webtier@glassfish.java.net

Re: [webtier] JSF2: how to set value to managed bean when clicking on table cell?

From: Lincoln Baxter, III <lincolnbaxter_at_gmail.com>
Date: Sun, 24 Jan 2010 22:48:36 -0500

Not sure how to specifically attach that event to the entire TD, but... this
might help:

http://ocpsoft.com/java/jsf-java/jsfs-hdatatable-vs-uirepeat-how-to-get-the-selected-row/

--Lincoln

On Sun, Jan 24, 2010 at 10:46 PM, <webtier_at_javadesktop.org> wrote:

> Hello,
>
> How can I define an action or event when clicking on a table cell (<td
> onclick='....'>) to set a specific value to the managed bean property?
>
> For example,
>
> @ManagedBean(name="myBean")
> @SessionScoped
> class MyBean {
> private List<String> values = new ArrayList<String>();
>
> private void setValues(List<String> vals) {
> ...
> }
>
> private void getValues() {
>
> }
>
> private void addValue(String s) {
>
> }
> }
>
>
> in the index.xhtml
> <td id='jan_1' onclick='.....'>1</td>
>
>
>
> How can I set the call MyBean.addValue when clicking on the <td ....> ???
>
> Best regards,
> Eric
> [Message sent by forum member 'ericmacau' (ericmacau_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=382687
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>


-- 
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"