RE: logic:iterate question

2004-02-06 Thread Michael McGrady

I don't think you can pass parameters in JSTL, at least not yet.  But
you could, in your action, call getModelList passing the String you got
from the request, and then when you forward to the JSP, iterate over
that Collection.
I am not sure what you meant, Wendy, but, in case you meant that you cannot 
use parameters, then check out: 
http://jakarta.apache.org/struts/faqs/indexedpropers.html .

If this is helpful, I use this with a BeanMap I whipped up:

public final class BeanMap
implements Map {
  private Map map;
  private BeanMap() {
  }
  public static Map getInstance(Map map) {
BeanMap bean = new BeanMap();
bean.setMap(map);
return bean;
  }
  public void setMap(Map map) {
this.map = map;
log.info(this.map);
  }
  public void setValue(Object key, Object value) {
map.put(key,value);
  }
  public Object getValue(Object key) {
return map.get(key);
  }
  // Forwarding, composition, methods
  public void   clear()   { map.clear(); }
  public booleancontainsKey(Object key)   { return 
map.containsKey(key);}
  public booleancontainsValue(Object value)   { return 
map.containsValue(value); }
  public SetentrySet(){ return map.entrySet(); }
  public booleanequals(Object object) { return 
map.equals(object); }
  public Object get(Object key)   { return map.get(key); }
  public inthashCode(){ return map.hashCode(); }
  public booleanisEmpty() { return map.isEmpty(); }
  public SetkeySet()  { return map.keySet(); }
  public Object put(Object key, Object value) { return 
map.put(key,value); }
  public void   putAll(Map map)   { map.putAll(map); }
  public Object remove(Object key){ return map.remove(key); }
  public intsize(){ return map.size(); }
  public Collection values()  { return map.values(); }
  public String toString(){ return map.toString(); }
}///;-)
Bye 'd bye,

Michael








RE: logic:iterate question

2004-02-06 Thread Kris Schneider
Forgot the obligatory, "but you should really do this in an action". There's no
reason to clog your JSP with this kind of stuff. Grab the collection in an
action, set it as a request attribute, forward to the JSP, and...

Quoting Kris Schneider <[EMAIL PROTECTED]>:

> You should be able to use BeanUtils' mapped property access for this,
> right?
> 
> 
> 
> 
> 
> Which should give you a bean called "modelList" that holds your collection.
> This
> assumes there's a bean called "bean" whose class implements the getModelList
> method.
> 
> Quoting Wendy Smoak <[EMAIL PROTECTED]>:
> 
> > > From: Dragos Madalin Popa [mailto:[EMAIL PROTECTED] 
> > > Thank you for your answer.I would like to change the code shown below,
> > > to pass a request parameter to the modelList function;something like
> > > this:
> > > public Collection getModelList(String requestString){}, where
> > > requestString is a parameter of the http request..
> > > 
> > >   
> > > 
> > > 
> > >   
> > > 
> > 
> > I don't think you can pass parameters in JSTL, at least not yet.  But
> > you could, in your action, call getModelList passing the String you got
> > from the request, and then when you forward to the JSP, iterate over
> > that Collection.
> > 
> > If getModelList returned a Map, or you made a getAllModelLists method
> > that returns a Map, you might have this:
> > 
> >  > item="${model}>
> >
> > 
> > 
> > That depends on how big they are, and whether they change for each user.
> > If you models are fixed and change infrequently, you might be able to
> > put a big Map in Application scope and use it across the entire webapp.
> > 
> > Out of curiosity, what class is getModelList from?
> > 
> > -- 
> > Wendy Smoak
> > Application Systems Analyst, Sr.
> > ASU IA Information Resources Management 
> 
> -- 
> Kris Schneider 
> D.O.Tech   

-- 
Kris Schneider 
D.O.Tech   

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



RE: logic:iterate question

2004-02-06 Thread Kris Schneider
You should be able to use BeanUtils' mapped property access for this, right?





Which should give you a bean called "modelList" that holds your collection. This
assumes there's a bean called "bean" whose class implements the getModelList method.

Quoting Wendy Smoak <[EMAIL PROTECTED]>:

> > From: Dragos Madalin Popa [mailto:[EMAIL PROTECTED] 
> > Thank you for your answer.I would like to change the code shown below,
> > to pass a request parameter to the modelList function;something like
> > this:
> > public Collection getModelList(String requestString){}, where
> > requestString is a parameter of the http request..
> > 
> >   
> > 
> > 
> >   
> > 
> 
> I don't think you can pass parameters in JSTL, at least not yet.  But
> you could, in your action, call getModelList passing the String you got
> from the request, and then when you forward to the JSP, iterate over
> that Collection.
> 
> If getModelList returned a Map, or you made a getAllModelLists method
> that returns a Map, you might have this:
> 
>  item="${model}>
>
> 
> 
> That depends on how big they are, and whether they change for each user.
> If you models are fixed and change infrequently, you might be able to
> put a big Map in Application scope and use it across the entire webapp.
> 
> Out of curiosity, what class is getModelList from?
> 
> -- 
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management 

-- 
Kris Schneider 
D.O.Tech   

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



RE: logic:iterate question

2004-02-06 Thread Wendy Smoak
> From: Dragos Madalin Popa [mailto:[EMAIL PROTECTED] 
> Thank you for your answer.I would like to change the code shown below,
> to pass a request parameter to the modelList function;something like
> this:
> public Collection getModelList(String requestString){}, where
> requestString is a parameter of the http request..
> 
>   
> 
> 
>   
> 

I don't think you can pass parameters in JSTL, at least not yet.  But
you could, in your action, call getModelList passing the String you got
from the request, and then when you forward to the JSP, iterate over
that Collection.

If getModelList returned a Map, or you made a getAllModelLists method
that returns a Map, you might have this:




That depends on how big they are, and whether they change for each user.
If you models are fixed and change infrequently, you might be able to
put a big Map in Application scope and use it across the entire webapp.

Out of curiosity, what class is getModelList from?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



RE: logic:iterate question

2004-02-06 Thread Dragos Madalin Popa
Hi,

Thank you for your answer.I would like to change the code shown below,
to pass a request parameter to the modelList function;something like
this:
public Collection getModelList(String requestString){}, where
requestString is a parameter of the http request..

Warmest Regards,
Dragos


  


  


> From: Dragos Madalin Popa [mailto:[EMAIL PROTECTED]
> How can I iterate over a collection which depends of a request
> parameter? 

JSTL and/or Struts-EL can probably help, but I'm not quite sure what
your question is.  Can you give an example?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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

2004-02-06 Thread Wendy Smoak
> From: Dragos Madalin Popa [mailto:[EMAIL PROTECTED] 
> How can I iterate over a collection which depends of a request
> parameter? 

JSTL and/or Struts-EL can probably help, but I'm not quite sure what
your question is.  Can you give an example?

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



RE: logic:iterate question

2004-02-06 Thread Slattery, Tim - BLS
> shouldn't that be?
> >

Yes, it sure should. And the first line should be:

 

So the whole thing should look like this:


   
   
 

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: logic:iterate question

2004-02-06 Thread James Mitchell
Oops, did you mean to do this?

> 
>
^^^
>
>  
> 


shouldn't that be?
>
 ^^ ^


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (cell)
AIM: jmitchtx
MSN: [EMAIL PROTECTED]



- Original Message - 
From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, February 06, 2004 9:29 AM
Subject: RE: logic:iterate question


> > i have a question about the  tag. My tag 
> > iterates over an ArrayList which contains an amount of beans. 
> > However, in the last iteration i want to perform some special 
> > action. My current code looks something like this:
> > 
> > 
> > 
> > ...
> > 
> > ...
> > 
> > 
> > 
> 
> This is something that JSTL does *extremely* well:
> 
> 
>
>
>  
> 
> 
> --
> Tim Slattery
> [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 question

2004-02-06 Thread Slattery, Tim - BLS
> i have a question about the  tag. My tag 
> iterates over an ArrayList which contains an amount of beans. 
> However, in the last iteration i want to perform some special 
> action. My current code looks something like this:
> 
> 
> 
> ...
> 
> ...
> 
> 
> 

This is something that JSTL does *extremely* well:


   
   
 


--
Tim Slattery
[EMAIL PROTECTED]


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



RE: logic:iterate question

2004-02-06 Thread Turner Benjamin
hi otto,

that solution didnt work - it wouldn't recognise bar as a variable in the <%= %>.

this solution does work for me:


...

...

...

...


the value parameter must be a string, so i used the String.valueOf method.

however this isnt very clean - are there better solutions?

Ben

-Original Message-
From: Otto, Frank [mailto:[EMAIL PROTECTED]
Sent: vrijdag, februari 06, 2004 10:46
To: 'Struts Users Mailing List'
Subject: AW: logic:iterate question


Sorry, I mean:

"foo.length-1" instead "bar.length-1"

-Ursprüngliche Nachricht-
Von: Otto, Frank [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 6. Februar 2004 10:41
An: 'Struts Users Mailing List'
Betreff: AW: logic:iterate question


Hello Ben,

you can do this in this way:




...

...




Regards,

Frank

-Ursprüngliche Nachricht-
Von: Turner Benjamin [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 6. Februar 2004 09:08
An: [EMAIL PROTECTED]
Betreff: logic:iterate question



hello,

i have a question about the  tag. My tag iterates over an ArrayList 
which contains an amount of beans. However, in the last iteration i want to perform 
some special action. My current code looks something like this:



...

...




However, i have no idea what to fill in in the dots (should be something like 
"bar.length-1"), or whether this kind of construction is even supposed to work. As far 
as i can make up out of the docs, logic:equal is only for constant comparison.

any hints on how to do this?

ty,

Ben

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

2003-12-19 Thread hernux
if you know its only one item, why don't change the action...

insteat of:
request.setAttribute("testers",testerInfo);
try
request.setAttribute("testers",testerInfo[0]);


hernux

- Original Message - 
From: "struts" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, December 19, 2003 6:51 AM
Subject: logic:iterate question


I have 


.



I only have one item in the testerInfo collection.

Why can't i do



Or how can i put it to the first item?

Thanks !


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



Re: logic:iterate question

2003-07-07 Thread Sandeep Takhar
The following link should help:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg71256.html

however it talks about using el, but this is not
necessary.

I have got the nested tags to work properly.  The
logic tag should work, but I think I was doing
something slightly wrong when I tried.

Remember to have

getMap(String key)

and 

setMap(String key, Object value)

in your form.  The online help has more on this.


sandeep
--- [EMAIL PROTECTED] wrote:
> hi all,
>   i have a Map-backed action Form which contains an
> HashMap
> 
> the ActionForm is as follows
> 
> public MapActionForm extends ActionForm {
>   HashMap table = new HashMap();
> 
> 
>   public void setValue(String key, String value) {
>   ...
>   }
> 
>   public Object getValue(String key) {
>   ..
>   }
> 
>   public HashMap getTable() {
>   return table;
>   }
> 
> }
> 
> 
> in one of jsp i have to display a textfield for each
> key contained in the HashMap.
> 
> i have written following code (name of the bean is
> DisplayKeys)
> 
> 
>   
>  name="params"/>
>  property="value()"/>
>   
> 
> 
> but when i get into the page (after populating the
> bean) i got following exception:
> 
> org.apache.jasper.JasperException:
> /callservice.jsp(53,79) equal symbol expected
> 
> the hashmap contains parameter names.
> in the jps i want to display the name of the
> parameter (done with bean:write name="params")
> and i want to display close to teh name an input
> text with the name of the parameter..
> 
> Example:
> in the map i have following values
> 
> param1, ""
> param2, ""
> 
> 
> and in the jsp i want to display
> 
> param1 : 
> 
> 
> anyone can give me some help?
> 
> regards
>   marco   
> 
> 
> 
>
-
> 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 question

2003-01-25 Thread Garth Patil
my previous question regarding use of logic:iterate with a HashMap can be 
cleared up by using the 'name' attribute rather than the 'collection' 
attribute in the tag.
now that i figured that out, i'm having some trouble nesting an iterate. now 
that i have the example below actually able to render, the nested 
logic:iterate only generates one result (although there are many in the 
Collection) before moving on to the next result in the outer iterator. any 
ideas how to fix this?
thanks /gp



   

   

   

   

   

   





From: "Garth Patil" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: logic:iterate question
Date: Sat, 25 Jan 2003 05:59:56 +

i have a HashMap stored in the session (as 'events') i'm trying to use the 
logic:iterate tag to iterate through it in my jsp in a nested fashion. the 
HashMap has a bean as the key and a collection of beans as its value. when 
i try to run the page, i get an error: "Cannot create iterator for this 
collection". any ideas?
my jsp looks like this.



   

   

   

   

   

   



_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


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



RE: logic:iterate question

2002-12-03 Thread Susan Bradeen
Just a guess, but perhaps try using the type attribute? Like ...



Susan Bradeen

On 12/03/2002 03:40:04 PM "Andy Kriger" wrote:

> Yes - I store some data in it and then want to use that data later in 
the
> page.
> 
> -Original Message-
> From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 15:32
> To: Struts Users Mailing List
> Subject: RE: logic:iterate question
> 
> 
> Dumb question:  Is the object reference 'myObj' pointing at anything 
before
> set it to the name 'myObj'?  That sounds confusing -- too many myObjs
> floating around.  Suppose you had
> 
> pageContext.setAttribute("myObj", foo, PageContext.PAGE_SCOPE);
> 
> My question is whether 'foo' is set before this call.
> 
> Sri
> 
> > -Original Message-
> > From: Andy Kriger [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, December 03, 2002 3:24 PM
> > To: Struts Users Mailing List
> > Subject: logic:iterate question
> >
> >
> > I have a JSP. I have some scriplet code that defines an
> > object and then I want to iterate over that object, but I
> > keep getting an error that the object is not defined in the
> > page scope. Looking at the docs I don't understand what I'm
> > doing wrong.
> >
> > ---
> >
> > <%
> >pageContext.setAttribute("myObj", myObj,
> > PageContext.PAGE_SCOPE); %>
> >
> > 
> >
> > 
> >
> > ---
> >
> > myObj has a getRecords() method that returns the array i want
> > to iterate over
> >
> > When i load the page i get 'Cannot find bean myObj in scope
> > page' Any ideas?
> >
> > thx
> > andy
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-user-> [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]>
> 

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




RE: logic:iterate question

2002-12-03 Thread Andy Kriger
Yes - I store some data in it and then want to use that data later in the
page.

-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 15:32
To: Struts Users Mailing List
Subject: RE: logic:iterate question


Dumb question:  Is the object reference 'myObj' pointing at anything before
set it to the name 'myObj'?  That sounds confusing -- too many myObjs
floating around.  Suppose you had

pageContext.setAttribute("myObj", foo, PageContext.PAGE_SCOPE);

My question is whether 'foo' is set before this call.

Sri

> -Original Message-
> From: Andy Kriger [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 3:24 PM
> To: Struts Users Mailing List
> Subject: logic:iterate question
>
>
> I have a JSP. I have some scriplet code that defines an
> object and then I want to iterate over that object, but I
> keep getting an error that the object is not defined in the
> page scope. Looking at the docs I don't understand what I'm
> doing wrong.
>
> ---
>
> <%
>pageContext.setAttribute("myObj", myObj,
> PageContext.PAGE_SCOPE); %>
>
> 
>
> 
>
> ---
>
> myObj has a getRecords() method that returns the array i want
> to iterate over
>
> When i load the page i get 'Cannot find bean myObj in scope
> page' Any ideas?
>
> thx
> andy
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-> [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: logic:iterate question

2002-12-03 Thread Sri Sankaran
Dumb question:  Is the object reference 'myObj' pointing at anything before set it to 
the name 'myObj'?  That sounds confusing -- too many myObjs floating around.  Suppose 
you had

pageContext.setAttribute("myObj", foo, PageContext.PAGE_SCOPE);

My question is whether 'foo' is set before this call.

Sri

> -Original Message-
> From: Andy Kriger [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, December 03, 2002 3:24 PM
> To: Struts Users Mailing List
> Subject: logic:iterate question
> 
> 
> I have a JSP. I have some scriplet code that defines an 
> object and then I want to iterate over that object, but I 
> keep getting an error that the object is not defined in the 
> page scope. Looking at the docs I don't understand what I'm 
> doing wrong.
> 
> ---
> 
> <%
>pageContext.setAttribute("myObj", myObj, 
> PageContext.PAGE_SCOPE); %>
> 
> 
>
> 
> 
> ---
> 
> myObj has a getRecords() method that returns the array i want 
> to iterate over
> 
> When i load the page i get 'Cannot find bean myObj in scope 
> page' Any ideas?
> 
> thx
> andy
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

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




Re: logic:iterate question

2002-10-02 Thread Peter S. Hamlen

Since you can access specific item in a list through something like
this:



You should be able to do what you want through a scriptlet:
ie


We use this trick all the time ( and I gleaned it from this fabulous
list in the first place.)

-Peter

On Wed, 2002-10-02 at 14:51, Andy Kriger wrote:
> I have two vectors of the same length. I can iterate over one and retrieve
> values. How can I use the index of that iteration to reference the other
> vector?
> 
> For example
> vOne = { 1,2,3,4 }
> vTwo = { a,b,c,d }
> 
> I iterate over vOne producing 1,2,3,4,
> 
>   ,
> 
> 
> How can I get the output to produce 1:a,2:b,3:c,4:d,?
> 
> (note the formatting is not important, just interested in how to reference
> vTwo using vOne's idx)
> 
> thx
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



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




RE: logic:iterate question

2002-10-02 Thread Joe Barefoot

You'll have to use indexed property getters.  I believe you'll also have to put vTwo 
into your form bean so you can take advantage of the indexed property getter.

Like so:



,
 
:  


I used single quotes around the attributes here because of the double quotes within 
the JSP expression, b.t.w.


Note that this would be a lot cleaner if you used a Tuple object (named whatever you 
like) that contained (number,letter) fields and use a single Vector of these objects:



,
 
:



 property='<%= "msgCode["
> + index.intValue() + "]" %>'

> -Original Message-
> From: Andy Kriger [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 02, 2002 11:52 AM
> To: Struts Users Mailing List
> Subject: logic:iterate question
> 
> 
> I have two vectors of the same length. I can iterate over one 
> and retrieve
> values. How can I use the index of that iteration to 
> reference the other
> vector?
> 
> For example
> vOne = { 1,2,3,4 }
> vTwo = { a,b,c,d }
> 
> I iterate over vOne producing 1,2,3,4,
> 
>   ,
> 
> 
> How can I get the output to produce 1:a,2:b,3:c,4:d,?
> 
> (note the formatting is not important, just interested in how 
> to reference
> vTwo using vOne's idx)
> 
> thx
> 
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail: 


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




RE: logic:iterate question (index available?)

2002-08-29 Thread Karr, David

> -Original Message-
> From: Mark Silva [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 29, 2002 2:46 PM
> To: [EMAIL PROTECTED]
> Subject: logic:iterate question (index available?)
> 
> hello all,
> 
> is there any way to get the current loop number (or index) of 
> a an iterate tag? 
> i have the following code:
> 

Just read the API description for "".  Your answer is one of
the attributes of "".  I'm leaving out the actual attribute
name to make sure you read it, because it is very useful to go through it.

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




RE: logic:iterate question

2002-04-25 Thread Ida Dørum

I have not used the indexId property before myself, but I have experienced with other 
properties/tags that names you define in the tag itself is not available from 
scriptlets. So the snippet <%= index%> will return an empty string or fail.

ida


-Original Message-
From: Graham Lounder [mailto:[EMAIL PROTECTED]]
Sent: 25. april 2002 14:36
To: [EMAIL PROTECTED]
Subject: logic:iterate question


Hello all,

I've got a question about the logic:iterate tag.  I'm trying to
reference a bean which returns a String[] but I only want one of the
values in the array.  The indexID is working but it isn't getting passed
to the bean:write tag corretly.  It throws a 

java.lang.IllegalArgumentException: Invalid indexed property
'attributeNames[]'

If I passed the bean a hardcoded index value, it works.  I can also
print out the value of the index.  I think it may be some kind of timing
issue in struts and maybe it can't be done.  Any Ideas?







 


Thanks,
Graham


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




Re: logic:iterate question

2002-04-25 Thread Nicolas De Loof






Correct your bean:write tag so attribute property becomes full scriplet
syntax coded :

property='<%= \"mapController.dataConnection.attributeNames[\"+ index +
\"]\"%>'

Nico


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




RE: logic:iterate question

2002-02-14 Thread Ronald Haring

> can't you create a form around each button ??

I can do that I suppose, but not sure whether old netscape users like
multiple forms.
Other problem is that if you define forms within a table the table row will
become larger, but thx for that solution

Gr
Ronald


Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---




RE: logic:iterate question

2002-02-14 Thread geert

can't you create a form around each button ??

On Thu, 14 Feb 2002 12:29:34 +0100 Ronald Haring <[EMAIL PROTECTED]> wrote:
>I have a similiar question, but this time with a button
>Every row will have a show action. With a link there is no problem (using
>the method described) but with 
>a button I have a problem since I cant replace the onclick event with a
>parameter.
>
>value="id"/>)"/>
>
>this should become 
>
>Gr
>Ronald 
>
>> -Original Message-
>> From: Oliver Kiessler [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, February 14, 2002 12:21 PM
>> To: Struts Users Mailing List
>> Subject: Re: logic:iterate question
>> 
>> 
>> thanks! thats it. now it works... ;)
>> 
>> oli
>> 
>> Am Don, 2002-02-14 um 12.13 schrieb Ivan Siviero:
>> > > links like this: > href=ViewHeadlineAction.do?headlineID=X>XYZ
>> > supposing the logic:iterate id paramenter is set to "element"
>> > It should be something like this
>> > 
>> > > > paramId="headlineID" paramPropery="getterMethodWhoReturnsX">
>> > 
>> >  instead of the static 
>> > 
>> > checks this document 
>> http://jakarta.apache.org/struts/struts-html.html for
>> >  reference doc.
>> > 
>> > Hope this helps.
>> > 
>> > > --
>> > > 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]>
>> > 
>> > 
>> -- 
>> mailto: [EMAIL PROTECTED]
>> web: http://www.linustar.de
>> gnupg key: http://www.linustar.de/pgp/kiessler.gpg
>> icq: 136832122
>> ---
>> The more I question the origin and meaning of our existence, the
>> less I care. And the less I care, the more I question myself.
>> 
>> 
>> --
>> To unsubscribe, e-mail:   
>> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail: 
>> <mailto:[EMAIL PROTECTED]>
>> 
>
>
>Furore B.V.
>Rijswijkstraat 175-8
>Postbus 9204
>1006 AE Amsterdam
>tel. (020) 346 71 71
>fax. (020) 346 71 77
>
>
>---
>The information transmitted is intended only for the person
>or entity to which it is addressed and may contain confidential
>and/or privileged material. Any review, retransmission,
>dissemination or other use of, or taking of any action in
>reliance upon, this information by persons or entities other
>than the intended recipient is prohibited. If you received
>this in error, please contact the sender and delete the material
>from any computer
>
>---
>
>
>


-- 
Get your firstname@lastname email at http://Nameplanet.com/?su

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




RE: logic:iterate question

2002-02-14 Thread Ronald Haring

I have a similiar question, but this time with a button
Every row will have a show action. With a link there is no problem (using
the method described) but with 
a button I have a problem since I cant replace the onclick event with a
parameter.

)"/>

this should become 

Gr
Ronald 

> -Original Message-
> From: Oliver Kiessler [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 14, 2002 12:21 PM
> To: Struts Users Mailing List
> Subject: Re: logic:iterate question
> 
> 
> thanks! thats it. now it works... ;)
> 
> oli
> 
> Am Don, 2002-02-14 um 12.13 schrieb Ivan Siviero:
> > > links like this:  href=ViewHeadlineAction.do?headlineID=X>XYZ
> > supposing the logic:iterate id paramenter is set to "element"
> > It should be something like this
> > 
> >  > paramId="headlineID" paramPropery="getterMethodWhoReturnsX">
> > 
> >  instead of the static 
> > 
> > checks this document 
> http://jakarta.apache.org/struts/struts-html.html for
> >  reference doc.
> > 
> > Hope this helps.
> > 
> > > --
> > > 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]>
> > 
> > 
> -- 
> mailto: [EMAIL PROTECTED]
> web: http://www.linustar.de
> gnupg key: http://www.linustar.de/pgp/kiessler.gpg
> icq: 136832122
> ---
> The more I question the origin and meaning of our existence, the
> less I care. And the less I care, the more I question myself.
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 


Furore B.V.
Rijswijkstraat 175-8
Postbus 9204
1006 AE Amsterdam
tel. (020) 346 71 71
fax. (020) 346 71 77


---
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other
than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material
from any computer

---




Re: logic:iterate question

2002-02-14 Thread Oliver Kiessler

thanks! thats it. now it works... ;)

oli

Am Don, 2002-02-14 um 12.13 schrieb Ivan Siviero:
> > links like this: XYZ
> supposing the logic:iterate id paramenter is set to "element"
> It should be something like this
> 
>  paramId="headlineID" paramPropery="getterMethodWhoReturnsX">
> 
>  instead of the static 
> 
> checks this document http://jakarta.apache.org/struts/struts-html.html for
>  reference doc.
> 
> Hope this helps.
> 
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
-- 
mailto: [EMAIL PROTECTED]
web: http://www.linustar.de
gnupg key: http://www.linustar.de/pgp/kiessler.gpg
icq: 136832122
---
The more I question the origin and meaning of our existence, the
less I care. And the less I care, the more I question myself.


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




Re: logic:iterate question

2002-02-14 Thread geert

This should work ... ( use bean:write to set the value of the parameter ... )


">
View Headline 



On 14 Feb 2002 11:58:39 +0100 Oliver Kiessler <[EMAIL PROTECTED]> wrote:
>hello,
>i have a problem on one of my "views" with a logic:iterate tag. i have
>an "action" that fetches news headlines from a database
>(headline,headlineID) and stores them in a bean
>(headlines->Arraylist,headlinedID->Vector) which is appended to
>request/session. On the "view" i want to iterate through the Arraylist
>with the headlines which basically works fine. but i need to create
>links like this: XYZ
>
>how would i use the iterate tag? do i have to use the nested tag? (i am
>currently using struts 1.0.2) i dont want to use any "java code" in my
>view, only tags...
>
>thanks, oli
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>


-- 
Get your firstname@lastname email at http://Nameplanet.com/?su

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




Re: logic:iterate question

2002-02-14 Thread Ivan Siviero

> links like this: XYZ
supposing the logic:iterate id paramenter is set to "element"
It should be something like this



 instead of the static 

checks this document http://jakarta.apache.org/struts/struts-html.html for
 reference doc.

Hope this helps.

> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Re: logic:iterate question

2002-02-14 Thread Konstantina Stamopoulou

Hi ,

>From what I understand you want to create links for each headline and pass
the head line as a parameter.
So inside the logic:iterate tag U should put :

 
   <%info.put("HeadLineID", "X"); %>

   Headline 


U can replace the one line of code with 

It worked for me.

Konstantina


---Original Message -
From: "Oliver Kiessler" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 12:58 PM
Subject: logic:iterate question


> hello,
> i have a problem on one of my "views" with a logic:iterate tag. i have
> an "action" that fetches news headlines from a database
> (headline,headlineID) and stores them in a bean
> (headlines->Arraylist,headlinedID->Vector) which is appended to
> request/session. On the "view" i want to iterate through the Arraylist
> with the headlines which basically works fine. but i need to create
> links like this: XYZ
>
> how would i use the iterate tag? do i have to use the nested tag? (i am
> currently using struts 1.0.2) i dont want to use any "java code" in my
> view, only tags...
>
> thanks, oli
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


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




Re: logic:Iterate question

2001-09-24 Thread Will Jaynes

If you mean, can you wrap a long column into two or more columns, like a
newspaper article, then there is no html way to do this. You would need to do in
manually somehow.

Will

- Original Message -
From: "Shea Kelly" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 23, 2001 7:01 PM
Subject: logic:Iterate question


Hi all,

I am using the iterate tag to iterate over a collection of items stored in
the FormBean. And all work fine (so far :) ). My question is: A I have a
large number of items in the collection is it possible arrange them in
columns?? Here is a code snippet:

 
  

  
  
  
  

  


This prints everything in one long column. Is there a html thing I can use??

regards

Shea Kelly

Consultant Software Engineer
Object Oriented Pty Ltd
PO Box 528, North Sydney NSW 2059
Phone: +61 2 9957-1092
Direct: +61 2 9459-3335
Fax: +61 2 9956-5089
Mobile: 0416 110 499
Email: [EMAIL PROTECTED]
Web: < http://www.oopl.com.au  >







RE: logic:Iterate question

2001-09-23 Thread Alexander Jesse

Hi,
 
try:
 
 
  


  


  


  


  


  

 
that is pure html...
 
hope this helps
Alexander Jesse 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 24, 2001 1:02 AM
To: [EMAIL PROTECTED]
Subject: logic:Iterate question


Hi all,
 
I am using the iterate tag to iterate over a collection of items stored in the 
FormBean. And all work fine (so far :) ). My question is: A I have a large number of 
items in the collection is it possible arrange them in columns?? Here is a code 
snippet:
 
 
  

  
  
  
  

  

 
This prints everything in one long column. Is there a html thing I can use??

regards 

Shea Kelly 

Consultant Software Engineer
Object Oriented Pty Ltd
PO Box 528, North Sydney NSW 2059
Phone: +61 2 9957-1092
Direct: +61 2 9459-3335
Fax: +61 2 9956-5089 
Mobile: 0416 110 499
Email: [EMAIL PROTECTED]
Web: < http://www.oopl.com.au  >