Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Not getting the variable values.

Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The value of workId is coming null in save method .Even i created the setter and getter method of workid.
But the value is not coming null in issueWork method.
Please help me.

This is my action class code
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
Where is workId supposed to be coming from?

Some general comments:
* misc: You have a Logger; use that instead of System.out.println.
* line 78: Your execute() method is returning "sucess", which is fine if you also misspelled it in the config file.
* lines 85-87: Don't get lazy; write something meaningful, even in your system.outs.
* lines 97-104: Simplify; all conditions result in the "add" result.
* lines 133 & 135: Unnecessary casts (your IDE should warn you about this)
* line 137: It doesn't appear that you're actually returning XML.
* line 139: don't get parameters directly from the request.
* line 145: No need to convert. You should always check for NumberFormatExceptions if you're going to work around the framework and do things manually.
* line 147: Convention generally says to name variables beginning with a lower-case letter. You don't *have* to, but it will help when others read your code.
* line 202: It looks like you're implementing RequestAware; at the very least you should use that to grab parameters directly from the request (although I don't believe you need to in this case).
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic