NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Matthew on January 17, 2012, 04:57:55 AM

Title: Popup reseting session value of unique key
Post by: Matthew on January 17, 2012, 04:57:55 AM
Hello,

I have the following problem:

I have NetWebBrowse procedure with four columns. The last column is button Other, which call popup memory NetWebForm. In 'OnClick' tab I have the following option:

Procedure: some NetWebForm
Open as Popup (not submit buttons) = TRUE
Title: 'something'
Target Frame: '_self'

For testing I add message box in "User Clicekd on row in the browse" embed, where I put:
MESSAGE(p_web.GSV('TAB:ID')) - unique key

Before I click on the button Other, the TAB:ID number is properly in message box.
After I click on the button Other, popup is showing. After close that popup and click on any browse row the TAB:ID is empty in message box.

Why after popup  the session value of TAB:ID is reset?
Is it a bug or something?

I have to refresh all site to get it work again. I need TAB:ID numer without refreshing all site, because I use this number in popup NetWebForm.

This problem is also when I turn on EIP in browse column (in my situation EIP is number). After change value of that field the session value of TAB:ID is reset.

Regards,
Matthew
Title: Re: Popup reseting session value of unique key
Post by: Bruce on January 17, 2012, 05:55:25 AM
Hi Matthew,

can you duplicate the effect in one of the examples, and post it here please?

cheers
Bruce
Title: Re: Popup reseting session value of unique key
Post by: Matthew on January 17, 2012, 11:32:24 PM
I attach the example with popup problem.

This situation is when the browse procedure is on form and then call popup window from that browse.

Regards,
Matthew

[attachment deleted by admin]
Title: Re: Popup reseting session value of unique key
Post by: DonRidley on February 10, 2012, 04:51:52 PM
I'm seeing something similar to this.  "Other" button in browse list which calls a popup browse.  Despite my best efforts, I cannot set a session value with the button which can been "seen" by the browse.  No matter what, the session value is empty when the popup browse is called.  It's very weird.

EDIT:  Ah Ha!  I got past this by forcing myself to learn how to pass parameters!  (NetTalk style).  Awesome!!! 

Don
Title: Re: Popup reseting session value of unique key
Post by: Matthew on April 02, 2012, 10:24:43 PM
Hello,

Getting value from unique key in popup form seems doesn't work. Popup is showing from NetWeBrowse and the value of unique key is reseting.

Could someone help?

I attache example app.

Regards,
Matthew

[attachment deleted by admin]
Title: Re: Popup reseting session value of unique key
Post by: Bruce on April 02, 2012, 11:35:11 PM
morning Matthew,
got the example - but I'm not sure what I'm supposed to be looking for.
Can you give me some hints on what to do - what I'll see, and what you would prefer to see?

cheers
Bruce
Title: Re: Popup reseting session value of unique key
Post by: Matthew on April 03, 2012, 12:23:40 AM
I would like to get value of unique key in popup form. (it's a MEMORY FORM)

In example is some browse with button named 'click', which open popup form. In that form I have put message box with value of unique key:

MESSAGE(p_web.GSV('TAB:ID'))

For the first time when I click on that button session value isn't empty so its ok, but after that when I click that button in other row this value is empty so I don't know which record I should Fetch.
Title: Re: Popup reseting session value of unique key
Post by: Bruce on April 04, 2012, 12:01:27 AM
Hi Matthew,

I compile and run your app. There is no data in the browse, so I click on Insert.
I fill in the fields, click on SAVE and a message box saying "test" appears.
Still nothing in the browse.
A quick look at MyBrowse_EditForm shows it is a memory form. So I've changed that to a Table form, and now I can add the record.

Now the browse has 2 buttons;
a) Button with server-side code - clicking that gives a _server side_ message saying "hello".
b) also popup button. Presumably you want the "row id of the row clicked" when clicking this button.

To get the rowId attached to the button click, you just need to tick on that option for the button - see attached.

Two tips for next time to make it go quicker-
a) it would have been helpful to have a data file included with the example;
b) leaving the form as a "table form" would have made it more obvious as well.

Cheers
Bruce






[attachment deleted by admin]
Title: Re: Popup reseting session value of unique key
Post by: Matthew on April 04, 2012, 09:59:17 PM
Sorry Bruce. I forgot to include data table. My mistake.

I attached example one more time. Could You look?

I have tick on option "include row id."
There is 10 records in browse. Try click on button "Click" in "Popup" column. First click is working, but another click doesn't show the properly value from unique key (p_web.GSV('TAB:ID') or p_web.GetValue('TAB:ID')).

Regards,
Matthew

[attachment deleted by admin]
Title: Re: Popup reseting session value of unique key
Post by: Bruce on April 05, 2012, 01:27:05 AM
Hi Matthew,

Sorry I wasn't clear.

To get the rowId attached to the button click, you just need to tick on that option for the button - see the pic attached to my previous post.

Cheers
Bruce
Title: Re: Popup reseting session value of unique key
Post by: Matthew on April 05, 2012, 01:54:43 AM
I have already tick on option "Include Row ID field" for that button, but still this ID is clear in popup form.
When the form is not running as a popup everythink works fine.

See TestApp.zip (latest version)

Regards,
Matthew
Title: Re: Popup reseting session value of unique key
Post by: Matthew on April 05, 2012, 02:41:30 AM
I found the reason why value of row ID was cleared when open popup form from browse.

This is happening when NetWebBrowse is on the NetWebForm (added as a "procedure field" on form).

When NetWebBrowse isn't on a form then unique value (ID) of a row is properly passed to the popup form.

Regards,
Matthew
Title: Re: Popup reseting session value of unique key
Post by: Bruce on April 05, 2012, 05:38:18 AM
hi Matthew,

the RowId is being passed as a Value to the browse. So 99% of the time, in the browse you want to do a StoreValue call.

So in the top of your GenerateForm routine put
p_web.StoreValue('Tab1:Id')

then elsewhere in the browse (in the filter and so on) you use p_web.GSV('tab1:id')

Cheers
Bruce