Skip to Content
author's profile photo Former Member
Former Member

Problem in Calling a Stateful Page

Hi,

I have got a stateful page.I can go to this page via 2 ways. One by clicking on a button another page and second by clicking on a popup menuItem present in another page. Now I want the onCreate event to be fired every time I come from the popupMenuItem present.But as it is a stateful page it goes to onInitialisation.How do I overcome this problem?

In the popup MenuItem I call the page in the following way:

<phtmlb:popupMenuItem menuItemId = "popmi1"

text = "Create program"

linkTarget = "main"

enabled = "TRUE"

linkReference = "program.htm"

checked = "TRUE"

/>

program.htm is a stateful page.

Regards

Tejaswini

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2005 at 01:25 PM

    I have some initial values which should appear only the first time the page is loaded. After that what the user inputs should appear. That is why I have initial values in onCreate and user-input values in onInitialization/

    Regards

    Tejaswini

    Add a comment
    10|10000 characters needed characters exceeded

    • Look at the properties tab of the page. There is one radio button called "lifetime". Setting this to request should do the trick (if I still remember correctly).

      Alternatively, the way I understand it, you want to know when the page is called the first time, versus every other time. What we usually do, is generate a flag into the source.

      On the Layout, somewhere within the <htmlb:form> we add this code: "<input type=hidden name=secondPlus value=xyz>".

      Then the onInitialization will look like this:

      IF request->get_form_field( 'secondPlus' ) IS INTIIAL.
        ... this is first time that the page is called ...
        ... do your initialization work...
      ENDIF.
      ... rest of code ...
      

      brian

  • author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2005 at 10:30 AM

    Hi, Tejaswini.

    Why do you need the popup menuItem to fire the onCreate event? Can't you move the code to the onInitialisation event? I think the onCreate event should be fired only once per session, and it seems you will show your "program.htm" more than once, so the code invoking it would be better placed in the other event.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.