RE: (Newbie Question) How to use java code as attributes in struts tags

2002-11-19 Thread shirishchandra . sakhare
U need to put the scriptlet code also in double quotes...




-Original Message-
From: amerolla [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 11:30 PM
To: struts-user
Cc: amerolla
Subject: (Newbie Question) How to use java code as attributes in struts
tags


I searched the archives but couldn't find anything on this.

When I try to use java code or jsp tags as the value of an attribute
in a Struts tag element, I get a compilation error.

The specific example is:


  length=<%=causeCodeTable.getMaxDisplayValue()%>
  id="causeCodeRecord"
  type="com. ... .CauseCodeData"
  indexId="index">

I'm tying to display a subset of an array of objects starting at "offset"
and up to "length" entries. If I hardcode the values of offset and
length, it works exactly as I'd expect.

Any suggestions? Thanks in advance.

Tony Merolla


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: (Newbie Question) How to use java code as attributes in struts tags

2002-11-18 Thread Vipul Sanghi
another thing you might consider doing is using  tag before
the iterate to define the counts and then go use the variable in the
iteration tag.

This looks cleaner and there are not too many pesky <% %> hanging around the
code.

-Original Message-
From: micael [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 1:12 PM
To: Struts Users Mailing List
Subject: RE: (Newbie Question) How to use java code as attributes in
struts tags


The <%= %> also has to be put into quotes.  That is what he means by
"properly quoting your attribute values".  I got caught on that one way
back when too.  Good luck!  Keep hacking.  Soon this will be second nature.

At 02:40 PM 11/18/2002 -0800, you wrote:
>If you get an exception, and you don't show us anything about the
>exception or much of your code or configuration, you're not likely going
>to get very useful help.
>
>Nevertheless, you might try properly quoting your attribute values.
>
> > -Original Message-
> > From: Anthony J. Merolla [mailto:[EMAIL PROTECTED]]
> >
> > I searched the archives but couldn't find anything on this.
> >
> > When I try to use java code or jsp tags as the value of an attribute
> > in a Struts tag element, I get a compilation error.
> >
> > The specific example is:
> >
> >  >   property="causeCodeTable"
> >   offset=<%=causeCodeTable.getCurrentIndex()%>
> >
> > length=<%=causeCodeTable.getMaxDisplayValue()%>
> >   id="causeCodeRecord"
> >   type="com. ... .CauseCodeData"
> >   indexId="index">
> >
> > I'm tying to display a subset of an array of objects starting
> > at "offset"
> > and up to "length" entries. If I hardcode the values of offset and
> > length, it works exactly as I'd expect.
> >
> > Any suggestions? Thanks in advance.
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Micael

---

This electronic mail  transmission and any accompanying documents contain
information belonging to the sender which may be confidential and legally
privileged.  This information is intended only for the use of the
individual or entity to whom this electronic mail transmission was sent as
indicated above. If you are not the intended recipient, any disclosure,
copying, distribution, or action taken in reliance on the contents of the
information contained in this transmission is strictly prohibited.  If you
have received this transmission in error, please delete the message.  Thank
you



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>








--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: (Newbie Question) How to use java code as attributes in struts tags

2002-11-18 Thread micael
The <%= %> also has to be put into quotes.  That is what he means by 
"properly quoting your attribute values".  I got caught on that one way 
back when too.  Good luck!  Keep hacking.  Soon this will be second nature.

At 02:40 PM 11/18/2002 -0800, you wrote:
If you get an exception, and you don't show us anything about the
exception or much of your code or configuration, you're not likely going
to get very useful help.

Nevertheless, you might try properly quoting your attribute values.

> -Original Message-
> From: Anthony J. Merolla [mailto:[EMAIL PROTECTED]]
>
> I searched the archives but couldn't find anything on this.
>
> When I try to use java code or jsp tags as the value of an attribute
> in a Struts tag element, I get a compilation error.
>
> The specific example is:
>
>property="causeCodeTable"
>   offset=<%=causeCodeTable.getCurrentIndex()%>
>
> length=<%=causeCodeTable.getMaxDisplayValue()%>
>   id="causeCodeRecord"
>   type="com. ... .CauseCodeData"
>   indexId="index">
>
> I'm tying to display a subset of an array of objects starting
> at "offset"
> and up to "length" entries. If I hardcode the values of offset and
> length, it works exactly as I'd expect.
>
> Any suggestions? Thanks in advance.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Micael

---

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: (Newbie Question) How to use java code as attributes in struts tags

2002-11-18 Thread Karr, David
If you get an exception, and you don't show us anything about the
exception or much of your code or configuration, you're not likely going
to get very useful help.

Nevertheless, you might try properly quoting your attribute values.

> -Original Message-
> From: Anthony J. Merolla [mailto:[EMAIL PROTECTED]]
> 
> I searched the archives but couldn't find anything on this.
> 
> When I try to use java code or jsp tags as the value of an attribute
> in a Struts tag element, I get a compilation error.
> 
> The specific example is:
> 
>property="causeCodeTable"
>   offset=<%=causeCodeTable.getCurrentIndex()%>
>   
> length=<%=causeCodeTable.getMaxDisplayValue()%>
>   id="causeCodeRecord"
>   type="com. ... .CauseCodeData"
>   indexId="index">
> 
> I'm tying to display a subset of an array of objects starting 
> at "offset"
> and up to "length" entries. If I hardcode the values of offset and
> length, it works exactly as I'd expect.
> 
> Any suggestions? Thanks in advance.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: