Please add Tiles Support
Status: Beta
Brought to you by:
sribeyron
Hi,
simple to realise.
Currently for jsp view objects it is neccesary that the path ends with .jsp
if this would not be i could simple use the path to set tiles definition names.
Greetings,
Alexander
Example:
<action name="sample" class="org.apache.struts2.tiles.example.SampleAction" >
<result name="success" type="tiles">tilesWorks</result>
</action>
Logged In: YES
user_id=1905597
Originator: NO
Hi Alexander.
I don't know much about tiles. If I understand well, with tiles, you define a tiles.xml file that works a little as struts.xml (I mean that you define paths in that file, and for each path, you specify JSP files to include on your page), am I wrong ?
You would like to be able to define views on your graph, that would point to a tiles view. I've never done this in a real world application, but plugin is already able to do that: don't use JSP views, use a generic view (you will then be able to enter any string that will be placed inside <result>). Then, when you draw a link from an action to a view, just select a result type "tiles" in your link settings.
I guess that you would like to be able, to edit your JSP / Tiles file by double-clicking on your tiles view but: in struts, you define results of type tiles, that point to templates you defined in tiles.xml. That means that basically, you don't redirect to ONE jsp file, but to a SET of jsp files (even if there is probably only one JSP file that represents the body of your template - the main problem is that there is no way to determine which one is THE body). So plugin will not be able to determine which JSP file to open !
I guess the only thing that we can do to help using tiles with MVC Web Project is:
- to keep current generic view management,
- to add an attribute on generic views, that would point to any file on workspace,
- on double-click on generic view, open the pointed file.
If you have any other idea...
Regards,
Sylvain.
Logged In: YES
user_id=2048834
Originator: YES
"You would like to be able to define views on your graph, that would point to a tiles view. I've never done this in a real world application, but plugin is already able to do that: don't use JSP views, use a generic view"
this was exactly was i was looking for^^
my bad. I didnt see the generic view option.
Greetings,
Alexander
Logged In: YES
user_id=1905597
Originator: NO
Hi again.
No problem. Do not hesitate to post another feature request (or bugs) if you need.
Thanks for participating this project. I really do appreciate.
Regards.
Sylvain.
a possible idea to the integration of tiles:
if a tiles result is created a double click on it results in opending the tiles definition of the result. the definition page can be found via the web.xml.
just for info: Using tiles with the deneric result works perfectly.
Alexander