aspose file tools*
The moose likes Struts and the fly likes Setting value for a key programmatically for arg0 tag 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 "Setting value for a key programmatically for arg0 tag" Watch "Setting value for a key programmatically for arg0 tag" New topic
Author

Setting value for a key programmatically for arg0 tag

Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Hi,

Can we set programmatically the value corresponding to a key? I have already set resource false for arg0 tag.



Now in the error message, for {0}, I want the value which I have set programmatically.


Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
I tried changing the value of arg0 key by variable tag.

Here is the code





My error message is, We don't provide loans for {0}. Here this 0 points to arg0 whose value is the value of variable validateCDField which I am assigning by our validate method.

Still I am not getting the value at place {0}

Can anyone please help me?
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Is there anyway to map arg key with user entered value of form field?



Just like ${var:varName} dynamically maps the value of var with key, similarly I tried with ${this:value}, but its not working. In place of form field value, I am getting ${this:value} as it is.

Please help
[ March 04, 2007: Message edited by: Naseem Khan ]
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Hi, I solved it by ...



here fieldValue is user entered value
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting value for a key programmatically for arg0 tag
 
Similar Threads
Problem with validator-rules.xml JavaScript
Exception while loading the validation.xml in strusts
validwhen question
Struts Client Side Validation JavaScript error : null is required
maxlength validation not working