Skip to main content

Datatable+ajax

3 replies [Last post]
gabox01
Offline
Joined: 2007-04-22
Points: 0

Hi,

I have a dataTable, and at every row, there is an inputBox component. When the user clicks away from any of these components, i want to refresh the InputBoxes. I don't want to refresh, the whole dataTable, just only those, whose reside in the same column, that the one, that generated the event.

My current solution is:

this is slow like hell.

How can i do this?

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
driscoll
Offline
Joined: 2003-06-06
Points: 0

You're trying to put a square peg into a round hole.

HTML Tables are row based, not column based. That makes selecting "columns" (which don't actually exist in the HTML) hard.

You could label the columns with columnClasses from DataTable, then write a JS selector (or use something like jQuery) that grabbed all the ids with that style class, then submitted that with jsf.ajax.request.

Or, you could use an Ajaxified DataTable that someone else already wrote, taking advantage of JSF's component based architecture...

Guess which one I'd do :-)

The only problem with using someone else's DataTable is that JSF 2.0 is so new I don't know that any framework is past the alpha stage of their 2.0 component set.

gabox01
Offline
Joined: 2007-04-22
Points: 0

It would be nice to have a regexp based selector out of the box.
Thanks anyway.

Jim Driscoll

Almost every JS library provides one. Try jQuery.

Sent from my iPhone

On Oct 28, 2009, at 3:55 AM, webtier@javadesktop.org wrote:

> It would be nice to have a regexp based selector out of the box.
> Thanks anyway.
> [Message sent by forum member 'gabox01' (beres.gabor@gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=369599
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

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