1 Reply Latest reply on Oct 20, 2009 7:05 AM by ilya_shaikovsky

    rich:page and one form

      Hi,

      I have a question regarding the rich:page tag:

      I have a facet for the sidebar (<f:facet name="sidebar">) the content of the page:

       <f:facet name="sidebar">
       <a4j:form>
       <rich:panel>
       <f:facet name="header">
       <h:outputText value="Options" />
       </f:facet>
       <ui:insert name="sidebar" />
       </rich:panel>
       </a4j:form>
       </f:facet>
       <a4j:form>
       <ui:insert name="content" />
       </a4j:form>
      


      The following code is inserted into sidebar:
       <ui:define name="sidebar">
       <a4j:commandLink value="Save List" action="#{listAdmin.saveList}" reRender="listAdminContent"/>
       </ui:define>
      


      Moreover, I have a textbox in the content.

      When I click the save link now, the content of the text box is not saved (because it is in a different form, therefore logical). How can I achieve that the content of the text box is saved when I click the button?

      I tried to surround everything with one form tag, but than the layout is destroyed.

      Does anybody know how to solve this?

      Thanks

        • 1. Re: rich:page and one form
          ilya_shaikovsky

          https://jira.jboss.org/jira/browse/RF-8007

          I see next workarounds:

          1) Redefinition of the theme markup as defined in wiki and dev guide.
          2) Not using sidebar which built-in to page but define layout nested to page instead with two layout panels (one for sidebar and one for body). And wrap this layout with form.
          3) using jsFunction calls to submit the main form from sidebar control onclick's. (looks weird and hardly maintainable for me)