问题
I want to develop an application in SmartClient using javascript. In that application, it takes inputs like price range and category. On form submit, without reloading the page it will send request to server and will get the list of items.few of them will be displayed after submit(on step 2) and other will be displayed on 3rd step. And there will be a database query fired after step-2 and step-3
Structure to display items details contains item_pic, Item_name, item_price and availability.
How can i use modality window(in SmartClient) for this?
i saw an example at this URL: http://www.smartclient.com/?skin=Enterprise#modality but i couldnt understand what type of programming is it? and how to use that example to make my application?
回答1:
They have attached JavaScript associated with the code. Two basic properties of Window are applied to get a Window having Modality:
- IsModal = true;
- ShowModalMask = true.
回答2:
That's javascript(I guess JSNI Code impl) based implementation. For java code implementation of similar example refer: http://www.smartclient.com/smartgwt/showcase/#layout_windows_modality.
You can achieve the modality by simply setting setIsModal(Boolean) of the corresponding dialog box to true.
回答3:
Well the programming done here is very simple. If you are good in java-script then try to learn JSON
(java script object notation) and you would find it simple.
JSON
is becoming popular data interchange medium. It's light weight, easy to parse, and consumes less traffic.
来源:https://stackoverflow.com/questions/4819583/smartclient-how-to-use-modal-window