-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have to make my code as per ADA(Americans disability act) specifications:
one of the specification is :-
Use label elements to associate text labels with form controls.
Provide a description for groups of form controls using fieldset and legend elements.
Use the title attribute to identify form controls when the label element cannot be used.
Ensure that all id values are unique on a web page.
In simple words i have to associate my label element with my input element,
for this I have to add a "for="input_ element_ id
"" attribute in my label.
But my problems is that zk generates its own id in html code and doesn't use the id specified in the zul code: below is the zul code for a textbox:-
<textbox type="password" id="password" focus="@load(not empty vm.something)"
vflex="1" value="@save(vm.password)" onOK="@command('dosomething')">
</textbox>
and here is the HTML code generated for the same:-
<input id="t_19" class="z-textbox" type="password" value="" >
here id="t_19"
but in zul code i had specified id="password"
,so I can't use for="id"
in label.
any one help on this?
Well actually, zk use an IdGenerator. The id's are never the same just because we don't want some guy creating scripts who can trigger javascript on id's.
If you don't want this, you have to implement your own IdGenerator.
Some usefull links :
http://books.zkoss.org/wiki/ZKDeveloper'sReference/Testing/TestingTips#Approach2:ImplementID_Generator
http://books.zkoss.org/wiki/User:Jimmyshiau/EtcIdGenerator
(See the IdAsUuidGenerator
)
Greetz chill.
Ensure that all id values are unique on a web page.
This is automatically done by ZK. Write this in your documentation!
Hello my little friend.
You have to declare in your window
xmlns:w="ht(remove space)tp://ww(remove space)w.zkoss.(remove space)org/2005(remove space)/zk(remove space)/client"
that will make your zul can work with jQuery, now to get the value of a textbox by id it would be like
jQuery("$idTextBox01").val()
Hope this works
Manito arriba, suscribite che y mega like
Asked: 2013-07-10 11:13:15 +0800
Seen: 114 times
Last updated: Mar 18 '15