Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
06. Aug 2008, 11:58 CET | Link

Hi ,
   I have a page designed in richfaces , i have added my components like texfield and textarea,command button inside a different rich panel under different form and the forms are inside the a4joutputPanel , iam re-rendering the output panel based on the selection from a different component , when i render the second panel , the field values inside the first output panel is cleared. Please suggest me how to get those values....

Here is my code snippet.
   <a4j:outputPanel id="p1">
   <h:form>
   <rich:panel><h:inputText id="t1" value="#{backBean.t1}" /></rich:panel>
   </h:form></a4j:ouputPanel>
   <a4j:outputPanel id="p2">
   <h:form>
   <rich:panel><h:inputText id="t2" value="#{backBean.t2}" /></rich:panel>
   </h:form></a4j:ouputPanel>
   <a4j:outputPanel id="p1">
   <h:form>
   <rich:panel><h:commandButton action="#{backBean.update}"></h:commandButton></rich:panel>
   </h:form></a4j:ouputPanel>

 

Thanks Muruga

3 Replies:
06. Aug 2008, 12:15 CET | Link

Because it's unpossible to submit multiple forms at once.

 

The human knowledge belongs to the world

06. Aug 2008, 13:33 CET | Link
Hi Adrian,
   Thanks for your reply, Can you suggest me how to post all the field values which is inside a seperate output panel .. iam using a4j support to re-render the panel whenever i re-render a new output panel ,the values entered in the previous output panel was cleared, and after submiting the page it does nothing and returning to the same page ... Will this code work ??

<a4j:outputPanel id="p1">
    <rich:panel><h:inputText id="t1" value="#{backBean.t1}" /></rich:panel>
  </a4j:ouputPanel>
   <a4j:outputPanel id="p2">
   <rich:panel><h:inputText id="t2" value="#{backBean.t2}" /></rich:panel>
   </a4j:ouputPanel>
       <h:form>
   <rich:panel><h:commandButton action="#{backBean.update}"></h:commandButton></rich:panel>
   </h:form>
 
 

Thanks Muruga

06. Aug 2008, 16:08 CET | Link
Arbi Sookazian

In your first code example, not sure why you need so many a4j:outputPanel and h:form components...

I didn't even see a reRender attribute anywhere...

Try this and reRender panel1, form1 or individual h:inputText components as required. Keep it simple!

<rich:panel id="panel1">
     <h:form id="form1">
         <h:inputText id="t1" value="#{backBean.t1}"/>
         <h:inputText id="t2" value="#{backBean.t2}"/>
         <h:commandButton action="#{backBean.update}"/>
     </h:form>
</rich:panel>