You need to put more starts and stops(only where your doing Java) to the
xsp:logic...see below. at the bottom I pasted some xsp with logic that I
know is working.
----- Original Message -----
From: "Tim Bachta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 4:33 PM
Subject: xsp question
I am trying to use logic in an xsp page to get the output formatted
correctly, here is what I want the output to look like
<taskanddate>
<date>2003-05-20</date>
<tasks>
<deviation>0</deviation>
<completed-by>Somebodys, Name</completed-by>
<deviation>0</deviation>
<completed-by>Somebodys, Name2</completed-by>
<deviation>0</deviation>
<completed-by>Somebodys, Name3</completed-by>
</tasks>
</taskanddate>
here is the code that I am using
<xsp:logic>
String date = <esql:get-string column="3"/>;
if(!date.equalsIgnoreCase(oldDate))
{ oldDate = date;
</xsp:logic>
<taskanddate>
<date>
<esql:get-string column="3"/>
</date>
<tasks>
<xsp:logic>
}
</xsp:logic>
<compleated-by>
<esql:get-string column="4"/>
</compleated-by>
<xsp:logic>
if(!date.equalsIgnoreCase(oldDate))
{
</xsp:logic>
</tasks>
</taskanddate>
<xsp:logic>
}
</xsp:logic>
and here is the result that I am getting:
<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- <taskanddate>
<date>2003-05-22 00:00:00.0</date>
<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- <tasks>
}
<compleated-by />
if(!date.equalsIgnoreCase(oldDate)) {
</tasks>
</taskanddate>
<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- <taskanddate>
<date>2003-05-23 00:00:00.0</date>
<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- <tasks>
}
<compleated-by />
if(!date.equalsIgnoreCase(oldDate)) {
</tasks>
</taskanddate>
<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- <taskanddate>
<date>2003-05-24 00:00:00.0</date>
<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- <tasks>
}
<compleated-by />
if(!date.equalsIgnoreCase(oldDate)) {
</tasks>
</taskanddate>
If anyone knows of a way to do this correctly I would greatly appreciate
the help.
Thank you
Tim Bachta
<xsp:logic>
if(!selectMap && parameterNames!=null &&
parameterNames.length>0)
{
//System.out.println("here");
str=mapIDValues[0];
boolean check=false;
int index=str.length()-1;
while(!check && index>=0)
{
if(!Character.isDigit(str.charAt(index)))
{
check=true;
index++;
}
else if(index==0)
{
check=true;
}
else
{
index--;
}
}
if(check)
{
mapIDPrefix=str.substring(0,index);
mapIDIndex=Integer.parseInt(str.substring(index,str.length()));
}
</xsp:logic>
<table border="1">
<CAPTION>Map Locations</CAPTION>
<tr><th>Location
#</th><th>X</th><th>Y</th><th>MAP_ID</th></tr>
<xsp:logic>
int count=1;
for(index=0;index<xValues.length;index++)
{
if(removeRowSet.elementAt(index)==null)
{
str=xValues[index];
</xsp:logic>
<tr><td><xsp:expr>count</xsp:expr></td>
<td><input type="text">
<xsp:attribute name="name">X</xsp:attribute>
<xsp:attribute
name="value"><xsp:expr>str</xsp:expr></xsp:attribute>
</input></td>
<xsp:logic>
str=yValues[index];
</xsp:logic>
<td><input type="text">
<xsp:attribute name="name">Y</xsp:attribute>
<xsp:attribute
name="value"><xsp:expr>str</xsp:expr></xsp:attribute>
</input></td>
<xsp:logic>
str=mapIDPrefix+mapIDIndex;
</xsp:logic>
<td><input type="text">
<xsp:attribute name="name">MAP_ID</xsp:attribute>
<xsp:attribute
name="value"><xsp:expr>str</xsp:expr></xsp:attribute>
</input></td></tr>
<xsp:logic>
mapIDIndex++;
count++;
}
}
int priorIndex=index-1;
for(index=0;index<appendRange;index++)
{
str=xValues[priorIndex];
</xsp:logic>
<tr><td><xsp:expr>priorIndex+index+2</xsp:expr></td>
<td><input type="text">
<xsp:attribute name="name">X</xsp:attribute>
<xsp:attribute
name="value"><xsp:expr>str</xsp:expr></xsp:attribute>
</input></td>
<xsp:logic>
str=yValues[priorIndex];
</xsp:logic>
<td><input type="text">
<xsp:attribute name="name">Y</xsp:attribute>
<xsp:attribute
name="value"><xsp:expr>str</xsp:expr></xsp:attribute>
</input></td>
<xsp:logic>
str=mapIDPrefix+mapIDIndex;
</xsp:logic>
<td><input type="text">
<xsp:attribute name="name">MAP_ID</xsp:attribute>
<xsp:attribute
name="value"><xsp:expr>str</xsp:expr></xsp:attribute>
</input></td></tr>
<xsp:logic>
mapIDIndex++;
}
</xsp:logic>
</table>
<xsp:logic>
}
</xsp:logic>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]