If you are starting fresh why not base your app on Tap4 ?

"CIJOML" <[EMAIL PROTECTED]> skrev i en meddelelse 
news:[EMAIL PROTECTED]
Hi Ron,

thanks very much, It helped me a lot! I had to do more changes ;)
<page name="Login" specification-path="Login.page"/>
I forgot rename also page name! :(

Thank you - probably a lot more questions will continue, while I am new to
Tapestry kingdom :)

Michal

Dne ètvrtek 24 srpen 2006 16:19 Ron Piterman napsal(a):
> its cycle.activate("Home");
>
> Cheers,Ron
>
> CIJOML wrote:
> > Hi,
> >
> > I wrote little application which now I want secure.
> > So I developped login form, but I am unable to be redirected to BasePage
> > after successfull login.
> >
> > When I call such page directly in DP.application, it renders:
> >
> > <!DOCTYPE application PUBLIC
> >   "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
> >   "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd";>
> > <!-- generated by Spindle, http://spindle.sourceforge.net -->
> >
> > <application name="DP"
> > engine-class="org.apache.tapestry.engine.BaseEngine"> <description>DP
> > Michal Semler</description>
> >     <page name="Home" specification-path="Home.page"/> <!-- uvodni
> > stranka --> <library id="contrib"
> > specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
> >     <library id="menu"
> > specification-path="/org/krysalis/menu/component/Menu.library"/>
> > </application>
> >
> > But when I change Home.page to Login.page, it returns errors:
> >
> > Login process goes OK, and then I don't know how to call from
> > cycle.activate my Home.page:
> >
> > My Login.java
> > -------------
> > package org.cijoml.ui.pages;
> >
> > import java.sql.SQLException;
> >
> >
> > import org.apache.tapestry.IRequestCycle;
> > import org.apache.tapestry.IPage;
> > import org.apache.tapestry.html.BasePage;
> > import org.cijoml.utils.IBatisUtil;
> > import org.cijoml.model.Administrator;
> >
> > import com.ibatis.sqlmap.client.SqlMapClient;
> >
> >
> > public abstract class Login extends BasePage {
> >
> > public abstract String getNick();
> > public abstract String getHeslo();
> > public abstract void setZprava(String zprava);
> >
> > public void login(IRequestCycle cycle) throws SQLException
> > {
> > if (isValidLogin(getNick(), getHeslo())) {
> > cycle.activate("Home.page");
> >
> > return;
> > }
> > setZprava("Spatne jmeno nebo heslo!!!");
> > }
> >
> > private boolean isValidLogin(String nick, String heslo) throws
> > SQLException { return true; //this is not important for this case
> > }
> > }
> > ------------
> >
> > Login.html:
> >
> > <html jwcid="@Shell" title="Prihlaseni">
> > <body>
> >     <span jwcid="@Conditional" condition="ognl:zprava">
> >         <font color=red>
> >         <span jwcid="@Insert" value="ognl:zprava">
> >             Error Message
> >         </span>
> >         </font>
> >     </span>
> >
> >     <p>
> >
> >     <form jwcid="@Form" listener="ognl:listeners.login">
> >
> >         <table>
> >         <tr>
> >             <th>Jmeno Administratora: </th>
> >             <td>
> >                 <input type="text" jwcid="@TextField" value="ognl:nick"
> > size="30"/>
> >             </td>
> >         </tr>
> >
> >         <tr>
> >             <th>Heslo: </th>
> >             <td>
> >                 <input type="password" jwcid="@TextField"
> > value="ognl:heslo" hidden="ognl:true" size="30"/>
> >             </td>
> >         </tr>
> >
> >         <tr>
> >             <td><input type="submit" value="Login"/></td>
> >         </tr>
> >         </table>
> >     </form>
> > </body>
> > </html>
> >
> > Login.page:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE page-specification PUBLIC
> >   "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
> >   "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd";>
> > <!-- generated by Spindle, http://spindle.sourceforge.net -->
> >
> > <page-specification class="org.cijoml.ui.pages.Login">
> >
> >     <property-specification name="zprava" type="java.lang.String"/>
> >     <property-specification name="nick" type="java.lang.String"/>
> >     <property-specification name="heslo" type="java.lang.String"/>
> >
> > </page-specification>
> >
> > Thanks a lot for help!
> >
> > Michal
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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





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

Reply via email to