cómo actualizar el valor de rightText de dojox.mobile.listitem

I typically do not develop client-side (in this case, mobile) code, so my apologies in advance for what is most likely a "101" type of question.

I have the following dojox.mobile type hierarchy in my html page... ScrollableView > EdgeToEdgeList > multiple ListItems each w the "moveTo" value populated. The complete app looks and flows exactly as I had hoped, however I cannot figure out how to populate the ListItem rightText of the "parent" (the one that invokes the moveTo transition action) w the selected text value from the ListItem Label of the "child".

In other words, I'm trying to simulate the behavior of the iPhone Settings > WiFi ListItem that shows the name of the router that you choose from the Wi-Fi Networks child page.

I have to believe that I'm overlooking some existing property or event that handles this behavior since this is a somewhat widely used visual design paradigm.

Gracias de antemano por su tiempo.

preguntado el 30 de junio de 12 a las 16:06

1 Respuestas

You must write a little bit of JavaScript code for this:

  • connect to the onCheckStateChanged event of the "child" list to know which item was selected; your handler will be called with (item, state) arguments, you are interested in state=true event;
  • set the 'rightText' attribute of the "parent" list item to the label of the selected child item.

Eso debería bastar.

Respondido 02 Jul 12, 09:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.