In my HTML page, there is a button new and a button modify, when I click the button new, a new page will show with an empty single line text field, the code of the text field is:
<input type="text" name="functionInfo.paramsText"/>
so I can input some text in the text field and save it into the database (the data will be put to Java and saved into a database), this is exactly what I want, but when I click modify to modify a text which has been stored in the database, the new page is shown with an empty text field, how can I get a text field with the stored text shown on it? So I can see what I have saved before.
If you use Struts tags then it's simply
The
valuewill be set via evaluating OGNL expression in thenameattribute. You only need to provide a beanfunctionInfowith propertyparamsTextand getters for both.If you put a bean to the action class, then using a getter it's accessible from the value stack via OGNL since the action bean is on top of the value stack.