-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hi guys i have a zul like this
<listcell sclass="textColumn"><textbox type="password" value="*+*+*+*+"/></listcell>
<listcell sclass="textColumn"><textbox type="password" value="*+*+*+*+"/></listcell>
as you can see i am setting the value of textbox value="++++" on records coming from the DB but i have a button set a new record on it using this code
model.add(clazz);
of course after the rendering i have cleaning both inputs values to null.
when i try to save the records on DB i am checking in zul the values of the 2 inputs and i getting the right values the user input values but when i get the listBox in Java Code i am getting still "++++" on both inputs this is driving me nuts
here is my code
((Textbox)((Listcell)(item.getChildren().get(5))).getFirstChild()).getValue();
(Textbox)((Listcell)(item.getChildren().get(6))).getFirstChild()).getValue();
both are returning "++++" on other hand the previously added items from DB i can modify and i can see the new values the problem comes when i add a new item set to null my question is
((Textbox)((Listcell)(item.getChildren().get(5))).getFirstChild()).setValue(null);
((Textbox)((Listcell)(item.getChildren().get(6))).getFirstChild()).setValue(null);
if this is not working why i am checking null values on afterRender.
this is the values i am receiving
onAfterRender:start[after set the values to null both empty in .zul]
onAfterRender:end
onBeforeSend:start[after the inputs of the user before going to java to be saved in .zul].
qwerty qwerty
onBeforeSend:end
inJava:start[the values i am receiving in the listbox before going to save them in .Java]
*+*+*+*+<--Java-->*+*+*+*+
inJava:end
Why are you using MVC ? You can do this in MVVM very easily See this ZK Listbox may be it will help you to USE MVVM
Asked: 2013-03-29 13:45:57 +0800
Seen: 41 times
Last updated: Mar 29 '13