• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How do I use struts nested hidden fields

 
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>
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bob,
There is a forum dedicated to Struts on this site:
https://coderanch.com/forums/f-58/Struts

You'll probably get better help for this question there.
 
Marshal
Posts: 67418
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved.
 
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic