You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by nunurs <ma...@gmail.com> on 2011/12/13 11:56:08 UTC
Refresh a textField
Hello,
I have this TextField linked with the attribute codeAgent of my object
comment :
*final* TextField<String> codeAgent = *new* TextField<String>("codeAgent",
new PropertyModel<String>( comment, "codeAgent"));
I want to change in java the value of codeAgent, can you tell me, if it is
possible, how also changed the value displayed by this textField on my web
page ?
Thanks
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Refresh-a-textField-tp4190022p4190022.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Refresh a textField
Posted by nunurs <ma...@gmail.com>.
In fact i put this textField into a table with an id like this :
<table style="margin-left: 30px;" <b>wicket:id="commentZone"*>
<tr>
<td>Comment</td>
<td>
<textarea wicket:id="codeAgent"></textarea>
</td>
</tr>
</table>
On the same web page i have an AjaxButton, which allows to search, into a
list of object, the object with the codeAgent set at the value of the
textfield below and fill the others component of my table.
The java code looks like :
add (new AjaxButton("Search") {
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
// research code and set to "comment" the object found
[...]
// update the commentZone
target.add(commentZone);
}
});
The research code works fine but passed the update of the commentZone, all
the component stays empty even if my object comment contains data...
sorry for my english :s
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Refresh-a-textField-tp4190022p4190930.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Refresh a textField
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
You can change comment's codeAgent. The next time the text field is
rendered it will show the new value.
On Tue, Dec 13, 2011 at 12:56 PM, nunurs <ma...@gmail.com> wrote:
> Hello,
>
> I have this TextField linked with the attribute codeAgent of my object
> comment :
> *final* TextField<String> codeAgent = *new* TextField<String>("codeAgent",
> new PropertyModel<String>( comment, "codeAgent"));
>
> I want to change in java the value of codeAgent, can you tell me, if it is
> possible, how also changed the value displayed by this textField on my web
> page ?
>
> Thanks
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Refresh-a-textField-tp4190022p4190022.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org