You can't nest forms. Just remove the nested form definitions. You're done.

On 12 Oct 2005, at 17:42, Jeffrey Porter wrote:

 
Hello all,
 
I’m a little stuck & need some guidance.
 
I have a web page with 2 forms on it. (Bean01 & Bean02).
I want to be able to have the user click a button and then behind the scenes take the data from these 2 beans and persist it.
I’m not sure how to do this & require someone pointing me in right direction.
 
Example of what I’m trying… (I know this wont work, I’d like to know what I should do)
 
<h:form>
 
<h:form form1" >
      <h:inputText name01" value="01" maxlength="10" size="15" true" />
      </h:form>
 
      <h:form form2" >
      <h:inputText name02" value="02" maxlength="10" size="15" true" />
      </h:form>
 
                 
      <h:commandButton value="Create" />
</h:form>
 
 
   public String saveBeans() {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        VariableResolver vr = facesContext.getApplication().getVariableResolver();
       
        Bean01 bean01 = (Bean01) vr.resolveVariable(facesContext, "bean01");
        Bean02 bean02 = (Bean02) vr.resolveVariable(facesContext, "bean02");
       
        //insert any bus logic here
        return ("sucesss");
    }
 
 
 
Thanks
Jeff

<x-tad-smaller>Met vriendelijke groeten,

Jan Dockx
</x-tad-smaller><x-tad-smaller>
PeopleWare NV - Head Office</x-tad-smaller>
<x-tad-smaller>
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66 </x-tad-smaller>
<x-tad-bigger>
</x-tad-bigger>
<x-tad-smaller>
PeopleWare NV - Branch Office Geel</x-tad-smaller>
<x-tad-smaller>
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25</x-tad-smaller>
<x-tad-bigger>
</x-tad-bigger>
<x-tad-smaller>
http://www.peopleware.be/
</x-tad-smaller><x-tad-smaller>http://www.mobileware.be/</x-tad-smaller>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to