xPages create Response document

Hi

I have my first xPage application up and running - am really loving it!

I do have a relatively difficult problem - here goes me trying to explain it:

I have a view that allows me to select a person - when I click on the person I set a session variable called personUID. On the person xPage I have the person info on the top of the page (loaded using the session variable) and an embedded view (categorized and restricted to the personUID session var) on the bottom. The embedded view displays the medical info for that person. This works perfectly! When I click on a record in the embedded view on the person document another xPage opens (called personMedical) that displays more info regarding the selected person’s medical record (the person info is on the top again with the medical info on the bottom). The person info on the top of personMedical is displayed using the old session var personUID, the medical info is displayed using mediUID. Again, this works perfectly. Now here is my problem… I have a button on the xPage person to create a new medical record. I am using the simple action “create document” that opens a new personMedical xPage. When I press the button I get a new document with the fields to fill out at the bottom but the top section (the page normally displays the person info using the session variable personUID) is empty. When the document is saved it is a response document, it is just not attached to the correct person document!

Sorry for the complex explanation (I hope it was understandable) but I have tried everything I know to fix it but to no avail!

Thank you for any help

Ursus

Subject: Are you using a Panel control?

My guess without seeing the app, is that both datasources are on the page. Both will respond to the request parameters such as “action=newDocument”.

If you place the top section for the person info in a panel and set the datasource on the panel, you can then control the usage of request parameters for the data source.

On the data source for the panel control you can set the “ignoreRequestParams” to true. Since you are using a session variable to set the docid there is no need for request parameters for the person datasource. Now the person data source should act independent of the state of the other data source.

Let me know if this helps.

-John

Subject: 1/2 way there :o)

Hi John

thank you again for your help with both of the problems :o)

You are correct about the 2 panels - after setting “ignoreRequestParams” I now get the correct data in the top part of the Panel yay - the problem I have is that I am still not creating a response document :o(

I have the personDocUID as a session variable (and displayed at the top of the xPage) - I have a button called “Save” that I would now like to save the values that have been entered in the xPage and attach to the person document - I have tried the simple action “Create Response Document” with the ParentUID = session.PersonDocUID and the name of the Page to open as varous pages - I cannot seem to get a new page!

Any ideas?

Thanks again for your help

Ursus

Subject: It’s hard to tell…

I’m glad the first issue is solved. I learned that issue the hardway…

You might need to take Phil up on his offer for this issue since it’s hard to tell without looking at the app (btw…Phil is the Chief Architect for XPages so I am sure the issue will be resolved).

-John

Subject: Can you send the app?

It is hard for me to guess what is happening here as there is some custom business logic. Can you send a reproducible case so we can have a look at it?

Thanks!

Subject: Thank you

Hi Philippe

Thank you very much for your offer - I have now managed to update the top of the document (John helped me) but now I cannot create the response document :o(

I’ll see if John can help - else I’ll send you the template - could I please have your email address?

Please note that parts of the code are in German - I hope that that will not be a problem for you.

Thank you for your kind offer

Ursus

Subject: application

Hi again Philippe

I would like to send you the application - could you please send me your email address - mine is:

ursus dot schneider at aqua-soziales dot com

looking forward to hearing from you :o)

ursus