Skip to main content

[webtier] f:ajax issue with h:dataTable

2 replies [Last post]
Anonymous

I'm trying to use the f:ajax to re-render a datatable when I click on a
checkbox. When I click the checkbox the table would never re-render, but
during debug I saw that updateCustomer listener method would be called.
However if I changed the ajax tag to * * to re-render the form, it would work perfectly.
Any ideas?

*----- Page ------*

* *

*--- CustomerBean ----*

private HtmlDataTable custTable;
private List customers;

public void updateCustomer(final ValueChangeEvent event)
{
Customer cust = (Customer) custTable.getRowData();
customers.remove(cust);
}

--
Derek Hollis
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jim Driscoll

Wouldn't you have to say

?

Jim

On 2/17/09 7:49 PM, Derek Hollis wrote:
> I'm trying to use the f:ajax to re-render a datatable when I click on a
> checkbox. When I click the checkbox the table would never re-render, but
> during debug I saw that updateCustomer listener method would be called.
> However if I changed the ajax tag to * > render="customerUpdate" />* to re-render the form, it would work
> perfectly. Any ideas?
>
> *----- Page ------*
>
>
> > var="cust" value="#{customerBean.customers}" styleClass="tbl"
> rowClasses="odd, even">
>
>
>
>

>
>

>
>
>
>

>
>

>
>
>
>

> > valueChangeListener="#{customerBean.updateCustomer}"
> value="#{customerBean.frontShelf}">
> * *
>

>

>

>

>
>
> *--- CustomerBean ----*
>
> private HtmlDataTable custTable;
> private List customers;
>
> public void updateCustomer(final ValueChangeEvent event)
> {
> Customer cust = (Customer) custTable.getRowData();
> customers.remove(cust);
> }
>
>
> --
> Derek Hollis

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Lincoln Baxter, III

Hmm... that didn't work, but re-rendering the form does:

Seems odd to me...

On Wed, 2009-02-18 at 13:26 -0800, Jim Driscoll wrote:

> Wouldn't you have to say
>
>
>
> ?
>
> Jim
>
> On 2/17/09 7:49 PM, Derek Hollis wrote:
> > I'm trying to use the f:ajax to re-render a datatable when I click on a
> > checkbox. When I click the checkbox the table would never re-render, but
> > during debug I saw that updateCustomer listener method would be called.
> > However if I changed the ajax tag to * > > render="customerUpdate" />* to re-render the form, it would work
> > perfectly. Any ideas?
> >
> > *----- Page ------*
> >
> >
> > > > var="cust" value="#{customerBean.customers}" styleClass="tbl"
> > rowClasses="odd, even">
> >
> >
> >
> >

> >
> >

> >
> >
> >
> >

> >
> >

> >
> >
> >
> >

> > > > valueChangeListener="#{customerBean.updateCustomer}"
> > value="#{customerBean.frontShelf}">
> > * *
> >

> >

> >

> >

> >
> >
> > *--- CustomerBean ----*
> >
> > private HtmlDataTable custTable;
> > private List customers;
> >
> > public void updateCustomer(final ValueChangeEvent event)
> > {
> > Customer cust = (Customer) custTable.getRowData();
> > customers.remove(cust);
> > }
> >
> >
> > --
> > Derek Hollis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
[att1.html]