You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Weisu <we...@gmail.com> on 2008/06/01 12:33:08 UTC

Re: t5-components MultipleSelect use

Hi Zack, please look at the t5component demo site @
http://87.193.218.134:8080/t5c-demo/multipleselectpage, the java source  @
http://tapestry5-components.googlecode.com/svn/trunk/demo/src/main/java/org/apache/tapestry/demo/pages/MultipleSelectPage.java,
the tml @
http://tapestry5-components.googlecode.com/svn/trunk/demo/src/main/resources/org/apache/tapestry/demo/pages/MultipleSelectPage.tml

zack1403 wrote:
> 
> @
> http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/components/MultipleSelect.html
> the docs say its not required but I guess I need it.  Do you have a
> snippet similar to what you gave for selectModel?  Or further
> documentation on initiating an instance of a select model
> 
> Thanks,
> Zack
> 
> Weisu wrote:
>> 
>> You need to define encoder in your tml file, this is my:
>> <td><select t:type="t5components/MultipleSelect" size="10"
>>             				encoder="selectModel" 
>>             				model="selectModel"
>>             				value="selectedDistricts"/>
>> </td>
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/t5-components-MultipleSelect-use-tp17524086p17584228.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: t5-components MultipleSelect use

Posted by zack1403 <za...@gmail.com>.
One last issue.... if i persist my list thats going into the value attribute
it all works fine until i refresh the page once.  At which point i get this:
object is not an instance of declaring class.  Any idea what that might be? 
Originates at
org.apache.tapestry.commons.models.GenericMultipleSelectModel.getOptions(GenericMultipleSelectModel.java:83)

Any thoughts?

Zack

zack1403 wrote:
> 
> That actually did help being able to look through the code (some links are
> broken from the 87.193.218.134 site).  My issue that I was trying hard to
> just have strings in the list.  It looks like a getter is required to pull
> a value so once i created an object with one attribute (value) i was able
> to get it working.  Is there a way I was missing to get it to work with
> just a list of strings? Are their plans for a multiple select checkbox
> component similar to this?
> 
> Thanks for the help,
> Zack
> 
> 

-- 
View this message in context: http://www.nabble.com/t5-components-MultipleSelect-use-tp17524086p17594119.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: t5-components MultipleSelect use

Posted by zack1403 <za...@gmail.com>.
That actually did help being able to look through the code (some links are
broken from the 87.193.218.134 site).  My issue that I was trying hard to
just have strings in the list.  It looks like a getter is required to pull a
value so once i created an object with one attribute (value) i was able to
get it working.  Is there a way I was missing to get it to work with just a
list of strings? Are their plans for a multiple select checkbox component
similar to this?

Thanks for the help,
Zack


Weisu wrote:
> 
> Hi Zack, please look at the t5component demo site @
> http://87.193.218.134:8080/t5c-demo/multipleselectpage, the java source  @
> http://tapestry5-components.googlecode.com/svn/trunk/demo/src/main/java/org/apache/tapestry/demo/pages/MultipleSelectPage.java,
> the tml @
> http://tapestry5-components.googlecode.com/svn/trunk/demo/src/main/resources/org/apache/tapestry/demo/pages/MultipleSelectPage.tml
> 
> zack1403 wrote:
>> 
>> @
>> http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/components/MultipleSelect.html
>> the docs say its not required but I guess I need it.  Do you have a
>> snippet similar to what you gave for selectModel?  Or further
>> documentation on initiating an instance of a select model
>> 
>> Thanks,
>> Zack
>> 
>> Weisu wrote:
>>> 
>>> You need to define encoder in your tml file, this is my:
>>> <td><select t:type="t5components/MultipleSelect" size="10"
>>>             				encoder="selectModel" 
>>>             				model="selectModel"
>>>             				value="selectedDistricts"/>
>>> </td>
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/t5-components-MultipleSelect-use-tp17524086p17588928.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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