Hallo,
haw I can define condition in tile definition?

for example, I have 3 pages:

basic.jsp:
**********************
<html>
<head></head>
<body>
blablabbla
|<tiles:insert attribute="loginform"/>|
</body></html>
**********************
loginform.jsp:
**********************
username:<html:text property="uname" /><br/>
password:<html:password poperty="pwd" /><br/>
<html:submit/>
**********************
usermenu.jsp:
**********************
<a href="changeme.jsp">Change my data</a>
**********************

object "user" with methods for example
public boolean isLogged();
public int getUserID();

and how to write definition as:

|<tiles-definitions>
<definition name="layout" path="/layout/basic.jsp">
<< if user.isLogged() or user.getUserID() > -1 >> -- first or second, do not need booth
   <put name="loginform" value="usermenu.jsp"/>
<< else >>
||    <put name="loginform" value="loginform.jsp"/>
<< end if >>
...
||</definition>
<tiles-definitions>

How to do it?
Thanks, Jiri
|




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to