You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoff Longman <gl...@gmail.com> on 2005/07/19 14:44:02 UTC

Nested Foreach and a brain fart

Having one of those days.

I have a nested Foreach:

<div jwcid="subjectTitleLoop@Foreach" 
      source="ognl:beans.studentActivities.subjects">

      <div jwcid="activitiesLoop@Foreach"        
source="ognl:beans.studentActivities.getActivitiesForSubject(components.subjectTitleLoop.value)"
    >

beans.studentActivities.subjects returns a nonempty set, this is verified.

But, in the 'source' expression for the second Foreach this part,

components.subjectTitleLoop.value

always evaluates to null.

Anybody see the obvious here?

Geoff


-- 
The Spindle guy.           http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:    
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates:            http://spindle.sf.net/updates

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Nested Foreach and a brain fart

Posted by Geoff Longman <gl...@gmail.com>.
Figured it out.

getActivitiesForSubject() takes a Subject object and I was passing a
SubjectHolder object. OGNL silently drops the argument if its the
wrong type.

Geoff

On 7/19/05, Geoff Longman <gl...@gmail.com> wrote:
> Having one of those days.
> 
> I have a nested Foreach:
> 
> <div jwcid="subjectTitleLoop@Foreach"
>       source="ognl:beans.studentActivities.subjects">
> 
>       <div jwcid="activitiesLoop@Foreach"
> source="ognl:beans.studentActivities.getActivitiesForSubject(components.subjectTitleLoop.value)"
>     >
> 
> beans.studentActivities.subjects returns a nonempty set, this is verified.
> 
> But, in the 'source' expression for the second Foreach this part,
> 
> components.subjectTitleLoop.value
> 
> always evaluates to null.
> 
> Anybody see the obvious here?
> 
> Geoff
> 
> 
> --
> The Spindle guy.           http://spindle.sf.net
> Get help with Spindle:
> http://lists.sourceforge.net/mailman/listinfo/spindle-user
> Announcement Feed:
> http://www.jroller.com/rss/glongman?catname=/Announcements
> Feature Updates:            http://spindle.sf.net/updates
> 


-- 
The Spindle guy.           http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:    
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates:            http://spindle.sf.net/updates

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org