0

[solved]textbox constraint="no empty", how to cancel it?

asked 2014-10-06 11:16:24 +0800

unitcell gravatar image unitcell
28 4

updated 2014-10-07 11:42:24 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Hi all,

<textbox constraint="no empty"/>

wanna to cancel 'contstraint:no empty' in ViewModel, How to do it ?

Thanx.

delete flag offensive retag edit

Comments

yes, textbox.setConstraint(null); Thank a lot !

unitcell ( 2014-10-06 14:44:13 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-10-06 13:03:29 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

Hi unitcell,

It depends on what you want.
If you need the value without the constraint check you could use :

textbox.getRawValue();

This will give you the value without an error.

If you really want to dismiss the constraint, you could make the zul more dynamic :

<textbox constraint="@load(vm.constraint)"/>

Or get the textbox out of your binder :

textbox.setConstraint(null);

Greetz chill.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-10-06 11:16:24 +0800

Seen: 27 times

Last updated: Oct 07 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More