Validator JavaScript and html:radio buttons

2003-08-25 Thread Matt E
Hi all.  I have two radio buttons on a page, one both
named "outcome" one with the value of "Accepted" and
one with the value of "Rejected".  In my
validation.xml file, I say that outcome is required.

The Javascript checking generated by the Validator
framework doesn't give an error if neither on is
selected, however the backend will, and produce an
error I can see with the  tag.

How do I get the javascript to check the radio buttons
to make sure one is selected?



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Writing Javascript for Validators

2003-08-18 Thread Matt E
Robert,

> Warning, I haven't done this before, but need to :
> The validator-rules.xml and validator.xml file for
> your project have the 
> same format.
> In --your-- validator.xml you can enter:
> 
> 
>
> 
>   
>
classname="com.matte.futuredate.validator.FieldChecks"
>method="validateFutureDate"
>   methodParams="java.lang.Object,
>   
> org.apache.commons.validator.ValidatorAction,
>   
> org.apache.commons.validator.Field,
>   
> org.apache.struts.action.ActionErrors,
>   
> javax.servlet.http.HttpServletRequest"
>   msg="errors.required">
> 
>  
>  
>   
>  

My question is this.  In that Javascript code, I need
to "validate" the fields.  How do I know what fields
need to validated?  The javascript methods provided by
Struts for the other validators seem to call a method
that builds an array of all the fields in the form to
check, and then do a loop over that array.

(for example, the required validator makes a call to a
method called required()).

My question is what call should I be making?  I don't
know how the required() method is being generated (it
isn't in the validation-rules.xml file, but it appears
in the code included by html:javascript.  I'm going to
need something like a futuredate() method that builds
this array, but I don't know where I need to write it
(or how I tell struts to build it for me).

Does this make sense?

Cheers

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Writing Javascript for Validators

2003-08-18 Thread Matt E
Hello All,

I've written a new plugable validator rule, and now
I'd like to write some javascript for it.  Looking at
the existing javascript for other validators, I see
they all make a call like this:

oRequired = new required();

which (in this case) gets all the required fields. 
I'm not sure what generates this method, but I can see
it in my jsp when i put in html:javascript.

my new rule is called futuredate.  I don't know what
sort of method I should call that will be like
required(); but give me all the fields marked with
furuterdate.

How do I do this?

Cheers

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Form Bean Help?

2003-07-29 Thread Matt E
Wendy,

> If you need to pre-populate the form, read the DTO
> from the database and use
> BeanUtils.copyProperties(...) to copy the DTO values
> into the Form bean
> before forwarding to the view.
> 
> Take a look at the struts-example webapp, it works
> the way you're
> describing.

Outstanding!  This sounds like exactly what I want. 
I'll check it out, and post back if I have any
questions.

Cheers!

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Form Bean Help?

2003-07-29 Thread Matt E
Mike,

The bean is stored in the Session scope (the bean
needs to be stored in the session scope, so that some
other data for it which is valid for the life of the
session stays around).

Even if it was a request scoped bean, I'd still like a
way to fill out the action form before hand, because
then things like Radio buttons could be "preselected"
based on what I loaded from the database.

Cheers.
--- "Mainguy, Mike" <[EMAIL PROTECTED]> wrote:
> My angle on this is to only load the data from the
> database when the user is
> submitted a request to "read" data.  If they are
> submitting an "update"
> action, I don't load the data from the database.
>  
> -Original Message-
> From: Matt E [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 29, 2003 12:37 PM
> To: [EMAIL PROTECTED]
> Subject: Form Bean Help?
> 
> Hello All,
> 
> I'm running into a little problem, maybe someone can
> help me fix it.
> 
> My application is driven by filling out web forms. 
> At
> one point, A user can click the "Save Form" button,
> which writes the form information to a Database. 
> When
> the user visits the page again, the action builds a
> DTO that contains all the information they had
> filled
> out and puts it in the session scope, then forwards
> to
> the JSP page that has the form on it.
> 
> I had been using the value property of the
> struts-html
> tags to fill in the data, but I've noticed that when
> the user hits submit, if there is a validation
> error,
> they are pushed back to the page, and the data they
> had enetered is replaced with what was in the DTO
> (which is now old data).  I've also run into the
> problem of filling in things like radio buttons,
> based
> on what was in the DTO.
> 
> It seems to me that what I want to do is not pass
> along the DTO with the action, but fill out parts of
> the Form Bean before forwarding to the page that
> displays it, at which point I could remove the value
> properties of the html tags, and have everything
> work.
> 
> My question is, how can I do this from the action? 
> Or
> do I want to attack this problem in another way?
> 
> Thanks!
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> This message and its contents (to include
> attachments) are the property of Kmart Corporation
> (Kmart) and may contain confidential and proprietary
> information. You are hereby notified that any
> disclosure, copying, or distribution of this
> message, or the taking of any action based on
> information contained herein is strictly prohibited.
> Unauthorized use of information contained herein may
> subject you to civil and criminal prosecution and
> penalties. If you are not the intended recipient,
> you should delete this message immediately.
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Form Bean Help?

2003-07-29 Thread Matt E
Hello All,

I'm running into a little problem, maybe someone can
help me fix it.

My application is driven by filling out web forms.  At
one point, A user can click the "Save Form" button,
which writes the form information to a Database.  When
the user visits the page again, the action builds a
DTO that contains all the information they had filled
out and puts it in the session scope, then forwards to
the JSP page that has the form on it.

I had been using the value property of the struts-html
tags to fill in the data, but I've noticed that when
the user hits submit, if there is a validation error,
they are pushed back to the page, and the data they
had enetered is replaced with what was in the DTO
(which is now old data).  I've also run into the
problem of filling in things like radio buttons, based
on what was in the DTO.

It seems to me that what I want to do is not pass
along the DTO with the action, but fill out parts of
the Form Bean before forwarding to the page that
displays it, at which point I could remove the value
properties of the html tags, and have everything work.

My question is, how can I do this from the action?  Or
do I want to attack this problem in another way?

Thanks!

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Writing values from javabeans to html tags.

2003-07-24 Thread Matt E
Hello All!

I'm trying to give an inital value to one of the
fields in a form in an application of mine.

I had tried this:

 to write out the value, so I
know it's there.

What do I need to do so that
<%=requestDTO.getComments()%> works also?

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Struts Taglib DTD's and Firewalls

2003-06-25 Thread Matt E
Kevin,

I downloaded all the DTDs and editied the taglib and
XML files to remove the url but keep the DTD.  I now
get this error:

org.apache.jasper.compiler.CompileException:
/int0/webdata/swtools/apps/tir/toolDevelopmentRequest.jsp(0,0)
Unable to open taglibrary /WEB-INF/struts-html.tld :
Parse Error in the tag library descriptor: Relative
URI "web-app_2_3.dtd"; can not be resolved without a
base URI.

What do I need to do to tell the xml/tld files that
the dtd is in the same directory as the other files? 
Do I have to put an absoulte URL or can I get away
with a realitive path somehow?

Thanks


--- Kevin Peters <[EMAIL PROTECTED]>
wrote:
> That's what we did.  We downloaded all of the DTDs
> our application
> references so we can point to a local copy.  Make
> sure you keep them
> current, though.
> 
> 
> Kevin
> 
> -Original Message-
> From: Matt E [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 25, 2003 10:06 AM
> To: [EMAIL PROTECTED]
> Subject: Struts Taglib DTD's and Firewalls
> 
> 
> Hello All.
> 
> I'm attempting to deploy a Struts project to a
> server
> here at work.  Whenever I try to access any pages in
> it I get this error:
> 
> org.apache.jasper.compiler.CompileException:
>
/int0/webdata/swtools/apps/tir/toolDevelopmentRequest.jsp(0,0)
> Unable to open taglibrary /WEB-INF/struts-html.tld :
> Parse Error in the tag library descriptor: External
> entity not found:
> "http://java.sun.com/dtd/web-app_2_3.dtd";.
> 
> I think this is due to a firewall that blocks all
> access to external sites unless you have entered a
> username and password.
> 
> From my local machine I can access the dtd.  Is
> there
> anyway to put a copy of it on the local machine, and
> then tell the tag libs to look at the local copy of
> the dtd?
> 
> I don't want to try to get a hole broken in the
> firewall for this.
> 
> Thanks all!
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
***
> 
> This electronic mail transmission contains
> confidential and/or privileged 
> information intended only for the person(s) named. 
> Any use, distribution, 
> copying or disclosure by another person is strictly
> prohibited. 
>
***
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Struts Taglib DTD's and Firewalls

2003-06-25 Thread Matt E
Hello All.

I'm attempting to deploy a Struts project to a server
here at work.  Whenever I try to access any pages in
it I get this error:

org.apache.jasper.compiler.CompileException:
/int0/webdata/swtools/apps/tir/toolDevelopmentRequest.jsp(0,0)
Unable to open taglibrary /WEB-INF/struts-html.tld :
Parse Error in the tag library descriptor: External
entity not found:
"http://java.sun.com/dtd/web-app_2_3.dtd";.

I think this is due to a firewall that blocks all
access to external sites unless you have entered a
username and password.

>From my local machine I can access the dtd.  Is there
anyway to put a copy of it on the local machine, and
then tell the tag libs to look at the local copy of
the dtd?

I don't want to try to get a hole broken in the
firewall for this.

Thanks all!

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Adding to JavaScript Validator

2003-06-23 Thread Matt E
Hello All.

I'm using Struts 1.1rc2 with the Validator Frame work.
 I have some conditional validation that has to be
done (if this option is selected, then some other
field must be filled out).

Everything works fine when I mess around with the
validate method of the action form, but I don't know
what I need to do so get JavaScript validation
working.

I'd like to have a way to call my own methods in
adition to the ones called when I use  and have all the errors pop up in the
same error box.

Is there an easy way to do this?

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Passing Information with forward

2003-06-23 Thread Matt E
Hello All.  I'm running up a problem and I'm not sure
how to solve it.

In my application, there is an action called
PLAReview.  An e-mail is sent to someone telling them
to click on a link that looks like this:

http://www.whatever.com/PLAReview.do?id=1

The Action PLAReview uses that ID number to pull some
data out of a database, push it into a DTO, put the
DTO in the request scope, and then calls
mapping.findForward("Success"); which forwards to
another jsp page.

This page prints out all the data from the DTO, and
also has a few form feilds that the user needs to
complete, and then submit.

I'm rendering a  object on this second
page, that will hold the id of this request (the same
ID value from above), but I don't know how to get it
there.

I tried doing:



But that didn't seem to work because I think it wants
to get the ID property from the ActionForm object tied
to the form, which doesn't have the correct value.

I need a way to get that value from the first URL, and
also make sure that if validation fails and the form
is redisplayed, the value for ID is pulled from the
ActionForm (since I think the initial id from the
first URL will be lost).

Does this make any sense?

Cheers! 

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Newbie: Passing information from an Action to a JSP

2003-06-20 Thread Matt E
Hello All,

Here's what I want to do.  I have an action called
LookupRequest.  It has some code that gets data out of
a Database, builds a Data Transfer Objects from it,
and then will forward to another jsp using
ActionMapping.

However, in that JSP I need to access the data
transfer object that I just built in the action.  I'm
unsure how to keep this object around for the rest of
the request, so I can access it in the JSP that is
forwarded to.

I'm sure I'm missing something trivial, but I don't
know how I should do this.

Thanks!

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: logic:iterate problems

2003-06-17 Thread Matt E
Worked like a charm.  I noticed that you removed the
collection argument and changed it to a name argument.

For the archives, here's the complete code:

<%
  Collection c =
org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines();
  pageContext.setAttribute("productLineCollection",c);
%>


Next element is 


Thanks!

--- "Chen, Gin" <[EMAIL PROTECTED]> wrote:
> 
>   Next element is  property="blah"/>
> 
> 
> Doesn't matter what scope you put it in.
> 
> -Tim
> 
> -Original Message-
> From: Matt E [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 17, 2003 11:23 AM
> To: Struts Users Mailing List
> Subject: RE: logic:iterate problems
> 
> 
> Hello!
> 
> Changed the code to read:
> 
> <%
>   Collection c = ...getProductLines();
>   Iterator it = c.iterator();
>   out.print(it);  
> 
>   pageContext.setAttribute("colName",c);
> 
> %>
> 
> However it still fails with the same problem.
> 
> Cheers.
> 
> --- Valery Jacot <[EMAIL PROTECTED]> wrote:
> > Hello,
> > 
> > Try to put your collection in the pageContext and
> > not in the request...
> > 
> > Strut's tags works a lot with the pageContext...
> > 
> > 
> > -Original Message-
> > From: Matt E [mailto:[EMAIL PROTECTED]
> > Sent: mardi, 17. juin 2003 17:09
> > To: Struts Users Mailing List
> > Subject: Re: logic:iterate problems
> > 
> > 
> > > <%
> > >   Collection c = ...getProductLines();
> > >   Iterator it = c.iterator();
> > >out.print(it);  
> > > %>
> > 
> > This worked as expected.  It wrote:
> > [EMAIL PROTECTED] to the HTML,
> which
> > leads me to belive that the collection is
> returning
> > an
> > iterator.
> > 
> > I then tried this (after deleting the above):
> > 
> > <%
> >   Collection c = ...getProductLines();
> >   request.setAttribute("colName",c);
> > %>
> > 
> >  > collection="colName">
> > Is this working?
> > 
> > 
> > However, when I introduce the logic iterate tag, I
> > get
> > the same "Cannot create iterator for this
> > collection"
> > error.
> > 
> > I'd really like to not have to drop back to coding
> > Java to do the Iteration, since the taglib seems
> > cleaner to me.
> > 
> > Any ideas what to try?
> > 
> > 
> > 
> > 
> > 
> > __
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> >
>

> ***
> > 
> > This email and any files transmitted with it are
> > confidential and
> > intended solely for the use of the individual or
> > entity to whom they
> > are addressed. If you have received this email in
> > error please notify
> > the system manager to [EMAIL PROTECTED]
> > 
> >
>

> ***
> > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> 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]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: logic:iterate problems

2003-06-17 Thread Matt E
Hello!

Changed the code to read:

<%
  Collection c = ...getProductLines();
  Iterator it = c.iterator();
  out.print(it);  

  pageContext.setAttribute("colName",c);

%>

However it still fails with the same problem.

Cheers.

--- Valery Jacot <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Try to put your collection in the pageContext and
> not in the request...
> 
> Strut's tags works a lot with the pageContext...
> 
> 
> -Original Message-
> From: Matt E [mailto:[EMAIL PROTECTED]
> Sent: mardi, 17. juin 2003 17:09
> To: Struts Users Mailing List
> Subject: Re: logic:iterate problems
> 
> 
> > <%
> >   Collection c = ...getProductLines();
> >   Iterator it = c.iterator();
> >out.print(it);  
> > %>
> 
> This worked as expected.  It wrote:
> [EMAIL PROTECTED] to the HTML, which
> leads me to belive that the collection is returning
> an
> iterator.
> 
> I then tried this (after deleting the above):
> 
> <%
>   Collection c = ...getProductLines();
>   request.setAttribute("colName",c);
> %>
> 
>  collection="colName">
> Is this working?
> 
> 
> However, when I introduce the logic iterate tag, I
> get
> the same "Cannot create iterator for this
> collection"
> error.
> 
> I'd really like to not have to drop back to coding
> Java to do the Iteration, since the taglib seems
> cleaner to me.
> 
> Any ideas what to try?
> 
> 
> 
> 
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
***
> 
> This email and any files transmitted with it are
> confidential and
> intended solely for the use of the individual or
> entity to whom they
> are addressed. If you have received this email in
> error please notify
> the system manager to [EMAIL PROTECTED]
> 
>
***
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: logic:iterate problems

2003-06-17 Thread Matt E
> <%
>   Collection c = ...getProductLines();
>   Iterator it = c.iterator();
>out.print(it);  
> %>

This worked as expected.  It wrote:
[EMAIL PROTECTED] to the HTML, which
leads me to belive that the collection is returning an
iterator.

I then tried this (after deleting the above):

<%
  Collection c = ...getProductLines();
  request.setAttribute("colName",c);
%>


Is this working?


However, when I introduce the logic iterate tag, I get
the same "Cannot create iterator for this collection"
error.

I'd really like to not have to drop back to coding
Java to do the Iteration, since the taglib seems
cleaner to me.

Any ideas what to try?





__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: logic:iterate problems

2003-06-17 Thread Matt E
480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)




--- guo yingshou <[EMAIL PROTECTED]> wrote:
> try something like:
> 
> <%
>   Collection c =
>
org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines();
> 
>   request.setAttribute("colName",c);
> %>
> 
> and then:
> 
>  
> 
> 
> you can alse put your collection into the jsp scope
> variable somewhere in your action.
> 
> hope it helps.
> 
> guo
> 
>  --- Matt E <[EMAIL PROTECTED]> µÄÕýÎÄ£º> Hello
> All!
> > 
> > I'm running into some problems getting the
> > logic:iterate tag to work.
> > 
> > I have a class who's full name is
> > org.ellism.tir.util.DatabaseConstantsAdapter.  It
> > has
> > a public method, getInstance() that returns an
> > instance of itself (The class itself is a
> > singleton). 
> > This class has a method getProductLines() that
> > returns
> > an ArrayList full of
> > org.ellis.tir.util.ProductLineToken objects.  I'd
> > like
> > to iterate over this collection and print some
> stuff
> > out.
> > 
> > I've tried this:
> > 
> > <%@ taglib uri="/WEB-INF/struts-html.tld"
> > prefix="html" %>
> > <%@ taglib uri="/WEB-INF/struts-bean.tld"
> > prefix="bean" %>
> > <%@ taglib uri="/WEB-INF/struts-logic.tld"
> > prefix="logic" %>
> > 
> > ...Lots of HTML code...
> > 
> > 
> > The name is:  > property="name"/>.
> > 
> > 
> > However this doesn't seem to work, I get this
> error:
> > 
> > org.apache.jasper.JasperException: Cannot create
> > iterator for this collection
> > ..Stack Trace
> > 
> > I'm not sure why this happens?  The object
> returned
> > by
> >
>
org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines()
> > is of type ArrayList, and I thought that was a
> valid
> > collection to iterate over?
> > 
> > Any insights would be wonderful.
> > 
> > Cheers!
> > 
> > __
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >  
> 
>
_
> Do You Yahoo!? 
> Á÷Á¬ÍøÂçÊÀ½çµÄ¡°Ä㡱ÊÇË­£¿
>
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



logic:iterate problems

2003-06-16 Thread Matt E
Hello All!

I'm running into some problems getting the
logic:iterate tag to work.

I have a class who's full name is
org.ellism.tir.util.DatabaseConstantsAdapter.  It has
a public method, getInstance() that returns an
instance of itself (The class itself is a singleton). 
This class has a method getProductLines() that returns
an ArrayList full of
org.ellis.tir.util.ProductLineToken objects.  I'd like
to iterate over this collection and print some stuff
out.

I've tried this:

<%@ taglib uri="/WEB-INF/struts-html.tld"
prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld"
prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld"
prefix="logic" %>

...Lots of HTML code...


The name is: .


However this doesn't seem to work, I get this error:

org.apache.jasper.JasperException: Cannot create
iterator for this collection
..Stack Trace

I'm not sure why this happens?  The object returned by
org.ellism.tir.util.DatabaseConstantsAdapter.getInstance().getProductLines()
is of type ArrayList, and I thought that was a valid
collection to iterate over?

Any insights would be wonderful.

Cheers!

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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