RE: Re[3]: Need logic:equal tag help

2003-01-07 Thread Jordan Thomas
Great, it worked. I actually used the c:if: tag but still, this is all new
info. Cool.

thanks for your help

Jordan

:O)

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]]
Sent: Monday, 6 January 2003 9:40 PM
To: Struts Users Mailing List
Subject: Re[3]: Need logic:equal tag help




On Monday, January 6, 2003, 3:26:26 PM, Rick wrote:

RR To avoid the scriplet though I think you are going to have to use the
RR logic-el tag, but possibly someone else has a better solution.

Actually logic-el wouldn't be what you want either. I think if you
just used the JSTL choose and when tag you'd be fine...

logic:iterate id=permission name=permissions indexId=idx
   c:choose
  c:when test=${permissionsSize eq idx}
 bla bla bla
 /c:when
   /c:choose
/logic:iterate

I know the above works, but there might be a better way.

--

Rick
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]




Need logic:equal tag help

2003-01-06 Thread Jordan Thomas
Hi,

I am wanting to use a logic:equal tag inside an interate tag like this

logic:iterate id=permission name=permissions indexId=idx
  logic:equal scope=page name=idx value=request.permissionsSize
blah blah...
  /logic:equal
/logic:iterate

Essentially the idx value comes from the logic:iterate tag and the
permissionsSize comes from a request variable. This doesn't seem to work
though. Is there a clean way to get the permissionsSize value out of the
request scope into the logic:equal tag without using scriplets?
Incedently, my scriptlet code looks like this:

%Integer permissionsSize =  (Integer)
request.getAttribute(permissionsSize);%
  logic:iterate id=permission name=permissions indexId=idx
  logic:equal scope=page name=idx
value=%=permissionsSize.toString()%
blah blah...
  /logic:equal
/logic:iterate

Any suggestions would be great.

thanks

Jordan





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




Re: Need logic:equal tag help

2003-01-06 Thread Rick Reumann


On Monday, January 6, 2003, 2:41:02 PM, Jordan wrote:

JT Hi,

JT I am wanting to use a logic:equal tag inside an interate tag like this

JT logic:iterate id=permission name=permissions indexId=idx
JT   logic:equal scope=page name=idx value=request.permissionsSize
JT blah blah...
JT   /logic:equal
JT /logic:iterate

Did you try:

 logic:iterate id=permission name=permissions indexId=idx
   logic:equal name=permissionsSize value=idx
  blah blah...
   /logic:equal
 /logic:iterate

I'm not positive the above will work though. Let me know. The problem
might be the value=idx part.. if it is let me know.

-- 

Rick
mailto:[EMAIL PROTECTED]


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




RE: Need logic:equal tag help

2003-01-06 Thread James Turner
This is (unfortuantely) another one of those gotta use JSTL things.
The value clause in a logic comparison has to be a literal.  So you
either need to drop the value in dynamically with %= tags, or give in
to the Dark Side (major :-) and do it in JSTL.

James
(Who's in the middle of converting a client application from Struts tags
to JSTL...)

 -Original Message-
 From: Rick Reumann [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, January 06, 2003 3:00 PM
 To: Struts Users Mailing List
 Subject: Re: Need logic:equal tag help
 
 
 
 
 On Monday, January 6, 2003, 2:41:02 PM, Jordan wrote:
 
 JT Hi,
 
 JT I am wanting to use a logic:equal tag inside an 
 interate tag like this
 
 JT logic:iterate id=permission name=permissions indexId=idx
 JT   logic:equal scope=page name=idx 
 value=request.permissionsSize
 JT blah blah...
 JT   /logic:equal
 JT /logic:iterate
 
 Did you try:
 
  logic:iterate id=permission name=permissions indexId=idx
logic:equal name=permissionsSize value=idx
   blah blah...
/logic:equal
  /logic:iterate
 
 I'm not positive the above will work though. Let me know. The problem
 might be the value=idx part.. if it is let me know.
 
 -- 
 
 Rick
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [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[2]: Need logic:equal tag help

2003-01-06 Thread Rick Reumann


On Monday, January 6, 2003, 2:59:41 PM, Rick wrote:

RR Did you try:

RR  logic:iterate id=permission name=permissions indexId=idx
RRlogic:equal name=permissionsSize value=idx
RR   blah blah...
RR/logic:equal
RR  /logic:iterate

Sorry to have tried to help so soon, the above that I gave you won't
work. With a scriplet it wouldn't work like:

logic:iterate id=permission name=permissions indexId=idx
   logic:equal name=permissionsSize value=%= String.valueOf(idx ) %
  blah blah...
   /logic:equal
/logic:iterate

To avoid the scriplet though I think you are going to have to use the
logic-el tag, but possibly someone else has a better solution.

-- 

Rick
mailto:[EMAIL PROTECTED]


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




Re[3]: Need logic:equal tag help

2003-01-06 Thread Rick Reumann


On Monday, January 6, 2003, 3:26:26 PM, Rick wrote:

RR To avoid the scriplet though I think you are going to have to use the
RR logic-el tag, but possibly someone else has a better solution.

Actually logic-el wouldn't be what you want either. I think if you
just used the JSTL choose and when tag you'd be fine...

logic:iterate id=permission name=permissions indexId=idx
   c:choose
  c:when test=${permissionsSize eq idx}
 bla bla bla
 /c:when
   /c:choose
/logic:iterate

I know the above works, but there might be a better way.

-- 

Rick
mailto:[EMAIL PROTECTED]


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