A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
how to show the duplicate value.
Joined: Oct 07, 2008
Mar 27, 2009 00:29:38
i am using strut2.
In my DAO class i use the following code
workorder.setStrErrMessage("Work order No already exixts !");
I want to display the value of strErrMessage in
page.if its exits
and in jsp i did like this.
<s:if test="strErrMessage != null && strErrMessage.size > 0 " >
<s:property value="strErrMessage" />
Can any body tell me how to do this.
Joined: Aug 03, 2008
Mar 27, 2009 01:58:31
What is this workorder that you are adding the message to?? I think you should once take a look at
SCJP 6 | SCWCD 5 |
Javaranch SCJP FAQ
Joined: Sep 29, 2008
Mar 27, 2009 06:50:20
If the strErrMessage isn't an action property then you can't access it like it is--if the *workorder* is an action property then you'd refer to the property as workorder.strErrMessage.
Whether or not this is the "Struts 2" way to do error reporting really depends on what exactly you're trying to do.
subject: how to show the duplicate value.
How to use <s:if> tag in another Struts2 tag
<s:textfield value="NEED_TO_CHECK_CONDITION" name="testField"/>
Taglib that translates into a series of other taglib calls
Struts2 test condition in s:if not working
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015