logic:iterate tag with html:select

2003-10-14 Thread Xiuyu Zhang
Hi all,

I am try it to do a list in the action class and pass
it to a jsp page as the html:select options.  I am
using Strut 1.0.

in the action class, I do this:


ArrayList codes = new ArrayList();
codes.add("--select one--");

request.setAttribute("CODES", codes);

in jsp, I try to do:








submit  
 


I got the following errors:

Compilation of
'C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_hesm_dir_hesm\jsp_servlet\__hospitalsearch.java'
failed:


C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_hesm_dir_hesm\jsp_servlet\__hospitalsearch.java:319:
cannot resolve symbol
probably occurred due to an error in
/hospitalsearch.jsp line 52:




Full compiler error(s):
C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver__appsdir_hesm_dir_hesm\jsp_servlet\__hospitalsearch.java:319:
cannot resolve symbol
symbol  : method setValue (java.lang.Object)
location: class
org.apache.struts.taglib.html.OptionTag
 
_html_option0.setValue(code.get(ctr.intValue())); //[
/hospitalsearch.jsp; Line: 52]
   ^
1 error



Do you know how can I make it right?

Thanks,
katlyn


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



sorting using logic:iterate tag

2003-08-25 Thread Chiyaan Schumi
Hi *,

Is there any possibility of sorting the data elements in the form bean with 
all indexed properties in it.  I need to display this data using  
logic:iterate tag.  does struts provide any functionality similar to this.  
The data has to be displayed in html table format, by selecting any column 
for sort, the other properties need to be ordered according to the sorted 
column

my form bean:

public class IterateForm extends ActionForm {

  private int intIndexed[] ={1,2,3,4,5};

  private String strAry[] =
   { "String 0", "String 1", "String 2", "String 3", "String 4" };
   public String getStringIndexed(int index) { return (strAry[index]); }

   public String[] getStringIndexed(){
return strAry;
   }
   public void setStringIndexed(int index, String value)
   { strAry[index] = value; }
  public int getIntIndexed(int index) {
return (intIndexed[index]);
   }
public int[] getIntIndexed() {
return intIndexed;
}
public void setIntIndexed(int index, int value){
intIndexed[index] = value;
}
}
Thanks in advance
Sch.
_
Find an old friend. Revisit your past. http://www.batchmates.com/msn.asp 
It's never been easier!

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


RE: Resetting of Checkbox when using logic:iterate Tag

2003-08-22 Thread Raghu.Ramakrishnan


Hi Susan,

In my application, I do not have to reset the entire form, as I
do an update and return to the same page... The user should be able to
see the checkboxes that he set or disabled. Do you have any ideas??? One
idea given to me was to read the request parameters and then set the
checkboxes according... Plss let me know if you know of anything else...

Thanks,
Raghu

-Original Message-
From: Susan Bradeen [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2003 2:00 PM
To: Struts Users Mailing List
Subject: Re: Resetting of Checkbox when using logic:iterate Tag


Are you using the reset() method of your ActionForm to set the checkbox
to 
null or false?

http://jakarta.apache.org/struts/faqs/newbie.html#checkbox

Susan Bradeen

On 08/22/2003 12:32:17 PM "Raghu.Ramakrishnan" wrote:

> Hi,
> 
> I have one issue, that is I have some checkboxes within my 
> , and
> 
> 1) When the user clicks on the checkbox, the property corresponding to

> the checkbox is set to 'on'.
> 2) When the user de-clicks the checkbox(removes the check), the 
> checkbox is still set to 'on', how do we reset the checkbox...
> 
> 
> My code is as follows:
> 
>  indexId="clmIdx" id="indexBean" 
> type="com.tgt.dist.icl.formbeans.WorkQueueBean">
> 
>  indexed="true"
> >
>  
> P
> W
> A
> M
> C
> 
> 
>  indexed="true">
> 
> 
> 
> WorkQueueForm is the Form Bean
> workQueueArrList is a property of the WorkQueue Form Bean which 
> contains WorkQueue Beans.
> 
> 
> I would be obliged if you could let us know how to reset the checkbox,

> when the user Deselects the checkbox, the checkbox property in the 
> WorkQeue Bean should be reset to null.
> 
> Thanks,
> Raghu
> 
> -Original Message-
> From: Dan Tran [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 22, 2003 10:45 AM
> To: Struts Users Mailing List
> Subject: Re: struts test info
> 
> 
> http://strutstestcase.sourceforge.net/
> 
> -Dan
> - Original Message -
> From: "ronanoc" <[EMAIL PROTECTED]>
> To: "Struts List" <[EMAIL PROTECTED]>
> Sent: Friday, August 22, 2003 6:13 AM
> Subject: struts test info
> 
> 
> > Can anyone point me in the direction of good examples and info about

> > using/writing Struts tests other than the documentation that 
> > comes
> 
> > with Struts test it self...?
> >
> > Thanks in advance.
> >
> > Ron.
> > Always ready to Discotogogo
> >
> >
> > 
> > -
> > 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]
> 

-
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]



Re: Resetting of Checkbox when using logic:iterate Tag

2003-08-22 Thread Susan Bradeen
Are you using the reset() method of your ActionForm to set the checkbox to 
null or false?

http://jakarta.apache.org/struts/faqs/newbie.html#checkbox

Susan Bradeen

On 08/22/2003 12:32:17 PM "Raghu.Ramakrishnan" wrote:

> Hi,
> 
> I have one issue, that is I have some checkboxes within my
> , and
> 
> 1) When the user clicks on the checkbox, the property corresponding to
> the checkbox is set to 'on'.
> 2) When the user de-clicks the checkbox(removes the check), the checkbox
> is still set to 'on', how do we reset the checkbox...
> 
> 
> My code is as follows:
> 
>  indexId="clmIdx" id="indexBean"
> type="com.tgt.dist.icl.formbeans.WorkQueueBean">
> 
>  >
>  
> P
> W
> A
> M
> C
> 
> 
>  indexed="true">
> 
> 
> 
> WorkQueueForm is the Form Bean
> workQueueArrList is a property of the WorkQueue Form Bean which contains
> WorkQueue Beans.
> 
> 
> I would be obliged if you could let us know how to reset the checkbox,
> when the user
> Deselects the checkbox, the checkbox property in the WorkQeue Bean
> should be reset to null.
> 
> Thanks,
> Raghu
> 
> -Original Message-
> From: Dan Tran [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 22, 2003 10:45 AM
> To: Struts Users Mailing List
> Subject: Re: struts test info
> 
> 
> http://strutstestcase.sourceforge.net/
> 
> -Dan
> - Original Message -
> From: "ronanoc" <[EMAIL PROTECTED]>
> To: "Struts List" <[EMAIL PROTECTED]>
> Sent: Friday, August 22, 2003 6:13 AM
> Subject: struts test info
> 
> 
> > Can anyone point me in the direction of good examples and info about
> > using/writing Struts tests other than the documentation that comes
> 
> > with Struts test it self...?
> >
> > Thanks in advance.
> >
> > Ron.
> > Always ready to Discotogogo
> >
> >
> > -
> > 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]
> 

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



Resetting of Checkbox when using logic:iterate Tag

2003-08-22 Thread Raghu.Ramakrishnan



Hi,

I have one issue, that is I have some checkboxes within my
, and 

1) When the user clicks on the checkbox, the property corresponding to
the checkbox is set to 'on'. 
2) When the user de-clicks the checkbox(removes the check), the checkbox
is still set to 'on', how do we reset the checkbox...


My code is as follows:



 
 
P 
W
A
M
C






WorkQueueForm is the Form Bean
workQueueArrList is a property of the WorkQueue Form Bean which contains
WorkQueue Beans.


I would be obliged if you could let us know how to reset the checkbox,
when the user
Deselects the checkbox, the checkbox property in the WorkQeue Bean
should be reset to null.

Thanks,
Raghu

-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2003 10:45 AM
To: Struts Users Mailing List
Subject: Re: struts test info


http://strutstestcase.sourceforge.net/

-Dan
- Original Message - 
From: "ronanoc" <[EMAIL PROTECTED]>
To: "Struts List" <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 6:13 AM
Subject: struts test info


> Can anyone point me in the direction of good examples and info about
> using/writing Struts tests other than the documentation that comes

> with Struts test it self...?
> 
> Thanks in advance.
> 
> Ron.
> Always ready to Discotogogo
> 
> 
> -
> 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]



Re: logic:iterate tag fails on large dataset, succeeds on small one?

2003-07-23 Thread David Graham
--- Aaron Humphrey <[EMAIL PROTECTED]> wrote:
> 
> 
> > If both JSTL and Struts are failing, it's probably your code that's
> > broken.
> 
> > David
> 
> Often a reasonable assumption, in the circumstances, but it turns out
> not so.
> 
> I got my page to work with a straight Servlet full of out.println()
> statements.
> Then I got it working using one Servlet filling my bean and putting it
> in
> session context and then forwarding to the other, in case that was the
> problem.
> 
> And then I put in  tags to replace my  tags, which I
> perhaps should have done in the first place.  I guess I assumed they'd
> be
> as interchangeable as  and .  But 
> works.  Which leads me to conclude that the problem might be in
> .
> 
> Am I correct in thinking that future versions of Struts may end up using
> JSTL
> anyway?  

The Struts tags are largely in maintainence mode at this point because the
emphasis is on using standardized technologies like the JSTL.  There's
been no decision regarding the future of the Struts tags but I haven't
seen many committers interested in adding new ones or upgrading existing
tags.  There doesn't seem to be much point in maintaining proprietary tags
when the standard versions are easier to use and more powerful.

I'm glad you got it working!

David

> If so, then I guess I'll keep to this approach.  Someone else
> can
> debug  if they want to.
> 
> 
> Aaron V. Humphrey
> Kakari Systems Ltd.
> 
> 
> 
> -
> 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]



Re: logic:iterate tag fails on large dataset, succeeds onsmall one?

2003-07-23 Thread Aaron Humphrey


> If both JSTL and Struts are failing, it's probably your code that's
> broken.

> David

Often a reasonable assumption, in the circumstances, but it turns out not so.

I got my page to work with a straight Servlet full of out.println() statements.
Then I got it working using one Servlet filling my bean and putting it in
session context and then forwarding to the other, in case that was the
problem.

And then I put in  tags to replace my  tags, which I
perhaps should have done in the first place.  I guess I assumed they'd be
as interchangeable as  and .  But 
works.  Which leads me to conclude that the problem might be in .

Am I correct in thinking that future versions of Struts may end up using JSTL
anyway?  If so, then I guess I'll keep to this approach.  Someone else can
debug  if they want to.


Aaron V. Humphrey
Kakari Systems Ltd.



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



Re: logic:iterate tag fails on large dataset, succeeds on smallone?

2003-07-22 Thread Nagendra Kumar O V S








  hi,
  this happens only when struts is unable to load the resources from 
  the bundle. make sure u have everything in place and restart web 
  application or server.
  also u may want to try getting that prompt.username from the bundle 
  using 
  in ur jsp to actually check if struts or validator is the 
  culprit.
   
  -- nagi
  ---Original Message---
   
  
  From: Struts Users Mailing 
  List
  Date: Tuesday, July 22, 
  2003 03:15:09 PM
  To: Struts Users Mailing 
  List
  Subject: Re: 
  logic:iterate tag fails on large dataset, succeeds on 
smallone?
   Hi,I am using struts validator in the logon.jsp of my 
  application. If I don'tenter the username & click on submit the 
  message displayed is "null isrequired". Instead it should be "Username 
  is required".The part of the code in the validator-rules.xml is 
  correct. I have givenmsg="errors.required"Also I have given 
  "errors.required={0} is required." &"prompt.username=Username" in 
  the ApplicationResources.properties file.Still it is giving the same 
  alert as "null is required" instead of"Username" is 
  required.The corresponding part in the validation.xml 
  isdepends="required, 
  minlength,maxlength">resource="false"/>resource="false"/>maxlength16minlength3Has 
  anybody experienced this problem earlier 
  ?prashant.-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




  IncrediMail - 
Email has finally evolved - Click 
Here



Re: logic:iterate tag fails on large dataset, succeeds on small one?

2003-07-22 Thread prashant . mdesai

Hi,
I am using struts validator in the logon.jsp of my application.  If I don't
enter the username & click on submit the message displayed is "null is
required". Instead it should be "Username is required".
The part of the code in the validator-rules.xml is correct. I have given
msg="errors.required"
Also I have given "errors.required={0} is required."  &
"prompt.username=Username" in the ApplicationResources.properties file.
Still it is giving the same alert as "null is required" instead of
"Username" is required.

The corresponding part in the validation.xml is






maxlength
16


minlength
3



Has anybody experienced this problem earlier ?


prashant.



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



Re: logic:iterate tag fails on large dataset, succeeds on small one?

2003-07-21 Thread David Graham
--- Aaron Humphrey <[EMAIL PROTECTED]> wrote:
> 
> 
> >>> [EMAIL PROTECTED] 07/21/03 12:00PM >>>
> > I suggest you use the JSTL's  tag instead of the Struts
> iterate
> > tag.  I have dynamic query pages that use forEach and display n number
> of
> > fields with no problem.  As an added bonus you'll get improved page
> > rendering time because containers can optimize the performance of JSTL
> > tags.
> 
> Okay, I got JSTL 1.0 working on my machine(after giving up on 1.1, which
> is
> apparently too bleeding-edge).  Replacing logic:iterate with c:forEach
> is
> straightforward.
> 
> And I still get the same problem.  Oh, the exception might come up on a
> different
> line of my compiled JSP, but the same thing is happening.
> 
> Does this mean that it's no longer a Struts problem?  Should I be asking
> these
> questions on a JSTL forum?

If both JSTL and Struts are failing, it's probably your code that's
broken.

David

> 
> 
> Aaron V. Humphrey
> Kakari Systems Ltd.
> 
> 
> 
> -
> 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 tag fails on large dataset, succeeds onsmall one?

2003-07-21 Thread Aaron Humphrey


>>> [EMAIL PROTECTED] 07/21/03 12:00PM >>>
> I suggest you use the JSTL's  tag instead of the Struts iterate
> tag.  I have dynamic query pages that use forEach and display n number of
> fields with no problem.  As an added bonus you'll get improved page
> rendering time because containers can optimize the performance of JSTL
> tags.

Okay, I got JSTL 1.0 working on my machine(after giving up on 1.1, which is
apparently too bleeding-edge).  Replacing logic:iterate with c:forEach is
straightforward.

And I still get the same problem.  Oh, the exception might come up on a different
line of my compiled JSP, but the same thing is happening.

Does this mean that it's no longer a Struts problem?  Should I be asking these
questions on a JSTL forum?


Aaron V. Humphrey
Kakari Systems Ltd.



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



Re: logic:iterate tag fails on large dataset, succeeds on small one?

2003-07-21 Thread David Graham
I suggest you use the JSTL's  tag instead of the Struts iterate
tag.  I have dynamic query pages that use forEach and display n number of
fields with no problem.  As an added bonus you'll get improved page
rendering time because containers can optimize the performance of JSTL
tags.

David


--- Aaron Humphrey <[EMAIL PROTECTED]> wrote:
> 
> I am trying to do a very simple data-display web application using
> Struts, with MySQL on the
> back end.
> 
> Basically, I take a ResultSet and its ResultSetMetaData and put it into
> some beans.  I have a
> TableDataView object which contains a FieldList and a RecordCollection. 
> FieldList has a property
> called fields which returns a List.  RecordCollection implements
> Collection, and containts an
> ArrayList of Record objects; Record returns an array of the field value
> objects as the property
> fieldValues.
> 
> My JSP page(showtable.jsp)looks like:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> If I run this on a small table, with 10 fields and 11 records, it works
> fine.  If I run it on a
> large table, with 28 fields and 307 records, then I get:
> 
> javax.servlet.ServletException: cannot find bean fvalues in any scope
> at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
> textImpl.java:533)
> at
> org.apache.jsp.showtable_jsp._jspService(showtable_jsp.java:192)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> ...[deletia...I can't imagine that any of it has anything to do with my
> error]
> at java.lang.Thread.run(Thread.java:536)
> 
> I can eliminate this problem if I reduce the number of fields in the
> table to 9 or 10,
> but I can't see why this should be a problem, and certainly not why my
> looping bean
> should suddenly become unavailable.  My unit tests seem to be telling me
> that my
> Record bean should be properly returning a list of 28 field values.  I
> don't know at
> what point things are breaking down.  I'm not experienced with JSP tag
> programming,
> so I haven't been able to learn much from IterateTag.java, or the
> compiled version
> of showtable.jsp.  Any pointers on my problem would be much appreciated.
> 
> 
> 
> 
> -
> 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 tag fails on large dataset, succeeds on smallone?

2003-07-21 Thread Aaron Humphrey

I am trying to do a very simple data-display web application using Struts, with MySQL 
on the
back end.

Basically, I take a ResultSet and its ResultSetMetaData and put it into some beans.  I 
have a
TableDataView object which contains a FieldList and a RecordCollection.  FieldList has 
a property
called fields which returns a List.  RecordCollection implements Collection, and 
containts an
ArrayList of Record objects; Record returns an array of the field value objects as the 
property
fieldValues.

My JSP page(showtable.jsp)looks like:


















If I run this on a small table, with 10 fields and 11 records, it works fine.  If I 
run it on a
large table, with 28 fields and 307 records, then I get:

javax.servlet.ServletException: cannot find bean fvalues in any scope
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
textImpl.java:533)
at org.apache.jsp.showtable_jsp._jspService(showtable_jsp.java:192)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
...[deletia...I can't imagine that any of it has anything to do with my error]
at java.lang.Thread.run(Thread.java:536)

I can eliminate this problem if I reduce the number of fields in the table to 9 or 10,
but I can't see why this should be a problem, and certainly not why my looping bean
should suddenly become unavailable.  My unit tests seem to be telling me that my
Record bean should be properly returning a list of 28 field values.  I don't know at
what point things are breaking down.  I'm not experienced with JSP tag programming,
so I haven't been able to learn much from IterateTag.java, or the compiled version
of showtable.jsp.  Any pointers on my problem would be much appreciated.




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



RE: Help- logic:iterate tag

2003-06-09 Thread Kamholz, Keith (corp-staff) USX
As far as your question about rebuilding the table, I'm not sure exactly
what you're asking.  These sorts of things are generally done automatically.

I can answer your other question though.  The 'type' attribute of the
logic:iterate tag specifies the name of the class that is stored in your
collection that you are iterating through.  For example, if you just have an
ArrayList stored in the request with the attribute "someList", and it stores
strings that you want to iterate through, you would use:


(Do something with 'thisElement')


Does that help more?


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 1:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Help- logic:iterate tag


Also could u tell me as what u defined ur action form (eg: ArrayList
storing type AnsmItem, and 
what is type used for  type="com.moog.us.app.ans.data.AnsmItem">


>>> [EMAIL PROTECTED] 06/09/03 01:22PM >>>
This will definitely help me , but the reason for asking this question
..

In my application my requirement is to have multiple HTML elements with
the same name.

eg:






  
   
   MH 
   MSA 
   NATIONAL 
 




But the above table can be 1 row or many rows (dynamic). Once the user
submits the page, and say there is some validation error, I want to
rebuild the table with the values from the action form.



Hope i am clear, if not I will further info.

>>> [EMAIL PROTECTED] 06/09/03 12:33PM >>>
Well, I'm not sure exactly what you want to know, but here's an example
of
how I used it in an application I'm currently working on:























"groups" is an ArrayList that I put in the request from the preceding
action.  it stores variables of type AnsmItem.  "ansm" is the local bean
name that you use within the iterate tag to access the current element
of
the collection.

Let me know if you have any questions about it, or if you want to know
anything else.


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-Original Message-----
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 11:22 AM
To: [EMAIL PROTECTED]
Subject: Help- logic:iterate tag


Hi

I am trying to understand the logic:iterate tag. I have gone thru the
docs
but could figure out some of the attributes of this tag.

My confusion is following attributes

1. property="" 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of
usage.

Thanks

-
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]



RE: Help- logic:iterate tag

2003-06-09 Thread Sashi Ravipati
Also could u tell me as what u defined ur action form (eg: ArrayList
storing type AnsmItem, and 
what is type used for  type="com.moog.us.app.ans.data.AnsmItem">


>>> [EMAIL PROTECTED] 06/09/03 01:22PM >>>
This will definitely help me , but the reason for asking this question
..

In my application my requirement is to have multiple HTML elements with
the same name.

eg:






  
   
   MH 
   MSA 
   NATIONAL 
 




But the above table can be 1 row or many rows (dynamic). Once the user
submits the page, and say there is some validation error, I want to
rebuild the table with the values from the action form.



Hope i am clear, if not I will further info.

>>> [EMAIL PROTECTED] 06/09/03 12:33PM >>>
Well, I'm not sure exactly what you want to know, but here's an example
of
how I used it in an application I'm currently working on:























"groups" is an ArrayList that I put in the request from the preceding
action.  it stores variables of type AnsmItem.  "ansm" is the local bean
name that you use within the iterate tag to access the current element
of
the collection.

Let me know if you have any questions about it, or if you want to know
anything else.


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 11:22 AM
To: [EMAIL PROTECTED]
Subject: Help- logic:iterate tag


Hi

I am trying to understand the logic:iterate tag. I have gone thru the
docs
but could figure out some of the attributes of this tag.

My confusion is following attributes

1. property="" 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of
usage.

Thanks

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


RE: Help- logic:iterate tag

2003-06-09 Thread Sashi Ravipati
This will definitely help me , but the reason for asking this question
..

In my application my requirement is to have multiple HTML elements with
the same name.

eg:



 


  
   
   MH 
   MSA 
   NATIONAL 
 




But the above table can be 1 row or many rows (dynamic). Once the user
submits the page, and say there is some validation error, I want to
rebuild the table with the values from the action form.



Hope i am clear, if not I will further info.

>>> [EMAIL PROTECTED] 06/09/03 12:33PM >>>
Well, I'm not sure exactly what you want to know, but here's an example
of
how I used it in an application I'm currently working on:























"groups" is an ArrayList that I put in the request from the preceding
action.  it stores variables of type AnsmItem.  "ansm" is the local bean
name that you use within the iterate tag to access the current element
of
the collection.

Let me know if you have any questions about it, or if you want to know
anything else.


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 11:22 AM
To: [EMAIL PROTECTED]
Subject: Help- logic:iterate tag


Hi

I am trying to understand the logic:iterate tag. I have gone thru the
docs
but could figure out some of the attributes of this tag.

My confusion is following attributes

1. property="" 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of
usage.

Thanks

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


RE: Help- logic:iterate tag

2003-06-09 Thread Kamholz, Keith (corp-staff) USX
Well, I'm not sure exactly what you want to know, but here's an example of
how I used it in an application I'm currently working on:























"groups" is an ArrayList that I put in the request from the preceding
action.  it stores variables of type AnsmItem.  "ansm" is the local bean
name that you use within the iterate tag to access the current element of
the collection.

Let me know if you have any questions about it, or if you want to know
anything else.


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 11:22 AM
To: [EMAIL PROTECTED]
Subject: Help- logic:iterate tag


Hi

I am trying to understand the logic:iterate tag. I have gone thru the docs
but could figure out some of the attributes of this tag.

My confusion is following attributes

1. property="" 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of usage.

Thanks

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



Help- logic:iterate tag

2003-06-09 Thread Sashi Ravipati
Hi

I am trying to understand the logic:iterate tag. I have gone thru the docs but could 
figure out some of the attributes of this tag.

My confusion is following attributes

1. property="" 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of usage.

Thanks


Re: Excluding values inside a logic:iterate tag or an html:optionstag

2003-06-06 Thread Ionel Gardais
you mean to add the  or  tags inside the 
 tag ?
I guess it should work ok inside the logic:iterate tag because you know 
the name of the element at each iteration but how to do the same inside 
an html:options tag ?

I need this because I have a list of person which I want to be displayed 
in a listbox.
I want all the persons to be displayed except the user who ask this 
page. (all people except the one who ask)

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


RE: Excluding values inside a logic:iterate tag or an html:options tag

2003-06-06 Thread Kamholz, Keith (corp-staff) USX
Yes it is.  Use the logic:equal and logic:notEqual tags to do this.
Let me know if you need more info.


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001

www.buffalo.edu/~kkamholz


-Original Message-
From: Ionel Gardais [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 4:08 AM
To: Struts Users Mailing List
Subject: Excluding values inside a logic:iterate tag or an html:options
tag


Hi,

Is it possible to tell these tags that when they hit some values, they 
shouldn't display them ?

Thanks,
ionel



-
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]



Excluding values inside a logic:iterate tag or an html:options tag

2003-06-06 Thread Ionel Gardais
Hi,

Is it possible to tell these tags that when they hit some values, they 
shouldn't display them ?

Thanks,
ionel


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


Re: logic:iterate tag revisited

2003-03-06 Thread alexj
a better page :
http://jakarta.apache.org/struts/faqs/actionForm.html

--
Alexandre Jaquet

- Original Message -
From: "Steve Vanspall" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 4:49 AM
Subject: RE: logic:iterate tag revisited


> Yeah that's col, I figured I would have to do that. that's the way I
> originally was going to do it,
>
> This then leads me to my next question, which was in the p.s. of my
previous
> post,
>
> how does struts create a formfile for upload form the path entered by the
> user.
>
> My problem is, there could be any number of image files needing uploading,
> depending on the strutcture of the template they are going into.
>
> Hence, I can't just have a fixed number of FormFile fields in my form.
>
> So when the user submits the file details, I want to be able to upload
that
> file to the server, then process it from there.
>
> How do I do that.
>
> There isn't much info about uploading a dynamic number of files to the
serve
> using struts.
>
> Steve
>
> -Original Message-----
> From: alexj [mailto:[EMAIL PROTECTED]
> Sent: Friday, 7 March 2003 2:34 PM
> To: Struts Users Mailing List
> Subject: Re: logic:iterate tag revisited
>
>
> Yep struts cannot simply act as you wanna do.
>
> Before you can update your files path or everything else
> you will need to tell an action :
>
> "Hey retrieve all the kinds of datas on a whole collection
> I will made some change on it"
>
> First you got an view page who juste iterate your collection.
> and have a tag just as you say to will store some variables
> in your request.
>
> But one trouble I see is you are not in a windows like program,
> where you can just made some appropriate change and then
> pass it to whatever you want.
>
> If you wanna do your job, before you can send to an appropriate
> action, you will need to hit it by a client side programming.
>
> I'm not sure if you understand what I mean.
> --
> Alexandre Jaquet
>
>
>
> - Original Message -
> From: "Steve Vanspall" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, March 07, 2003 4:16 AM
> Subject: RE: logic:iterate tag revisited
>
>
> > ok this is the full story
> >
> > The value come from the form, the IMGTemplateFields object are in an
> > ArrayList chich is stored in the 'imageFieldsList' field of my
> > RenderHTMLForm
> >
> > I want to have struts iterate through that list. For wach occurence of
an
> > IMGTemplateBean I want to make a tag that will allow the user to enter
the
> > path of a file for upload.
> >
> > this will go into the 'file' field of the corresponding IMGTemplateBean.
> >
> > Now my problem is, when I submit the form, using the code mentioned in
my
> > previous message, it does not update the IMGTemplateBeans that the
'file'
> > fields relate to.
> >
> > Not sure if I am trying to do something that struts can't do, or if I am
> > just doing it wrong
> >
> > Regards
> >
> > Steve
> >
> > P.S. Alternatively how to I create a FormFile, with inputstream etc.
from
> a
> > string giving me the path of a file on the clients machine.
> >
> >
> >
> >
> >
> > -Original Message-
> > From: alexj [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 7 March 2003 2:07 PM
> > To: Struts Users Mailing List
> > Subject: Re: logic:iterate tag revisited
> >
> >
> > I can't understand why you need to re-iterate .
> >
> > Do you need to do some update on a view page ?
> >
> > If yes you will need to have an action defined for
> > that, then you will be redirect on an another page
> > or update your change on a session scope (for
> > example)
> >
> > From where the original value came ? The default
> > value you define on your based ActionForm ?
> >
> > --
> > Alexandre Jaquet
> >
> > - Original Message -
> > From: "Steve Vanspall" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Friday, March 07, 2003 4:01 AM
> > Subject: RE: logic:iterate tag revisited
> >
> >
> > > Ok making some headway here,
> > >
> > > I have my logic:iterate tag working, but it doesn't do what I want it
to
> > >
> > > this is my code
> > >
> > >   > > type="com.

Re: logic:iterate tag revisited

2003-03-06 Thread alexj
I never had that case but you may have a look
at the
http://jakarta.apache.org/struts/api/org/apache/struts/upload/package-use.ht
ml
(never try)
--
Alexandre Jaquet

You can get the source code of this taglib on the wrox web site.
- Original Message -
From: "Steve Vanspall" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 4:49 AM
Subject: RE: logic:iterate tag revisited


> Yeah that's col, I figured I would have to do that. that's the way I
> originally was going to do it,
>
> This then leads me to my next question, which was in the p.s. of my
previous
> post,
>
> how does struts create a formfile for upload form the path entered by the
> user.
>
> My problem is, there could be any number of image files needing uploading,
> depending on the strutcture of the template they are going into.
>
> Hence, I can't just have a fixed number of FormFile fields in my form.
>
> So when the user submits the file details, I want to be able to upload
that
> file to the server, then process it from there.
>
> How do I do that.
>
> There isn't much info about uploading a dynamic number of files to the
serve
> using struts.
>
> Steve
>
> -Original Message-----
> From: alexj [mailto:[EMAIL PROTECTED]
> Sent: Friday, 7 March 2003 2:34 PM
> To: Struts Users Mailing List
> Subject: Re: logic:iterate tag revisited
>
>
> Yep struts cannot simply act as you wanna do.
>
> Before you can update your files path or everything else
> you will need to tell an action :
>
> "Hey retrieve all the kinds of datas on a whole collection
> I will made some change on it"
>
> First you got an view page who juste iterate your collection.
> and have a tag just as you say to will store some variables
> in your request.
>
> But one trouble I see is you are not in a windows like program,
> where you can just made some appropriate change and then
> pass it to whatever you want.
>
> If you wanna do your job, before you can send to an appropriate
> action, you will need to hit it by a client side programming.
>
> I'm not sure if you understand what I mean.
> --
> Alexandre Jaquet
>
>
>
> - Original Message -
> From: "Steve Vanspall" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, March 07, 2003 4:16 AM
> Subject: RE: logic:iterate tag revisited
>
>
> > ok this is the full story
> >
> > The value come from the form, the IMGTemplateFields object are in an
> > ArrayList chich is stored in the 'imageFieldsList' field of my
> > RenderHTMLForm
> >
> > I want to have struts iterate through that list. For wach occurence of
an
> > IMGTemplateBean I want to make a tag that will allow the user to enter
the
> > path of a file for upload.
> >
> > this will go into the 'file' field of the corresponding IMGTemplateBean.
> >
> > Now my problem is, when I submit the form, using the code mentioned in
my
> > previous message, it does not update the IMGTemplateBeans that the
'file'
> > fields relate to.
> >
> > Not sure if I am trying to do something that struts can't do, or if I am
> > just doing it wrong
> >
> > Regards
> >
> > Steve
> >
> > P.S. Alternatively how to I create a FormFile, with inputstream etc.
from
> a
> > string giving me the path of a file on the clients machine.
> >
> >
> >
> >
> >
> > -Original Message-
> > From: alexj [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 7 March 2003 2:07 PM
> > To: Struts Users Mailing List
> > Subject: Re: logic:iterate tag revisited
> >
> >
> > I can't understand why you need to re-iterate .
> >
> > Do you need to do some update on a view page ?
> >
> > If yes you will need to have an action defined for
> > that, then you will be redirect on an another page
> > or update your change on a session scope (for
> > example)
> >
> > From where the original value came ? The default
> > value you define on your based ActionForm ?
> >
> > --
> > Alexandre Jaquet
> >
> > - Original Message -
> > From: "Steve Vanspall" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Friday, March 07, 2003 4:01 AM
> > Subject: RE: logic:iterate tag revisited
> >
> >
> > > Ok making some headway here,
> > >
> > > I have my logic:iterate tag working, but

RE: logic:iterate tag revisited

2003-03-06 Thread Steve Vanspall
Yeah that's col, I figured I would have to do that. that's the way I
originally was going to do it,

This then leads me to my next question, which was in the p.s. of my previous
post,

how does struts create a formfile for upload form the path entered by the
user.

My problem is, there could be any number of image files needing uploading,
depending on the strutcture of the template they are going into.

Hence, I can't just have a fixed number of FormFile fields in my form.

So when the user submits the file details, I want to be able to upload that
file to the server, then process it from there.

How do I do that.

There isn't much info about uploading a dynamic number of files to the serve
using struts.

Steve

-Original Message-
From: alexj [mailto:[EMAIL PROTECTED]
Sent: Friday, 7 March 2003 2:34 PM
To: Struts Users Mailing List
Subject: Re: logic:iterate tag revisited


Yep struts cannot simply act as you wanna do.

Before you can update your files path or everything else
you will need to tell an action :

"Hey retrieve all the kinds of datas on a whole collection
I will made some change on it"

First you got an view page who juste iterate your collection.
and have a tag just as you say to will store some variables
in your request.

But one trouble I see is you are not in a windows like program,
where you can just made some appropriate change and then
pass it to whatever you want.

If you wanna do your job, before you can send to an appropriate
action, you will need to hit it by a client side programming.

I'm not sure if you understand what I mean.
--
Alexandre Jaquet



- Original Message -
From: "Steve Vanspall" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 4:16 AM
Subject: RE: logic:iterate tag revisited


> ok this is the full story
>
> The value come from the form, the IMGTemplateFields object are in an
> ArrayList chich is stored in the 'imageFieldsList' field of my
> RenderHTMLForm
>
> I want to have struts iterate through that list. For wach occurence of an
> IMGTemplateBean I want to make a tag that will allow the user to enter the
> path of a file for upload.
>
> this will go into the 'file' field of the corresponding IMGTemplateBean.
>
> Now my problem is, when I submit the form, using the code mentioned in my
> previous message, it does not update the IMGTemplateBeans that the 'file'
> fields relate to.
>
> Not sure if I am trying to do something that struts can't do, or if I am
> just doing it wrong
>
> Regards
>
> Steve
>
> P.S. Alternatively how to I create a FormFile, with inputstream etc. from
a
> string giving me the path of a file on the clients machine.
>
>
>
>
>
> -Original Message-
> From: alexj [mailto:[EMAIL PROTECTED]
> Sent: Friday, 7 March 2003 2:07 PM
> To: Struts Users Mailing List
> Subject: Re: logic:iterate tag revisited
>
>
> I can't understand why you need to re-iterate .
>
> Do you need to do some update on a view page ?
>
> If yes you will need to have an action defined for
> that, then you will be redirect on an another page
> or update your change on a session scope (for
> example)
>
> From where the original value came ? The default
> value you define on your based ActionForm ?
>
> --
> Alexandre Jaquet
>
> - Original Message -
> From: "Steve Vanspall" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, March 07, 2003 4:01 AM
> Subject: RE: logic:iterate tag revisited
>
>
> > Ok making some headway here,
> >
> > I have my logic:iterate tag working, but it doesn't do what I want it to
> >
> > this is my code
> >
> >   > type="com.crm.util.TemplateBeans.IMGTemplateBean"
> property="imageFieldsList"
> > id="imgFile">
> >   
> >
> >  > property="description"/>
> >  > accept="image/gif,image/jpeg"/>
> >   
> >   
> > cnt++;
> > 
> >   
> >
> > now I want this to populate the original field it got the value from,
when
> I
> > submit the form.
> >
> > I can see why this won't do it, but can't work out if struts has a way
of
> > doing it for me
> >
> > Is there a way to get struts to iterate through a list, and then re
> iterate
> > through thelist and make the necessary changes, by populating the
> > IMGTemplateBean with the apporopriate formFile information
> >
> > Regards
> >
> > Steve
> >
> >
> >
> > -

Re: logic:iterate tag revisited

2003-03-06 Thread alexj
Yep struts cannot simply act as you wanna do.

Before you can update your files path or everything else
you will need to tell an action :

"Hey retrieve all the kinds of datas on a whole collection
I will made some change on it"

First you got an view page who juste iterate your collection.
and have a tag just as you say to will store some variables
in your request.

But one trouble I see is you are not in a windows like program,
where you can just made some appropriate change and then
pass it to whatever you want.

If you wanna do your job, before you can send to an appropriate
action, you will need to hit it by a client side programming.

I'm not sure if you understand what I mean.
--
Alexandre Jaquet



- Original Message -
From: "Steve Vanspall" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 4:16 AM
Subject: RE: logic:iterate tag revisited


> ok this is the full story
>
> The value come from the form, the IMGTemplateFields object are in an
> ArrayList chich is stored in the 'imageFieldsList' field of my
> RenderHTMLForm
>
> I want to have struts iterate through that list. For wach occurence of an
> IMGTemplateBean I want to make a tag that will allow the user to enter the
> path of a file for upload.
>
> this will go into the 'file' field of the corresponding IMGTemplateBean.
>
> Now my problem is, when I submit the form, using the code mentioned in my
> previous message, it does not update the IMGTemplateBeans that the 'file'
> fields relate to.
>
> Not sure if I am trying to do something that struts can't do, or if I am
> just doing it wrong
>
> Regards
>
> Steve
>
> P.S. Alternatively how to I create a FormFile, with inputstream etc. from
a
> string giving me the path of a file on the clients machine.
>
>
>
>
>
> -Original Message-
> From: alexj [mailto:[EMAIL PROTECTED]
> Sent: Friday, 7 March 2003 2:07 PM
> To: Struts Users Mailing List
> Subject: Re: logic:iterate tag revisited
>
>
> I can't understand why you need to re-iterate .
>
> Do you need to do some update on a view page ?
>
> If yes you will need to have an action defined for
> that, then you will be redirect on an another page
> or update your change on a session scope (for
> example)
>
> From where the original value came ? The default
> value you define on your based ActionForm ?
>
> --
> Alexandre Jaquet
>
> - Original Message -
> From: "Steve Vanspall" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, March 07, 2003 4:01 AM
> Subject: RE: logic:iterate tag revisited
>
>
> > Ok making some headway here,
> >
> > I have my logic:iterate tag working, but it doesn't do what I want it to
> >
> > this is my code
> >
> >   > type="com.crm.util.TemplateBeans.IMGTemplateBean"
> property="imageFieldsList"
> > id="imgFile">
> >   
> >
> >  > property="description"/>
> >  > accept="image/gif,image/jpeg"/>
> >   
> >   
> > cnt++;
> > 
> >   
> >
> > now I want this to populate the original field it got the value from,
when
> I
> > submit the form.
> >
> > I can see why this won't do it, but can't work out if struts has a way
of
> > doing it for me
> >
> > Is there a way to get struts to iterate through a list, and then re
> iterate
> > through thelist and make the necessary changes, by populating the
> > IMGTemplateBean with the apporopriate formFile information
> >
> > Regards
> >
> > Steve
> >
> >
> >
> > -Original Message-
> > From: Steve Vanspall [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 7 March 2003 12:42 PM
> > To: Struts Users Mailing List
> > Subject: RE: logic:iterate tag revisited
> >
> >
> > Ah it's always the small thing,
> >
> > I can't beleive I missed that
> >
> > Thank you, I will procedd to kick myself several times
> >
> > Steve
> >
> > -Original Message-
> > From: Rick Reumann [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 7 March 2003 11:51 AM
> > To: Struts Users Mailing List
> > Subject: Re: logic:iterate tag revisited
> >
> >
> > On Fri, 7 Mar 2003 11:33:50 +1100
> > "Steve Vanspall" <[EMAIL PROTECTED]> wrote:
> >
> > > Hi there
> > >
> > > Here's my problem, I hav

RE: logic:iterate tag revisited

2003-03-06 Thread Steve Vanspall
ok this is the full story

The value come from the form, the IMGTemplateFields object are in an
ArrayList chich is stored in the 'imageFieldsList' field of my
RenderHTMLForm

I want to have struts iterate through that list. For wach occurence of an
IMGTemplateBean I want to make a tag that will allow the user to enter the
path of a file for upload.

this will go into the 'file' field of the corresponding IMGTemplateBean.

Now my problem is, when I submit the form, using the code mentioned in my
previous message, it does not update the IMGTemplateBeans that the 'file'
fields relate to.

Not sure if I am trying to do something that struts can't do, or if I am
just doing it wrong

Regards

Steve

P.S. Alternatively how to I create a FormFile, with inputstream etc. from a
string giving me the path of a file on the clients machine.





-Original Message-
From: alexj [mailto:[EMAIL PROTECTED]
Sent: Friday, 7 March 2003 2:07 PM
To: Struts Users Mailing List
Subject: Re: logic:iterate tag revisited


I can't understand why you need to re-iterate .

Do you need to do some update on a view page ?

If yes you will need to have an action defined for
that, then you will be redirect on an another page
or update your change on a session scope (for
example)

>From where the original value came ? The default
value you define on your based ActionForm ?

--
Alexandre Jaquet

- Original Message -
From: "Steve Vanspall" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 4:01 AM
Subject: RE: logic:iterate tag revisited


> Ok making some headway here,
>
> I have my logic:iterate tag working, but it doesn't do what I want it to
>
> this is my code
>
>   type="com.crm.util.TemplateBeans.IMGTemplateBean"
property="imageFieldsList"
> id="imgFile">
>   
>
>  property="description"/>
>  accept="image/gif,image/jpeg"/>
>   
>   
> cnt++;
> 
>   
>
> now I want this to populate the original field it got the value from, when
I
> submit the form.
>
> I can see why this won't do it, but can't work out if struts has a way of
> doing it for me
>
> Is there a way to get struts to iterate through a list, and then re
iterate
> through thelist and make the necessary changes, by populating the
> IMGTemplateBean with the apporopriate formFile information
>
> Regards
>
> Steve
>
>
>
> -Original Message-
> From: Steve Vanspall [mailto:[EMAIL PROTECTED]
> Sent: Friday, 7 March 2003 12:42 PM
> To: Struts Users Mailing List
> Subject: RE: logic:iterate tag revisited
>
>
> Ah it's always the small thing,
>
> I can't beleive I missed that
>
> Thank you, I will procedd to kick myself several times
>
> Steve
>
> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Friday, 7 March 2003 11:51 AM
> To: Struts Users Mailing List
> Subject: Re: logic:iterate tag revisited
>
>
> On Fri, 7 Mar 2003 11:33:50 +1100
> "Steve Vanspall" <[EMAIL PROTECTED]> wrote:
>
> > Hi there
> >
> > Here's my problem, I have modelled my iterate tag on a working example
> > I was given by a colleague.
> >
> > this is my jsp code
> >
> >  > type="com.crm.util.TemplateBeans.IMGTemplateBean"
> > property="imageFieldsList" id="imfFile">
> >   
> >  > property="id"/> > property="file"
> > accept="image/gif,image/jpeg"/>
> >   
> >   nameArray[cnt] =
> >   '<%=TemplateBeans.IMG_TMPLT%>:<bean:write
> > name="imfFile" property="id"/>';
> > cnt++;
> > 
> > 
> >
> >
> > when I run it I get
> >
> > javax.servlet.jsp.JspException: Cannot find bean imfFile in any scope
>
> are you sure it's not saying "imgFile" is not any scope??? If you look
> you named one of them imgFile and the other imfFile but I don't see
> where you ever declared the id imgFile ? Is imgFile declared somewhere
> else?
>
> Also, are you positive your list has IMGTemplateBeans in it? If you
> remove all the  stuff and just print out "test" in there do
> you get a bunch of "test"s printed out?
>
> Are you also positive that your imageFieldsList is being populated with
> the type "com.crm.util.TemplateBeans.IMGTemplateBean" You sure nothing
> is spelled wrong there..etc. ?
>
> I know a lot of this is probably obvious but it's always the o

Re: logic:iterate tag revisited

2003-03-06 Thread alexj
I can't understand why you need to re-iterate .

Do you need to do some update on a view page ?

If yes you will need to have an action defined for
that, then you will be redirect on an another page
or update your change on a session scope (for
example)

>From where the original value came ? The default
value you define on your based ActionForm ?

--
Alexandre Jaquet

- Original Message -
From: "Steve Vanspall" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 4:01 AM
Subject: RE: logic:iterate tag revisited


> Ok making some headway here,
>
> I have my logic:iterate tag working, but it doesn't do what I want it to
>
> this is my code
>
>   type="com.crm.util.TemplateBeans.IMGTemplateBean"
property="imageFieldsList"
> id="imgFile">
>   
>
>  property="description"/>
>  accept="image/gif,image/jpeg"/>
>   
>   
> cnt++;
> 
>   
>
> now I want this to populate the original field it got the value from, when
I
> submit the form.
>
> I can see why this won't do it, but can't work out if struts has a way of
> doing it for me
>
> Is there a way to get struts to iterate through a list, and then re
iterate
> through thelist and make the necessary changes, by populating the
> IMGTemplateBean with the apporopriate formFile information
>
> Regards
>
> Steve
>
>
>
> -Original Message-
> From: Steve Vanspall [mailto:[EMAIL PROTECTED]
> Sent: Friday, 7 March 2003 12:42 PM
> To: Struts Users Mailing List
> Subject: RE: logic:iterate tag revisited
>
>
> Ah it's always the small thing,
>
> I can't beleive I missed that
>
> Thank you, I will procedd to kick myself several times
>
> Steve
>
> -Original Message-
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Friday, 7 March 2003 11:51 AM
> To: Struts Users Mailing List
> Subject: Re: logic:iterate tag revisited
>
>
> On Fri, 7 Mar 2003 11:33:50 +1100
> "Steve Vanspall" <[EMAIL PROTECTED]> wrote:
>
> > Hi there
> >
> > Here's my problem, I have modelled my iterate tag on a working example
> > I was given by a colleague.
> >
> > this is my jsp code
> >
> >  > type="com.crm.util.TemplateBeans.IMGTemplateBean"
> > property="imageFieldsList" id="imfFile">
> >   
> >  > property="id"/> > property="file"
> > accept="image/gif,image/jpeg"/>
> >   
> >   nameArray[cnt] =
> >   '<%=TemplateBeans.IMG_TMPLT%>:<bean:write
> > name="imfFile" property="id"/>';
> > cnt++;
> > 
> > 
> >
> >
> > when I run it I get
> >
> > javax.servlet.jsp.JspException: Cannot find bean imfFile in any scope
>
> are you sure it's not saying "imgFile" is not any scope??? If you look
> you named one of them imgFile and the other imfFile but I don't see
> where you ever declared the id imgFile ? Is imgFile declared somewhere
> else?
>
> Also, are you positive your list has IMGTemplateBeans in it? If you
> remove all the  stuff and just print out "test" in there do
> you get a bunch of "test"s printed out?
>
> Are you also positive that your imageFieldsList is being populated with
> the type "com.crm.util.TemplateBeans.IMGTemplateBean" You sure nothing
> is spelled wrong there..etc. ?
>
> I know a lot of this is probably obvious but it's always the obvious
> that gets me:) A mistyped letter or something.
>
>
> --
> Rick Reumann
>
> -
> 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]
>



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



RE: logic:iterate tag revisited

2003-03-06 Thread Steve Vanspall
Ok making some headway here,

I have my logic:iterate tag working, but it doesn't do what I want it to

this is my code

 
  



  
  
cnt++;

  

now I want this to populate the original field it got the value from, when I
submit the form.

I can see why this won't do it, but can't work out if struts has a way of
doing it for me

Is there a way to get struts to iterate through a list, and then re iterate
through thelist and make the necessary changes, by populating the
IMGTemplateBean with the apporopriate formFile information

Regards

Steve



-Original Message-
From: Steve Vanspall [mailto:[EMAIL PROTECTED]
Sent: Friday, 7 March 2003 12:42 PM
To: Struts Users Mailing List
Subject: RE: logic:iterate tag revisited


Ah it's always the small thing,

I can't beleive I missed that

Thank you, I will procedd to kick myself several times

Steve

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Friday, 7 March 2003 11:51 AM
To: Struts Users Mailing List
Subject: Re: logic:iterate tag revisited


On Fri, 7 Mar 2003 11:33:50 +1100
"Steve Vanspall" <[EMAIL PROTECTED]> wrote:

> Hi there
>
> Here's my problem, I have modelled my iterate tag on a working example
> I was given by a colleague.
>
> this is my jsp code
>
>  type="com.crm.util.TemplateBeans.IMGTemplateBean"
> property="imageFieldsList" id="imfFile">
>   
>  property="id"/> property="file"
> accept="image/gif,image/jpeg"/>
>   
>   nameArray[cnt] =
>   '<%=TemplateBeans.IMG_TMPLT%>:<bean:write
> name="imfFile" property="id"/>';
>   cnt++;
>   
> 
>
>
> when I run it I get
>
> javax.servlet.jsp.JspException: Cannot find bean imfFile in any scope

are you sure it's not saying "imgFile" is not any scope??? If you look
you named one of them imgFile and the other imfFile but I don't see
where you ever declared the id imgFile ? Is imgFile declared somewhere
else?

Also, are you positive your list has IMGTemplateBeans in it? If you
remove all the  stuff and just print out "test" in there do
you get a bunch of "test"s printed out?

Are you also positive that your imageFieldsList is being populated with
the type "com.crm.util.TemplateBeans.IMGTemplateBean" You sure nothing
is spelled wrong there..etc. ?

I know a lot of this is probably obvious but it's always the obvious
that gets me:) A mistyped letter or something.


--
Rick Reumann

-
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]



RE: logic:iterate tag revisited

2003-03-06 Thread Steve Vanspall
Ah it's always the small thing, 

I can't beleive I missed that

Thank you, I will procedd to kick myself several times

Steve

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Friday, 7 March 2003 11:51 AM
To: Struts Users Mailing List
Subject: Re: logic:iterate tag revisited


On Fri, 7 Mar 2003 11:33:50 +1100
"Steve Vanspall" <[EMAIL PROTECTED]> wrote:

> Hi there
> 
> Here's my problem, I have modelled my iterate tag on a working example
> I was given by a colleague.
> 
> this is my jsp code
> 
>  type="com.crm.util.TemplateBeans.IMGTemplateBean"
> property="imageFieldsList" id="imfFile">
>   
>  property="id"/> property="file"
> accept="image/gif,image/jpeg"/>
>   
>   nameArray[cnt] =
>   '<%=TemplateBeans.IMG_TMPLT%>:<bean:write
> name="imfFile" property="id"/>';
>   cnt++;
>   
> 
> 
> 
> when I run it I get
> 
> javax.servlet.jsp.JspException: Cannot find bean imfFile in any scope

are you sure it's not saying "imgFile" is not any scope??? If you look
you named one of them imgFile and the other imfFile but I don't see
where you ever declared the id imgFile ? Is imgFile declared somewhere
else? 

Also, are you positive your list has IMGTemplateBeans in it? If you
remove all the  stuff and just print out "test" in there do
you get a bunch of "test"s printed out?

Are you also positive that your imageFieldsList is being populated with
the type "com.crm.util.TemplateBeans.IMGTemplateBean" You sure nothing
is spelled wrong there..etc. ?

I know a lot of this is probably obvious but it's always the obvious
that gets me:) A mistyped letter or something.


-- 
Rick Reumann

-
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]



Re: logic:iterate tag revisited

2003-03-06 Thread Rick Reumann
On Fri, 7 Mar 2003 11:33:50 +1100
"Steve Vanspall" <[EMAIL PROTECTED]> wrote:

> Hi there
> 
> Here's my problem, I have modelled my iterate tag on a working example
> I was given by a colleague.
> 
> this is my jsp code
> 
>  type="com.crm.util.TemplateBeans.IMGTemplateBean"
> property="imageFieldsList" id="imfFile">
>   
>  property="id"/> property="file"
> accept="image/gif,image/jpeg"/>
>   
>   nameArray[cnt] =
>   '<%=TemplateBeans.IMG_TMPLT%>: name="imfFile" property="id"/>';
>   cnt++;
>   
> 
> 
> 
> when I run it I get
> 
> javax.servlet.jsp.JspException: Cannot find bean imfFile in any scope

are you sure it's not saying "imgFile" is not any scope??? If you look
you named one of them imgFile and the other imfFile but I don't see
where you ever declared the id imgFile ? Is imgFile declared somewhere
else? 

Also, are you positive your list has IMGTemplateBeans in it? If you
remove all the  stuff and just print out "test" in there do
you get a bunch of "test"s printed out?

Are you also positive that your imageFieldsList is being populated with
the type "com.crm.util.TemplateBeans.IMGTemplateBean" You sure nothing
is spelled wrong there..etc. ?

I know a lot of this is probably obvious but it's always the obvious
that gets me:) A mistyped letter or something.


-- 
Rick Reumann

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



logic:iterate tag revisited

2003-03-06 Thread Steve Vanspall
Hi there

Here's my problem, I have modelled my iterate tag on a working example I was
given by a colleague.

this is my jsp code


  


  
  nameArray[cnt] = '<%=TemplateBeans.IMG_TMPLT%>:';
cnt++;




when I run it I get

javax.servlet.jsp.JspException: Cannot find bean imfFile in any scope

having debugged, when struts puts the bea into pageContext, the id it tries
to pass is set to null.

Looking at the list of variables set at the time, there are two variables
named id one set to null and one set to 'imgFile'.

I figure this is where the problem lies,

Is there something wrong withmy coding?

Any help would be appreciated

Steve


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



RE: logic:iterate -tag

2003-01-13 Thread Sri Sankaran
You *can* use .  Be sure to look at the docs at 
http://jakarta.apache.org/struts/userGuide/struts-bean.html#define; it explains how 
this tag differs from .

Sri

-Original Message-
From: Matthias Weßendorf [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 13, 2003 2:59 AM
To: Struts Users Mailing List
Subject: AW: logic:iterate -tag


thank you,

is it possible to create a bean with the -tag? or must i you the 
-Tag?

greetings

Matthias



Matthias Weßendorf
Lange Strasse 17
D-44137 Dortmund
Tel.: (02 31) 1 89 15 95
Handy: (01 79) 1 11 89 79
Email: mailto:[EMAIL PROTECTED]
URL: http://www.wessendorf.NET


-Ursprüngliche Nachricht-
Von: David M. Karr [mailto:[EMAIL PROTECTED]]
Gesendet: Sonntag, 12. Januar 2003 23:26
An: [EMAIL PROTECTED]
Betreff: Re: logic:iterate -tag


>>>>> "Matthias" == Matthias Weßendorf <[EMAIL PROTECTED]>
writes:

Matthias> Hello everybody,
Matthias> i am just trying to use the -Tag

Matthias> this way was successfull:

Matthias> THE CODE:
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
Matthias>  scope="request"/>
Matthias> 
Matthias> 
Matthias> 

Matthias> END OF CODE

Matthias> but i didn´t want to use the -Tag
Matthias> so i tried this one:

Matthias> THE CODE:
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
Matthias>  type="access.Glossarbegriffsverwaltung">
Matthias> 
Matthias> 
Matthias> END OF CODE

Matthias> but i get this error:
Matthias> org.apache.jasper.JasperException: Cannot find bean menge in scope null

No surprise here.  The "logic:iterate" tag doesn't create beans, it just references 
them.  The error message says it can't find a bean named "menge" because you never 
created it.  You either have to use "jsp:useBean" or have the bean put into the 
request scope in the action that forwards to this jsp.

-- ===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD




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


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


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




AW: logic:iterate -tag

2003-01-12 Thread Matthias Weßendorf
thank you,

is it possible to create a bean with the -tag?
or must i you the -Tag?

greetings

Matthias



Matthias Weßendorf
Lange Strasse 17
D-44137 Dortmund
Tel.: (02 31) 1 89 15 95
Handy: (01 79) 1 11 89 79
Email: mailto:[EMAIL PROTECTED]
URL: http://www.wessendorf.NET


-Ursprüngliche Nachricht-
Von: David M. Karr [mailto:[EMAIL PROTECTED]]
Gesendet: Sonntag, 12. Januar 2003 23:26
An: [EMAIL PROTECTED]
Betreff: Re: logic:iterate -tag


>>>>> "Matthias" == Matthias Weßendorf <[EMAIL PROTECTED]>
writes:

Matthias> Hello everybody,
Matthias> i am just trying to use the -Tag

Matthias> this way was successfull:

Matthias> THE CODE:
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"
%>
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic"
%>
Matthias>  scope="request"/>
Matthias> 
Matthias> 
Matthias> 

Matthias> END OF CODE

Matthias> but i didn´t want to use the -Tag
Matthias> so i tried this one:

Matthias> THE CODE:
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"
%>
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic"
%>
Matthias>  type="access.Glossarbegriffsverwaltung">
Matthias> 
Matthias> 
Matthias> END OF CODE

Matthias> but i get this error:
Matthias> org.apache.jasper.JasperException: Cannot find bean menge in
scope null

No surprise here.  The "logic:iterate" tag doesn't create beans, it just
references them.  The error message says it can't find a bean named "menge"
because you never created it.  You either have to use "jsp:useBean" or have
the
bean put into the request scope in the action that forwards to this jsp.

--
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD




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


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




Re: logic:iterate -tag

2003-01-12 Thread David M. Karr
>>>>> "Matthias" == Matthias Weßendorf <[EMAIL PROTECTED]> writes:

Matthias> Hello everybody,
Matthias> i am just trying to use the -Tag

Matthias> this way was successfull:

Matthias> THE CODE:
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
Matthias>  scope="request"/>
Matthias> 
Matthias> 
Matthias> 

Matthias> END OF CODE

Matthias> but i didn´t want to use the -Tag
Matthias> so i tried this one:

Matthias> THE CODE:
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
Matthias>  type="access.Glossarbegriffsverwaltung">
Matthias> 
Matthias> 
Matthias> END OF CODE

Matthias> but i get this error:
Matthias> org.apache.jasper.JasperException: Cannot find bean menge in scope null

No surprise here.  The "logic:iterate" tag doesn't create beans, it just
references them.  The error message says it can't find a bean named "menge"
because you never created it.  You either have to use "jsp:useBean" or have the
bean put into the request scope in the action that forwards to this jsp.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD




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




logic:iterate -tag

2003-01-12 Thread Matthias Weßendorf
Hello everybody,

i am just trying to use the -Tag

this way was successfull:

THE CODE:
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>








END OF CODE

but i didn´t want to use the -Tag
so i tried this one:

THE CODE:
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>





END OF CODE


but i get this error:
org.apache.jasper.JasperException: Cannot find bean menge in scope null

thank you very much for helping!

best greetings

Matthias



Matthias Weßendorf
Lange Strasse 17
D-44137 Dortmund
Tel.: (02 31) 1 89 15 95
Handy: (01 79) 1 11 89 79
Email: mailto:[EMAIL PROTECTED]
URL: http://www.wessendorf.NET


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Using anchors with logic:iterate tag

2002-09-20 Thread jlhalbe

You set me on the right track.  Thanks!

Jennifer
> 
> From: "Galbreath, Mark" <[EMAIL PROTECTED]>
> Date: 2002/09/20 Fri PM 12:34:18 EDT
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Using anchors with logic:iterate tag
> 
> Hmmm...interesting problem
> 
> I assume by "that part of the list," you mean when a user clicks on "C," the
> first "C" word in the list is the target.
> 
> First, just in case:
> http://developer.netscape.com/docs/manuals/htmlguid/tags7.htm#1227754
> 
> Second,
> Using the HTML anchor tag (as defined above) you would have to program some
> logic in the body of the  like:
> 
> <%
> String word = "";
> String letter_1 = "";
> String letter_2 = "";
> %>
> property="wordList"
>type="java.util.SortedSet"
>id="list"
> 
>   <%
> word = ;
> letter_2 = word.substring( 0,1);
> 
> if( !letter_2.equalsIgnoreCase( letter_1) {
> out.println( "" + word +
> "");
> letter_1 = letter_2;
> } else {
> out.println( word);
> }
>   %>
> 
> 
> Not sure if this will work, but it seems reasonable.  Then, in your menu,
> hyperlink the letters to the named anchors.
> 
> Mark
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 11:54 AM
> To: [EMAIL PROTECTED]
> Subject: Using anchors with logic:iterate tag
> 
> 
> I am printing out a large list that is in alphabetical order using the
> logic:iterate tag.  I want to have alphabet jump menu at the top of the page
> so that when users click on a letter, they will jump to that part of the
> list.  How can I insert anchors into my list when I am using the
> logic:iterate tag?
> 
> Thank,
> Jennifer
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


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




RE: Using anchors with logic:iterate tag

2002-09-20 Thread Galbreath, Mark

Hmmm...interesting problem

I assume by "that part of the list," you mean when a user clicks on "C," the
first "C" word in the list is the target.

First, just in case:
http://developer.netscape.com/docs/manuals/htmlguid/tags7.htm#1227754

Second,
Using the HTML anchor tag (as defined above) you would have to program some
logic in the body of the  like:

<%
String word = "";
String letter_1 = "";
String letter_2 = "";
%>
;
letter_2 = word.substring( 0,1);

if( !letter_2.equalsIgnoreCase( letter_1) {
out.println( "" + word +
"");
letter_1 = letter_2;
} else {
out.println( word);
}
  %>


Not sure if this will work, but it seems reasonable.  Then, in your menu,
hyperlink the letters to the named anchors.

Mark

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 11:54 AM
To: [EMAIL PROTECTED]
Subject: Using anchors with logic:iterate tag


I am printing out a large list that is in alphabetical order using the
logic:iterate tag.  I want to have alphabet jump menu at the top of the page
so that when users click on a letter, they will jump to that part of the
list.  How can I insert anchors into my list when I am using the
logic:iterate tag?

Thank,
Jennifer


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

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




Using anchors with logic:iterate tag

2002-09-20 Thread jlhalbe

I am printing out a large list that is in alphabetical order using the logic:iterate 
tag.  I want to have alphabet jump menu at the top of the page so that when users 
click on a letter, they will jump to that part of the list.  How can I insert anchors 
into my list when I am using the logic:iterate tag?

Thank,
Jennifer


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




RE: Search example of complex tables with Nested tag or Logic:iterate tag

2002-09-18 Thread Heligon Sandra

I am really surprised that nobody made the model of which I speak but it is
perhaps that the nesteds tag do not correspond to the good solution. 

I would like to display a list like:

Id  NameOn/Off  
17  Paris   x
18  Rennes  
24  Londres x

If you click on the id 17 a new window is displayed with details about the
service.
The column On/off is composed of check-box and allow to factorise call to
the server
and reduce request number.

Perhaps that somebody made this type of table with the tag logic:iterate.
This mailing list offers a considerable saving of time for the developments 
I really hope that somebody could help me.
  
Sandra
-Original Message-
From: Arron Bates [mailto:[EMAIL PROTECTED]]
Sent: 17 September 2002 16:31
To: Struts Users Mailing List
Subject: RE: Nested tagscomplete example for Table (with check-box,
hyperl ink) Help, help help


On Tue, 2002-09-17 at 20:53, Lister, Tom (ANTS) wrote:
> see
> http://www.keyboardmonkey.com/next/index.jsp
> they work a treat for master/detail type forms although I'm finding I may
> have to upgrade to form Struts 1.0 to 1.1 to get them working on Web logic

You wont be sorry for going through the upgrade though. :)

Arron.

> 
> :-)
> Tom Lister
> * 020 7612 3030
> * [EMAIL PROTECTED]
> 
> 
> -Original Message-
> From: Heligon Sandra [mailto:[EMAIL PROTECTED]]
> Sent: 17 September 2002 11:43
> To: '[EMAIL PROTECTED]'
> Subject: Nested tagscomplete example for Table (with check-box,
> hyperlink) Help, help help
> Importance: High
> 
> 
> 
>   I am searching JSP example with Struts tags (probably nested tags)
> to
>   display a table with multiple rows and columns.
> 
>   I have to follow a minimum well-defined format:
>   - one column has to offer hyperlink;
>   - one column is composed of check-box;
>   - each column of the table can be sorted by ascending or decreasing
> order;
> 
>   I must produce this model very quickly and I hope that a person will
> have done something 
>   of similar and will be able to help me to hold my time.
> 
>   Thank you very much in advance.
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
>
***
> This communication (including any attachments) contains confidential
information.  If you are not the intended recipient and you have received
this communication in error, you should destroy it without copying,
disclosing or otherwise using its contents.  Please notify the sender
immediately of the error.
> 
> Internet communications are not necessarily secure and may be intercepted
or changed after they are sent.  Abbey National Treasury Services plc does
not accept liability for any loss you may suffer as a result of interception
or any liability for such changes.  If you wish to confirm the origin or
content of this communication, please contact the sender by using an
alternative means of communication.
> 
> This communication does not create or modify any contract and, unless
otherwise stated, is not intended to be contractually binding.
> 
> Abbey National Treasury Services plc. Registered Office:  Abbey National
House, 2 Triton Square, Regents Place, London NW1 3AN.  Registered in
England under Company Registration Number: 2338548.  Regulated by the
Financial Services Authority (FSA).
>
***
> 
> 
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: CachedRowset with logic:iterate tag

2002-07-18 Thread aps olute

Ok from what I gather from the responses, it is not
necessary to use Struts Tags to iterate the contents
of the CachedRowSet.  However I would still like how
to do this. I've looked at webPIM, and were not able
to download as there are no jar files or zip files
package I saw at sourceforge.net, am not about to
pick bits and pieces and spend so much time putting it
together, if a better download site is provided i'd
apprecite it.
Am still not clear if it requires a Collection type
to do any of these iterations, not just logic, but in
html: tags too and what have you.

aps

__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: CachedRowset with logic:iterate tag

2002-07-18 Thread Chad Johnson

You could use the "forEach" tag from JSTL
(http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html).  "forEach"
can iterate over ResultSet's (and RowSet's via inheritance) with the
assistance from the helper class: javax.servlet.jsp.jstl.sql.ResultSupport .
ResultSupport can convert ResultSet's to the JSTL friendly Result class.

-Chad Johnson

- Original Message -
From: "aps olute" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 6:19 PM
Subject: CachedRowset with logic:iterate tag


> How to iterate over a CachedRowSet using
>  tags? I have filled the CachedRowset
> with a select
> statement and am able to iterate using the
> crs.getString(1) or the crs.getString(colname)
> methods,
> but no am ready to use Struts tags but dont know how.
> Do I need to convert it a Collection type? but that
> will eat up more memory as two copies CRS and the
> Collection with same contents?
> Is it necessary to use the Struts tags to work with
> the rest of the Struts features?
>
> 
> <%@ page language="java" %>
> <%@ page contentType="text/html" %>
> <%@ page
> import="sun.jdbc.rowset.CachedRowSet,javax.naming.InitialContext"%>
>  class="sun.jdbc.rowset.CachedRowSet" scope="session">
> <% InitialContext ctx = new InitialContext();
>   javax.sql.DataSource ds =
> (javax.sql.DataSource)ctx.lookup("java:/DefaultDS");
>   java.sql.Connection con = ds.getConnection();
>   Contacts.setCommand("SELECT name,
> owner,species,sex,birth,death from pet");
>   Contacts.execute(con);
>   Contacts.first(); %> 
> 
>   type="sun.jdbc.rowset.CachedRowSet">
> 
> 
> 
>
>
> But nothing is ever printed. if i take out the
> logic:present and logic:iterate and replaced with a
> while (Contacts.next()  Contacts.getString(1)  at
> least
> i gets some output.
>
>
>
>
> __
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
> http://autos.yahoo.com
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>



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




Re: CachedRowset with logic:iterate tag

2002-07-18 Thread @Basebeans.com

Subject: Re: CachedRowset with logic:iterate tag
From: "Vic C." <[EMAIL PROTECTED]>
 ===
I have extendend and made cached row set work with the iterator. See 
webPIM on sourceforge, basebeans.com or downloads.com

David Chu wrote:
> Hi,
> When first using struts, I first tried to use a CachedRowSet object as well.
> However, based on other people's recommendations, I just went with a simple
> Vector of Beans, one representing each row in the ResultSet.  It is true
> this is more overhead, but no one has extended the CachedRowSet to have an
> iterator which is what is necessary.
> 
> It is not necessary to use struts tags; you can use scriplets.  But it is so
> nice to just use the struts tags.  You can achieve almost all of the same
> functionality and it looks more like an html page.
> 
> 
> -david
> 
> --
> David C. Chu
> America Online
> Network Tools Intern
> --
> 
> "aps olute" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> 
>>How to iterate over a CachedRowSet using
>> tags? I have filled the CachedRowset
>>with a select
>>statement and am able to iterate using the
>>crs.getString(1) or the crs.getString(colname)
>>methods,
>>but no am ready to use Struts tags but dont know how.
>>Do I need to convert it a Collection type? but that
>>will eat up more memory as two copies CRS and the
>>Collection with same contents?
>>Is it necessary to use the Struts tags to work with
>>the rest of the Struts features?
>>
>>
>><%@ page language="java" %>
>><%@ page contentType="text/html" %>
>><%@ page
>>import="sun.jdbc.rowset.CachedRowSet,javax.naming.InitialContext"%>
>>>class="sun.jdbc.rowset.CachedRowSet" scope="session">
>><% InitialContext ctx = new InitialContext();
>>  javax.sql.DataSource ds =
>>(javax.sql.DataSource)ctx.lookup("java:/DefaultDS");
>>  java.sql.Connection con = ds.getConnection();
>>  Contacts.setCommand("SELECT name,
>>owner,species,sex,birth,death from pet");
>>  Contacts.execute(con);
>>  Contacts.first(); %> 
>>
>>> type="sun.jdbc.rowset.CachedRowSet">
>>
>>
>>
>>
>>
>>But nothing is ever printed. if i take out the
>>logic:present and logic:iterate and replaced with a
>>while (Contacts.next()  Contacts.getString(1)  at
>>least
>>i gets some output.
>>
>>
>>
>>
>>__
>>Do You Yahoo!?
>>Yahoo! Autos - Get free new car price quotes
>>http://autos.yahoo.com
>>
>>--
>>To unsubscribe, e-mail:
> 
> <mailto:[EMAIL PROTECTED]>
> 
>>For additional commands, e-mail:
> 
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 


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




Re: CachedRowset with logic:iterate tag

2002-07-18 Thread @Basebeans.com

Subject: Re: CachedRowset with logic:iterate tag
From: "David Chu" <[EMAIL PROTECTED]>
 ===
Hi,
When first using struts, I first tried to use a CachedRowSet object as well.
However, based on other people's recommendations, I just went with a simple
Vector of Beans, one representing each row in the ResultSet.  It is true
this is more overhead, but no one has extended the CachedRowSet to have an
iterator which is what is necessary.

It is not necessary to use struts tags; you can use scriplets.  But it is so
nice to just use the struts tags.  You can achieve almost all of the same
functionality and it looks more like an html page.


-david

--
David C. Chu
America Online
Network Tools Intern
--

"aps olute" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> How to iterate over a CachedRowSet using
>  tags? I have filled the CachedRowset
> with a select
> statement and am able to iterate using the
> crs.getString(1) or the crs.getString(colname)
> methods,
> but no am ready to use Struts tags but dont know how.
> Do I need to convert it a Collection type? but that
> will eat up more memory as two copies CRS and the
> Collection with same contents?
> Is it necessary to use the Struts tags to work with
> the rest of the Struts features?
>
> 
> <%@ page language="java" %>
> <%@ page contentType="text/html" %>
> <%@ page
> import="sun.jdbc.rowset.CachedRowSet,javax.naming.InitialContext"%>
>  class="sun.jdbc.rowset.CachedRowSet" scope="session">
> <% InitialContext ctx = new InitialContext();
>   javax.sql.DataSource ds =
> (javax.sql.DataSource)ctx.lookup("java:/DefaultDS");
>   java.sql.Connection con = ds.getConnection();
>   Contacts.setCommand("SELECT name,
> owner,species,sex,birth,death from pet");
>   Contacts.execute(con);
>   Contacts.first(); %> 
> 
>   type="sun.jdbc.rowset.CachedRowSet">
> 
> 
> 
>
>
> But nothing is ever printed. if i take out the
> logic:present and logic:iterate and replaced with a
> while (Contacts.next()  Contacts.getString(1)  at
> least
> i gets some output.
>
>
>
>
> __
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
> http://autos.yahoo.com
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>



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




CachedRowset with logic:iterate tag

2002-07-17 Thread aps olute

How to iterate over a CachedRowSet using
 tags? I have filled the CachedRowset
with a select
statement and am able to iterate using the
crs.getString(1) or the crs.getString(colname)
methods,
but no am ready to use Struts tags but dont know how.
Do I need to convert it a Collection type? but that
will eat up more memory as two copies CRS and the
Collection with same contents?
Is it necessary to use the Struts tags to work with 
the rest of the Struts features?


<%@ page language="java" %>
<%@ page contentType="text/html" %>
<%@ page
import="sun.jdbc.rowset.CachedRowSet,javax.naming.InitialContext"%>

<% InitialContext ctx = new InitialContext();
  javax.sql.DataSource ds =  
(javax.sql.DataSource)ctx.lookup("java:/DefaultDS");
  java.sql.Connection con = ds.getConnection();
  Contacts.setCommand("SELECT name,
owner,species,sex,birth,death from pet");
  Contacts.execute(con);
  Contacts.first(); %> 


 

  


But nothing is ever printed. if i take out the
logic:present and logic:iterate and replaced with a
while (Contacts.next()  Contacts.getString(1)  at
least
i gets some output.




__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Iterating multiple collections using logic:iterate tag

2002-07-15 Thread Ravi Kora

Hi,

Can someone help me to iterate over multiple collections using
logic:iterate tags. It is taking as nested loop if I place the the tag
one after the other.

Thanks & Regards,
Ravi Kora
[EMAIL PROTECTED]
337-739-3434(M) 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




indexId attribute setting in logic:iterate tag

2002-03-19 Thread Krishnan

I am trying to get the current index value from the
iterate tag and pass it to a mouse event handler
function that is part of the iterate tag.  Could some
one show examples of how this is done?.  

Thanks
Krishnan

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to use the radio tag inside logic:iterate tag

2001-11-03 Thread Alvin Kutttikkat Antony

Hello dave
  It sounds better.Thank u.

alvin kuttikkat antony
Internet und Virtuelle Hochshule
Directory
Universität München

Leopoldstr .3
80802 München
Germany

Office Tel + 49.89.21025979
Office Fax + 49.89.21025980


>>> [EMAIL PROTECTED] 11/02/01 06:41pm >>>


See if this helps...

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg16684.html 

Cheers,

Dave





"Alvin Kutttikkat Antony"
<[EMAIL PROTECTED]> on 11/02/2001 12:33:27
PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "<" <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  How to use the radio tag inside logic:iterate tag




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




Re: How to use the radio tag inside logic:iterate tag

2001-11-02 Thread dhay



See if this helps...

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg16684.html

Cheers,

Dave





"Alvin Kutttikkat Antony"
<[EMAIL PROTECTED]> on 11/02/2001 12:33:27
PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "<" <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  How to use the radio tag inside logic:iterate tag






I have a collection called workrelationships .I have to use radio buttons to
select the preferred workrelationship.
here is the code for iteration





















I can't understand the use of 'Indexed' attribute in radio tag?
Could any one plz help me?
thanks
Alvin


alvin kuttikkat antony
Internet und Virtuelle Hochshule
Directory
Universität München

Leopoldstr .3
80802 München
Germany

Office Tel + 49.89.21025979
Office Fax + 49.89.21025980



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








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


How to use the radio tag inside logic:iterate tag

2001-11-02 Thread Alvin Kutttikkat Antony

I have a collection called workrelationships .I have to use radio buttons to select 
the preferred workrelationship.
here is the code for iteration





















I can't understand the use of 'Indexed' attribute in radio tag?
Could any one plz help me?
thanks
Alvin 


alvin kuttikkat antony
Internet und Virtuelle Hochshule
Directory
Universität München

Leopoldstr .3
80802 München
Germany

Office Tel + 49.89.21025979
Office Fax + 49.89.21025980



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to use the radio tag inside logic:iterate tag

2001-11-02 Thread Alvin Kutttikkat Antony

I have a collection called workrelationships .I have to use radio buttons to select 
the preferred workrelationship.
here is the code for iteration





















I can't understand the use of 'Indexed' attribute in radio tag?
Could any one plz help me?
thanks
Alvin 


alvin kuttikkat antony
Internet und Virtuelle Hochshule
Directory
Universität München

Leopoldstr .3
80802 München
Germany

Office Tel + 49.89.21025979
Office Fax + 49.89.21025980




BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:Alvin Kutttikkat Antony
EMAIL;WORK;PREF;NGW:aantony.RFE-MAIN.RFE
N:Antony;Alvin Kutttikkat
X-GWUSERID:aantony
END:VCARD




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Display nested information(xml tree) using logic:iterate tag

2001-08-28 Thread BlaineNewsletters\(@yahoo\)




I want to parse a xml document using Jdom and then 
display the resulting tree . Below I have a sample XML, the code in the jsp page, as well as what is outputted. The nested loop 
is not working correctly. It's nesting over the parent  tag 
and displaying all  tags. Any suggestions on the nested loops would 
be great. I've actually got more nested elements under the  tags, 
but left them out for now. 
Also, the JSP isn't very clean. Any suggestions on 
cleaning it up? 



Example XML 
:--
  
Code in jsp 
page:--
 
<% test.TestConfigBean testbean = new 
test.TestConfigBean();
  java.util.List testfamilylist = 
testbean.getTestFamily(testbean.getTestIndexElement());  
pageContext.setAttribute("j_tflist",testfamilylist, 
PageContext.PAGE_SCOPE);
  %>
<%  java.util.Iterator i_tf = 
testfamilylist.iterator();  while (i_tf.hasNext()) 
{        org.jdom.Element _testType = 
(Element) i_tf.next();        java.util.List 
ttype = testbean.getTestArgs (_testType);    
    pageContext.setAttribute("j_ttlist",ttype, 
PageContext.PAGE_SCOPE);%>      <% } 
%>
 
Resulting 
display:--
[Element: 
]   
[Element: 
]   
[Element: 
]   
[Element: 
]   
[Element: 
]   
[Element: ][Element: 
]   
[Element: 
]   
[Element: 
]   
[Element: 
]   
[Element: 
]   
[Element: ]



 
Thanks,
Blaine Kendall
 


RE: Another question about the logic:iterate tag

2001-07-24 Thread Melissa

Yes - yes, and again, yes. Thanks, Ted.

To further expound (in the chance that it might help someone else), when one
needs to iterate through the key/value pairs of a hashmap, instantiate the
object as type Map:

Map aMap = new HasMap();

and place it in the request.  When you need to retrieve the elements, you
can save time by using the struts logic:iterate tag as follows:





This works b/c the element that gets exposed as the iterator is actually a
Map.Entry object, which contains the key value pairs as properties (although
this utility is only available during the life of the iteration).

Very useful! It reduced my code from a natty 11 lines (see below) down to 4.

Feeling *much* better now,
Melissa


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 1:35 PM
To: [EMAIL PROTECTED]
Subject: Re: Another question about the logic:iterate tag


id is the name you want to give each item in the map as it iterates.

For more see, <
http://jakarta.apache.org/struts/struts-logic.html#iterate >

We are about to add more indexing support, which may help you further.

See the Indexed Tablibs item at

< http://husted.com/about/struts/resources.htm#taglibs >

for an early release.

Melissa wrote:
>
> I have just tried this, but the "id" attribute is apparently required. My
> guess is that this can just be an arbitrary variable... However, the
bigger
> issue seems to be that the iterate tag isn't really suited to the
retrieval
> of more than one oject (i.e. the hashmap's key/value pairs)...
>
> here's the old code I was hoping to "convert":
> 
> <%
> }
> %>
>
> Is there a way to integrate this into a Struts iterate tag, or should i
just
> stick with the original code?
>
> Thanks so much for your help.
> Melissa
> (Strutting better every day)
>
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 11:03 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Another question about the logic:iterate tag
>
> The docs say "JSP bean", but the meaning there is broad. So, yes, you
> can do this:
>
> request.setAttribute("hashmap",hashmap);
>
> ...
>
> 
>
> To use an actual bean, you would also specify the property
>
> 
>
> which resolves to javaBean.getHashmap()
>
> Melissa wrote:
> >
> > Hi again.  I am wondering whether the logic:iterate tag requires you to
> use
> > a bean (or bean property) as the collection to iterate over. I would
> > actually like to iterate over a hashmap that i placed in the request in
my
> > action class, but I have not determined through the user docs whether
this
> > is possible or not.
> >
> > Any help would be greatly appreciated!
> >
> > Melissa
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/




Re: Another question about the logic:iterate tag

2001-07-24 Thread Ted Husted

id is the name you want to give each item in the map as it iterates. 

For more see, <
http://jakarta.apache.org/struts/struts-logic.html#iterate >

We are about to add more indexing support, which may help you further.

See the Indexed Tablibs item at 

< http://husted.com/about/struts/resources.htm#taglibs >

for an early release. 

Melissa wrote:
> 
> I have just tried this, but the "id" attribute is apparently required. My
> guess is that this can just be an arbitrary variable... However, the bigger
> issue seems to be that the iterate tag isn't really suited to the retrieval
> of more than one oject (i.e. the hashmap's key/value pairs)...
> 
> here's the old code I was hoping to "convert":
> 
> <%
> }
> %>
> 
> Is there a way to integrate this into a Struts iterate tag, or should i just
> stick with the original code?
> 
> Thanks so much for your help.
> Melissa
> (Strutting better every day)
> 
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 11:03 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Another question about the logic:iterate tag
> 
> The docs say "JSP bean", but the meaning there is broad. So, yes, you
> can do this:
> 
> request.setAttribute("hashmap",hashmap);
> 
> ...
> 
> 
> 
> To use an actual bean, you would also specify the property
> 
> 
> 
> which resolves to javaBean.getHashmap()
> 
> Melissa wrote:
> >
> > Hi again.  I am wondering whether the logic:iterate tag requires you to
> use
> > a bean (or bean property) as the collection to iterate over. I would
> > actually like to iterate over a hashmap that i placed in the request in my
> > action class, but I have not determined through the user docs whether this
> > is possible or not.
> >
> > Any help would be greatly appreciated!
> >
> > Melissa
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



RE: Another question about the logic:iterate tag

2001-07-24 Thread Melissa

I have just tried this, but the "id" attribute is apparently required. My
guess is that this can just be an arbitrary variable... However, the bigger
issue seems to be that the iterate tag isn't really suited to the retrieval
of more than one oject (i.e. the hashmap's key/value pairs)...

here's the old code I was hoping to "convert":

<%
}
%>

Is there a way to integrate this into a Struts iterate tag, or should i just
stick with the original code?


Thanks so much for your help.
Melissa
(Strutting better every day)

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 11:03 AM
To: [EMAIL PROTECTED]
Subject: Re: Another question about the logic:iterate tag


The docs say "JSP bean", but the meaning there is broad. So, yes, you
can do this:

request.setAttribute("hashmap",hashmap);

...



To use an actual bean, you would also specify the property



which resolves to javaBean.getHashmap()

Melissa wrote:
>
> Hi again.  I am wondering whether the logic:iterate tag requires you to
use
> a bean (or bean property) as the collection to iterate over. I would
> actually like to iterate over a hashmap that i placed in the request in my
> action class, but I have not determined through the user docs whether this
> is possible or not.
>
> Any help would be greatly appreciated!
>
> Melissa

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/




Re: Another question about the logic:iterate tag

2001-07-24 Thread Ted Husted

The docs say "JSP bean", but the meaning there is broad. So, yes, you
can do this:

request.setAttribute("hashmap",hashmap);

...



To use an actual bean, you would also specify the property



which resolves to javaBean.getHashmap()

Melissa wrote:
> 
> Hi again.  I am wondering whether the logic:iterate tag requires you to use
> a bean (or bean property) as the collection to iterate over. I would
> actually like to iterate over a hashmap that i placed in the request in my
> action class, but I have not determined through the user docs whether this
> is possible or not.
> 
> Any help would be greatly appreciated!
> 
> Melissa

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Another question about the logic:iterate tag

2001-07-24 Thread Melissa

Hi again.  I am wondering whether the logic:iterate tag requires you to use
a bean (or bean property) as the collection to iterate over. I would
actually like to iterate over a hashmap that i placed in the request in my
action class, but I have not determined through the user docs whether this
is possible or not.

Any help would be greatly appreciated!

Melissa




logic:iterate tag

2001-05-07 Thread TIqbal

Can someone explain me about property parameter in the logic:iterate tag?
I have something like below and this works fine. but I have seen in struts
example
where property parameter is alos used:

e.g. 

in this line I know 
name="user" is an object,
id="subscription" is a bean
but i can not understand
 property="subscriptions"  what is this and from where it came?

any good explanation would be highly appericated...

===


<%java.util.ArrayList list = new java.util.ArrayList();
list.add(new LabelValueBean("ONE","1"));
list.add(new LabelValueBean("TWO","2"));
list.add(new LabelValueBean("THREE","3"));
list.add(new LabelValueBean("FOUR","4"));
list.add(new LabelValueBean("FIVE","5"));

pageContext.setAttribute("list",list,PageContext.PAGE_SCOPE);

%>



 






Re: problems with the logic:iterate tag

2001-01-26 Thread Craig R. McClanahan

There was a bug in the nightly build versions through early January -- the
 tag was not exposing the variable name you specified with "id"
to the rest of the page.  This has been fixed, AFAIK.  Can you please try this
with a very recent nightly build?

For the record, where "someList" is a bean that implements Collection, the
following code should work correctly:



  

  


  

  


Craig


Florian Zwerina wrote:

> Hi !
>
> I have a problem with the  tag
>
> the following piece of 'code' works ok=20
> (so I know I=B4m doing nothing wrong on the Controller/Model side):
>
> 
>
> 
> <%=09
> Iterator it =3D
> ((Collection)session.getAttribute("someList")).iterator();
> while (it.hasNext()){
> pageContext.setAttribute("item",it.next());
> %>
>   
> 
>   
> 
> 
>   
> 
> 
>   
> 
>   
> <% }  %>
> 
>
> but what I really like to do is
> (our web designer would appreciate it !):
>
> 
>
> 
> 
>   
> 
>   
> 
> 
>   
> 
>   
> 
>
> but with the second approach the table is always empty...
>
> am I too stupid to use the iterate tag ?
> or is something else wrong with my approach ?
>
> pleas help !
>
> Regards
>
> flo




RE: problems with the logic:iterate tag

2001-01-26 Thread Kevin Wang


>  class=3D"com.mycomp.SomeData"/>
>

you might want to check whether "someList" is empty or not.

> 
> 
>   
> 
>   
> 
> 
>   
> 
>   
> 
> 



RE: problems with the logic:iterate tag

2001-01-26 Thread Ted Husted

On 1/26/2001 at 2:18 PM Florian Zwerina wrote:
> but what I really like to do is the following (our web designer would
appreciate it !):

For 





  

  


  

  


Try 





  

  


  

  


Or, maybe just 



The real point being that the "id" property is what you want to call
the object in the given scope. So when you hand the object off from
useBean to iterate, the useBean's "id" becomes iterate's "name", and
then you pick some other "id" for the instance of each thing iterated.
(whewww.)

HTH, and let me know if it doesn't. Iterate's can be tricky at first. 

*** REPLY SEPARATOR  ***

On 1/26/2001 at 2:18 PM Florian Zwerina wrote:

I have a problem with the  tag

the following piece of 'code' works ok
(therfore I know I am doing nothing wrong on the Controller/Model
side):




<%
Iterator it =
((Collection)session.getAttribute("someList")).iterator();
while (it.hasNext()){
pageContext.setAttribute("item",it.next());
%>
  

  


  


  

  
<% }  %>


but what I really like to do is the following
(our web designer would appreciate it !):





  

  


  

  


but with the second approach the table is always empty...

am I too stupid to use the iterate tag ?
or is something else wrong with my approach ?


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





RE: problems with the logic:iterate tag

2001-01-26 Thread Florian Zwerina

here it is again - this time as an attachment



-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 1:31 PM
To: Struts List
Subject: Re: problems with the logic:iterate tag


Could you submit your example as an attachment? In my mail reader at
least, some of the control characters were converted to ASCII, and it
is difficult to read. 

*** REPLY SEPARATOR  ***

On 1/26/2001 at 10:45 AM Florian Zwerina wrote:

Hi !

I have a problem with the  tag

the following piece of 'code' works ok=20
(so I know I=B4m doing nothing wrong on the Controller/Model side):




<%=09
Iterator it =3D
((Collection)session.getAttribute("someList")).iterator();
while (it.hasNext()){
pageContext.setAttribute("item",it.next());
%>
  

  


  


  

  
<% }  %>


but what I really like to do is
(our web designer would appreciate it !):





  

  


  

  


but with the second approach the table is always empty...

am I too stupid to use the iterate tag ?
or is something else wrong with my approach ?


pleas help !


Regards

flo



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/




I have a problem with the  tag

the following piece of 'code' works ok
(therfore I know I am doing nothing wrong on the Controller/Model side):




<%
Iterator it = ((Collection)session.getAttribute("someList")).iterator();
while (it.hasNext()){
pageContext.setAttribute("item",it.next());
%>
  

  


  


  

  
<% }  %>


but what I really like to do is the following
(our web designer would appreciate it !):





  

  


  

  


but with the second approach the table is always empty...

am I too stupid to use the iterate tag ?
or is something else wrong with my approach ?





AW: problems with the logic:iterate tag

2001-01-26 Thread Oliver . Lauer

But I am interested in any kind of solution, too, so please publish it here.

Oliver  

-Ursprüngliche Nachricht-
Von: Ted Husted [mailto:[EMAIL PROTECTED]]
Gesendet am: Freitag, 26. Januar 2001 13:31
An: Struts List
Betreff: Re: problems with the logic:iterate tag

Could you submit your example as an attachment? In my mail reader at
least, some of the control characters were converted to ASCII, and it
is difficult to read. 

*** REPLY SEPARATOR  ***

On 1/26/2001 at 10:45 AM Florian Zwerina wrote:

Hi !

I have a problem with the  tag

the following piece of 'code' works ok=20
(so I know I=B4m doing nothing wrong on the Controller/Model side):




<%=09
Iterator it =3D
((Collection)session.getAttribute("someList")).iterator();
while (it.hasNext()){
pageContext.setAttribute("item",it.next());
%>
  

  


  


  

  
<% }  %>


but what I really like to do is
(our web designer would appreciate it !):





  

  


  

  


but with the second approach the table is always empty...

am I too stupid to use the iterate tag ?
or is something else wrong with my approach ?


pleas help !


Regards

flo



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/




Re: problems with the logic:iterate tag

2001-01-26 Thread Ted Husted

Could you submit your example as an attachment? In my mail reader at
least, some of the control characters were converted to ASCII, and it
is difficult to read. 

*** REPLY SEPARATOR  ***

On 1/26/2001 at 10:45 AM Florian Zwerina wrote:

Hi !

I have a problem with the  tag

the following piece of 'code' works ok=20
(so I know I=B4m doing nothing wrong on the Controller/Model side):




<%=09
Iterator it =3D
((Collection)session.getAttribute("someList")).iterator();
while (it.hasNext()){
pageContext.setAttribute("item",it.next());
%>
  

  


  


  

  
<% }  %>


but what I really like to do is
(our web designer would appreciate it !):





  

  


  

  


but with the second approach the table is always empty...

am I too stupid to use the iterate tag ?
or is something else wrong with my approach ?


pleas help !


Regards

flo



-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/





problems with the logic:iterate tag

2001-01-26 Thread Florian Zwerina

Hi !

I have a problem with the  tag

the following piece of 'code' works ok=20
(so I know I=B4m doing nothing wrong on the Controller/Model side):




<%=09
Iterator it =3D
((Collection)session.getAttribute("someList")).iterator();
while (it.hasNext()){
pageContext.setAttribute("item",it.next());
%>
  

  


  


  

  
<% }  %>


but what I really like to do is
(our web designer would appreciate it !):





  

  


  

  


but with the second approach the table is always empty...

am I too stupid to use the iterate tag ?
or is something else wrong with my approach ?


pleas help !


Regards

flo




RE: Newbie Question on Logic:Iterate Tag

2001-01-06 Thread Ted Husted

> 

or 

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

(note prefix)

If the latter, then then tag should be 


  strut test... (this should repeat) 


What am I doing wrong?


> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 03, 2001 10:09 AM
> To: Struts List
> Subject: Re: Newbie Question on Logic:Iterate Tag
> 
> 
> Basically, iterate will run through a collection object that you've
> stored in one of the contexts (page, request, session, or 
> application),
> using a call like request.SetAttribute("myObj", myObj); You 
> can then do
> something like 
> 
> 
> 
> 
> 
> in your JSP. (Assuming that myObj is an array, hashtable, et cetera.)
> 
> The Example application uses the iterate tag in registration.jsp. 
> 
> For more about the Struts Example application, see 
> < http://husted.com/about/struts >
> 
> The "Stuts with a Fruit Glaze" also uses iterate in the
> "fruitSales.jsp".
> 
> *** REPLY SEPARATOR  ***
> 
> On 1/3/2001 at 6:31 AM Jouhal, CJ wrote:
> 
> Could someone please give me an example of struts logic iterate tag.
> for example if I was to have a bean object called:
>scope="request"/>
> 
> TIA,
> CJ
> 
> 
>






RE: Newbie Question on Logic:Iterate Tag

2001-01-06 Thread Jouhal, CJ

OK.. here is my code.. I couldn't get it to work properly:

ArrayList myObj = new ArrayList();

I only add objects to the list that are instances of mySubObj

I pass myObj to the JSP page using request.setAttribute("myObj",myObj);

(I can print it out using loops)

Now this is what I had for my struts:iterate tag:

  strut test... (this should repeat) 


What am I doing wrong?


> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 03, 2001 10:09 AM
> To: Struts List
> Subject: Re: Newbie Question on Logic:Iterate Tag
> 
> 
> Basically, iterate will run through a collection object that you've
> stored in one of the contexts (page, request, session, or 
> application),
> using a call like request.SetAttribute("myObj", myObj); You 
> can then do
> something like 
> 
> 
> 
> 
> 
> in your JSP. (Assuming that myObj is an array, hashtable, et cetera.)
> 
> The Example application uses the iterate tag in registration.jsp. 
> 
> For more about the Struts Example application, see 
> < http://husted.com/about/struts >
> 
> The "Stuts with a Fruit Glaze" also uses iterate in the
> "fruitSales.jsp".
> 
> *** REPLY SEPARATOR  ***
> 
> On 1/3/2001 at 6:31 AM Jouhal, CJ wrote:
> 
> Could someone please give me an example of struts logic iterate tag.
> for example if I was to have a bean object called:
>scope="request"/>
> 
> TIA,
> CJ
> 
> 
> 



RE: Newbie Question on Logic:Iterate Tag

2001-01-04 Thread Dennis

Um*red-faced*  Nevermind.  It seems forgetting to identify the logic tag
library is a problem!

Thanks anyway,

Dennis

-Original Message-
From: Dennis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 3:46 PM
To: [EMAIL PROTECTED]
Subject: RE: Newbie Question on Logic:Iterate Tag


Ted,

In this example (I'm still having problems using the iterate tag), how does
the "row" get put into a context?  Where is that bean?  According to the tag
docs, id is "The name of a page scope JSP bean that will contain the current
element of the collection on each iteration."

Thanks,

Dennis



-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 03, 2001 8:09 AM
To: Struts List
Subject: Re: Newbie Question on Logic:Iterate Tag


Basically, iterate will run through a collection object that you've
stored in one of the contexts (page, request, session, or application),
using a call like request.SetAttribute("myObj", myObj); You can then do
something like





in your JSP. (Assuming that myObj is an array, hashtable, et cetera.)





RE: Newbie Question on Logic:Iterate Tag

2001-01-04 Thread Dennis

Ted,

In this example (I'm still having problems using the iterate tag), how does
the "row" get put into a context?  Where is that bean?  According to the tag
docs, id is "The name of a page scope JSP bean that will contain the current
element of the collection on each iteration."

Thanks,

Dennis



-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 03, 2001 8:09 AM
To: Struts List
Subject: Re: Newbie Question on Logic:Iterate Tag


Basically, iterate will run through a collection object that you've
stored in one of the contexts (page, request, session, or application),
using a call like request.SetAttribute("myObj", myObj); You can then do
something like





in your JSP. (Assuming that myObj is an array, hashtable, et cetera.)





Re: Newbie Question on Logic:Iterate Tag

2001-01-03 Thread Ted Husted

Basically, iterate will run through a collection object that you've
stored in one of the contexts (page, request, session, or application),
using a call like request.SetAttribute("myObj", myObj); You can then do
something like 





in your JSP. (Assuming that myObj is an array, hashtable, et cetera.)

The Example application uses the iterate tag in registration.jsp. 

For more about the Struts Example application, see 
< http://husted.com/about/struts >

The "Stuts with a Fruit Glaze" also uses iterate in the
"fruitSales.jsp".

*** REPLY SEPARATOR  ***

On 1/3/2001 at 6:31 AM Jouhal, CJ wrote:

Could someone please give me an example of struts logic iterate tag.
for example if I was to have a bean object called:


TIA,
CJ






Newbie Question on Logic:Iterate Tag

2001-01-03 Thread Jouhal, CJ

Could someone please give me an example of struts logic iterate tag.
for example if I was to have a bean object called:


TIA,
CJ