Topic
  • 3 replies
  • Latest Post - ‏2013-02-08T00:40:36Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts

Pinned topic DOJO view parameter

‏2013-01-23T16:29:49Z |
Hello

I'm new using worklight and Dojo and I was wandering what is the best way to make transition between views.

I need views contening lists : second view content's depend on the first view choice, and third view content's depends on the second view selection and so on.

What is the best way to implement this behavior.

For now i'm using URL property in lisItem object but I don't know how to pass the selected value to the next view.

Thanks
  • Eric Durocher
    Eric Durocher
    38 Posts

    Re: DOJO view parameter

    ‏2013-01-23T17:02:44Z  
    Hi,

    If I understand correctly you transition to a new view defined as an HTML fragment, and in your new view you want to know which item was clicked in the previous view?

    One way to do that is to set a userClickAction handler on each item, and store the clicked item ('this' in the handler) somewhere in a global variable of your application so you can get it from the new view.

    Or did I misunderstand the question?

    Regards,

    Eric
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: DOJO view parameter

    ‏2013-01-28T08:40:50Z  
    Hi,

    If I understand correctly you transition to a new view defined as an HTML fragment, and in your new view you want to know which item was clicked in the previous view?

    One way to do that is to set a userClickAction handler on each item, and store the clicked item ('this' in the handler) somewhere in a global variable of your application so you can get it from the new view.

    Or did I misunderstand the question?

    Regards,

    Eric
    Hi,

    Than you for your answer.

    Yes, you understood what I need to do.

    I was thinking about using a global variable but I was not sure that the method was the right way to achieve the behavior. I would have like having independent html fragment with parameters in the URL for example, so I was wandering if it was possible or not.
    Fabrice
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: DOJO view parameter

    ‏2013-02-08T00:40:36Z  
    Hi,

    Than you for your answer.

    Yes, you understood what I need to do.

    I was thinking about using a global variable but I was not sure that the method was the right way to achieve the behavior. I would have like having independent html fragment with parameters in the URL for example, so I was wandering if it was possible or not.
    Fabrice
    Note: IBM forums are in the process of migrating to a new format. During migration the forums will be frozen and in read-only mode. If you wish to continue this thread discussion please post it on stackoverflow, where the Worklight team and others can respond.

    See the Forum Migration announce post for more details. Thank you.

    Barbara Hampson, Manager, IBM Worklight