This discussion is archived
3 Replies Latest reply: Nov 21, 2003 1:13 PM by steve.west RSS

How do I pass the value of a named page property to the next page?

steve.west Newbie
Currently Being Moderated
Hi,
I have a UIX page which passes a rowkey to the next page via a page property as follows:

<event name="tasks">
<ctrl:go name="TaskBrowse" redirect="true">
<ctrl:property name="key">
<ctrl:selection name="ViewTable" key="key"/>
</ctrl:property>
</ctrl:go>
</event>

I now want to navigate to another page from ViewTable.uix, passing the value in "key" as a page property. How do I do it? The ctrl:property element can only derive its values from hard-coded text, an event parameter or a selected table row How can I set the property value to be the value of a page property?


Thanks,

Steve

  • 1. Re: How do I pass the value of a named page property to the next page?
    55663 Newbie
    Currently Being Moderated
    I'll try and get you an answer tomorrow.
  • 2. Re: How do I pass the value of a named page property to the next page?
    55663 Newbie
    Currently Being Moderated
    OK, before I start asking around let me make sure
    I understand the problem. You have a table or
    something named ViewTable and it has a selection that
    is based on key? And your trying to pass that to the
    next page right? If not where is that key coming
    from? Is it already passed to you from a previous page?

    Also can you post more of your uix file so I can try
    and diagnose the problem?

    One minor thing is that you don't need the ctrl: on your
    elements because event is already in the ctrl: namespace.
  • 3. Re: How do I pass the value of a named page property to the next page?
    steve.west Newbie
    Currently Being Moderated
    Hi Frank,
    The key is already passed from a previous page. To set the scene a little, I have three pages:
    1. Project list, has a table listing all projects.
    2. Drill down to tasks for a project, passing the project key as a page property. This is a master/detail page. This currently works well.
    3. Create a new task for the project from page 2. I want to pass the project key obtained from page 1 to page 3 via page 2, so that the user does not have to re-select a project when creating a task.

    Here is my registrydef from page 2 (the tasks for a project):
    <bc4j:rootAppModuleDef name="ProjectModule"
    defFullName="ProjectPackage.ProjectModule"
    configName="ProjectModuleLocal"
    releaseMode="stateful">
    <bc4j:viewObjectDef name="ProjectsVO1">
    <bc4j:rowDef name="ProjectRow" autoCreate="false" usesCurrency="true">
    <bc4j:propertyKey name="key"/>
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="TasksVO2" rangeSize="20"/>
    </bc4j:rootAppModuleDef>

    This works well, I can display the selected project and then list the tasks in a table.

    My problem is that in page 2 the project record is not in a table, so I cannot use a table selection mechanism to set the key value in the event which calls page 3 (see my earlier post for this code). As the key that I need is sittng there in the URL as a page property, I want to pass that instead. How to I reference it from within an event?

    Does this make sense or is there a better way of doing it? Do I actually need a new page to create a new task - I don't think I can add new records in a table!



    Thanks for the tip on ctrl: , I'm slowly getting the hang of the namespace thing.

    Steve