Hi Varma,

i have no experience with 'thirdparty AJAX frameworks', but i don't
think they work with tobago.

But you can do this with the tobago internal ajax partial reload feature.

put the second tc:selectOneChoice into a tc:panel with defined
clientId ( this means you set a id to this panel and to all
surrounding namingContainer components).

add a 'change' facet to the first tc:selectOneChoice with a action to
change the options for the second one, and a renderedPartially
attribute to update.

--- jsf ------------------------
<tc:page id="page">
...
<tc:selectOneChoice ...>
 <f:selectItems .../>
 <f:facet name="change">
   <tc:command action="#{bean.selectOptions}">
     <tc:attribute name="renderedPartially" value=":page:panel"/>
   </tc:command>
 </f:facet>
</tc:selectOneChoice>

<tc:panel id="panel">
 <tc:selectOneChoice ...>
   <f:selectItems value="#{bean.items2}"/>
 </tc:selectOneChoice>
</tc:panel>
...
</tc:page>
--- /jsf ------------------------

the action method "public String selectOptions() {...}" should update the
selectItems in items2 property.
And MUST return null, because you don't want to navigate to anohter view.

Regards,
 Volker


2007/2/12, Varma Dendukuri <[EMAIL PROTECTED]>:
Hi All,

I have a usecase where i need to dynamically change the values(Options) of a
ListBox [<tc:selectOneChoice>] based on a value selected in another ListBox
or based on the value entered in a textbox[<tc:in>]. At present i have
achieved this using changeEventListener in which the form is submitted to
the server. But i dont want to go to server to get the values. Wanna do that
using AJAX.

So is there a way that we can achieve this with the thirdparty AJAX
frameworks like YUI, ScriptAculoUs, ProtoType etc.

It would be great if someone can provide any kinda examples ?

Thanks in Advance.

Regards,
Varma


Reply via email to