tiles-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cserveny Tamás (JIRA) <j...@apache.org>
Subject [jira] Issue Comment Edited: (TILES-220) [tiles] use of wildcard in tiles-defs.xml as for wildcard mappings
Date Sun, 23 Mar 2008 21:29:58 GMT

    [ https://issues.apache.org/struts/browse/TILES-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43539#action_43539
] 

smil edited comment on TILES-220 at 3/23/08 2:29 PM:
---------------------------------------------------------------

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

ps. Sorry for the XWork dependency.

      was (Author: smil):
    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.


Mime
View raw message