aspose file tools*
The moose likes JSP and the fly likes How do I use struts nested hidden fields Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How do I use struts nested hidden fields " Watch "How do I use struts nested hidden fields " New topic
Author

How do I use struts nested hidden fields

bob morkos
Ranch Hand

Joined: Sep 06, 2001
Posts: 104
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

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61206
    
  66

Moved.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I use struts nested hidden fields