Messages by mobilist

11 topics, 19 messages
Kuix technical support » Application Hanged when any Exception occurs

Hi All,

   I have developed an application which interact with the server.. My application got hanged when there exist any exception either from server or from application itself, Can any body tell me, How can I handle these exceptions ?

Thanks in Advance !

Kuix technical support » problem in removal of the current frame with List

Hi Tofu !

     I have Resolved the issue ..

          In My previous case , I was missing to set the screen of main list as default screen. It's woprking fine now .

Thanks !

 

Kuix technical support » problem in removal of the current frame with List

Hi Tofu !

   You are right , Kuix.getFrameHandler() contains a unique and static instance for all the application, I am not cretaing any nonStaic instance of the second Frame, but again the static one ..

  I am posting here the code snippet..

I hope the problem will be visible now ..

SearchFrame.java

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

public  class SearchFrame implements

 

Frame {

 

 

 

 

 

public static final SearchFrame instance = new

 

SearchFrame();

 

 

 

 

DataList

 

myList = new

 

DataList();

 

ResultDataProvider

 

resultDetail = new

 

ResultDataProvider();

 

Screen

 

screen

;

 

String [][]

 

str= {{"Hi", "Welcome To the World of Kuix !"},{"Hello !","How greatly U R enjoying It ? "

}};

 

 

 

 

 

 

 

public void

 

onAdded() {

 

 

screen = Kuix.loadScreen("/xml/mySearch.xml", myList

);

 

 

screen

.setCurrent();

}

 

 

 

 

 

 

 

 

public boolean

 

onMessage(Object arguments, Object[] arg1)

{

 

 

 

 

if("show"

.equals(arguments))

{

 

 

Widget focusedWidget =

 

screen

.getFocusManager().getFocusedWidget();

 

 

 

if (focusedWidget instanceof

 

ListItem) {

 

DataProvider dataprovider = ((ListItem) focusedWidget).getDataProvider();

 

 

 

 

 

if(dataprovider !=null

 

)

{

 

 

 

 

 

ResultDataProvider result = (ResultDataProvider) dataprovider;

 

SearchItem.

 

instance

 

.setResult(result);

 

 

System.

 

out

 

.println(result);

 

 

 

 

//searchDetail();

 

Kuix.getFrameHandler().pushFrame(SearchItem.

 

instance

 

);

 

}

 

}

 

 

 

return false

 

;

}

 

 

 

 

if("search"

.equals(arguments))

{

 

 

 

for (int i=0; i<str.length

; i++)

{

 

 

 

myList.addItem(DataList.LIST_PROPERTRY, new ResultDataProvider(str[i][0],str

[i][1]));

 

}

 

}

 

 

 

 

 

 

 

return false

 

;

}

 

 

 

 

public void

 

onRemoved() {

 

 

 

myList= null

 

;

 

 

resultDetail = null

 

;

 

 

screen = null

 

;

 

 

 

 

 

}

}

searchItem.java

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

public

 

class SearchItem implements

Frame {

 

 

 

 

 

public static final SearchItem instance= new

SearchItem();

Screen

 

screen

;

 

 

 

 

public ResultDataProvider result

;

 

 

 

public

SearchItem()

{}

 

 

 

public void

setResult(ResultDataProvider result) {

 

 

this.result

= result;

System.

 

out.println("<-----In Frame Search Item--------->"

);

System.

out.println(result.getStringValue("resultLabel"

));

);

}

 

 

 

 

 

public void

onAdded()

{ System.

 

out.println("In On Added Method"

);

System.

 

out.println(result.getStringValue("resultDetail"

));

 

 

screen= Kuix.loadScreen("/xml/searchDetail.xml", result

);

 

 

screen

.setCurrent();

}

 

 

 

public boolean

onMessage(Object identifier, Object[] arg1) {

 

 

 

if("backPage"

.equals(identifier))

{

Kuix.getFrameHandler().removeFrame(

 

instance

);

 

 

return false

;

}

 

 

 

return false

;

}

 

 

 

public void

onRemoved() {

 

 

result = null

;

 

 

screen = null

;}

ResultDataProvider.java

public

 

class ResultDataProvider extends DataProvider

{

 

public String resultLabel;

 

public String resultDetail;

 

 

 

 

public ResultDataProvider(String resultLabel, String resultDetail)

{

 

this.resultLabel=resultLabel;

 

this.resultDetail=resultDetail;

}

 

 

public ResultDataProvider ()

{

 

}

 

 

 

public String getStringValue(String property) {

 

if("resultLabel".equals(property))

 

{

 

return resultLabel;

}

 

 

if("resultDetail".equals(property))

{

 

return resultDetail;

}

 

return super.getStringValue(property);

 

}

 

void setResultLabel(String resultLabel) {

 

this.resultLabel = resultLabel;

}

 

 

public void setResultDetail(String resultDetail) {

 

this.resultDetail = resultDetail;

}

 

}

DataList.java

 

 

 

public

 

 

public static final String LIST_PROPERTRY ="results"

;}

mySearch.xml

class DataList extends  DataProvider

{

 

 

<

screen style="layout:borderlayout">

 

<container style="layout-data:bld(north);layout:borderlayout">

 

<textfield id="myTextfield" style="layout-data:bld(center)"/>

 

<button style="layout-data:bld(east)" onAction="search(myTextfield.text)">GO</button>

 

</container>

 

<container style="layout-data:bld(center)">

 

<list>

 

<_renderer><![CDATA[

<listItem style="layout:borderlayout;gap:5 0" onAction="show">

<listItem><text>@{resultLabel}</text></listItem>

</listItem>

 

]]></_renderer>

 

<_items>@{results}</_items>

 

</list>

 

</container>

</

screen>

 

serchDetail.xml

<

screen>

 

<_title>@{resultLabel}</_title>

 

 

<scrollPane usemarkers="false" style="align:fill-center;layout:inlinelayout(false,fill);gap:1 5">

 

 

<textarea style="padding: 2 0 1 1">@{resultLabel}</textarea>

 

<textarea style="padding: 10 10 15 10">@{resultDetail}</textarea>

 

 

 

</scrollPane>

 

<screenfirstmenu onAction="backPage">%BACK%</screenfirstmenu>

 

<screenSecondMenu>

%MENU%

 

<menupopup>

 

 

<menuitem onAction="goHome">%HOME%</menuitem>

 

<menuitem onAction="exit">%EXIT%</menuitem>

 

</menupopup>

 

</screenSecondMenu>

 

 

 

</

screen>

 

 

Above Given Code snippet work fine .. it gives me list on search though String str[i][0], onAction of this selected ListItem again It gives me the value of str[i][1] in sublist,

The Problem comes in picture when, I am trying to return back to the list of str[i][0]  from sublist str[i][1]; The Application slightly behaves idle when , I am pressing back to return the mainList.

How do  I can  return to the mainList, from the sublist ? I Hope , My problem Will be clear to You now .

 

 

 

Kuix technical support » problem in removal of the current frame with List

Hi All !

I am using a list, onAction of the List Item , I am having a sub List on seperate widget with a seperate framehandler. I am facing problem while I am trying to remove the current Frame, to return back on the ListWidget.

For Removing the current frame I am using

 

 

Kuix.getFrameHandler().removeFrame(

instance);

 

 

return false;

Please Help me out for resolving this issue.

Thanks !

 

  

Kuix technical support » Simple TextField in Kuix like J2me

Dear All !

       I am trying to have very simple controls like TextField for username as well as Password fileds similar to J2me TextFields instead Of having new Dialoge or new windowpage. Is there any alternative for having this facilty in Kuix ? Please , Let me  know also, How can I use simple J2me controls along with KUIX in any application development ?

Thanks !  

 

Kuix technical support » Problem in running the application in NetBeans

Hi Tofu !

    Yeah , U R Right ..  By mistake I had taken a standard xml document . which is having this <root> tag by default. It's now working fine ..

Thanks For this Quick Response.  

Kuix technical support » Problem in running the application in NetBeans

Hi All !

    I am getting a problem , While I am trying to run an application in NetBeans.

I am getting these following error at run time ..

startApp threw an Exception
java.lang.IllegalArgumentException: Unknow tag : root
        at org.kalmeo.kuix.core.Kuix$1.startElement(Kuix.java:379)
        at org.kalmeo.util.xml.LightXmlParser.parse(LightXmlParser.java:214)
        at org.kalmeo.kuix.core.Kuix.parseXml(Kuix.java:305)
        at org.kalmeo.kuix.core.Kuix.loadXml(Kuix.java:195)
        at org.kalmeo.kuix.core.Kuix.loadScreen(Kuix.java:119)
        at org.kalmeo.kuix.core.Kuix.loadScreen(Kuix.java:107)
        at com.arieon.mobile.frame.SearchFrame.onAdded(SearchFrame.java:34)
        at org.kalmeo.util.frame.FrameHandler.pushFrame(FrameHandler.java:100)
        at com.arieon.mobile.N2RMobile.initDesktopContent(N2RMobile.java:22)
        at org.kalmeo.kuix.core.KuixCanvas.initialize(+151)
        at org.kalmeo.kuix.core.KuixMIDlet.startApp(+102)
        at javax.microedition.midlet.MIDletProxy.startApp(MIDletProxy.java:44)
        at com.sun.midp.midlet.Scheduler.schedule(+270)
        at com.sun.midp.main.Main.runLocalClass(+28)

        at com.sun.midp.main.Main.main(+80)
Execution completed.

where I am having

N2RMobile.java

public class N2RMobile extends KuixMIDlet{
   
   
    protected void initDesktopContent(Desktop arg0) {
  //Kuix.getFrameHandler().pushFrame(N2RMobileMainFrame.instance);
  Kuix.getFrameHandler().pushFrame(SearchFrame.instance);

 }

 protected void initDesktopStyles() {
  Kuix.loadCss("/css/style.css");
 }

SerachFrame.java

public class SearchFrame implements Frame {

   
public static final SearchFrame instance = new SearchFrame();
 
 DataProvider myDataProvider = new DataProvider();
 DataList myList = new DataList();
 
 Screen screen;
 
String []str= {"Hello", "Kuix","!"}

 public void onAdded() {
  
  screen= Kuix.loadScreen("/xml/mySearch.xml", myList);
  screen.setCurrent();

 }

 public boolean onMessage(Object arguments, Object[] arg1)
 {
  if("search".equals(arguments))
  {
   
   for(int i=0; i<str.length;i++)
     
   myList.addItem(DataList.LIST_PROPERTY,new ResulDataProvider(str [i] );
   
   myList.addItem(DataList.LIST_PROPERTY,new ResulDataProvider("Hello") );
   myList.addItem(DataList.LIST_PROPERTY,new ResulDataProvider("Test") );
    }
   
   //myDataProvider.addItem(, new ResulDataProvider("Hi"));
  }
  
  
  return false;
 }

I have already tried for both relative as well as absolute path parameters.

Please help me out to Identify this running issue .

 

 

   

Kuix technical support » Dynamically displaying String [ ][ ] into a growing List

Hi All !

    I am facing some problem while trying to display the data through String [][] str into a list dynamically. Can any body give me any hint , How do i can solve this issue ? additionally, If any body throw some more light on inter DataProvider communication as well as relationship, It will be enjoyable.

Thanks in advance.

  

Kuix technical support » Unable to get the selected Value through choice RadioGroup

Thanks Tofu !

     Me too have resolve the issue ..  Thanks For this Quick Risponse ..

Kuix technical support » Unable to get the selected Value through choice RadioGroup

Hi Tofu !

     Thanks For Reply,  I have already tried out Value attribute too , But Unable to get this selected value 1, 2 0r 3 through

<choice >
  <choiceRadiogroup id="chGroup1" >

     <radiobutton selected="true" >1</radiobutton>
     <radiobutton>2</radiobutton>
     <radiobutton>3</radiobutton>
    
  </choiceRadiogroup>
</choice

<button onAction "action(#chGoup1.value)" >%ACTION%</button>

in my Frame.

String ComboValue= (String) arguments[0];

Is there some thing which , I am missing still ? presently , it's Giving me null ..

 

Kuix technical support » Unable to get the selected Value through choice RadioGroup

Hi All !

I am using several choiceRadioGroups in this similar way

<choice >
  <choiceRadiogroup id="chGroup1" >

     <radiobutton selected="true" >1</radiobutton>
     <radiobutton>2</radiobutton>
     <radiobutton>3</radiobutton>
    
  </choiceRadiogroup>
</choice>

<button onAction "action(#chGoup1.selected)" >%ACTION%</button>

and willing to get the selected value of the choice group on the button Action in context of chGroup1. Can any body help me out to identify the problem ?

Thanks !

 

Kuix technical support » managing keyEvents in TabFolder

In the current scenario, for a focused tabFolder, it's only UP and DOWN keys are working fine .. but when , i am using LEFT or RIGHT keys  the focus is transfered to the adjacent tabFolder. i.e , Focus of tabFolders is changed  by simply using LEFT or Right Keys, due to this behavior, i am unable to have the complete traversal of the widgets associated with a tabFolder. when I am trying to access any widget through LEFT or RIGHT key on the assocated screen of tabFolder, Inspite of having the control of the widget , the focus is changed to next adhacent TabFolder.

   Kindly, Let me know, How Can I Have control over tab Navigation as well as How can I have LEFT and RIGHT key enabled for a focused tabFolder ?

 

Kuix technical support » Wrapping Text in List

I want to wrap a long string in a List so that data can be displayed on the screen completely. presently , i am getting this text in list in a line only which approaches beyond the screen. I have tried several styles for list, but unable to wrap the text on the screen.

Can any body help me out to resolve this issue ...

Thanks !

 

Kuix technical support » managing keyEvents in TabFolder

I am using a tabFolder, and having some widgets on that Like Choice Box as well as Buttons in static layout. I am facing a problem when I am trying to manage the button through left and right key of mobile. i.e when I am pressing left or right key, the focus is being transfered to the adjacent tab. I want to restrict the tab action without managing it through any message behaviour, so that I can manage the complete screen of focused tab through left and right key also as working with up and down.

  

 

Kuix technical support » Handling HTTP Response and setting the value from Recordset onto the Widget

Thanks For Your reply Bo !

                 I have already gone for the Tutorial and now I am loking on Kprice, By the way in my case I am trying to have a search on several parameters from the server, which will return huge data in the form of string, I have to display the value of this string on the widget in a textArea in the Wraped form. I am facing the problem in fetching this string value in myFrame and set this string value in the XML.