Anthony,
See my comments below. Hope this clears things up a little and I see
Laurie has made a worthwhile comment about looking at the examples
available.
HTH,
Al
Anthony N. Frasso wrote:
My head hurts. :) Thanks for everyone's help. I've
gotten a number of responses, it's just that I
Anthony N. Frasso wrote:
My head hurts. :) Thanks for everyone's help. I've
gotten a number of responses, it's just that I'm still
confused. It's obvious I have something drastically
wrong with my understanding of the workflow of Struts,
so I'd like to clear that up now.
Let's take my list pa
My head hurts. :) Thanks for everyone's help. I've
gotten a number of responses, it's just that I'm still
confused. It's obvious I have something drastically
wrong with my understanding of the workflow of Struts,
so I'd like to clear that up now.
Let's take my list page, ListRoles.jsp:
Yes you do, the form is passed in as one of the parameters to execute().
The typical pattern is for the action to be invoked via an action
mapping, populate the form bean and forward to the JSP. It's during this
action processing that you copy your business data into the form bean,
thus initial
On 8/30/06, Anthony N. Frasso <[EMAIL PROTECTED]> wrote:
I don't have the form bean
until I get to the JSP page, so there's no way to
initialize it.
Struts being a classic Model 2 framework requires all requests to go
through an action. Well, this is not a strict requirement just a
standard pra
I guess I don't follow
How do I prepopulate the form bean? I have a list
page which lists all of the roles in the system. When
the form on the list page is submitted, I can retrieve
the ID of the role that the user wants to edit. In
the action class I then retrieve that role, and put it
int
Anthony,
I am puzzled by your comment that you don't have a form bean before you
get to the jsp. We do this all the time. Say I want to display a list
of inventory items for a user. I retrieve a list of inventory items
matching the query data the user gave me and create an array of
invento
Actually, that's incorrect. I want to *read* from the
Role bean. I want to *write* to the form bean. I
just don't know how to go about it yet. :) It seems
like I have to read/write to the same form bean, which
doesn't make sense, because I don't have the form bean
until I get to the JSP page, s
On 8/30/06, Anthony N. Frasso <[EMAIL PROTECTED]> wrote:
Hello all,
public class Role {
private int id;
private String name;
private String description;
private boolean permissionA;
private boolean permissionB;
...
private boolean permissionN;
}
Each of those prop
Hello all,
OK. I admit I am thoroughly confused. :)
> Note that there's a
> special
> consideration for checkboxes, though: if a checkbox
> is de-selected when
> the form is submitted, *no* URL parameter will be
> included for it. As a
> result, Struts has no way to automatically clear
> your
Anthony N. Frasso wrote:
Do you need one checkbox or a series of checkboxes?
Just one. :)
For one checkbox you write something like this (from
the article):
As I understand it, what this tag does is place the
value "yes" into the property "married" of the form
bean associated with this HTM
> Do you need one checkbox or a series of checkboxes?
Just one. :)
> For one checkbox you write something like this (from
> the article):
>
As I understand it, what this tag does is place the
value "yes" into the property "married" of the form
bean associated with this HTML form (actually, "yes
Do you need one checkbox or a series of checkboxes?
For one checkbox you write something like this (from the article):
For a group of checkbox you can create several checkbox HTML elements
with the same name (this is what does for you).
Looking at the example from the article, "customers" is
Thanks, I appreciate the quick response.
Unfortunately, I'm not sure that this addresses my
issue, unless I've misunderstood something. It
doesn't really mention how to populate a checkbox with
a value... but it does provide the following:
This creates a checkbox for each cu
On 8/28/06, Anthony N. Frasso <[EMAIL PROTECTED]> wrote:
Hello all, and thanks for your help in advance.
I have a relatively simple JSP that I'm trying to
present. I have a bean that is accessible as an
attribute in the request, as well as a form bean for
the form on this page. As an example,
Hello all, and thanks for your help in advance.
I have a relatively simple JSP that I'm trying to
present. I have a bean that is accessible as an
attribute in the request, as well as a form bean for
the form on this page. As an example, here is one of
the input components for the form:
This t
16 matches
Mail list logo