forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thorsten Scherler (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FOR-789) default variable filename is always set to 'index.html' in dispatcher v3
Date Sat, 28 Jan 2006 19:40:33 GMT
    [ http://issues.apache.org/jira/browse/FOR-789?page=comments#action_12364336 ] 

Thorsten Scherler commented on FOR-789:
---------------------------------------

This is because it is working so far with a test link. You can find in 
package org.apache.forrest.dispatcher;
public class ContractBeanDOMImpl extends Beans implements ContractBean {
...line 253...
 Node defaultVariables = org.apache.forrest.dispatcher.util.SourceUtil.readDOM("cocoon://test-props",
this.manager);

Like you can see the properties are always get requested from cocoon://test-props.

This is linked in the themer plugin in output.xmap:
<map:match pattern="test-props">
        <map:generate src="foo.xml" />
        <map:transform src="lm://transform.xml.variable.helper">
          <map:parameter name="path" value="samples/index.html" />
        </map:transform>
        <map:serialize type="xml" />
      </map:match>

Like you see there is not yet a path aware way to request the variables. We need to extend
this match to include the forrest.properties.xml instead of foo.xml and pass the path to the
transfomer. 

Like:
package org.apache.forrest.dispatcher;
public class ContractBeanDOMImpl extends Beans implements ContractBean {
...line 253...
 Node defaultVariables = org.apache.forrest.dispatcher.util.SourceUtil.readDOM("cocoon://"+requestedPath+".properties",
this.manager);

and
<map:match pattern="*.properties">
        <map:generate src="cocoon://forrest.properties.xml" />
        <map:transform src="lm://transform.xml.variable.helper">
          <map:parameter name="path" value="{1}" />
        </map:transform>
        <map:serialize type="xml" />
      </map:match>

That forces us that the forrest.properties.xml are aviable.



> default variable filename is always set to 'index.html' in dispatcher v3
> ------------------------------------------------------------------------
>
>          Key: FOR-789
>          URL: http://issues.apache.org/jira/browse/FOR-789
>      Project: Forrest
>         Type: Bug
>   Components: Dispatcher (aka views)
>     Versions: 0.8-dev
>     Reporter: Cyriaque Dupoirieux
>      Fix For: 0.8-dev

>
> In the siteinfo-credits contract for pelt, I added :
>         <xsl:param name="defaultVariables" select="'test.html'"/>
>         <xsl:variable name="filename" select="$defaultVariables/*/*[@name='filename']/@value"/>
> to be able to display credits if the current page is index.
> I realise - adding traces - that filename variable is always set to index.html ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message