Never done this before,
But ${js.get('name1')} should show you your value.
See http://www.json.org/javadoc/org/json/JSONObject.html for more info
-Original Message-
From: Angelo C. [mailto:angelochen...@gmail.com]
Sent: Friday 4 February 2011 03:51
To: users@tapestry.apache.org
Subject: T5: getting json value in tml
Hi,
How to get the value of a json object in tml file, following does not work:
in page class:
public JSONObject getJS() {
JSONObject js = new JSONObject();
js.put("name1","123");
return js;
}
in the tmp,
${js} // this shows key/value pair
${js.name1} // does not show anything
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/T5-getting-json-value-in-tml-tp3370385p3370385.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
Atos Worldline SA/NV - Chaussee de Haecht 1442 Haachtsesteenweg
- 1130 Brussels - Belgium
RPM-RPR Bruxelles-Brussel - TVA-BTW BE 0418.547.872
Bankrekening-Compte Bancaire-Bank Account 310-0269424-44
BIC BBRUBEBB - IBAN BE55 3100 2694 2444
"The information contained in this e-mail and any attachment thereto is
confidential and may contain information which is protected by intellectual
property rights.
This information is intended for the exclusive use of the recipient(s) named
above.
This e-mail does not constitute any binding relationship or offer toward any of
the addressees.
If you are not one of the addressees , one of their employees or a proxy holder
entitled to hand over this message to the addressee(s), any use of the
information contained herein (e.g. reproduction, divulgation, communication or
distribution,...) is prohibited.
If you have received this message in error, please notify the sender and
destroy it immediately after.
The integrity and security of this message cannot be guaranteed and it may be
subject to data corruption, interception and unauthorized amendment, for which
we accept no liability."
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org