text fields values insite ui:repeat or h:datatable are not posting to model

Splash Forums PrettyFaces Users text fields values insite ui:repeat or h:datatable are not posting to model

This topic contains 6 replies, has 2 voices, and was last updated by  vijayinder 6 years, 6 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #17897

    vijayinder
    Participant

    Hi,

    I am new to Faces-config. All is working fine except values inside dynamically created text fields inside ui:repeat or h:dataTable are not posting. values are not updating in corresponding list on submit of form.

    Can some one please help me on this ? Am I missing some thing here ?

    Thanks,

    Vijay

    #20811

    Hi Vijay,

    Could you post some example code of what you are trying to get working? Could you also post your versions of PrettyFaces and JSF? That would help us help you more easily :) Thanks.

    ~Lincoln

    #20812

    vijayinder
    Participant

    Hi Lincoln,

    Thanks for the immediate response.

    We are using jsf2 and PrettyFaces ‘prettyfaces-jsf2’ version ‘3.0.1’.

    Here is the code in jsf. Values in inputText are not available in bean after posting the form:

    <ui:repeat value=”#{orderBean.laundryOrder.washingServices}” var=”services”>

    <tr>

    <td width=”70%” align=”left”>

    <h:outputLabel value=”#{services.name}” style=”font-size: 25px;”/>

    </td>

    <td width=”30%” align=”center”>

    <h:inputText id=”quantity” class=”inlineTarget” value=”#{services.quantity}” style=”font-size: 25px;” size=”3″/>

    </td>

    </tr>

    <tr><td colspan=”2″><h:outputText value=” ” escape=”false”/></td></tr>

    </ui:repeat>

    Thanks,

    Vijay

    #20813

    vijayinder
    Participant

    here is the url mapping in pretty-config for above problem:

    <url-mapping id=”SaveOrder”>

    <pattern>/SaveOrder</pattern>

    <query-param name=”customerId”>#{orderBean.order.customerId}</query-param>

    <view-id>/WEB-INF/content/order/Order.xhtml</view-id>

    <action>#{orderController.saveOrder}</action>

    </url-mapping>

    #20814

    Vijay, could you also please post your bean, and where you have it configured with JSF (or with the Bean container) Thanks!

    Does this functionality work if you remove prettyfaces and access the page directly?

    #20815

    What you have looks fine so far..

    #20816

    vijayinder
    Participant

    Here is the bean configured in jsf and actual bean:

    /**

    */

    @ManagedBean

    @RequestScoped

    public class OrderController extends RokkitDeliveryController {

    private static final Logger LOGGER = Logger.getLogger(OrderController.class);

    @ManagedProperty(“#{orderBean}”)

    private OrderBean orderBean;


    Bean


    /**

    */

    @SuppressWarnings(“serial”)

    @ManagedBean

    @SessionScoped

    public class OrderBean{

    private Order order;

    /**

    * @return the order

    */

    public Order getOrder() {

    return this.Order;

    }

    /**

    * @param order

    */

    public void setOrder(final Order order) {

    this.order = order;

    }

    }

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Comments are closed.