Hi,
thanks for your reply.
Well... I have to iterate through a collection accesible in a struts2
Action. I can make that object visible to the page/request scope and then
access it from JSTL <c:forEach>; in fact I am doing that for dynamic images
as strugs2 has no IMG tag to use OGNL directly. Very painful when someone is
used to access the object from the tag itself. Moreover... I am really
trying to forget about EL and JSTL. I really don't find my self confortable
using 3 different expression languages / tag libs in my pages. I didn't have
to (in struts1) but maybe I have to accept that idea now.
Moreover, EL is obsolete when compared to OGNL (oh god... when I discovered
I could do #{people.size()} I just didn't believe it!!! Direct access to
methods. JSTL hasn't been improved for 4 (5?) years! Method access,
valuestack... and I am new to OGNL. Don't know 50% of its power!

More situations: I made my HTML designers learn JSTL. Now I have to make
them learn OGNL and I am sure they'll have problems with both things mixed.
Of course, I'd like new people in the company thinking about the
presentation layer just to handle one thing.

Why doesn't OGNL team focus on making it possible to forget about JSTL+EL
and just use OGNL for every thing? It nearly does!!!! and just because a
couple of minor glitches we can't. (Another example... s:a tag doesn't have
"target" attribute. I have then to use HTML   tag directly, what forces me
to transfer the href data in the Action to an object in the page scope and
use EL where. Painful for something that should be straightforward.

Well... sorry for the long text. Please don't take me wrong. Just love
struts2 and would love to forget about old technnologies. I wish I had time
and knowledge to help on all this. Now I just can't.


newton.dave wrote:
> 
> Ignacio de Córdoba wrote:
>> Hi there,
>> I've checked struts2 docs and this forum and have found no inside syntax
>> for
>> s:iterator tag to do:
>> <c:forEach var='' value='${}' being='1' end='4'/>
>> 
>> Examples in docs just show how to count from 1 to 5 ¿? I'd like to avoid
>> counting and using indexed property to access an iterator. The last
>> example
>> in docs doesnt seem to work if I replace "this" with the property/objet I
>> want to iterate.
>> 
>> I am sure struts2 team has thought of a way to do some partial iterator
>> (I
>> can also do the full iterator and do a s:if to show only 5 values using
>> status.index, but doesn't seem a nice solution.
> 
> Any reason you can't use <c:forEach...>? <s:iterator doesn't have the 
> same functionality.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/s%3Aiterator-%C2%BFbegin--%3E-end--tp21832209p21844359.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to