RE: logic:equal and EdHill Display taglib

2003-01-20 Thread Raible, Matt
Use a decorator:

http://edhill.its.uiowa.edu/display-examples-0.8/example-imp-objects.jsp

It's worked great for me.

HTH,

Matt

> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 20, 2003 10:01 AM
> To: [EMAIL PROTECTED]
> Subject: logic:equal and EdHill Display taglib
> 
> 
> Greetings,
> 
> I'm currently using EdHills Display taglib to iterate over some search
> results and render them
> in a table. I would also like to hyper link the contents of a 
> column if
> certain conditions apply.
> In short, I'm looking for a way to expose the iterator 
> element so that I can
> use the
> .
> 
> Looking at the the code in appears that TableTag publishes 
> the iterator
> element to the
> pageContext as an attribute named "smartRow" (see 
> getHTMLData()).  This
> becomes the default
> name if a name is not supplied by ColumnTag. This implies 
> that I should be
> able to gain
> data access to the "smartRow".
> 
> I tried  value="myValue"
> scope="page">stuff
> and I keep getting an exception that says the following:
> 
> "javax.servlet.jsp.JspException: No bean found under 
> attribute key smartRow"
> 
> I even tried a scriptlet to just print the contents of the 
> element and I'm
> getting an NullPointerException (because I call toString() on 
> the object,
> which
> apparently is null)
> 
> Is there an easier way, or am I missing something?
> Any advice would be appreciated.
> 
> robert
> 
> 
> 
> 
> 
> --
> 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: logic:equal and EdHill Display taglib

2003-01-20 Thread Robert Taylor
Thanks Jerome. I just didn't dig deep enough. I should have seen this.

robert

> -Original Message-
> From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 20, 2003 12:17 PM
> To: Struts Users Mailing List
> Subject: RE: logic:equal and EdHill Display taglib
>
>
> If you're trying to conditionally hyperlink the contents of a
> certain column
> of the current row then you'll have to use a Decorator.  The
> current row of
> the list is not exposed in a scripting variable or scoped
> variable.  For the
> reason why see
> http://edhill.its.uiowa.edu/display-examples-0.8/example-imp-objects.jsp
>
> -Jerome
>
> > -Original Message-
> > From: Robert Taylor [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, January 20, 2003 12:01 PM
> > To: [EMAIL PROTECTED]
> > Subject: logic:equal and EdHill Display taglib
> >
> >
> > Greetings,
> >
> > I'm currently using EdHills Display taglib to iterate over some search
> > results and render them
> > in a table. I would also like to hyper link the contents of a column if
> > certain conditions apply.
> > In short, I'm looking for a way to expose the iterator element so
> > that I can
> > use the
> > .
> >
> > Looking at the the code in appears that TableTag publishes the iterator
> > element to the
> > pageContext as an attribute named "smartRow" (see getHTMLData()).  This
> > becomes the default
> > name if a name is not supplied by ColumnTag. This implies that
> I should be
> > able to gain
> > data access to the "smartRow".
> >
> > I tried  value="myValue"
> > scope="page">stuff
> > and I keep getting an exception that says the following:
> >
> > "javax.servlet.jsp.JspException: No bean found under attribute
> > key smartRow"
> >
> > I even tried a scriptlet to just print the contents of the
> element and I'm
> > getting an NullPointerException (because I call toString() on
> the object,
> > which
> > apparently is null)
> >
> > Is there an easier way, or am I missing something?
> > Any advice would be appreciated.
> >
> > robert
> >
> >
> >
> >
> >
> > --
> > 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]>


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




RE: logic:equal and EdHill Display taglib

2003-01-20 Thread Jerome Jacobsen
If you're trying to conditionally hyperlink the contents of a certain column
of the current row then you'll have to use a Decorator.  The current row of
the list is not exposed in a scripting variable or scoped variable.  For the
reason why see
http://edhill.its.uiowa.edu/display-examples-0.8/example-imp-objects.jsp

-Jerome

> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 20, 2003 12:01 PM
> To: [EMAIL PROTECTED]
> Subject: logic:equal and EdHill Display taglib
>
>
> Greetings,
>
> I'm currently using EdHills Display taglib to iterate over some search
> results and render them
> in a table. I would also like to hyper link the contents of a column if
> certain conditions apply.
> In short, I'm looking for a way to expose the iterator element so
> that I can
> use the
> .
>
> Looking at the the code in appears that TableTag publishes the iterator
> element to the
> pageContext as an attribute named "smartRow" (see getHTMLData()).  This
> becomes the default
> name if a name is not supplied by ColumnTag. This implies that I should be
> able to gain
> data access to the "smartRow".
>
> I tried  scope="page">stuff
> and I keep getting an exception that says the following:
>
> "javax.servlet.jsp.JspException: No bean found under attribute
> key smartRow"
>
> I even tried a scriptlet to just print the contents of the element and I'm
> getting an NullPointerException (because I call toString() on the object,
> which
> apparently is null)
>
> Is there an easier way, or am I missing something?
> Any advice would be appreciated.
>
> robert
>
>
>
>
>
> --
> 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]>




logic:equal and EdHill Display taglib

2003-01-20 Thread Robert Taylor
Greetings,

I'm currently using EdHills Display taglib to iterate over some search
results and render them
in a table. I would also like to hyper link the contents of a column if
certain conditions apply.
In short, I'm looking for a way to expose the iterator element so that I can
use the
.

Looking at the the code in appears that TableTag publishes the iterator
element to the
pageContext as an attribute named "smartRow" (see getHTMLData()).  This
becomes the default
name if a name is not supplied by ColumnTag. This implies that I should be
able to gain
data access to the "smartRow".

I tried stuff
and I keep getting an exception that says the following:

"javax.servlet.jsp.JspException: No bean found under attribute key smartRow"

I even tried a scriptlet to just print the contents of the element and I'm
getting an NullPointerException (because I call toString() on the object,
which
apparently is null)

Is there an easier way, or am I missing something?
Any advice would be appreciated.

robert





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




Re: Re: Problem with logic:equal and bean:define

2002-04-11 Thread stephen.chambers

Pawel,

I appreciate the suggestion, but I couldn't get it to work somehow. It keeps coming 
back with compile errors that java.lang.String is already defined. I put exactly the 
same bean:define tag, albeit with a different value outside and above the logic:equal 
tag.

Which struts are you using 1.0.2 or 1.1 b1?

Stephen

From: Pawel Rzepa <[EMAIL PROTECTED]>
Date: 2002/04/11 Thu AM 02:38:45 CDT
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Problem with logic:equal and bean:define

Hi Stephen,
  If you are interested in why it is happening look at the .java file that is
created by jsp compiler. I've spent some time doing it but eventually I had given
up because there were too many lines of code to analyze. Nevertheless I'm sure
there is an important reason :-).
Despite I don't know why it is happening, I know how to solve the problem and
that is why I'm replying to your email. What you have to do is to define a bean
with the same name outside of any  tag. When you repeat  inside  tag bean's value just changes. And that is all. You can
then use bean as you want.
What you must remember is to keep the same classname of the bean in each
 statement. When you use "value" attribute it is done
automatically, assuming that the classname is java.lang.String. If you use
another attribute (name, property and so on) don't forget to add "type" attribute
as well.

Regards,
  Pawel

"stephen.chambers" wrote:

>  All,
>
>  When I use the bean:define tag inside a logic:equal, why doesn't the
> scriptinh variable created stay in scope outside of the logic tags? What am
> I doing wrong?
>
>  Code snippet below:
>
>  
>
>  
>
>  Once outside of the logic tags, even out.print(myvar); results in null.
>
>  Thanks, Steve
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
Pawel Rzepa   Department of Computer Science
[EMAIL PROTECTED]   University of Mining and Metallurgy (AGH)
tel: +48 (12) 617 39 82  fax: +48 (12) 617 39 66



--
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: Problem with logic:equal and bean:define

2002-04-11 Thread Pawel Rzepa

Hi Stephen,
  If you are interested in why it is happening look at the .java file that is
created by jsp compiler. I've spent some time doing it but eventually I had given
up because there were too many lines of code to analyze. Nevertheless I'm sure
there is an important reason :-).
Despite I don't know why it is happening, I know how to solve the problem and
that is why I'm replying to your email. What you have to do is to define a bean
with the same name outside of any  tag. When you repeat  inside  tag bean's value just changes. And that is all. You can
then use bean as you want.
What you must remember is to keep the same classname of the bean in each
 statement. When you use "value" attribute it is done
automatically, assuming that the classname is java.lang.String. If you use
another attribute (name, property and so on) don't forget to add "type" attribute
as well.

Regards,
  Pawel

"stephen.chambers" wrote:

>  All,
>
>  When I use the bean:define tag inside a logic:equal, why doesn't the
> scriptinh variable created stay in scope outside of the logic tags? What am
> I doing wrong?
>
>  Code snippet below:
>
>  
>
>  
>
>  Once outside of the logic tags, even out.print(myvar); results in null.
>
>  Thanks, Steve
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
Pawel Rzepa   Department of Computer Science
[EMAIL PROTECTED]   University of Mining and Metallurgy (AGH)
tel: +48 (12) 617 39 82  fax: +48 (12) 617 39 66



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




Problem with logic:equal and bean:define

2002-04-06 Thread stephen.chambers

 All,

 When I use the bean:define tag inside a logic:equal, why doesn't the
scriptinh variable created stay in scope outside of the logic tags? What am
I doing wrong?

 Code snippet below:

 
   
 

 Once outside of the logic tags, even out.print(myvar); results in null.

 Thanks, Steve


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




Problem with logic:equal and bean:define

2002-04-06 Thread res0s9j4

All,

When I use the bean:define tag inside a logic:equal, why doesn't the scriptinh 
variable created stay in scope outside of the logic tags? What am I doing wrong?

Code snippet below:


  


Once outside of the logic tags, even out.print(myvar); results in null.

Thanks, Steve


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




Problem with logic:equal and logic:notEqual tags both evaluating to true

2002-03-22 Thread $B%"%s%H%K!<(B $B%9%F%$%9(B

Hi

I have the following code



I am logic:equal


I am logic:notEqual



For some reason it is printing out both

"I am logic:notEqual"

and

"I am logic:equal"

Am I missing the point about the "logic:equal" and "logic:notEqual" tags, or
is there a reason this might be happening?




Cheers

Tony





_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




RE: logic:equal and dynamic value

2001-09-20 Thread Matt Raible

Nope:

2001-09-20 06:25:57 - error-the file
'\WEB-INF\pages\resourceWorkProfileManage.jsp' generated the following parse
exception: org.apache.jasper.compiler.CompileException:
C:\iPlanet\iPM6\ias\APPS\timetracker\timetracker\WEB-INF\pages\resourceWorkProfileManage.jsp(255,12)
According to the TLD attribute value is mandatory for tag equal


--- Sean Gollschewsky <[EMAIL PROTECTED]> wrote:
> Can't you use
> 
>  property="workSchedule$WorkScheduleEid" parameter="wsId">
> 
> to save having to use a scriptlet in the value attribute?
> 
> Cheers,
> 
> Gollo
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> 
> 
>  The compiler is probably getting confused by the two sets of double
> quotes
> in your value specification. Try using single quotes around the overall
> expression, like this:
> 
>  property="workSchedule$WorkScheduleEid"
> value='<%=request.getParameter("wsId")%>'>
> 
> --
> Martin Cooper
> 
> 
> ----- Original Message -
> From: "Matt Raible" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 19, 2001 2:28 PM
> Subject: logic:equal and dynamic value
> 
> 
> > I am trying to compare a value in my bean with a value from the
> request,
> using
> > the following
> >
> >  > property="workSchedule$WorkScheduleEid"
> > value="<%=request.getParameter("wsId")%>">
> >
> > However, I am getting the following error:
> >
> > 2001-09-19 03:31:07 - error-the file
> > '\WEB-INF\pages\resourceWorkProfileManage.jsp' generated the following
> parse
> > exception: org.apache.jasper.compiler.ParseException:
> >
> D:\iPlanet\iPM6ias\APPS\timetracker\timetracker\WEB-INF\pages\resourceWo
> rkPr
> ofileManage.jsp(248,131)
> > Attribute wsId has no value
> >
> >
> > I have tried putting <%=request.getParameter("wsId")%> outside of the
> equal
> > tags and the value is there - and it is the one I've expected.
> >
> > Thanks,
> >
> > Matt
> >
> >
> > __
> > Terrorist Attacks on U.S. - How can you help?
> > Donate cash, emergency relief information
> > http://dailynews.yahoo.com/fc/US/Emergency_Information/
> 
> 
> 


__
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/



RE: logic:equal and dynamic value

2001-09-20 Thread Sean Gollschewsky

Can't you use



to save having to use a scriptlet in the value attribute?

Cheers,

Gollo

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]


 The compiler is probably getting confused by the two sets of double
quotes
in your value specification. Try using single quotes around the overall
expression, like this:



--
Martin Cooper


- Original Message -
From: "Matt Raible" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 19, 2001 2:28 PM
Subject: logic:equal and dynamic value


> I am trying to compare a value in my bean with a value from the
request,
using
> the following
>
>  property="workSchedule$WorkScheduleEid"
> value="<%=request.getParameter("wsId")%>">
>
> However, I am getting the following error:
>
> 2001-09-19 03:31:07 - error-the file
> '\WEB-INF\pages\resourceWorkProfileManage.jsp' generated the following
parse
> exception: org.apache.jasper.compiler.ParseException:
>
D:\iPlanet\iPM6ias\APPS\timetracker\timetracker\WEB-INF\pages\resourceWo
rkPr
ofileManage.jsp(248,131)
> Attribute wsId has no value
>
>
> I have tried putting <%=request.getParameter("wsId")%> outside of the
equal
> tags and the value is there - and it is the one I've expected.
>
> Thanks,
>
> Matt
>
>
> __
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/






Re: logic:equal and dynamic value

2001-09-19 Thread martin . cooper

The compiler is probably getting confused by the two sets of double quotes
in your value specification. Try using single quotes around the overall
expression, like this:



--
Martin Cooper


- Original Message -
From: "Matt Raible" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 19, 2001 2:28 PM
Subject: logic:equal and dynamic value


> I am trying to compare a value in my bean with a value from the request,
using
> the following
>
>  property="workSchedule$WorkScheduleEid"
> value="<%=request.getParameter("wsId")%>">
>
> However, I am getting the following error:
>
> 2001-09-19 03:31:07 - error-the file
> '\WEB-INF\pages\resourceWorkProfileManage.jsp' generated the following
parse
> exception: org.apache.jasper.compiler.ParseException:
>
D:\iPlanet\iPM6ias\APPS\timetracker\timetracker\WEB-INF\pages\resourceWorkPr
ofileManage.jsp(248,131)
> Attribute wsId has no value
>
>
> I have tried putting <%=request.getParameter("wsId")%> outside of the
equal
> tags and the value is there - and it is the one I've expected.
>
> Thanks,
>
> Matt
>
>
> __
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/





logic:equal and dynamic value

2001-09-19 Thread Matt Raible

I am trying to compare a value in my bean with a value from the request, using
the following

">

However, I am getting the following error:

2001-09-19 03:31:07 - error-the file
'\WEB-INF\pages\resourceWorkProfileManage.jsp' generated the following parse
exception: org.apache.jasper.compiler.ParseException:
D:\iPlanet\iPM6ias\APPS\timetracker\timetracker\WEB-INF\pages\resourceWorkProfileManage.jsp(248,131)
Attribute wsId has no value


I have tried putting <%=request.getParameter("wsId")%> outside of the equal
tags and the value is there - and it is the one I've expected.

Thanks,

Matt


__
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/



RE: logic:equal and nesting

2001-03-15 Thread Kyle Robinson

Thanks.  I went with option number two.  It's more correct for what I want
to do.

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 10:28
To: '[EMAIL PROTECTED]'
Subject: Re: logic:equal and nesting




On Thu, 15 Mar 2001, Kyle Robinson wrote:

> Here's a piece of code that I want to do.  However it gives a nested tag
> error as the closing  tag ends up inside the . I
> basically want the form to do different actions based on the property
> "title".  Anyone know of a better way of doing the same thing?
>  
>  scope="request" value="Contractor">
>   
> 
>  scope="request" value="Supplier">
>   
> 
> 

As the error message tells you, this is invalid nesting of tags.  In order
to change the destination of the submit, you will need to create some
JavaScript that does so on the client side, perhaps when the submit button
is presed.  (If you do this, be sure you use the same form bean on all of
the actions, or Struts is likely to get confused.)

Alternatively, you could have the  tag submit to a single
action, (say, "/commonSearch.do") which could then look at the title
property itself and then forward to either "/contractorSearch.do" or
"/supplierSearch.do" appropriately.

> 
> Kyle Robinson 
> Systems Consultant 
> Pangaea Systems Inc. 
> (250) 360-0111 
> 
>  
> 
Craig




Re: logic:equal and nesting

2001-03-15 Thread John Raley

I run into this kind of thing a lot.  It's a constant reminder that the
tag syntax is not a substitute for the control structures we're used to
in programming languages...

It's ugly, but I would probably handle this with scripting vars:
<% String theAction = null; %>
<%
theAction="contractorSearch.do"; %>

<%
theAction="contractorSearch.do"; %>

  


Kyle Robinson wrote:

>  Here's a piece of code that I want to do.  However it gives a nested
> tag error as the closing  tag ends up inside the
> . I basically want the form to do different actions based
> on the property "title".  Anyone know of a better way of doing the
> same thing? scope="request" value="Contractor">
>   
> 
>  scope="request" value="Supplier">
>   
> 
> Kyle Robinson
> Systems Consultant
> Pangaea Systems Inc.
> (250) 360-0111




Re: logic:equal and nesting

2001-03-15 Thread Maya Muchnik


Do you need or not to have a statement  ?
Kyle Robinson wrote:
 Here's
a piece of code that I want to do.  However it gives a nested tag
error as the closing  tag ends up inside the .
I basically want the form to do different actions based on the property
"title".  Anyone know of a better way of doing the same thing?
   
scope="request" value="Contractor">
  


   
scope="request" value="Supplier">
  

Kyle Robinson
Systems Consultant
Pangaea Systems Inc.
(250) 360-0111 



Re: logic:equal and nesting

2001-03-15 Thread Craig R. McClanahan



On Thu, 15 Mar 2001, Kyle Robinson wrote:

> Here's a piece of code that I want to do.  However it gives a nested tag
> error as the closing  tag ends up inside the . I
> basically want the form to do different actions based on the property
> "title".  Anyone know of a better way of doing the same thing?
>  
>  scope="request" value="Contractor">
>   
> 
>  scope="request" value="Supplier">
>   
> 
> 

As the error message tells you, this is invalid nesting of tags.  In order
to change the destination of the submit, you will need to create some
JavaScript that does so on the client side, perhaps when the submit button
is presed.  (If you do this, be sure you use the same form bean on all of
the actions, or Struts is likely to get confused.)

Alternatively, you could have the  tag submit to a single
action, (say, "/commonSearch.do") which could then look at the title
property itself and then forward to either "/contractorSearch.do" or
"/supplierSearch.do" appropriately.

> 
> Kyle Robinson 
> Systems Consultant 
> Pangaea Systems Inc. 
> (250) 360-0111 
> 
>  
> 
Craig





logic:equal and nesting

2001-03-15 Thread Kyle Robinson



Here's a piece of 
code that I want to do.  However it gives a nested tag error as the closing 
 tag ends up inside the . I basically 
want the form to do different actions based on the property "title".  
Anyone know of a better way of doing the same thing?
 
    
scope="request" value="Contractor">      
scope="request" value="Supplier">  
Kyle Robinson Systems Consultant Pangaea Systems 
Inc. (250) 360-0111