forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: exists selector in locationmap
Date Sun, 28 Aug 2005 04:25:00 GMT
Before I go to sleep. 

One thing is handy if you use an IDE like Eclipse and want to debug
java:
# Any other arguments to pass to the JVM. For example, to run on an
X-less
# server, set to -Djava.awt.headless=true
forrest.jvmargs=-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,susp end=n

That starts your project in debugging mode with Port 8000. The default
debug port from e.g. Eclipse. Then you can set breakpoints to debug.
That is pretty sweet. ;-)

Good night.

salu2

On Sun, 2005-08-28 at 06:19 +0200, Thorsten Scherler wrote:
> On Sat, 2005-08-27 at 23:41 -0400, Tim Williams wrote:
> 
> > > I forgot:
> > > <locationmap xmlns="http://apache.org/forrest/locationmap/1.0">
> > >   <components>
> > >     <matchers default="lm">
> > >       <matcher name="lm"
> > > src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
> > >     </matchers>
> > >     <actions default="RecursiveDirectoryTraversalAction">
> > >       <action name="RecursiveDirectoryTraversalAction"
> > > src="org.apache.forrest.plugin.internal.view.acting.RecursiveDirectoryTraversalAction"/>
> > >     </actions>
> > >     <selectors default="exists">
> > >             <selector name="exists"
> > > src="org.apache.forrest.sourceexists.SourceExistsSelector" />
> > >           </selectors>
> > >   </components>
> > >   <locator>
> > >     <match pattern="views/**">
> > >       <select type="exists">
> > >         <!-- File-based -->
> > >         <location src="{1}{project:theme-ext}" />
> > >               <act type="RecursiveDirectoryTraversalAction">
> > >                 <parameter value="{1}" name="request"/>
> > >                 <parameter value="{project:theme}" name="projectFallback"/>
> > >                 <parameter value="{project:theme-ext}"
> > > name="projectExtension"/>
> > >                 <parameter value="{project:content.xdocs}" name="projectDir"/>
> > >           <!-- Directory-based / Parent-directory based (recursively)
> > > -->
> > >                 <location src="{uri}" />
> > >               </act>
> > >         <!-- Theme based -->
> > >         <location
> > > src="{defaults:view-themes}/{project:theme}{project:theme-ext}" />
> > >         <!-- Application Default -->
> > >         <location
> > > src="{defaults:view-themes}/{defaults:theme}{defaults:theme-ext}" />
> > >       </select>
> > >     </match>
> > >   </locator>
> > > </locationmap>
> > 
> > Out of quick curiousity, have you taken the 'act' out of this and seen
> > if the "exists" selector will work against the "location"'s alone? 
> 
> Yes, i did this but no success. Then I reduced till:
> <locationmap xmlns="http://apache.org/forrest/locationmap/1.0">
>   <components>
>     <matchers default="lm">
>       <matcher name="lm" 
> 
> src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
>     </matchers>
>     <selectors default="exists">
> 	    <selector name="exists" 
> 	      src="org.apache.forrest.sourceexists.SourceExistsSelector" />
> 	  </selectors>
>   </components>
>   <locator>
>     <match pattern="views/**">
>       <select type="exists">
>         <location 
> 
> src="{defaults:view-themes}/{defaults:theme}{defaults:theme-ext}" />
>       </select>
>     </match>
>   </locator>
> </locationmap>
> 
> and it worked. That made me think about my changes. I switched the order
> how I defined in the lm. From:
> -actions
> -selectors
> to:
> -selectors
> -actions
> 
> But I got the old error. I think it is in the ActNode.java that I just
> checked in. 
> 
> > That might allow us to narrow it down.  I'm going to have to read up
> > on actions as I think they're subtley different than other sitemap
> > components.
> > 
> 
> It seems to me that the ActNode is overriding the .m_manager instead of
> extending it. Another thing could be the LocationMap.
> 
> The action is working like I described in the other thread. They send
> back a map or null.
> 
> If an action returns null then the inner children will be ignored (not
> executed). If they return a Map the values of the map can be directly
> accessed in the sitemap by {key}.
> 
> Have a quick look into the RecursiveDirectoryTraversalAction then you
> know how action work. You will understand directly.
> 
> > I've admitted before but perhaps not to you -- I'm not a 'Cocooner' so
> > it takes me some time to study up on each aspect of cocoon-related
> > things. 
> 
> jeje, me too, but you know somethings about the lm. ;-) I reckon I made
> some mistakes in the Actnode that you may spot right on. :) 
> 
> >  This gives me reason to go deep on Actions but I'm just
> > warning that you may well find it before me.
> > --tim
> 
> :) 
> 
> Cheers again for your help. :)
> 
> salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message