« Return to Thread: getting form FORM to Java Object (JSF)

RE: getting form FORM to Java Object (JSF)

by mikewse :: Rate this Message:

Reply to Author | View in Thread

Hi Sudheer,

I have two suggestions:
- use the latest stable release of DWR, which is 2.0.3 (with 2.0.4
  coming out soon)
- show us the resulting HTML in the browser of your input form (do
  a View Source and cut out the interesting part) and it will be
  easier for us to help you

Best regards
Mike Wilson

> -----Original Message-----
> From: sudheerp [mailto:p_sudheers@...]
> Sent: den 24 april 2008 12:26
> To: users@...
> Subject: [dwr-user] getting form FORM to Java Object (JSF)
>
>
> Hello,
>
>    I am new two DWR, I am using dwr-1.1.1 with JSF (myfaces
> 1.1.4). I want
> to
> populcate the Category object from the following JSF form.
>
>
> <h:panelGrid columns="3">
>
>     <h:outputLabel styleClass="desc" for="category"
> value="#{text['category.category']}"/>
>
>     <h:inputText styleClass="text large" id="catCategory"
> value="#{categoryForm.category.category}"/>
>
>     <h:panelGroup styleClass="buttonBar bottom">
>         <h:commandButton type="button" value="#{text['button.save']}"
> onclick="assignCategory();" id="save" styleClass="button"/>
>
>         <c:if test="${not empty categoryForm.category.id}">
>         <h:commandButton value="#{text['button.delete']}"
> action="#{categoryForm.delete}"
>             id="delete" styleClass="button"
> onclick="bCancel=true; return
> confirmDelete('Category')"/>
>         </c:if>
>
>         <h:commandButton value="#{text['button.cancel']}"
> action="cancel"
> immediate="true"  
>             id="cancel" styleClass="button" onclick="bCancel=true"/>
>     </h:panelGroup>
>     <h:outputText/><h:outputText/>
> </h:panelGrid>
>
>    I tried the following piece of code to get values from
> form fields to
> Category object.
>
> var cat = { catId:"", catCategory:"" };
> DWRUtil.getValues( cat );
>
>
>    but I am getting null values here.
>
>    Please help.
>
>    Thank you.
>
> Sudheer.
>
>
> --
> View this message in context:
> http://www.nabble.com/getting-form-FORM-to-Java-Object-%28JSF%
> 29-tp16849569p16849569.html
> Sent from the DWR - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: getting form FORM to Java Object (JSF)