Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I use struts nested hidden fields

 
bob morkos
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone tell me what I'm doing wrong with the following code:

<%@ page language="java" %>

<%@ taglib uri="../WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="../WEB-INF/struts-html.tld" prefix="html" %>

<%@ taglib uri="../WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ taglib uri="../WEB-INF/struts-nested.tld" prefix="nested" %>

<%@ taglib uri="../WEB-INF/displaytag.tld" prefix="display" %>

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>

<bean:message key="TradeOrderForm.title" />

</title>

<script type="text/_javascript" src="../_javascript/commons.js"></script>

<link rel="stylesheet" href="../css/screen.css" type="text/css" media="screen, print" />

</head>

<body bgcolor="#FFFFFF">

<h1><center><bean:message key="TradeOrderForm.header" /></center></h1>

<BR/>

<center>

<nested:form action="/executeTradeOrders.do?method=submitTradeOrders" name="displayTradeOrderForm" type="com.webapp.form.DisplayTradeOrderForm" method="post">

<nested:notEmpty property="tol">

<nested:iterate id="tradeOrder" property="tol" type="com.businessobject.tradeorder.TradeOrderList">

<table width="550px">

<tr style="background-color: blue">

<th>

<nested:checkbox name="tradeOrder" property="chkAccount" />

<b><bean:message key="TradeOrderForm.accountId" /></b>

<nested:write name="tradeOrder" property="accountId" />

<b><bean:message key="TradeOrderForm.accountName" /></b>

<nested:write name="tradeOrder" property="accountName" />

<nested:hidden name="tradeOrder" property="accountId"/>

<nested:hidden name="tradeOrder" property="accountName"/>


</th>

</tr>

<tr>

<td colspan="0" align="right">

<table width="550px" border="1">

<tr>

<th nowrap>

<b><bean:message key="TradeOrderForm.quantity" /></b>

</th>

<th nowrap>

<b><bean:message key="TradeOrderForm.scheldule" /></b>

</th>

<th nowrap>

<b><bean:message key="TradeOrderForm.ticker" /></b>

</th>

<th nowrap>

<b><bean:message key="TradeOrderForm.action" /></b>

</th>

</tr>

<nested:notEmpty property="trade">

<nested:iterate id="trade" property="trade" type="com.businessobject.tradeorder.Trade" indexId="indexTrade">

<tr>

<td>

<nested:text name="trade" size="10" property="quantity" />

</td>

<td>

<nested:text name="trade" size="10" property="scheldule" />

</td>

<td>

<nested:text name="trade" size="10" property="ticker" />

</td>

<td>

<nested:text name="trade" size="10" property="action" />

</td>

</tr>

</nested:iterate>

</nested:notEmpty>

</table>

</td>

</tr>

</table>

</nested:iterate>

</nested:notEmpty>


<nested:submit>Submit</nested:submit>

</nested:form>

</center>

</body>

</html>
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bob,
There is a forum dedicated to Struts on this site:
http://www.coderanch.com/forums/f-58/Struts

You'll probably get better help for this question there.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic