Input name value

asked 2016-09-14 10:54:05 +0800

FlorianSchaetz gravatar image FlorianSchaetz flag of Germany
31 6


to use some browser's capability to "autofill" (like "Ah, this input is called 'firstname', let me offer my user all the firstnames he entered elsewhere"), we would like to at least (since the id is random anyway) set the name attribute of the input fields. Unfortunately, the documentation of InputElement.setName says...

Don't use this method if your application is purely based on ZK's event-driven model.

So, big question: Will this cause somehow troubles if I use this method? Or is there another way to put the name of the input element into the resulting html?

delete flag offensive retag edit


you can have fixed id's when you create your own IdGenerator. but of course, it has it's disadvatages having fixed id's. About the name attribute I can't help.

chillworld ( 2016-09-14 11:45:42 +0800 )edit

Yeah, I know, but this would mean solving the whole id space problem myself (since the id should be unique in the resulting html document - and stay the same when other stuff around it changes), I would like not to do that ;-)

FlorianSchaetz ( 2016-09-14 12:00:58 +0800 )edit

Since zk 7 there is a staticidgenerator. You could use that and don't have problems with the idspace

chillworld ( 2016-09-14 14:46:21 +0800 )edit
Be the first one to answer this question!
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

1 follower



Asked: 2016-09-14 10:54:05 +0800

Seen: 21 times

Last updated: Sep 14 '16

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