On Jan 3, 2013, at 3:17 PM, Thiago H de Paula Figueiredo wrote:

> On Thu, 03 Jan 2013 15:44:12 -0200, owzim <tapes...@owzim.com> wrote:
> 
>> how can I set a value of any input field client side and have it transfered 
>> properly to the backend.
> 
> The easiest way is just using the Tapestry form field components.

Or do you mean via JavaScript and Prototype, e.g. $('myTextFieldID').value = 
'whatever';

>> I've tried many different approaches, like hidden input fields and such, but 
>> "value" is mandatory within the tml,
> 
> Your sentence above doesn't compute. tml itself has nothing mandatory besides 
> being valid XML. Please post your attempts, otherwise we can only guess what 
> was wrong with them. You probably used the TextField component. For example:
> 
> <t:textfield value="someProperty"/>
> 
> @Property
> private String someProperty;

Yes, the value parameter is mandatory. That' tells Tapestry where to store the 
value. As noted earlier you can use regular HTML input fields to avoid this, 
but then you need to extract the value on the server yourself.

>> it has to be a proper tml/java
>> object/variable,
> 
> tml itself doesn't have objects.
> 
>> but thats not what I want, I want to set it client side and then post the 
>> value to the server. Mission impossible?
> 
> Absolutely not. Just provide use more information on how you tried to 
> implement and we'll help you.


Tapestry wouldn't be very useful if you couldn't transfer client input. 
However, there are a few ways of doing it depending on what the goal is.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



Reply via email to