Published on Xoetrope (http://www.xoetrope.com)

XUI Mobile/MIDP/LCDUI support

By luano
Created 07/01/2008 - 15:57

XUI Mobile/MIDP & LCDUI Support

Quite a few people have asked us for LCDUI support in the XUI framework, however we have been unable to provide this - until now.

LCDUI/MIDP support has now been added to XUI as an incubator project. The new support provides for the same declarative specification of the GUI, the events, validations and data bindings.

Of course the lack of reflection and other limitations mean that several features of the Java SE version are not available, but there is still sufficient capability to make a MIDP version of XUI useful. The initial implementation weights in at about 200K but we hope to shrink that to nearer 100K when some of the unnecessary Java SE APIs are removed.

For example the following sample page:

<?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>

gets rendered as


and it hooks up to the following Java code:

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" );
  }
}

The guts of the implementation is complete and mostly it is now a question of choosing the APIs to facilitate or exclude. We are looking for experienced mobile to developers to help us test/evaluate/develop, so if you are interested please get in touch with me via e-mail at (luano at xoetrope.com).

P.S. There is a little more infomation on the XUI wiki [1].


Source URL:
http://www.xoetrope.com/blog/luano/midp