Since T5's redirect after post, there needs some extra work to pass value
between pages, and you have to make sure that the value must be in the
activation context in the next page.
In your PageToCreate.java:
@PageActivationContext //make sure the value in the context
@Property
private String textToSet;
public initialize(String textToSet) {
this.textToSet = textToSet;
}
In your PageToCreate.tml
<input t:type="textfield" t:value="textToSet"/>
DH
http://www.gaonline.com.cn
----- Original Message -----
From: "Joshua Martin"
To: <[email protected]>
Sent: Thursday, August 06, 2009 11:15 AM
Subject: TextField Setting Text
> How do I set the text for a TextField programatically?
>
> I'm redirecting to a page I create programatically like this, and I
> need to set the text with Strings I'm passing from my starting page:
>
> @InjectPage
> private PageToCreate page;
>
> Object onAction()
> {
> String textToSet = "Me the text";
>
> return page.initialize(textToSet);
> }
>
> --
> _________________________________
>
> Joshua S. Martin
>
>
> CONFIDENTIALITY NOTE: This e-mail message, including any
> attachment(s), contains information that may be confidential,
> protected by the attorney client or other legal privileges, and or
> proprietary non public information. If you are not an intended
> recipient of this message or an authorized assistant to an intended
> recipient, please notify the sender by replying to this message and
> then delete it from your system. Use, dissemination, distribution, or
> reproduction of this message and or any of its attachments (if any) by
> unintended recipients is not authorized and may be unlawful.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>