users@woodstock.java.net

Re: Add binding attribute to com.sun.webui.jsf.component.DropDown

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Thu, 05 Jun 2008 10:53:23 -0400

Please disregard this question. I've got it working now and I think I
understand why I do not need to manually add a "binding" attribute.

The DropDowns I created live inside of a PanelGroup, which was part of
my request scope page bean. The Restore View phase in JSF rebuilds the
page bean instances. The DropDown references I was storing in session
do not point to the new instances created by Restore View. To get
access to the restored instances, I need to load them from my page
bean's PanelGroup instance instead. The other issue I had was the
onChange script I generated was doing a refresh on itself instead of the
next DropDown in the coordinated list.


Thanks,
Ryan


Ryan de Laplante wrote:
> Hi again,
>
> Once I got the coordinated dropdown lists working with AJAX I set out
> to make it work with my dynamically generated dropdown lists (custom
> fields). I think what I coded would work if I could add the
> equivalent of binding="#{Page1.dropDownX}" to the
> com.sun.webui.jsf.component.DropDown instance. The DropDown
> instances my code creates are added into a PanelGroup instance, which
> is rendered using <h:panelGroup binding="#{Page1.optionsPanel}"/>. I
> also keep a reference to the DropDown instances in a LinkedHashMap so
> that I can somehow use it for binding.
>
> There doesn't seem to be a way for me to add a binding attribute to
> DropDown from code. I was able to add a valueChangeListener, and
> onChange JavaScript code. That part of it works.
>
>
>
> Thanks,
> Ryan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>
>