Are you saying that you have a fixed set of options and depends on
what value is from your bean, the option that has the same value will
be checked?
Maybe something like this?
form
input name=checkbox type=checkbox value=val1
c:if test=${myval == 'val1'}checked/c:if
Check Box
Ops the c:if's tests should be
c:if test=${myval == 'val1'}checked/c:if
c:if test=${myval == 'val2'}checked/c:if
c:if test=${myval == 'val3'}checked/c:if
or Check Box 1,2,and 3 respectively.
-H
On Dec 4, 2003, at 7:28 PM, Hien Q Nguyen wrote:
Are you saying that you have a fixed set of
As you've probably found-out this syntax does not work in tiles-defs.xml(!)
... but a similar result can be achieved in a definition in a JSP page. One
option may be to define your loginform attribute as say, mainForm.jsp that
could then use el (or logic) tags to determine which jsp to include.
Hallo, I thinking about registration form yet.
first form will contain username and password. Validation framework will
chceck if it is filled, if it has minimal length atc.
after it I must check if tehere is no other user who has this username,
of course. So I thinking if to do it in validator
you should try using a TileController
-Original Message-
From: Jiri Chaloupka [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 5:30 AM
To: Struts Users Mailing List
Subject: tiles: condition in tile definition
Hallo,
haw I can define condition in tile definition?
for example, I
Hi Jana,
You might want to look at struts-el (JSTL expression language extension for
struts). To implement with logic:eqal I think you would have to have three
separate logic:equal blocks each containing the same jsp code, perhaps
included.
Jon Ridgway
-Original Message-
From: Jana
Can't you make a collection, iterate though the 'or' (||) values
Do something once and then breakout? Like a switch statement
Umm not something i've tried i'll get back to you after i've run some tests.
Cheers mark
On 5-12-2002 12:13, Jon.Ridgway [EMAIL PROTECTED] wrote:
Hi Jana,
You
When the logic is this complex, shouldn't it be in Java or is that
putting too much pressure on the server side?
-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 6:33 AM
To: 'Struts Users Mailing List'
Subject: Re: if condition with or
Can't
Where do you think tags get run?
-Original Message-
From: edgar [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 21:17
To: 'Struts Users Mailing List'
Subject: RE: if condition with or
When the logic is this complex, shouldn't it be in Java or is that
putting too much
I meant the java programmers, not the server machine.
-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 8:16 AM
To: 'Struts Users Mailing List'
Subject: RE: if condition with or
Where do you think tags get run?
-Original Message
, December 05, 2002 21:22
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: if condition with or
I meant the java programmers, not the server machine.
-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 8:16 AM
To: 'Struts Users
AM
To: Struts Users Mailing List
Subject: RE: if condition with or
snip
what is the difference between having a scriptlet or what you use above?
/snip
Hehe I rather agree Jim!
(Mind you I am rather anti-JSP so my view is probably a bit biased!)
Your question reminds me of an old article I read
: Thursday, December 05, 2002 21:17
To: 'Struts Users Mailing List'
Subject: RE: if condition with or
When the logic is this complex, shouldn't it be in Java or is that
putting too much pressure on the server side?
-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December
: edgar [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 21:22
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: if condition with or
I meant the java programmers, not the server machine.
-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Thursday
On Thu, 5 Dec 2002, Jim Collins wrote:
This is one of the very large number of reasons that you should start
using JSTL if you can (i.e. you're on a Servlet 2.3/JSP 1.2 or later
container):
c:if test=${(count == 0) || (count == 2) || (count == 4)}
... do something ...
On Thu, 5 Dec 2002, Andrew Hill wrote:
Date: Thu, 5 Dec 2002 21:24:09 +0800
From: Andrew Hill [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED],
[EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: if condition with or
Ah, you mean
How you do it depends on what you're trying to do. logic:equal probably
won't do it for you, as it doesn't have anything that works like an or
operator. If you're formatting the content based on whether it's odd or
even , I use a boolean flag in the % scriptlet code %. If you want to use
tags, I
On Wed, 4 Dec 2002, Jana Navaneethan wrote:
Date: Wed, 4 Dec 2002 17:23:42 -0500
From: Jana Navaneethan [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: if condition with or
Hi,
I want to use
- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, December 05, 2002 12:20 AM
Subject: Re: if condition with or
On Wed, 4 Dec 2002, Jana Navaneethan wrote:
Date: Wed, 4 Dec 2002 17:23:42 -0500
From
: if condition with or
- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, December 05, 2002 12:20 AM
Subject: Re: if condition with or
On Wed, 4 Dec 2002, Jana Navaneethan wrote:
Date: Wed, 4 Dec 2002 17
Hi, Peter,
I hope this'll answer your question.
If you use lt;logic:iterategt; to loop through a collection. you can use
lt;logic:equal ..gt; to compare the value, the best way (in my opinion) is to use a
collection of objects, then you can compare the property in the object. However,
Make it easy on yourself. Prune the vales in the collection in the actions
and not in the jsp page.
Try to keep as much business logic out of the JSP pages
- Original Message -
From: Peter Cnops [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 26, 2002 12:06 PM
Subject: using
22 matches
Mail list logo