When the client web browser use the zh_cn locale to load my login page, i get a
exception like this :
Render queue error in BeginRender[admin/Login:username]: d != java.lang.String
but if client use the en locale, it works correctly.
if i want to use zh_cn locale to load my login page, i found t
Thanks!
just add two lines to the app.properties:
minimum-string-length=\u60a8\u5fc5\u987b\u4e3a %2$s \u63d0\u4f9b\u81f3\u5c11
%1$d \u5b57\u7b26\u3002
maximum-string-length=\u60a8\u6700\u591a\u80fd\u4e3a %2$s
\u63d0\u4f9b\u81f3\u5c11 %1$d \u5b57\u7b26\u3002
All works correctly!
I have a mixins to validate the username field and email field using ajax.
but in my ValidateField.js file, i use:
Event.observe(this.sourceField.form,'submit',this.doSubmit.bindAsEventListener(this));
doSubmit:function(event){
return this.state;
}
but the form still submit even the "d
Tapestry 5.3.2:
I try to use Email validator in my email input field, but it doesn't work. Then
I use the regexp validator in my properties file like this:
email-regexp=^[a-zA-Z0-9_\-]+@[a-zA-Z0-9_\-]+(\.[a-zA-Z0-9_\-]+)+$
It still doesn't work.
Finally I found even regexp like this "^[1-9]" does
in template file:
in properties file:
productAmount-regexp=^[1-9]
The product amount can't start with zero.
> From: ricr...@hotmail.com
> To: users@tapestry.apache.org
> Subject: Tapestry Regexp Validator
> Date: Fri, 18 May 2012 15:58:12 +0800
>
>
> Tapestry 5.3.
productAmount-regexp=^[1-9][0-9]*
> Subject: Re: Tapestry Regexp Validator
> From: tawus.tapes...@gmail.com
> Date: Fri, 18 May 2012 13:43:28 +0530
> To: users@tapestry.apache.org
>
>
> Can you share the code ?
>
>
> On May 18, 2012, at 1:28 PM, Fight Ice wro
> that so ?
>
> if it is a number not starting with zero shouldn't it be ^[1-9][0-9]* or
> ^[1-9]\\d*
>
> On May 18, 2012, at 1:55 PM, Fight Ice wrote:
>
> >
> > in template file:
> >
> > > t:validate="
Solved!
In my java file:
@Property
private int productAmount;
The "productAmount" is int type. So the regexp validator doesn't works.
Thanks a lot Taha!
This case confused me. Why and how this happened?
So I can't use int type for the field which uses the regexp.
Could anyone give me some advices for this case?
java code:
Transaction ts=session.beginTransaction();
Criteria criteria=session.createCriteria(Item.class);
criteria.add(Restrictions.idEq(product.getItem().getId()));
criteria.setLockMode(LockMode.PESSIMISTIC_WRITE);
Item item=(Item)criteria.list().get(0);
...
ts.commit();
...
Transaction tc=ses
Thx, I use HibernateSessionSource.create(). Is this thread safe?
I have read the source code of HibernateCoreModule.java and
HibernateSessionManagerImpl.java .
The HibernateSessionManager service is per-thread, but I didn't find any code
for concurrency(like using ThreadLocal). How Tapestry make
HibernateSessionManager service to be per-thread.
The @Scope(ScopeConstants.PERTHREAD) makes the service per-thread, and finally
the SessionFactory.openSession() will be called(SessionFactory is thread safe).
One session for one thread(request)?
java code
String onActivate(EventContext eventContext){
if(eventContext.getCount==0){
return "index";
}
if(eventContext.getCount==1){
//do something
}
// ...
}
Object onSubmitComment(@RequestParameter(COMMENT_PARAM) String comment){
//do something
}
I used firebug and found that client receive "
@Inject
private Request request;
if(eventContext.getCount()==0){
if(request.isXHR()){
return null;
}
return "index";
}
Any better idea?
15 matches
Mail list logo