wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts 2: Strange <s:textfield> prepopulation issue. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2: Strange <s:textfield> prepopulation issue." Watch "Struts 2: Strange <s:textfield> prepopulation issue." New topic
Author

Struts 2: Strange <s:textfield> prepopulation issue.

Alia Huss
Ranch Hand

Joined: Feb 13, 2009
Posts: 63
Hello!

When clicking a link for updating user information one of 6 fields doesn't get populated.

Here's the jsp code:
UpdateUser.jsp

The <s:textfield> that doesn't get populated is "phone"

In my action class I have the following code:


When the action's execute is called the value of phone is set with a value Ex. 0708090909

Any idea why this particular field isn't getting populated?
I can't see any typo's and by debugging I have established that the value of phone (in the action class) is set to something (not null and not an empty String)

Thanks
Alia
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

We'd have to see more information; I don't see anything obvious that would cause it not to be populated.
Alia Huss
Ranch Hand

Joined: Feb 13, 2009
Posts: 63
It was a typo afterall, I had set the getter as private, not public.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Teh <s:debug/> tag might help. Posting the config and action could also provide a clue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2: Strange <s:textfield> prepopulation issue.
 
Similar Threads
Combobox question.
unable to get next form
problem in printing the values
NullPointerException at the SessionFactory create line.
struts2 textfield tag not populating with correct value from action class