• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Action Form not populate with JSP hidden value

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic