1 Reply Latest reply on Mar 23, 2013 6:40 AM by songjinglim

    After redirect, <f:selectItems> can't get the value

    songjinglim Newbie

      This situation is ood when I deploy to GAE.  It work fine on my local.  Don't know is that due to GAE only store session on client.


      Well, after using Google authentication, it redirect back to my xhtml page.  From there it will call a backbean and redirect to other pages based on condition.


         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

          <html xmlns="http://www.w3.org/1999/xhtml"









                  function myfunc() {

                      var buttonvar = document.getElementById("googleLoginForm:loginButton");





          <body onload="myfunc()">

              Google account login success... please wait while processing your CEA account....

              <h:form rendered="true" id="googleLoginForm">

                  <h:commandButton value="submit" id="loginButton" type="submit" immediate="true" style="visibility:hidden;"


                      <f:param name="resultComponentId" value="googleLoginLink" />   






      This work fine and in faces-config, for that xhtml (googleIdLogin) if return value is REQUEST_USER_PROFILES_SELECTION, then it will redirect to userProfilesSelection.xhtml.  And #{userProfileSelectionBean.userProfiles} will be init during the back bean action (#{guestSupportBean.authenticationGoogle}).








                  <redirect />




      userProfileSelection.xhtml will display a list of user profiles in drop down selection, this work fine on my local but not when deploy to GAE.


          <rich:select id="userProfile"


              defaultLabel="#{msg.clickToSelect} #{msg.title}">

              <f:selectItems value="#{userProfileSelectionBean.userProfiles}" />



          <h:commandButton value="#{msg.selectUserProfile}" type="submit"




      I try to printout the bean value, it is null seem like I receive another bean after redirect.


      Well...  if I take out indirect using forward.  Now the <f:selectItems> will have value.  The problem is the the commonButton didn't trigger call to back bean action (#{userProfileSelectionBean.selectUserProfile}".


      Here the summary:

      - if using redirect then the <f:selectItems> will not get the value

      - if not using redirect, <f:selectItems> fill with the value but <h:commandButton> not trigger bean bean action.