0

what is this statement do.....?

asked 2009-05-15 06:39:35 +0800

shilpa gravatar image shilpa
51 4

name.constraint = (Constraint) null;

here name is an id of textbox and it has constraint ="no empty" . but if i want to clear the text box through clear button , it is showing error....
how can i clear the text box if text box havind constraint="no empty".
plz help me in this......

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-05-15 07:30:51 +0800

hideokidd gravatar image hideokidd
750 1 2

updated 2009-05-15 07:31:09 +0800

Hi,

Please try following example,

<textbox id="tbx" constraint="no empty"/>
<button label="clear">
  <attribute name="onClick">
      tbx.setRawValue(null);
      tbx.clearErrorMessage();    //hide 'no empty' warning
  </attribute>
</button>

Note that after clearing the textbox, its value will be ""(an empty string) but null.

link publish delete flag offensive edit

answered 2009-12-10 03:41:33 +0800

buggy gravatar image buggy
57 2

Thanks hideokidd... Your solution helped!
Cheers!

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2009-05-15 06:39:35 +0800

Seen: 401 times

Last updated: Dec 10 '09

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