SmartClient-Version: 7.0rc4
Browser : Firefox 3.6.8
We are thinking of using reusable component methodology for developing our application.
Rationale: Some of the small screens are present in multiple places.
Here is what we do :
While developing component we specify a new class "MainPanel" extending the original VLayout class.
Now in this class we initialize various components by adding properties method(without using any IDs for any underlying member component).
example:
Initializing a new component: create instance of the top component as above (The IDs for underlying or member component are generated automatically(by SmartClient))
Problem:
Is there a way to find a member component by name of the member instead of IDs (As we do have to write a method in main component to ) so that we can access member by name instead of ID.
For example in above example:
mainPanelInstance.findElementByName("formOne");
mainPanelInstance.findElementByName("formTwo");
Browser : Firefox 3.6.8
We are thinking of using reusable component methodology for developing our application.
Rationale: Some of the small screens are present in multiple places.
Here is what we do :
While developing component we specify a new class "MainPanel" extending the original VLayout class.
Now in this class we initialize various components by adding properties method(without using any IDs for any underlying member component).
example:
Code:
isc.defineClass("MainPanel", "VLayout"); isc.MainPanel.addProperties({ height: "100%", width: "85%", name: "layoutMain", members: [ isc.LayoutSpacer.create({height:"5%"}) , isc.HLayout.create({ width: "60%", height: "5%", align: "center", name: "memberlayoutOne", members: [ isc.FirstForm.create({ width: "50%", height: "10%", name: "formOne" }), isc.LayoutSpacer.create({width:"5"}) , isc.SecondForm.create({ width: "45%", height: "10%", name: "formTwo" }) ] }), isc.LayoutSpacer.create({height:"5%"}) ] }); isc.MainPanel.create({ ID: "mainPanelInstance" });
Problem:
Is there a way to find a member component by name of the member instead of IDs (As we do have to write a method in main component to ) so that we can access member by name instead of ID.
For example in above example:
mainPanelInstance.findElementByName("formOne");
mainPanelInstance.findElementByName("formTwo");
Comment