Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8950

Re: Default selection in List view..?

$
0
0

Hi Karthik,

   

      I am also trying the same kind of scenario in my application. i am using XML view. i have tried your code, it is working 50% for me. The list item got selected, but i am not able to view the detail page for that particular selected list.

 

XML code:

 

<List

  id="list"

  mode="{device>/listMode}"

  select="handleListSelect"

  updateFinished="onSelected"

  items="{/Organization_Hrchy}" >

  <ObjectListItem

  title="{BusinessGroup_OrganizationName}"

  type="Active"

  press="onListItemPress"

  number="{OrganizationKey}"

  numberUnit="{IsActive}">

  <firstStatus>

  <ObjectStatus

  text="{SubOrgText}"

  />

  </firstStatus>

  <attributes>

  <ObjectAttribute text="Valid From : {ValidFrom}" />

  <ObjectAttribute text="Valid To : {ValidTo}" />

  </attributes>

  </ObjectListItem>

  </List>

 

 

 

Controller code:

 

onSelected:function(evt)

  {

 

  alert("onSelected");

    var firstItem = this.getView().byId("list").getItems()[1];

   

    alert("onSelected "+firstItem);

           this.getView().byId("list").setSelectedItem(firstItem,true);  

  },


Viewing all articles
Browse latest Browse all 8950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>