You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mark Huang <kp...@mysinamail.com> on 2005/02/07 11:03:10 UTC

PropertySelection usage

Dear all,

I have encountered a problem when using PropertySelection.
Hope someone can help me fix it.

MyPage.page specification:
<component name="selection" type="PropertySelection">
<binding name="model" value="someModel" />
<binding name="value" value="myValue" />
</compoenent>

MyPage.html:
<form ...>
<select jwcid="selection" />
</form>

Rendered output is:
<form action="somelistener..">
<select name="selection">
<option value="0"> Hello1 </option>
<option value="1"> Hello2</option>
</select>
</form>

I find that the component model does not work,
when the form is submitted, the getMyValue return "".
There is something wrong in the code. If the component is
properly rendered, then the select tag should look like
<select name="$selection">
...
</select>

Any help will be appreciated. Thank you.



===================================================================
�K�O46��^�y�|�ܯZ�A�ߧY�d�ߡI
http://adimages.sina.com.hk/Lingua_0205.html
GT4 Bible���媩  �W�a�u���w�q
http://game.sina.com.hk/event05/gt/
MySinaMail�G�l�c + ��ï + �ӤH���� = 101MB
http://mysinamail.sina.com.hk/
===================================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: PropertySelection usage

Posted by Kent Tong <ke...@cpttm.org.mo>.
Mark Huang <kphuang <at> mysinamail.com> writes:

> 
> Dear all,
> 
> I have encountered a problem when using PropertySelection.
> 
> Hope someone can help me fix it.

It seems that you're not using Spindle. Your .page file
contains several errors that would have been detected
by Spindle immediately:

> MyPage.page specification:
> 
> <component name="selection" type="PropertySelection">
> <binding name="model" value="someModel" />
> <binding name="value" value="myValue" />
> </compoenent>

try:

<!-- use "id", not "name" -->
<component id="selection" type="PropertySelection">
<!-- use "expression", not "value" -->
<binding name="model" expression="someModel" />
<binding name="value" expression="myValue" />
</compoenent>




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org