Hi all,
I'm trying to show different components with the same id using an If component, but when I run the app it says that i have multiple components with the same id, so it throws exception error.

For example:

<span jwcid="@If" condition="ognl:isMale">
<select jwcid="[EMAIL PROTECTED]" model="ognl:person" value="ognl:person"/>
</span>
<span jwcid="@Else">
   <span jwcid="[EMAIL PROTECTED]" value="literal:notMale"/>
</span>

Why i'm trying to do this? Becouse i'm refreshing this component with the same id with UpdateComponent from an EventListener. In this example, if is not a Male, the user can click a button and ask again if it's a Male, so i'll update the same component if now it's male.

The problems rather in the eventlistener, becauso if I use diferent eventlisteners with diferents components id it will be necesary to have both components displayed and loaded, but i want that only one will... so i'm trying to use the same id, but tapestry doesn't let me.

Other clasic example is when i make a form with a Country and State ListBoxs. When you select the country it calls an eventlistener that will read from the database the States and update the state component, but if in one country haves regions and not states, the component if diferent (due to different objects), but you have to use the same id to receive the information in the form.

How do I do this?! Maybe my problem is that i'm using auto-generation dojo ajax code from tapestry with eventlistener.. so i have to make the dojo code by myself?
Any ideas?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to