-
FEATURED COMPONENTS
First time here? Check out the FAQ!
一个关于正则表达式的bug,请教大家这个是不是一个zk bug。
<zk>
<window id="win_test" >
<textbox id="txt_test" constraint="/[a-z\\]*/"></textbox>
</window>
</zk>
I am using zk 3.6.1
first: at textbox input a char '-', the constraint pass, continue input a char 'a', appear the information "Illegal value".
this is a zk bug? Excuse me! My english is poor.
thanks hideokidd, my mistake, the the Constraint is constraint="/[a-z\\]*/", is not constraint="/*/"
第一次在这个页面输入字符 - ,即一个小横线。正则表达式无效,通过了校验。如果再输入 a ,则出现格式不正确的提示信息。
这是不是zk的一个bug。
Hi,
The contraint will cause an exception at runtime,
the error appears when page creation.
I am using ZK 3.6.1.
java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0 * ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.sequence(Pattern.java:1878) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) at java.util.regex.Pattern.<init>(Pattern.java:1133) at java.util.regex.Pattern.compile(Pattern.java:823) at org.zkoss.zul.SimpleConstraint.<init>(SimpleConstraint.java:168) at org.zkoss.zul.SimpleConstraint.getInstance(SimpleConstraint.java:180) at org.zkoss.zul.impl.InputElement.setConstraint(InputElement.java:425) ...............
I've a problem with constraints and longbox. When a longbox have any constraints it acts like a intbox. Anyone else saw this?
I've created an issue to this: ID: 2786584
Regards,
Felipe Cypriano
Hi fmcypriano,
I've tried your case and the values both didn't be converted,
I use zk 3.6.1, and your zk edition is?
My steps:
1.Create two longboxes
2.Fill the first one with value 12.3 and press Tab key.
3.Fill the second one with value 65.4 and press Tab key.
Hi achuanok,
Below is my test result, any bugs?
-------------------------------------------------
input.............Constraint warning appear?
-------------------------------------------------
-.............Yes
a.............No
-a.............Yes
-------------------------------------------------
Hi hideokidd,
-------------------------------------------------
input.............Constraint warning appear?
-------------------------------------------------
-...............No
a...............No
-a.............Yes
-...............Yes
please step by this.
-------------------------------------------------
Hi,
I got the same result,
I think it's a bug of textbox,
please post it to zk bugs,
thanks!
http://sourceforge.net/tracker/?group_id=152762&atid=785191
Hi hideokidd,
Did you set the constraint for one of the longboxes?
My code is:
<longbox /> <longbox constraint="no negative"/>
I'm using 3.6.0, maybe it's only in this version.
Regards,
Felipe Cypriano
I can't believe I'm confusing long and double!
I'm so sorry, I've deleted the issue in ZK's tracker.
Asked: 2009-05-05 06:42:43 +0800
Seen: 557 times
Last updated: May 06 '09