I don't know if there is anything like it for Struts tags, but Sue Spielman's "JSTL Practical Guide for JSP Programmers" (Morgan Kaufmann) is exactly what you are looking for if you also use JSTL tags. It's 200 pages, example-based and 20 bucks.

Erik


Scott Purcell wrote:

Hello,

following up with my select-list issue, I ended up with this next question. 
First off, I have been referencing the HTML tag users guide. But to be honest, 
it does me little use, as it does not show how to use the html:select tags, 
etc. Some make sense, but most do not. I am probably like others, I like to see 
examples, and put the logic together in that way.

Finally late last night I was able to get the select-list stuff to work, but it was 
through a hack and stealing of code. I ended up using something that was a 
"LabelValueBean" and passing it values.

I own the O'Reilly struts book, and have read it many times, and through this, 
I understand how the framework works. The book is great at getting an 
understanding of the framework, but it does not go into any detail of using 
tags within the framework. The problem I am having now, is that I am wasting a 
ton of time with the logic: html: and bean: tags. I can populate my 
ActionForms, pass off to the Action  classes, but I am having trouble, or a 
lack of understanding, how to cleanly populate my JSP pages from the 
ActionForms for lists, selects, etc.


Does anyone know of any books, or links that spend some time on combining all these tags, struts, etc to create a full streamlined struts application? I shopped Amazon last night, but none seem to stand out for myself.

Thanks,
Scott






-----Original Message----- From: Richard Bywater [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 22, 2005 11:13 PM To: Struts Users Mailing List Subject: Re: select list issues:


I assume you know about the HTML tag Users Guide? (http://struts.apache.org/userGuide/struts-html.html)

Richard.

On Tue, 22 Mar 2005 14:35:25 -0600, Scott Purcell
<[EMAIL PROTECTED]> wrote:


Hello,

I am trying to do something pretty simple I would think. I am also trying to 
use html:select tags, logic, etc. to keep the project uniform.
I have a jsp page that I need to show a set of users in a select list.

So I have an action that creates a bean in memory and does not validate.
    <action path="/displaySelect"
     type="foo.WorkAsUser"
     scope="request"
     name="usersbean"
     validate="false"
     input="/jsp/admin/mainAdmin.jsp">
     <forward name="Success" path="/jsp/admin/testSelect.jsp" />
     <!-- test above only -->
    </action>

In the foo.WorkAsUser Class, I am doing a query and grabbing the data into a 
Vector:
Then I cast the form (in this action) class back to the usersbean (type).

eg:
com.UsersBean usersbean = (UsersBean)form;
Then I am setting the bean with the Vector.

usersbean.setSelectVector(vector);

So at this point, I believe to have a good vector of String names options, in 
the usersBean.

Now in the JSP page how do I incorporate this bean into something like this:
           <html:select property="multipleSelect" size="10" multiple="true">
             <html:options name="multipleValues" labelName="multipleValues" />
           </html:select>

I cannot find the answer. I do have a form tag in this jsp page that calls once 
again for this usersbean: So I know I own the bean in the request scope, but 
how do put all this data into a select list?

Any ideas

Thanks,
Scott





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


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





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



Reply via email to