9 Replies Latest reply on Jul 18, 2008 1:35 AM by Arulkumar Kandasamy

    Skin update form question

    Gregory L Newbie

      Hi
      I have made a form for changing richfaces skin. Everything works fine for now, but when I nest this form inside the simpleTogglePanel component the chosen skin will not be applied.
      Can you tell me why ?

        • 1. Re: Skin update form question
          Ilya Shaikovsky Master

          in our demo there is next hierarchy:

          form - togglePanel - skin switcher inside.

          as you could see it works

          please add your snippets.

          • 2. Re: Skin update form question
            Gregory L Newbie

             

            "ilya_shaikovsky" wrote:
            in our demo there is next hierarchy:

            form - togglePanel - skin switcher inside.

            as you could see it works

            please add your snippets.


            Ok It works that way, but the question remains why it could not work the other way? If I place this panel and many other components and forms inside of it could they also not work ?

            • 3. Re: Skin update form question
              Ilya Shaikovsky Master

              again.. please show code that doesn't works. It'll be better than theoretical discussion :)

              • 4. Re: Skin update form question
                Gregory L Newbie

                 

                "ilya_shaikovsky" wrote:
                again.. please show code that doesn't works. It'll be better than theoretical discussion :)


                <rich:simpleTogglePanel opened="false" switchType="client" label="Skin chooser" >
                <h:form>
                 <h:outputText value="skin name: " />
                 <h:inputText value="#{skinBean.skin}" />
                </h:form>
                </rich:simpleTogglePanel>
                

                And skinBean is application scope managed-bean defined in /WEB-INF/faces-config.xml with "skin" property of type java.lang.String

                • 5. Re: Skin update form question
                  Ilya Shaikovsky Master

                  And where some submit control?

                  • 6. Re: Skin update form question
                    Gregory L Newbie

                     

                    "ilya_shaikovsky" wrote:
                    And where some submit control?


                    You just change value of inputText control and press Enter. Then the form is submitted and skin is changed. It always work as it should be but if the form is nested inside simpleTogglePanel it doesn't work.

                    • 8. Re: Skin update form question
                      Gregory L Newbie

                       

                      "ilya_shaikovsky" wrote:
                      Yes, you're right.. Thanks!

                      http://jira.jboss.com/jira/browse/RF-3799


                      Thanks for submitting this issue. I have one more question regarding the case with h:form outside of rich:simpleTogglePanel. I don't know why skins gets changed only after second attempt/after second form submit. First submit does nothing.. ? How can I change skin with the first attempt.

                      • 9. Re: Skin update form question
                        Arulkumar Kandasamy Newbie

                        I am also using rich:simpleTogglePanel and facing the same problem
                        ( Save is not happening in first submit). I changed the switchtype to "ajax" and this issue is solved.
                        But this created one more issue i.e toggle panel in opened state when reloading the page. I tried with attribute opened="false" but this did't solve the problem.
                        Can anybody share your thoughts in this issue

                        One more problem with switchtype "client" is even though save is happening on second submit it takes long time(one minute) sporadically
                        (normal is 5 seconds)

                        
                        <rich:simpleTogglePanel switchType="ajax" id="extInfo" label="Extended Information" styleClass="completeWidth" headerClass="togglePanelInput" bodyClass="togglePanelContent" opened="false" reRender="extInfo" limitToList="true">
                        <h:panelGrid columns="3" columnClasses="simpleToggle1,simpleToggle2,simpleToggle3" styleClass="completeWidth">
                        <h:outputText styleClass="textLabel" value="Local code :" />
                        <rich:spacer/>
                        <h:inputText id="editLocalCode" value="#{assetDataMgdBean.mediaAsset.localCode}" styleClass="togglePanelInputText inputValue" maxlength="100" tabindex="13" readonly="#{initAssetMgdBean.readOnlyPermission}"/>
                         </h:panelGrid>
                        </rich:simpleTogglePanel>