before sending back the response.
Wiebe
-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Friday, October 22, 2004 10:59 AM
To: Struts Users Mailing List
Subject: RE: Need Ideas for This Puzzle
What about something like:
<%
boolean checked = isChecked("a&q
Hi, Caroline,
Just a little follow up to all these good suggestions. I agree that if
you use the Action, then you should definitely use helper classes and
hopefully decouple them from the action. I like to use multithreading
in the helper classes generally. The suggestions about using the
Ac
What about something like:
<%
boolean checked = isChecked("a"); // check if the
value should be checked by default
if(showCheckbox(user, "a")) { // check if, for this
user, the checkbox should be visible
%>
>
<%
} else { // show disabled checkbox (or leave that out
to show nothing...)
%>
disabled
From: "Caroline Jen" <[EMAIL PROTECTED]>
> The challege comes as the "roles" of the web site
> users are introduced. According to the role of the
> web site user, I have to display certain groups (not
> all the groups) and certain sub-groups (not all
> sub-groups within a group) to him/her.
> How
Here's my idea:
Create a bean that has multiple Boolean fields, with each corresponding to a
checkbox you might want to display.
In the action that loads data for this page, process the user's role and set
the bean's Boolean values accordingly. Store the bean so that the jsp can
read it.
For all
>
> There are at least two good solutions. I like the second one best.
>
>
> 1. Tag Conditional Logic Solution
>
> Just use the , and tags. I assume,
> Caroline,
> that you are using JSTL. If not, then there are equivalent solutions
> with Struts logic tags.
>
>
> 2 Action Condition
There are at least two good solutions. I like the second one best.
1. Tag Conditional Logic Solution
Just use the , and tags. I assume, Caroline,
that you are using JSTL. If not, then there are equivalent solutions
with Struts logic tags.
2 Action Conditional Delivery Solution
Or, you can
7 matches
Mail list logo