First of, it's handy to add a convenience method to your "page" component to define this "list" of objects:
protected void addObjectToPathComponents(Object anObject, String aPageName, Object aTitle)
{
if ( anObject !=null)
____
____
___throw_new_IllegalArgumentException(_"Page.addObjectWithPageNameAndTitleToPath:_null_object.");
__}
Now,_in_each_concrete_page_you_could_initialize_the_path_components:
__protected_void_initPathComponents()
__{
___EnvelopeanEnvelope=_this.value();
___Date__aDate=_anEnvelope.creationDate();
___List__aList=_anEnvelope.list();
____
___this.addObjectToPathComponents(_aDate,"Timeline","TIMELINE");
___this.addObjectToPathComponents(_aDate);
____
___if(aList!= null )
this.addObjectToPathComponents( anEnvelope );
}
Finally, the path component itself could look like this:
{panel} <webobject name = "IsMain"> <webobject name = "MainLink"><webobject name = "MainLabel"></webobject></webobject> </webobject> <webobject name = "IsNotMain"> <webobject name = "Components"> <webobject name = "HasPrefix"> <webobject name = "Prefix"></webobject> </webobject><webobject name = "Component"></webobject> </webobject> <webobject name = "HasPrefix"> <webobject name = "Prefix"></webobject> </webobject><webobject name = "LastComponent"></webobject> </webobject> {panel}
Components: WORepetition
;
IsMain: WOConditional
;
IsNotMain: WOConditional
;
ainLink: WOHyperlink
;
MainLabel: SpanString
;
HasPrefix: WOConditional
;
Prefix: WOImage
;
Component: Link
;
LastComponent: SpanString
;
That's all folks.
Category:WebObjects