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

getting form FORM to Java Object (JSF)

by sudheerp :: Rate this Message:

Reply to Author | View in Thread

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.

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