You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "BB@umd" <bb...@umd.edu> on 2009/06/15 22:40:45 UTC

Dynamic Select with Textarea.

Here is my problem : I created a DynamicSelect like this 
http://lombok.demon.co.uk/tapestry5Demo/test/components/dynamicselectdemo1source
one  which allow me to select a "Category" and then an "Application" from my
database.

Here is an extract of my tml :
<table>
		<tr>
			<td>Browse Category :</td>
			<td>Select Application :</td>
		</tr>
		<tr>
			<td><select t:type="parentSelect" t:id="categ" model="${category}"
value="prop:categ" /></td>
			<td><select t:type="childSelect" t:id="application" parent="categ"
models="childSelectModels" t:value="application"
defaultOptions="defaultOptions" /></td>
			<td><input type="submit" value="Add Application" /></td>
		</tr>
</table>

Now I would like to add the selected "Application" in a TextArea each time I
click on my submit button. Then the goal is to display this TextArea so that
a user can remove an applications of this textarea if finally he did not
want it.

Until now I managed to display it through a condition test like this :
<t:if test="application">          
     You have selected ${application}                            
</t:if>

However, I do not manage to store this value in my textarea. I mean, my
textarea do not read the content of its value when I click on my submit
button even if I put my textarea in a zone or a triggerfragment. Here is an
example :

file.java
void onSuccess() {		
	System.out.println("onsuccess :" +application); //this display correctly
the value in my terminal
	added=application;}

file.tml
<t:checkbox t:id="visible" t:mixins="triggerfragment"
fragment="currentlyselected" />
	<t:label for="visible">Show currently selected :</t:label>
	<t:formfragment t:id="currentlyselected" visible="visible">
		<t:textarea t:id="textarea" t:value="added" />		
	</t:formfragment>

Can someone help me ?
Thanks








-- 
View this message in context: http://www.nabble.com/Dynamic-Select-with-Textarea.-tp24042082p24042082.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