You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by DegeneRatoR <h1...@rppkn.com> on 2012/04/26 01:44:42 UTC
Linking my app with MYSQL
I have set up hibernate and now control flow over data base processing ( i.e.
it shows articles ), however what is not doing is I can't log in, even
though in my opinion everything is fine? What am I doing wrong?
Please help.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Linking-my-app-with-MYSQL-tp5666272p5666272.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Linking my app with MYSQL
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 25 Apr 2012 20:44:42 -0300, DegeneRatoR <h1...@rppkn.com> wrote:
> I have set up hibernate and now control flow over data base processing (
> i.e. it shows articles ), however what is not doing is I can't log in,
> even
> though in my opinion everything is fine? What am I doing wrong?
You're asking for help giving almost no information nor code. It's almost
impossible to help with so sparse information.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Linking my app with MYSQL
Posted by DegeneRatoR <h1...@rppkn.com>.
<loginSection
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<div class="frontPanel">
<t:if t:test="userExists">
<div class='welcomeMessage'>Welcome, ${userExists.surname}!</div>
<div class="button-box">
<t:actionlink t:id="logout">Log Out</t:actionlink>
</div>
</div>
<t:parameter name="else">
<p>You are currently not logged in. Please log in or
<t:actionlink t:id="register">register</t:actionlink>.
</p>
<form t:type="form" t:id="form">
<t:errors/>
<div class="input-box">
<input t:type="TextField" t:id="userName" t:validate="required,minlength=8"
size="20"></input>
<input t:type="PasswordField" t:id="userPassword"
t:validate="required,minlength=8" size="20"></input>
<input type="submit" value="log in"></input>
</div>
</form>
</t:parameter>
</t:if>
</div>
</loginSection>
@Persist
@Property
private String userName;
@Property
private String userPassword;
@Component
private Form form;
@Component(id = "userName")
private TextField textField;
@ApplicationState
@Property
private User user;
@Property
private boolean userExists;
@Inject
private Session hibernate;
Object onSuccess()
{
List list = hibernate.createCriteria(User.class)
.add(Restrictions.eq("name", userName))
.add(Restrictions.eq("password", userPassword))
.list();
if(list.size() > 0)
user = (User)list.get(0);
else
form.recordError(textField, "Invalid user name or password.");
return null;
}
This is the code I am dealing with, and I am switching from Tap 5.0 to Tap
5.2.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Linking-my-app-with-MYSQL-tp5666272p5667280.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Linking my app with MYSQL
Posted by Chris Mylonas <ch...@opencsta.org>.
nabble ate half your post, some of it was relevant
###########
I have set up hibernate and now control flow over data base processing ( i.e. it shows articles ), however what is not doing is I can't log in, even though in my opinion everything is fine? What am I doing wrong? When I press Sumbit nothing happens, but I have clearly stated in code to process something, which is odd to me, as it worked previously while using 5.0.18.
###########
what version did you upgrade to.
did you read the release notes for any changes for stuff you use.
are there any stack traces etc.
On 26/04/2012, at 9:44 AM, DegeneRatoR wrote:
> I have set up hibernate and now control flow over data base processing ( i.e.
> it shows articles ), however what is not doing is I can't log in, even
> though in my opinion everything is fine? What am I doing wrong?
>
> Please help.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Linking-my-app-with-MYSQL-tp5666272p5666272.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org