Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Alia Huss
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was a typo afterall, I had set the getter as private, not public.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Teh <s:debug/> tag might help. Posting the config and action could also provide a clue.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic