0

textbox not getting cleared

asked 2014-11-05 13:15:58 +0800

bnb83 gravatar image bnb83
1

Hi,

we are using zk6 and java version 1.7,

We have defined text box like

<textbox type="text" value="@bind(cdm.lastName)" sclass="textbox"
                                    constraint="no empty"
                                    maxlength="70" />

We have two pages, in one page a text box is shown, when we enter some data and remove or clear it and move to next page by clicking a button, when we go second page, earlier entered data still remains on the screen.

Please suggest any workaround or right way to accomplish this.

delete flag offensive retag edit

Comments

Can you post some more details, like how you change the page and the remove/clear.

chillworld ( 2014-11-05 16:31:43 +0800 )edit

+1 is this a problem or a requirement, I cannot understand from your explanations, what you are trying to work around, and how you change the "pages": by url or by include or in a tabbox or another mechanism. It would be best to post a running example on http://zkfiddle.org/

cor3000 ( 2014-11-06 01:30:25 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-11-08 15:13:14 +0800

Darksu gravatar image Darksu
1991 1 4

updated 2014-11-08 15:14:37 +0800

Hello bnb83,

Since you are using a bind then i can presume that the click event of the button also saves the value either on a database or on the temporary memory.

Thus you have to recheck your clear method in order to actually set the data with an empty string.

*Also Please remove the constraint

Best Regards,

Darksu

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
2 followers

RSS

Stats

Asked: 2014-11-05 13:15:58 +0800

Seen: 8 times

Last updated: Nov 08 '14

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