Re: [TOBAGO] SelectOneChoice and Rendered attribute

2010-03-22 Thread Helmut Swaczinna
The value of tc:attribute is *relative* to the enclosing naming container (page 
or subview). So value="panel" (or "box") should be correct. When you want to use 
an absolute id, you must preceed the concatenated id with an extra colon, e.g. 
":page:panel". When you see the value changing in the model, than the id should 
be correct.


You can try it without Ajax also. When you omit the tc:attribute tag, the whole 
page should be reloaded, when the value of the selectOneChoice changes.


Helmut

Am 20.03.2010 15:15, schrieb Udo Schnurpfeil:

You may have a type problem. Maybe the itemValue allows only Strings.
When you don't set immediate=true you will see an error in that case.
You can also use tc:selectItems with a class model. With that integer
value should work.

The value for tc:attribute is the clientId of the component: This is the
chain of all naming containers.
On a simple page, you have only tc:page as naming container. Put
id="page" then you need value="page:panel".
You can check the clientId in the HTML Source Code.

Am 19.03.10 19:40, schrieb Fernando Augusto:

Well...

Getting deeper in the problem, I've seen that the problem is in the
ajax return, for it does not change the content of the box (or panel).
I guess it is something related with the value passed as tc:attribute
value. I've seen in a few tutorials and codes around, that addressing
nested containers, you should use a long value, full of ":", but I
couldn't understand that part...

Can someone help me with that???

Fernando Augusto escreveu:

Hello,

I´ve seen that the AJAX part works and the value changes, but the
tx:date keeps hidden even with the right value... Any other newbie
mistake in the code?

Regards,

Fernando Augusto

Helmut Swaczinna escreveu:

I think, yes, this should work too.

Helmut

Am 19.03.2010 15:58, schrieb ferna...@osmanager.com.br:

Helmut,

Can I do it with the tc:box they are inside?

Regards,

Fernando Augusto


Hi Fernando,

add a command tag to the selectOneChoice and enclose the
selectOneChoice
and
date within a panel:











Now the panel gets reloaded by Ajax, when the selection changes.

Regards
Helmut













Re: [TOBAGO] SelectOneChoice and Rendered attribute

2010-03-20 Thread Udo Schnurpfeil

You may have a type problem. Maybe the itemValue allows only Strings.
When you don't set immediate=true you will see an error in that case.
You can also use tc:selectItems with a class model. With that integer 
value should work.


The value for tc:attribute is the clientId of the component: This is the 
chain of all naming containers.
On a simple page, you have only tc:page as naming container. Put 
id="page" then you need value="page:panel".

You can check the clientId in the HTML Source Code.

Am 19.03.10 19:40, schrieb Fernando Augusto:

Well...

Getting deeper in the problem, I've seen that the problem is in the 
ajax return, for it does not change the content of the box (or panel). 
I guess it is something related with the value passed as tc:attribute 
value. I've seen in a few tutorials and codes around, that addressing 
nested containers, you should use a long value, full of ":", but I 
couldn't understand that part...


Can someone help me with that???

Fernando Augusto escreveu:

Hello,

I´ve seen that the AJAX part works and the value changes, but the 
tx:date keeps hidden even with the right value... Any other newbie 
mistake in the code?


Regards,

Fernando Augusto

Helmut Swaczinna escreveu:

I think, yes, this should work too.

Helmut

Am 19.03.2010 15:58, schrieb ferna...@osmanager.com.br:

Helmut,

Can I do it with the tc:box they are inside?

Regards,

Fernando Augusto


Hi Fernando,

add a command tag to the selectOneChoice and enclose the 
selectOneChoice

and
date within a panel:











Now the panel gets reloaded by Ajax, when the selection changes.

Regards
Helmut













Re: [TOBAGO] SelectOneChoice and Rendered attribute

2010-03-19 Thread Fernando Augusto

Well...

Getting deeper in the problem, I've seen that the problem is in the ajax 
return, for it does not change the content of the box (or panel). I 
guess it is something related with the value passed as tc:attribute 
value. I've seen in a few tutorials and codes around, that addressing 
nested containers, you should use a long value, full of ":", but I 
couldn't understand that part...


Can someone help me with that???

Fernando Augusto escreveu:

Hello,

I´ve seen that the AJAX part works and the value changes, but the 
tx:date keeps hidden even with the right value... Any other newbie 
mistake in the code?


Regards,

Fernando Augusto

Helmut Swaczinna escreveu:

I think, yes, this should work too.

Helmut

Am 19.03.2010 15:58, schrieb ferna...@osmanager.com.br:

Helmut,

Can I do it with the tc:box they are inside?

Regards,

Fernando Augusto


Hi Fernando,

add a command tag to the selectOneChoice and enclose the 
selectOneChoice

and
date within a panel:




  

  




Now the panel gets reloaded by Ajax, when the selection changes.

Regards
Helmut












Re: [TOBAGO] SelectOneChoice and Rendered attribute

2010-03-19 Thread Fernando Augusto

Hello,

I´ve seen that the AJAX part works and the value changes, but the 
tx:date keeps hidden even with the right value... Any other newbie 
mistake in the code?


Regards,

Fernando Augusto

Helmut Swaczinna escreveu:

I think, yes, this should work too.

Helmut

Am 19.03.2010 15:58, schrieb ferna...@osmanager.com.br:

Helmut,

Can I do it with the tc:box they are inside?

Regards,

Fernando Augusto


Hi Fernando,

add a command tag to the selectOneChoice and enclose the 
selectOneChoice

and
date within a panel:




  

  




Now the panel gets reloaded by Ajax, when the selection changes.

Regards
Helmut









Re: [TOBAGO] SelectOneChoice and Rendered attribute

2010-03-19 Thread Helmut Swaczinna

I think, yes, this should work too.

Helmut

Am 19.03.2010 15:58, schrieb ferna...@osmanager.com.br:

Helmut,

Can I do it with the tc:box they are inside?

Regards,

Fernando Augusto


Hi Fernando,

add a command tag to the selectOneChoice and enclose the selectOneChoice
and
date within a panel:




  

  




Now the panel gets reloaded by Ajax, when the selection changes.

Regards
Helmut





Re: [TOBAGO] SelectOneChoice and Rendered attribute

2010-03-19 Thread fernando
Helmut,

Can I do it with the tc:box they are inside?

Regards,

Fernando Augusto

> Hi Fernando,
> 
> add a command tag to the selectOneChoice and enclose the selectOneChoice
> and 
> date within a panel:
> 
> 
> 
> 
>  
>  value="panel"/>
>  
>
> 
>  
> 
> 
> Now the panel gets reloaded by Ajax, when the selection changes.
> 
> Regards
> Helmut
> 



Re: [TOBAGO] SelectOneChoice and Rendered attribute

2010-03-19 Thread Helmut Swaczinna

Hi Fernando,

add a command tag to the selectOneChoice and enclose the selectOneChoice and 
date within a panel:






  

  



Now the panel gets reloaded by Ajax, when the selection changes.

Regards
Helmut

Am 19.03.2010 15:48, schrieb ferna...@osmanager.com.br:

Hello,
Here I am with another newbie question (I guess I'll start a blog devoted
for Tobago learning). I have the following problem:
I have a SelectOneChoice with specific values. When I change this value, I
want to make a few fields from the form to appear or disappear... I tried:

   






But that approach didn't worked as expected.

What can I do to make this TX:DATE to appear just after the
selectOneChoice change it's value to 3 and disappear with any other
value???

Best Regards,

Fernando Augusto