tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Salamanca" <Juan.Salama...@ioko.com>
Subject RE: t5: getting checkbox value
Date Wed, 03 Dec 2008 10:44:12 GMT
You can use the clientId attribute of the component, which is the same
as the HTML ID that tapestry generates. One way of doing it would be to
inject the component in your class, e.g.:
@Component 
Private Checkbox processed

And then write a getter method like:

Public String getProcessedClientId() {
	Return processed.getClientId();
}

You can access this method as a property in your template, like:
${processedClientId}

Also, you may try accessing the attribute directly in your template as
something like: ${processed.clientId}. This should also work.

Cheers. 

-----Original Message-----
From: Angelo Chen [mailto:angelochen960@yahoo.com.hk] 
Sent: 03 December 2008 09:56
To: users@tapestry.apache.org
Subject: t5: getting checkbox value


Hi,

I put following form in a look, so the rendered text will have
id="processed_01", id="processed_02", etc. and I'd like to capture the
id
and pass it to updateProc javaScript function, any idea? actually I need
to
pass the state of the check box to updateProc, maybe there is other way?
thanks.

< t:form t:clientValidation="false">
      <input t:type="Checkbox" t:id="processed" value="currentUsr"
           onchange="updateProc(?)"/>
< /t:form>
-- 
View this message in context:
http://www.nabble.com/t5%3A-getting-checkbox-value-tp20809885p20809885.h
tml
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


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


Mime
View raw message