Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action Form not populate with JSP hidden value

 
thomas jacob
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP

<input type="hidden" id="projIds"/>

The hidden id is populated in the JSP not shown here


struts-config.xml

form-bean name="myForm"
type="com.MyForm"/>

ActionForm

public class MyForm extends ActionForm{

private String projIds;

public String getProjViewIds() {
return projIds;
}

public void setProjViewIds(String projViewIds) {
this.projIds = projIds;
}
}

Action mapping
<action path="/doit"
name="myForm"
type="com.MyAction"
validate="true">
</action>

I am not able to populate to the ActionForm with the JSP hidden field

What am I doing wrong?

Thanks
Thomas
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which error/exception you got?
And your ActionForm code is not valid bean, there is NO getter/setter methods for the property "projIds"
 
thomas jacob
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry the ActionForm is

private String projViewIds;

public String getProjViewIds() {
return projViewIds;
}

public void setProjViewIds(String projViewIds) {
this.projViewIds = projViewIds;
}

However I am not able to populate the actionform with the hidden variable
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's still no getter/setter methods for the property "projIds"...

Please use "code" tags when posting source; it's much easier to read. Thanks!
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thomas jacob wrote:
private String projViewIds;

public String getProjViewIds() {
return projViewIds;
}

public void setProjViewIds(String projViewIds) {
this.projViewIds = projViewIds;
}

This is changed, but what about this ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic