You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Cserveny Tamás (JIRA)" <ji...@apache.org> on 2008/03/23 22:21:58 UTC

[jira] Updated: (TILES-220) [tiles] use of wildcard in tiles-defs.xml as for wildcard mappings

     [ https://issues.apache.org/struts/browse/TILES-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cserveny Tamás updated TILES-220:
---------------------------------

    Attachment: WildcardMatchingDefFactory.java

Hi,

I've created a similar solution to Tiles 2.0.4. It is not a full solution. I did not try to solve the problem with lists and maps.

You will only need to specify "org.apache.tiles.definition.DefinitionsFactory" context parameter to use it without a new tiles release.

Example:
    <definition name=".masterdata.search.*" extends=".mainLayout">
        <put-attribute name="title" value="masterdata.search{1}.searchTitle"/>
        <put-attribute name="upper" value="sb.masterdata.search.{1}"/>
    </definition>

Cheers,

Tamas

> [tiles] use of wildcard in tiles-defs.xml as for wildcard mappings
> ------------------------------------------------------------------
>
>                 Key: TILES-220
>                 URL: https://issues.apache.org/struts/browse/TILES-220
>             Project: Tiles
>          Issue Type: New Feature
>          Components: tiles-core
>    Affects Versions: 2.0.4
>         Environment: Operating System: other
> Platform: Other
>            Reporter: nicolas de loof
>            Priority: Minor
>             Fix For: 2.1.x
>
>         Attachments: patch.txt, patch.txt, patch.txt, WildcardMatchingDefFactory.java
>
>
> Wildcard mappings is a interesting new feature in struts 1.2.x. This enhancement
> allow to use wildcard in tiles definition too like the following :
> <definition name="tiles:test.*" path="/testlayout.jsp">
>     <put name="testName" value="{1}"/>
>     <put name="def" value="tiles:another.definition.{1}" type="definition"/>
> </definition>
> Using this, you can build a full wildcard request handling when adding a mapping
> in struts-config :
> <action path="/Test*"
>         forward="tiles:test.{1}"/>
> Please note : properties are replaced in attributes of the definition only for
> put elements. It may require a little bit more coding in
> DefinitionsFactory.getDefinition() to add putlist support.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.