RE: nested:text not being evaluated

2002-10-23 Thread Zeitlin, Mike
Sri,

   Thanks, that worked!  Any explanation on what the difference is between
using single and double quotes?

Mike

-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran;sas.com]
Sent: Wednesday, October 23, 2002 2:29 PM
To: Struts Users Mailing List
Subject: RE: nested:text not being evaluated


Try deriving the entire string that represents your onclick attribute value
form a scriptlet (note the user of single and double quotes):

onclick='%=showTable(+pageContext.getAttribute(rowIndex)+,+pageContex
t.getAttribute(columnIndex)+)%'

Note: In addition I have taken the liberty to add a comma (,) to your
JavaScript call.  I think that's what you meant.

Sri

-Original Message-
From: Zeitlin, Mike [mailto:ZeitlinM;daugherty.com] 
Sent: Wednesday, October 23, 2002 2:18 PM
To: '[EMAIL PROTECTED]'
Subject: nested:text not being evaluated



I am trying to dynamically set the input parameters for a javascript method
in an nested tag.  This is the code I am current using:

nested:text property=displayValue size=6
onclick=showTable(%=pageContext.getAttribute(rowIndex)%%=pageContext.g
etAttribute(columnIndex)%);/

This does not generate the appropriate input tag.  But,  if I remove the
onclick parameter,  the nested tag gets evaluated to an input tag jus t
fine.  What am I doing wrong?

Any help would be appreciated,
Mike Zeitlin
Daugherty Systems

--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org

--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: nested:text not being evaluated

2002-10-23 Thread Dave Derry
Seems like this question is becoming as popular as the ever popular 'When is
struts 1.1 final going to be released'. David Karr has provided an excellent
answer to this question on several occasions (including earlier today). I'm
sure you can find the answer in the archive.

The short answer is that embedding a scriptlet as a portion of an attribute
value (part of an RTEXPR) is illegal according to the JSP spec. You will
need to rewrite your scriplet so that is composes the entire value.

Dave Derry


- Original Message -
From: Zeitlin, Mike [EMAIL PROTECTED]



 I am trying to dynamically set the input parameters for a javascript
method
 in an nested tag.  This is the code I am current using:

 nested:text property=displayValue size=6

onclick=showTable(%=pageContext.getAttribute(rowIndex)%%=pageContext.g
 etAttribute(columnIndex)%);/

 This does not generate the appropriate input tag.  But,  if I remove the
 onclick parameter,  the nested tag gets evaluated to an input tag jus
 t fine.  What am I doing wrong?

 Any help would be appreciated,
 Mike Zeitlin
 Daugherty Systems




--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: nested:text not being evaluated

2002-10-23 Thread Sri Sankaran
The single  double quotes simply keep the parsing of the JSP straight.  The onclick 
value definition terminates at the first matching quote character.  

  onclick=%=foo+bar%
  ^
whoops!  onclick ends here.

So, since you are forced to use double-quotes () within the scriptlet, you use a 
single-quote (') to wrap it all up.

  onclick='%=lots of java with double quotes%'

Sri

-Original Message-
From: Zeitlin, Mike [mailto:ZeitlinM;daugherty.com] 
Sent: Wednesday, October 23, 2002 2:36 PM
To: 'Struts Users Mailing List'
Subject: RE: nested:text not being evaluated


Sri,

   Thanks, that worked!  Any explanation on what the difference is between using 
single and double quotes?

Mike

-Original Message-
From: Sri Sankaran [mailto:Sri.Sankaran;sas.com]
Sent: Wednesday, October 23, 2002 2:29 PM
To: Struts Users Mailing List
Subject: RE: nested:text not being evaluated


Try deriving the entire string that represents your onclick attribute value form a 
scriptlet (note the user of single and double quotes):

onclick='%=showTable(+pageContext.getAttribute(rowIndex)+,+pageContex
t.getAttribute(columnIndex)+)%'

Note: In addition I have taken the liberty to add a comma (,) to your JavaScript call. 
 I think that's what you meant.

Sri

-Original Message-
From: Zeitlin, Mike [mailto:ZeitlinM;daugherty.com] 
Sent: Wednesday, October 23, 2002 2:18 PM
To: '[EMAIL PROTECTED]'
Subject: nested:text not being evaluated



I am trying to dynamically set the input parameters for a javascript method in an 
nested tag.  This is the code I am current using:

nested:text property=displayValue size=6 
onclick=showTable(%=pageContext.getAttribute(rowIndex)%%=pageContext.g
etAttribute(columnIndex)%);/

This does not generate the appropriate input tag.  But,  if I remove the onclick 
parameter,  the nested tag gets evaluated to an input tag jus t fine.  What am I doing 
wrong?

Any help would be appreciated,
Mike Zeitlin
Daugherty Systems

--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org


--
To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org

--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org