Xoetrope

 Wiki : XuiMobileMIDP

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2008-01-19 11:34:16 by LuanO

Additions:
So far the implementation includes the basic elements of XUI for building LCDUI forms and specifying events. The remaining features should follow shortly and should use the same mechanism. In particular only basic support for the Form. List, Alert and TextBox containers/displayables is implemented and all but the Form container need some refactoring.
Once the initial implementation is complete the framework will be put on a diet so as to shrink the implementation and remove unnecessary methods and interfaces left over from the port from Java SE.


Deletions:
So far the implementation includes the basic elements of XUI for building LCDUI forms and specifying events. The remaining features should follow shortly and should use the same mechanism. In particular only support for the Form container is implemented but the other container types should follow in the same strategy.



Edited on 2008-01-10 13:10:47 by LuanO

Additions:
this gets rendered as (click to enlarge):



Deletions:
this gets rendered as:





Edited on 2008-01-10 11:58:53 by LuanO

Additions:
LCDUI/MIDP support has now been added to XUI as an incubator project under a GPL license (for now). The new support provides for the same declarative specification of the GUI, the events, validations and data bindings.
<TextField name="speciesField" label="Data bound value:" content="THIS SHOULD BE REPLACED!"/>
<Data>
<Bind target="speciesField" source="coffee/species/1"/>
</Data>
In the above example the data bound to the text widget on the second page comes from an XML file:
<Datasets>
<dataset id="coffee">
<list id="species">
<item value="Arabica" id="1" />
<item value="Benghalensis" id="2" />
<item value="Bonnieri" id="6" />
<item value="Canephora" id="3" />
<item value="Congensis" id="4" />
<item value="Excelsa" id="5" />
<item value="Gallienii" id="6" />
<item value="Mogeneti" id="7" />
<item value="Liberica" id="8" />
<item value="Stenophylla" id="9" />
</list>
</dataset>
<dataset id="customer">
<data id="dob" value="01/01/1970" />
</dataset>
</Datasets>
In this case the data a static datasource, but XUI can also load data from database, web services and other dynamic sources.




Edited on 2008-01-10 11:47:59 by LuanO

Additions:
We are looking for experienced mobile developers to become involved in testing, evaluation and development. If you would like to get involved please contact me (luano at xoetrope.com).

Deletions:
we are looking for experienced mobile developers to become involved in testing, evaluation and development. If you would like to get involved please contact me (luano at xoetrope.com).



Edited on 2008-01-10 11:47:41 by LuanO

Additions:
The following XML defines a simple form with some test components (please not that this example is more of a test case than an example of how an application should appear!):

Deletions:
The following XML defines a simple form with some test components:



Edited on 2008-01-10 11:46:26 by LuanO

No differences.


Edited on 2008-01-10 11:45:54 by LuanO

Additions:
this gets rendered as:

and in turn this second page is rendered as




Edited on 2008-01-10 10:30:31 by LuanO

Additions:
The NanoXML parser used in the SE version is not suitable for Java ME and therefore a minimal XML parser has been included in the source. The parser just supports what XUI needs, it does not validate and so far it does not allow the inclusion of comments.
The component registration has been reinserted and no longer relies on reflection. The registration of component factories allows support for the inclusion of third party components/widgets.
Basic data binding has also been enabled for the text components (and the rest is just a matter of choosing suitable interfaces for the remaining components). The example application now includes some basic text bindings on page 2.


Deletions:
The NanoXML parser used in the SE version is not suitable for Java ME and therefore a minimal XML parser has been included in the source. The parser just supports what XUI needs, it does not validate and so far it does not allow the inclusion of comments.
The component registration has been stripped out as this relied heavily on reflection in the latest version of XUI, but at some point the older style of component factory can be re-added to support the inclusion of third party components/widgets.




Edited on 2008-01-07 14:51:18 by LuanO

Additions:
Lookup/attach a component



Edited on 2008-01-07 14:50:41 by LuanO

Additions:
import net.xoetrope.midp.XImageItem;
private XImageItem myImg;
{
public void pageCreated()
myImg = (XImageItem)findComponent( "myImg" );

Deletions:




Edited on 2008-01-07 13:17:10 by LuanO

Additions:
So far the implementation includes the basic elements of XUI for building LCDUI forms and specifying events. The remaining features should follow shortly and should use the same mechanism. In particular only support for the Form container is implemented but the other container types should follow in the same strategy.
The component registration has been stripped out as this relied heavily on reflection in the latest version of XUI, but at some point the older style of component factory can be re-added to support the inclusion of third party components/widgets.


Deletions:
So far the implementation includes the basic elements of XUI for building LCDUI forms and specifying events. The remaining features should follow shortly and should use the same mechanism.



Edited on 2008-01-07 11:51:09 by LuanO

No differences.


Oldest known version of this page was edited on 2008-01-07 11:47:23 by LuanO []
Page view:

Xui Mobile MIDP version



Like the desktop version of XUI the MIDP version supports the declarative file format for creating the LCDUI and for specifying events, validations and data bindings.

Difference from XUI on the Desktop

The MIDP profile does not support reflection and this means that XUI's event handling must be slightly different to that used for Java SE. The MIDP version therefore includes an "invoke" method:

public void invoke( String method, String[] args )
{
}


where the method parameter is the name of the method to be invoked.

The NanoXML parser used in the SE version is not suitable for Java ME and therefore a minimal XML parser has been included in the source. The parser just supports what XUI needs, it does not validate and so far it does not allow the inclusion of comments.

A Simple Example

The following XML defines a simple form with some test components:

<?xml version="1.0" encoding="UTF-8"?>
<XPage class="test.project.Welcome">
  <Components>
	<Ticker content="Hello World, Welcome to MIDP XUI"/>
	<DateField label="Date:" date="1198368000000"/>
	<Image label="Image:" content="/xui_icon.png"/>
	<TextField label="Text Field:" content="Testing 1,2,3"/>
	<Label label="A Label:" content="How did I get here?"/>
  </Components>
  <Events>
	<Event method="showPage" args="next" type="OK"/>
  </Events>
</XPage>


the page includes a link to another test page:
<?xml version="1.0" encoding="UTF-8"?>
<XPage class="test.project.Welcome">
  <Components>
	<Ticker content="This is page TWO 2 TWO 2"/>
  </Components>
  <Events>
	<Event method="home" args="next" type="OK"/>
  </Events>
</XPage>

both pages rely on the same Java class for their navigation:
(java,1)
package test.project;

import net.xoetrope.xui.XPage;

/
* A simple test page showing some MIDP components
* @author luano
*/
public class Welcome extends XPage
{
public Welcome()
{
}

public void invoke( String method, String[] args )
{
if ( "showPage".equals( method ))
showPage( "PageTwo" );
else if ( "home".equals( method ))
showPage( "Welcome" );
}
}

Size

The XUI MIDP package stands at about 200K but we expect that this can be shrunk to about 100K when some of the Java SE features that are not appropriate to MIDP are stripped out. Some of the classes and interfaces provided in the SE version may also be coalesced to compact the library as the features they provide are not possible for a MIDP device.

Status

XUI's MIDP support is in incubator form, use at your own discretion!

So far the implementation includes the basic elements of XUI for building LCDUI forms and specifying events. The remaining features should follow shortly and should use the same mechanism.

License

The XUI MIDP version is released under the GPL license, but please note that this may change prior to a full release.

Getting Involved

we are looking for experienced mobile developers to become involved in testing, evaluation and development. If you would like to get involved please contact me (luano at xoetrope.com).
Page was generated in 0.4171 seconds