jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Null value from struts tag ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Null value from struts tag !" Watch "Null value from struts tag !" New topic
Author

Null value from struts tag !

huong cat
Greenhorn

Joined: Jul 13, 2004
Posts: 2
Hi all,
I have a problem with tag in struts. Please help me if you can...

in my testAdd.jsp I write

<td>
<bean:size id="sizeOfAgent" name="CDContractAddForm" property="agentList"/>
<select property="txtAGENTNAME">
<logic:iterate id="agent" name="CDContractAddForm" property="agentList" offset="0" length="sizeOfAgent" indexId="index"><option value="<bean:write name="agent" property="txtAGENTNAME"/>">
<bean:write name="agent" property="txtAGENTNAME"/></option>
</logic:iterate>
</select>
</td>

the next page : testConfirmAdd.jsp

<bean efine id="agList" name="CDContractAddForm" property="agentList" type="form.CDContractAddForm"/>
<bean:size id="sizeOfAgent" name="CDContractAddForm" property="agentList"/> <select disabled name="txtAGENTNAME" width="90%" >
<logic:iterate id="agent" name="agList" offset="0" length="sizeOfAgent" indexId="index">
<logic:equal name="agent" property="txtAGENTNAME" value="<%= agentChose %>">
<option value="<bean:write name="agent" property="txtAGENTNAME"/>"selected><bean:write name="agent" property="txtAGENTNAME"/> </option>
</logic:equal>
<logic:notEqual name="agent" property="txtAGENTNAME" value="<%= agentChose %>">
<option value="<bean:write name="agent" property="txtAGENTNAME"/>"><bean:write name="agent" property="txtAGENTNAME"/> </option>
</logic:notEqual>
</logic:iterate>
</select>

I always receip a null txtAGENTNAME's value. Why ? Please help me soon. Thanks
Nidhin Kannan
Greenhorn

Joined: Oct 13, 2003
Posts: 4
hi
am assuming that u have the <html:form ..> tags and the struts action class all coded and ready for your example? check whether u are nullifying or even, populating the particular value u need in the next jsp page.
huong cat
Greenhorn

Joined: Jul 13, 2004
Posts: 2
hi,
thnks for your reply

yes,I'v <html:form> tag and many code . I'm writing a web-application.
This jsp page, I have many <html:text> tags and one tag which i've asked for you. My <html:text> work fine, but that tag is always return null.

You can see and help me !!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Null value from struts tag !
 
Similar Threads
Pulldown related
Struts 1.1: Need help with logic:iterate and logic:equals tag
logic:match , logic:notEqual not working
Help Needed Not able to display two drop downs in jsp
logic:iterate question