As today i am trying to answer someone question in ZK forum how we can delete selected item or items from the Listbox i have created a demo example for this ...
Java Code for this
And ZUL Code for this Example..
You can ask more question in comment section :)
Java Code for this
And ZUL Code for this Example..
You can ask more question in comment section :)
Good one. Do you have any example for ZK MVVM Dynamic listbox
ReplyDeleteThis is MVVM Example I did not get your point about Dynamic Listbox ? Are you looking something like this http://zkframeworkhint.blogspot.in/2013/06/zk-delete-selected-item-from-listbox.html
DeleteOk i will explain about dynamic. Many places i want to give the look up for the master record to select in the detail.
DeleteFor example, in the user personel page, i want to give the state lookup to select the state. Similarly, i want to show the look up for the insurance to select. So instead of creating seperate zul/vm for each lookup, i am trying to make it general. You got it now ?
Yes i have done this type of thing like When You will Select a State all District inside that State will be loaded into the DIstrict DropDown if this is requirmnet are you using Listbox for this?
Deleteyes. But not the drop down. Let me explain again. Assume that user want to select Insurance type in the details and also we have insurance type master which contains some 1000 records.
ReplyDeleteSo in the detail page, normally, we will give one read only text box for insurance type and next to that, we will give button. On clicking of the Button, we will open a modal window which will display all the insurance type in the listbox, now the user will select any one of the insurance type and then we will close the model window and populate the selected value in the read only text area.
Yes i have done this but we used different Modal Class for modal Window because we mainly focus on the reusability of modal window.If you want this kind of thing its very easily can be done in the ZK MVVM .Mainly we can do this with the help of CreateComponent onclick on the detail open a modal window AND pass the object which contain insurance type with the help of insurance type get all the list and show in modal window now select any type and update that object it will automatically update your main window object if you need detail clarification i will explain you again
DeleteYou catch my point of reusability, So here, the same model window will be used to show insurance type at one place and in another place, the same window will be show countries and so on. So now we have need to build the column header dynamically and the listcell should also be dynamic.
DeleteYes you are right ,but can you please let me know how can i help you do you need my help on creating modal window and showing all the list?
Deleteare ou able to resolve this ZK modal window issue?
Deleteyes. basically, string will comma separated column header names and array of list of objects. So just passing this two parameter, the reusable component should create the column and fill the list.
ReplyDeleteZK Modal window issue ? Are you talking about finding MVVM Way to close the window by clicking a button ? if so, no.
No i am asking about the issue to show modal window with details values and select one value and update main window which you previously mentioned . And closing a modal window i generally used in MVVM
Deletepublic void closeModal(@ContextParam(ContextType.VIEW) Component view){
view.detach();
}
Oh i am still in old way. Wire the window id in VM and use win.detach.
ReplyDeleteCan you please give me example for the below
String will comma separated column header names and array of list of objects. So just passing this two parameter, the reusable component should create the column and fill the list.
You can check this http://zkframeworkhint.blogspot.in/2013/04/zk-detach-modalwindow-without-wiring.html may be this help you to how to close modal window in MVVM? Alos you wrote String is comma separated column header names .. Which i am not able to understand .One more thing i have to ask Did you able to show details about any column in modal window which was your first question here in blog?
DeleteHow to get window state in zk. can you help me?
ReplyDeleteI did not Get your question? Window State mean Window Object in ViewModel? or something else Please elobrate
Deletefirst get windows object then save its in file. when windows load in another time then initial the object in window. is it possible?
DeleteYes its possible But what is the Use of this ? It will little bit tricky because you have to load the Whole Window which can contain other component as well Its not looking good idea to put Window Component in the File.
DeletePlease give me any example.
Deletewhat is the class ListboxViewModel in the above example
ReplyDeleteHi can you please share example regarding how to disable or grey out the check box on some condition.
ReplyDeleteHi can you please share example regarding how to disable or grey out the check box on some condition.
ReplyDelete