Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

context question

3 views
Skip to first unread message

Peter Currier

unread,
Sep 19, 2007, 1:25:28 AM9/19/07
to
I have a simple HTML datawindow with three columns. I've noticed that only
the modified columns are passed back via the context parameter.

This datawindows is a selection screen for a report. After the report is
opened, the user can then hit the browser Back button to go back to the
selection screen. If the user then only changes one of the three colmns,
only the modified column is sent back in the context. Is there any way to
get all column values passed back in the context?

Thanks.

Peter


Jim Egan

unread,
Sep 19, 2007, 3:57:26 PM9/19/07
to
pe...@alexsoft.com wrote...

I have seen this issue before. In once instance I added code to make sure the underlying
HTML DW understood the changes that were displayed on the screen. In another solution I
created a page with two frames and put the selection in one frame and the results in the
second one. That way the users didn't have to hit the back button to rerun the report.
--
Jim Egan [TeamSybase]

Peter Currier

unread,
Sep 24, 2007, 11:20:30 AM9/24/07
to
Thanks for your reply, Jim.

I'm a complete novice with Web datawindows - lots of experience in the PB
client/server world. Could you please give some more info on your first
solution? Your second solution will not work for us as we are deploying the
reports as PDFs in the browser.

Thanks.

Peter


"Jim Egan" <eganjp...@compuserve.com> wrote in message
news:46f17f26$1@forums-1-dub...

Jim Egan

unread,
Sep 25, 2007, 1:03:38 PM9/25/07
to
pe...@alexsoft.com wrote...

> Thanks for your reply, Jim.
>
> I'm a complete novice with Web datawindows - lots of experience in the PB
> client/server world. Could you please give some more info on your first
> solution? Your second solution will not work for us as we are deploying the
> reports as PDFs in the browser.

I can't give you any specific code sample because the code was rewritten to be in a frame
but I'll try to describe the solution.

In an HTML DW you have two places that you can look at the data within the browser. The
first location is the JavaScript data. When you use GetItem you are getting the data
directly from the JavaScript structures. The second location is the HTML elements. If you
have a column in the DW called lastname and there are three rows then you will have three
HTML elements called lastname_0, lastname_1 and lastname_2. You can directly reference the
HTML elements.

What I did after the page was reloaded (after the user hit the back button) was examine the
HTML elements and make sure they agreed with the JavaScript structure. As I recall the
JavaScript structure had the original values when the page was first loaded and the HTML
elements had the values from when the page was unloaded. So they were out of sync.
--
Jim Egan [TeamSybase]

Arnd Schmidt

unread,
Oct 2, 2007, 7:23:33 PM10/2/07
to
Peter,
did you found a solution?
I wrote some experimental code that forces an AcceptText() for
a given column in a given row of the HTML Datawindow and it seems to work.

I would be thankful for any better solution.

Acually the 'web app' uses PB 10.5 and can be visited at
pbwebeasy.org / cgi-bin/pwe.exe/pbwebeasy/n_ds_report/of_showform

Arnd


<SCRIPT Language=JavaScript>
function forceAcceptText (HTMLDW , rowNum, colNum , colName )
{
var control = HTMLDW.findControl(colName,rowNum -1 , true);
if (control != null)
{
if ( HTMLDW.SetRow(rowNum) == 1 )
{
if ( HTMLDW.SetColumn(colName) == 1 )
{
HTMLDW.currentControl = control;
eval('HTMLDW.itemGainFocus(rowNum - 1,colNum,control,HTMLDW.gobs.'+ colName +')');
HTMLDW.currentControl.bChanged=true;
return HTMLDW.AcceptText();
}
}
}
return -1;
}

function pwd_d_selectreport_UpdateStart ()
{
forceAcceptText(this,1,1,'sdatawindow');
forceAcceptText(this,1,2,'soutputtype');
forceAcceptText(this,1,3,'sretrievalarguments');
return 0;

Peter Currier

unread,
Jan 18, 2008, 12:31:30 PM1/18/08
to
Arnd -

I'm sorry that it took me so long to get back to you.

I had originally done a backend solution where I save an image of the HTMLdw
back to the database (as a blob). On subsequent requests from that
datawindow, I go back to the database and retrieve that last image and apply
the context to that. It works, but I'm not very comfortable with that
solution.

I have tried your solution. It appears to work for columns with a dropdown,
but not for straight edit columns or columns with a check box edit.


"Arnd Schmidt" <arnd.s...@gmx.de> wrote in message
news:98l5g3la3ru7iugml...@4ax.com...

0 new messages