First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3661776
By: oberinspector
I have written a constrain class for an email registration input field to check wether the email is valid and not yet registered and stored in db:
public class RegisterEmail implements com.potix.zul.html.Constraint { ...
2 questions:
1. how can i set my own constrain class?
I tried this:
<textbox constraint="mypackage.RegisterEmail" id="email" /> but... i got exceptions
2. When is the validate method invoked? From some tests with intbox it looks like it is invoked, when the focus is taken away from the textbox... is this a correct assumption?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3661933
By: tomyeh
1.
<zscript>
myct = new mypackage.RegisterEmail();
</zscript>
<textbox constraint="myct"/>
2. onChange (triggered by onblur -- losing focus) and setValue
Looks like I have to provide a function (from /WEB-INF/tld/web/core.dsp.tld) such that you could do <textbox constraint="c:new('mypackage.RegisterEMail')"/>
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3662018
By: oberinspector
thanks! in between i found it... ;)
<zscript>
ctt_email = new mypackage.RegisterEmail(); ...
<textbox constraint="${ctt_email}" id="email" /> ...
works fine for me... for each of my textboxes...
but when i click submit without solving the constraint no more error messages came up...
should i also provide a constraint for submit and make again the checks? i tried something like:
void submit() {
try{
ctt_nickname.validate(nickname, nickname.value);
ctt_email.validate(email, email.value);
}catch (Exception e){
alert(e.getMessage());
return; //
}
...
with this alert/messagebox ok events i get a nullpointer exception, when my HibernateSessionEventThreadCleanup tries to get the session...
...
if(event.getPage()
.getSession() //nullpointer exception
.getAttribute(HIBERNATE_SESSION_OWNER)==null)
return;
...
on the other hand... when i try to get the session from the component (passed in cleanup) all my input fields in my form are disabled... a little bit strange...???
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3662426
By: tomyeh
Thomas,
Is it the same thing I discussed with Michael in http://sourceforge.net/tracker/index.php?func=detail&aid=1461209&group_id=152
762&atid=785191 ?
HibernateSessionCleanup is the same as you sent to me a couple days ago?
NullPointerException happens only if alert occurs?
Tom
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3662429
By: tomyeh
BTW, I rewrote the chapter about database access in the developer's guide (from the latest Nightly). Would you take a look and give me some feedback? Thanks.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3662473
By: oberinspector
Hello Tom,
i try to reproduce the error with the debugger...
The mentioned link does'nt work... could you please check it!?
My bootstrap hibernate support works fine... i did some things to my EventThreadCleanup, but i'm not yet satisfied with my hibernate session cleanup handling... i'm working on it... ;) i can send you a link to the java files in my subversion repository...
BTW... i tried to bring the ZK 1.1 sources in eclipse to step through your code, but i get build errors... seems the both imports:
import com.potix.zk.mesg.MZk;
import com.potix.mesg.MCommon;
can not be resolved... it was the same with 1.0
i will have a look to your developers guide...
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3663226
By: michaelkmb
Tom,
I found the link you provided on the forum always have an extra ";" before aid= ( may be you should check you browser :) ).
The correct link should be
http://sourceforge.net/tracker/index.php?func=detail&aid=1461209&group_id=152762
&atid=785191
Regards,
Michael
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3663229
By: michaelkmb
Tom,
I found it is not your problem, it the the problem with SourceForge.net "Submit".
(The ";" is not enter by me).
So the link provided above is also incorrect, should have the ";" after "&"
deleted.
Michael
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3665077
By: tomyeh
MZk, Mommon... are dynamically generated by our build tools. They are simply a map of message IDs.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3665090
By: tomyeh
My browser (FF) didn't show up the semicolon. Strang!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3699235
By: nobody
hi tom,
this link does not work. i am interested to read your discussion.
http://sourceforge.net/tracker/index.php?func=detail&;aid=1461209&group_id=15276
2&atid=785191
Asked: 2006-03-31 12:50:25 +0800
Seen: 808 times
Last updated: Jan 13