Home » Archived » EGL Development Tools » Mobile widgets(Datepicker)
|
Re: Mobile widgets [message #918653 is a reply to message #917838] |
Fri, 21 September 2012 07:59 |
Smyle H Messages: 58 Registered: September 2012 |
Member |
|
|
Hi Trond,
I can't reproduce the problem. Here is the code snippet I used.
handler demo type RUIhandler{initialUI = [ ui], onConstructionFunction = start, cssFile = "css/Datepicker.css", title = "index"}
ui div{children = []};
function start()
_logonHandler logon{};
ui.children = [_logonHandler.ui];
end
end
handler logon type RUIhandler{initialUI =[ui
], onConstructionFunction = start, cssFile = "css/Datepicker.css", title = "logon"}
ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children = [ DatePicker ]};
DatePicker DojoMobileDatePicker{ layoutData = new GridLayoutData{ row = 1, column = 1 } };
function start()
end
end
Would you mind pasting a code snippet here to show us how do you use the widget? It would help us to resolve your problem.
Regards,
Smyle
|
|
|
Re: Mobile widgets [message #918730 is a reply to message #918653] |
Fri, 21 September 2012 09:38 |
Trond Einar Nilsen Messages: 36 Registered: December 2011 |
Member |
|
|
Hi Smyle,
Thank you for looking into this! Your code worked fine here too, but here is an example of my failing code:
import org.eclipse.edt.rui.infobus.InfoBus;
import org.eclipse.edt.rui.widgets.Div;
import org.eclipse.edt.rui.widgets.GridLayoutData;
import dojo.mobile.widgets.DojoMobileDatePicker;
handler x2 type RUIhandler{initialui =[ui], onConstructionFunction = start, cssFile = "css/com.ibm.egl.rui.dojo.mobile.samples.css", title = "DojoMobileViewSample"}
x1 x1{};
ui div{children = [ x1.ui ]};
divx div{layoutData = new GridLayoutData{row = 1, column = 1}, children =[
]};
DatePicker DojoMobileDatePicker{ };
function start()
InfoBus.subscribe("LOGON", start2);
end
function start2(eventName string in, data any in)
ui.children = [datepicker];
end
end
import org.eclipse.edt.rui.infobus.InfoBus;
import org.eclipse.edt.rui.widgets.GridLayout;
import org.eclipse.edt.rui.widgets.GridLayoutData;
import dojo.mobile.widgets.DojoMobileButton;
handler x1 type RUIhandler{initialUI =[ui
], onConstructionFunction = start, cssFile = "css/SelectM.css", title = ""}
ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children =[Button]};
Button DojoMobileButton{layoutData = new GridLayoutData{row = 2, column = 2}, text = "Button", width = "100", onClick ::= Button_onClick};
returnP string = "BAD";
function start()
end
function Button_onClick(event Event in)
returnP = "OK";
InfoBus.publish("LOGON", returnP);
end
end
/Trond
|
|
|
Re: Mobile widgets [message #922678 is a reply to message #918730] |
Tue, 25 September 2012 08:20 |
Smyle H Messages: 58 Registered: September 2012 |
Member |
|
|
Hi Trond,
I reproduced ur problem. I think it is probably due to the missing of parent when it is being initialized. You can work around it by adding a fake parent, here is my modified code based on the code you provided.
import org.eclipse.edt.rui.infobus.InfoBus;
import org.eclipse.edt.rui.widgets.Div;
import org.eclipse.edt.rui.widgets.GridLayoutData;
import dojo.mobile.widgets.DojoMobileDatePicker;
handler x2 type RUIhandler{initialui =[ui,fakeParent], onConstructionFunction = start, cssFile = "css/com.ibm.egl.rui.dojo.mobile.samples.css", title = "DojoMobileViewSample"}
x1 x1{};
ui div{children = [ x1.ui ]};
fakeParent div{ style="display:none", children=[DatePicker]};
divx div{layoutData = new GridLayoutData{row = 1, column = 1}, children =[
]};
DatePicker DojoMobileDatePicker{ };
function start()
InfoBus.subscribe("LOGON", start2);
end
function start2(eventName string in, data any in)
ui.children = [ DatePicker ];
end
end
Regards,
Smyle
|
|
| |
Goto Forum:
Current Time: Fri Oct 11 03:23:11 GMT 2024
Powered by FUDForum. Page generated in 0.04356 seconds
|