You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@attbi.com> on 2003/06/05 00:47:07 UTC
RE: problem: how to avoid inconsistencies when a user open a link in anew window
Do you have a specific issue that prevents you from using persistent page properties?
--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
> -----Original Message-----
> From: Marilen Corciovei [mailto:len@nemesisit.rdsnet.ro]
> Sent: Wednesday, June 04, 2003 11:24 AM
> To: tapestry-dev@jakarta.apache.org
> Subject: problem: how to avoid inconsistencies when a user
> open a link in anew window
>
>
> I posted this problem on the user group but I now think this
> is more of a developer nature. Maybe here can someone help.
>
> assume I have a page which gets some parameters, it uses them
> to render itself. The page also contains a table component.
> When the user clicks a table column which is a DirectLink
> this one will call the page again but with the original
> parameters lost. I am trying to find a way not to be forced
> to modify the table column to send the original parameters
> also. I was thinking of extending DirectService. I know how
> to handle parameter sending with my own links but not with
> others from existing components and I hope not to rewrote them.
>
> Len
>
> On Wed, 2003-06-04 at 17:11, Bill Lear wrote:
> > On , June 4, 2003 at 16:49:14 (+0300) Marilen Corciovei writes:
> > >I am having problem with users opening a link in a new window. I
> tried
> > >to store specific navigation data in the visit but this result in
> > >inconsistencies. My ideea was to make all the links carry some data
> as
> > >parameters. Can this be done in some way without modifind every
> > >component?
>
> --
> Marilen Corciovei <le...@nemesisit.rdsnet.ro>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
Re: problem: how to avoid inconsistencies when a user open a
linkin anew window
Posted by Bill Lear <ra...@zopyra.com>.
On , June 5, 2003 at 17:16:28 (+0300) Marilen Corciovei writes:
>What about the sorting links in the top. Are they not added by the table
>component? and they are directLink's :)
Hmm, in section 2.3 of the Table component guide, it says:
2.3. Changing renderers
Another way to change the appearance of the table is by using the
ITableColumn ability to provide custom renderers for both column
headers and values. By default, SimpleTableColumn uses
RenderString to display values and the SimpleTableColumnComponent
to render the headers. That component makes the header a link if
the column is sortable, handles clicks on it, and displays an
indicator if the column is currently used for sorting.
If is quite possible to use custom components to render the
values [of] the headers in a different way. This is the approach
taken by the LocaleSelection component in the Workbench. It uses
Block sections in its template to render some columns differently
(see the demo).
While using this mechanism is not hard at all, there are a number
of common pitfalls that the developer must avoid. If you would
like to go that route, please see how the
SimpleTableColumnComponent and the LocaleSelection component are
implemented and read the JavaDocs of
org.apache.tapestry.components.BlockRenderer and
org.apache.tapestry.ComponentAddress beforehand.
Sorry if this is nugatory:-)
Bill
RE: problem: how to avoid inconsistencies when a user open alinkin anew window
Posted by Mind Bridge <mi...@yahoo.com>.
Hi Marilen,
I am judging about the issue from your description earlier:
<marilen>
Take this case: I have a dynamic category, products hierarchy. I then
visit a page showing the categories and select one category in a page
(shift-click) and another in other page (shift-click). Both pages will
show the products for the category received as parameter. Can this be a
persistent page property. As far as I know both pages share the save
httpSession managed by a cookie. Assume then each page will have a
number of contained components for instance a table. This will contain a
direct link for sort. What happens it I store the category as a
persistent page property, load page1, load page2 and the click to sort
page1. I guess page1 will now show the sorted items in page2.
the sequence is as follows:
- load page1 in a new page with a parameter C1, store C1 in session
- load page2 in a new page with a parameter C2, store C2 in session
- click on page1 directLink
- render page1 using C2 from session ?!
</marilen>
Basically, the predicament that I see is the following:
- page1 and page2 would use the same session
- both page1 and page2 actually use the same Tapestry page with the same
components to essentially display different data
- since both the session and page/components are the same, update of the
persistent properties in page1 would reflect on page2 and the opposite. How
can this be avoided?
My earlier email was describing the general case.
If you are only worried about the state of the table and nothing else, you
have a way out, albeit not a terribly elegant one (it is along the lines of
what Bill sent):
You would need to encode in the URL the following information:
- the ID of the data query that is used for extracting the data that is to
be displayed
- the table state (page & sorting)
Normally this is kept in the session, but in your case this is obviously not
possible since it is shared.
The above means that _all_ links on the page that refer to itself,
especially the table-related ones must encode that information.
To do that with Table, you would need to
- use Direct or External services to encode that information
- modify TablePages and the table columns that you use to generate link
using the above and encode the necessary information
- use NullTableStateManager and recreate the table model completely each
time based on the extra information passed in the URL
This is not terribly easy, but is definitely doable.
This is very much similar to running your application stateless (since you
cannot use the session). As I pointed out earlier, this is (unfortunately) a
tricky issue (see the discussion a few weeks back). Note that in your case
you cannot even use cookies, since they are usually shared between different
instances of the same browser as well -- the only escape is keeping the data
in the URL.
There are, of course, simpler approaches than the full blown one, such as
having a "URL state" (kept by the engine, I guess) that is passed from URL
to URL. But this has not been discussed in detail, since there has not been
a need for it until now.
-mb
-----Original Message-----
From: Marilen Corciovei [mailto:len@nemesisit.rdsnet.ro]
Sent: Thursday, June 05, 2003 5:16 PM
To: Tapestry development
Cc: rael@zopyra.com
Subject: Re: problem: how to avoid inconsistencies when a user open
alinkin anew window
What about the sorting links in the top. Are they not added by the table
component? and they are directLink's :)
Len
On Thu, 2003-06-05 at 17:07, Bill Lear wrote:
> On , June 5, 2003 at 17:00:46 (+0300) Marilen Corciovei writes:
> >What if the directLink is in a tapestry component like table. Should I
> >modify the table component if I want to do that? And all other
> >components which might or might not be my own.
>
> Not sure I understand. Don't you decide which links get put into the
> table?
>
>
> Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
--
Marilen Corciovei <le...@nemesisit.rdsnet.ro>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: problem: how to avoid inconsistencies when a user open a
linkin anew window
Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
What about the sorting links in the top. Are they not added by the table
component? and they are directLink's :)
Len
On Thu, 2003-06-05 at 17:07, Bill Lear wrote:
> On , June 5, 2003 at 17:00:46 (+0300) Marilen Corciovei writes:
> >What if the directLink is in a tapestry component like table. Should I
> >modify the table component if I want to do that? And all other
> >components which might or might not be my own.
>
> Not sure I understand. Don't you decide which links get put into the
> table?
>
>
> Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
--
Marilen Corciovei <le...@nemesisit.rdsnet.ro>
RE: problem: how to avoid inconsistencies when a user open alinkin
anew window
Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
hey, thanks. I am now in the process of writing some services that
support that. I already extended direct and page. Since all components
call them I think this is the best way.
Len
On Thu, 2003-06-05 at 17:29, Anatoli Krassavine wrote:
> Hello,
>
> I encountered a similar problem, so I clearly understand Marilen's issue.
>
> Basically imagine a page with third-party components inside. These
> components are "black-boxes" - they contain links of their own:
> DirectLinks, etc. I want to persist page state regardless of which of these
> links is executed without need to "enter" black-box. I specifically do
> not want components to be aware that they are inside a particular page
> or force page to modify components.
>
> Page persisted properties is a possible way to do it, but it fails if
> one has multiple pages opened in different browser windows.
>
> My current solution is to intercept all requests for services. If I detect
> that the page for which service is required contains information to persist,
> then I wrap the required service instance inside my own proxy service.
> When encoding URL, my service adds persistent parameters to the url.
> Likewise, during execution it first extracts persistent parameters and
> then passes the execution to the original service it wraps.
>
> Having something like that inside Tapestry framework itself could be
> quite useful.
>
> Cheers,
> Toly
>
> -----Original Message-----
> From: Bill Lear [mailto:rael@zopyra.com]
> Sent: 05 June 2003 15:08
> To: Tapestry development
> Subject: Re: problem: how to avoid inconsistencies when a user open
> alinkin anew window
>
>
> On , June 5, 2003 at 17:00:46 (+0300) Marilen Corciovei writes:
> >What if the directLink is in a tapestry component like table. Should I
> >modify the table component if I want to do that? And all other
> >components which might or might not be my own.
>
> Not sure I understand. Don't you decide which links get put into the
> table?
>
>
> Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
--
Marilen Corciovei <le...@nemesisit.rdsnet.ro>
RE: problem: how to avoid inconsistencies when a user open alinkin
anew window
Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
My approach is something similar. I wrote a PageStateSqueezer which
creates a small representation of an PageState object. I also wrote a
ADirectService which replaces DirectService. The buildGesture function
now checks if the last parameter of the current request cycle is a
PageState object and if so adds it to the gesture (encodes it in the
URL). This works fine with directLinks and also Form components that are
direct. The form component will automaticaly create a hidden to store
the squeezed PageState.
Len
On Thu, 2003-06-05 at 18:29, Anatoli Krassavine wrote:
> Hello mb,
>
> True, and the way around is not to encode all persistence information
> blindly
> into URL - it is a waste of effort. Instead, the persistence info is encoded
> into an object stored on the server and I only pass the key to this
> information
> inside URL.
>
> The way I am doing it is to ask every page to give me a single object
> representing
> its persistent state within such framework. After that I use database to
> actually
> persist the object and use the key from now on.
>
> I realize that we are still running into the problem of "when to clear the
> caches", etc,
> but so far it seems to work fine. Since my system works with huge databases
> of data
> as a backend (think terabytes), allocating few megabytes for persistent page
> options
> never bothered anyone. The worst page state I ever had was only 2K. I only
> clear
> the state after the user logs out.
>
> BTW - the reason I originally faced the problem was having several
> independent
> sortable tables (contrib:Table) on the same page AND have several such pages
> around.
>
> Cheers,
> Toly
>
> -----Original Message-----
> From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
> Sent: 05 June 2003 16:02
> To: Tapestry development; anatoli.krassavine@intellidos.com
> Subject: RE: problem: how to avoid inconsistencies when a user open
> alinkin anew window
>
>
> Hi Anatoli,
>
> Yes, this is something like what I was referring to in my previous email.
>
> The only issue with a general solution for this is the limited maximum size
> of the URLs.
>
> Here is the paper sent by Ido Tamir discussing the issue:
> http://www.jetools.com/content/resources/whitepapers/HTTP_GET_Requests.pdf
>
> Also, if you are interested, search the archives for the thread "Recording
> page properties in cookies" -- it has a lot of details about a very similar
> topic.
>
> -mb
>
>
> -----Original Message-----
> From: Anatoli Krassavine [mailto:anatoli.krassavine@intellidos.com]
> Sent: Thursday, June 05, 2003 5:29 PM
> To: Tapestry development
> Subject: RE: problem: how to avoid inconsistencies when a user open
> alinkin anew window
>
>
> Hello,
>
> I encountered a similar problem, so I clearly understand Marilen's issue.
>
> Basically imagine a page with third-party components inside. These
> components are "black-boxes" - they contain links of their own:
> DirectLinks, etc. I want to persist page state regardless of which of these
> links is executed without need to "enter" black-box. I specifically do
> not want components to be aware that they are inside a particular page
> or force page to modify components.
>
> Page persisted properties is a possible way to do it, but it fails if
> one has multiple pages opened in different browser windows.
>
> My current solution is to intercept all requests for services. If I detect
> that the page for which service is required contains information to persist,
> then I wrap the required service instance inside my own proxy service.
> When encoding URL, my service adds persistent parameters to the url.
> Likewise, during execution it first extracts persistent parameters and
> then passes the execution to the original service it wraps.
>
> Having something like that inside Tapestry framework itself could be
> quite useful.
>
> Cheers,
> Toly
>
> -----Original Message-----
> From: Bill Lear [mailto:rael@zopyra.com]
> Sent: 05 June 2003 15:08
> To: Tapestry development
> Subject: Re: problem: how to avoid inconsistencies when a user open
> alinkin anew window
>
>
> On , June 5, 2003 at 17:00:46 (+0300) Marilen Corciovei writes:
> >What if the directLink is in a tapestry component like table. Should I
> >modify the table component if I want to do that? And all other
> >components which might or might not be my own.
>
> Not sure I understand. Don't you decide which links get put into the
> table?
>
>
> Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
--
Marilen Corciovei <le...@nemesisit.rdsnet.ro>
RE: problem: how to avoid inconsistencies when a user open alinkin anew window
Posted by Anatoli Krassavine <an...@intellidos.com>.
Hello mb,
True, and the way around is not to encode all persistence information
blindly
into URL - it is a waste of effort. Instead, the persistence info is encoded
into an object stored on the server and I only pass the key to this
information
inside URL.
The way I am doing it is to ask every page to give me a single object
representing
its persistent state within such framework. After that I use database to
actually
persist the object and use the key from now on.
I realize that we are still running into the problem of "when to clear the
caches", etc,
but so far it seems to work fine. Since my system works with huge databases
of data
as a backend (think terabytes), allocating few megabytes for persistent page
options
never bothered anyone. The worst page state I ever had was only 2K. I only
clear
the state after the user logs out.
BTW - the reason I originally faced the problem was having several
independent
sortable tables (contrib:Table) on the same page AND have several such pages
around.
Cheers,
Toly
-----Original Message-----
From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
Sent: 05 June 2003 16:02
To: Tapestry development; anatoli.krassavine@intellidos.com
Subject: RE: problem: how to avoid inconsistencies when a user open
alinkin anew window
Hi Anatoli,
Yes, this is something like what I was referring to in my previous email.
The only issue with a general solution for this is the limited maximum size
of the URLs.
Here is the paper sent by Ido Tamir discussing the issue:
http://www.jetools.com/content/resources/whitepapers/HTTP_GET_Requests.pdf
Also, if you are interested, search the archives for the thread "Recording
page properties in cookies" -- it has a lot of details about a very similar
topic.
-mb
-----Original Message-----
From: Anatoli Krassavine [mailto:anatoli.krassavine@intellidos.com]
Sent: Thursday, June 05, 2003 5:29 PM
To: Tapestry development
Subject: RE: problem: how to avoid inconsistencies when a user open
alinkin anew window
Hello,
I encountered a similar problem, so I clearly understand Marilen's issue.
Basically imagine a page with third-party components inside. These
components are "black-boxes" - they contain links of their own:
DirectLinks, etc. I want to persist page state regardless of which of these
links is executed without need to "enter" black-box. I specifically do
not want components to be aware that they are inside a particular page
or force page to modify components.
Page persisted properties is a possible way to do it, but it fails if
one has multiple pages opened in different browser windows.
My current solution is to intercept all requests for services. If I detect
that the page for which service is required contains information to persist,
then I wrap the required service instance inside my own proxy service.
When encoding URL, my service adds persistent parameters to the url.
Likewise, during execution it first extracts persistent parameters and
then passes the execution to the original service it wraps.
Having something like that inside Tapestry framework itself could be
quite useful.
Cheers,
Toly
-----Original Message-----
From: Bill Lear [mailto:rael@zopyra.com]
Sent: 05 June 2003 15:08
To: Tapestry development
Subject: Re: problem: how to avoid inconsistencies when a user open
alinkin anew window
On , June 5, 2003 at 17:00:46 (+0300) Marilen Corciovei writes:
>What if the directLink is in a tapestry component like table. Should I
>modify the table component if I want to do that? And all other
>components which might or might not be my own.
Not sure I understand. Don't you decide which links get put into the
table?
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
RE: problem: how to avoid inconsistencies when a user open alinkin anew window
Posted by Mind Bridge <mi...@yahoo.com>.
Hi Anatoli,
Yes, this is something like what I was referring to in my previous email.
The only issue with a general solution for this is the limited maximum size
of the URLs.
Here is the paper sent by Ido Tamir discussing the issue:
http://www.jetools.com/content/resources/whitepapers/HTTP_GET_Requests.pdf
Also, if you are interested, search the archives for the thread "Recording
page properties in cookies" -- it has a lot of details about a very similar
topic.
-mb
-----Original Message-----
From: Anatoli Krassavine [mailto:anatoli.krassavine@intellidos.com]
Sent: Thursday, June 05, 2003 5:29 PM
To: Tapestry development
Subject: RE: problem: how to avoid inconsistencies when a user open
alinkin anew window
Hello,
I encountered a similar problem, so I clearly understand Marilen's issue.
Basically imagine a page with third-party components inside. These
components are "black-boxes" - they contain links of their own:
DirectLinks, etc. I want to persist page state regardless of which of these
links is executed without need to "enter" black-box. I specifically do
not want components to be aware that they are inside a particular page
or force page to modify components.
Page persisted properties is a possible way to do it, but it fails if
one has multiple pages opened in different browser windows.
My current solution is to intercept all requests for services. If I detect
that the page for which service is required contains information to persist,
then I wrap the required service instance inside my own proxy service.
When encoding URL, my service adds persistent parameters to the url.
Likewise, during execution it first extracts persistent parameters and
then passes the execution to the original service it wraps.
Having something like that inside Tapestry framework itself could be
quite useful.
Cheers,
Toly
-----Original Message-----
From: Bill Lear [mailto:rael@zopyra.com]
Sent: 05 June 2003 15:08
To: Tapestry development
Subject: Re: problem: how to avoid inconsistencies when a user open
alinkin anew window
On , June 5, 2003 at 17:00:46 (+0300) Marilen Corciovei writes:
>What if the directLink is in a tapestry component like table. Should I
>modify the table component if I want to do that? And all other
>components which might or might not be my own.
Not sure I understand. Don't you decide which links get put into the
table?
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
RE: problem: how to avoid inconsistencies when a user open alinkin anew window
Posted by Anatoli Krassavine <an...@intellidos.com>.
Hello,
I encountered a similar problem, so I clearly understand Marilen's issue.
Basically imagine a page with third-party components inside. These
components are "black-boxes" - they contain links of their own:
DirectLinks, etc. I want to persist page state regardless of which of these
links is executed without need to "enter" black-box. I specifically do
not want components to be aware that they are inside a particular page
or force page to modify components.
Page persisted properties is a possible way to do it, but it fails if
one has multiple pages opened in different browser windows.
My current solution is to intercept all requests for services. If I detect
that the page for which service is required contains information to persist,
then I wrap the required service instance inside my own proxy service.
When encoding URL, my service adds persistent parameters to the url.
Likewise, during execution it first extracts persistent parameters and
then passes the execution to the original service it wraps.
Having something like that inside Tapestry framework itself could be
quite useful.
Cheers,
Toly
-----Original Message-----
From: Bill Lear [mailto:rael@zopyra.com]
Sent: 05 June 2003 15:08
To: Tapestry development
Subject: Re: problem: how to avoid inconsistencies when a user open
alinkin anew window
On , June 5, 2003 at 17:00:46 (+0300) Marilen Corciovei writes:
>What if the directLink is in a tapestry component like table. Should I
>modify the table component if I want to do that? And all other
>components which might or might not be my own.
Not sure I understand. Don't you decide which links get put into the
table?
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: problem: how to avoid inconsistencies when a user open a
linkin anew window
Posted by Bill Lear <ra...@zopyra.com>.
On , June 5, 2003 at 17:00:46 (+0300) Marilen Corciovei writes:
>What if the directLink is in a tapestry component like table. Should I
>modify the table component if I want to do that? And all other
>components which might or might not be my own.
Not sure I understand. Don't you decide which links get put into the
table?
Bill
Re: problem: how to avoid inconsistencies when a user open a
linkin anew window
Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
What if the directLink is in a tapestry component like table. Should I
modify the table component if I want to do that? And all other
components which might or might not be my own.
Len
On Thu, 2003-06-05 at 16:52, Bill Lear wrote:
> On Thursday, June 5, 2003 at 09:56:04 (+0300) Mindbridge writes:
> >Hi,
> >
> > From what I can see, you want the persistent page properties (perhaps
> >only some of them) to be stored as part of the URL -- this will make things
> >work in the context you describe. We've been thinking about how to possibly
> >realize this, but it is tricky, and at the very least will require
> >JavaScript ...
>
> I'm a bit confused on this.
>
> Doesn't DirectLink have a renderer, not to mention an anchor?
>
> 1) For renderer, suppose from the Category page you have link to a
> Summary page, the link to which might be expressed as:
>
> http://www.foo.com/svc/app?service=page/Summary
>
> Could you not provide a renderer that would render this instead:
>
> http://www.foo.com/svc/app?service=page/Summary&productCat=XYZ
>
> then, when the summary page validates, this value is parsed and set
> for the Summary page DirectLink renderers so they can also use this
> transient value?
>
>
> 2) And what about using the anchor to encode this? Could not the
> anchor just be the product category?
>
> Sorry if I'm lost.
>
>
> Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
--
Marilen Corciovei <le...@nemesisit.rdsnet.ro>
Re: problem: how to avoid inconsistencies when a user open a linkin anew window
Posted by Bill Lear <ra...@zopyra.com>.
On Thursday, June 5, 2003 at 09:56:04 (+0300) Mindbridge writes:
>Hi,
>
> From what I can see, you want the persistent page properties (perhaps
>only some of them) to be stored as part of the URL -- this will make things
>work in the context you describe. We've been thinking about how to possibly
>realize this, but it is tricky, and at the very least will require
>JavaScript ...
I'm a bit confused on this.
Doesn't DirectLink have a renderer, not to mention an anchor?
1) For renderer, suppose from the Category page you have link to a
Summary page, the link to which might be expressed as:
http://www.foo.com/svc/app?service=page/Summary
Could you not provide a renderer that would render this instead:
http://www.foo.com/svc/app?service=page/Summary&productCat=XYZ
then, when the summary page validates, this value is parsed and set
for the Summary page DirectLink renderers so they can also use this
transient value?
2) And what about using the anchor to encode this? Could not the
anchor just be the product category?
Sorry if I'm lost.
Bill
Re: problem: how to avoid inconsistencies when a user open a linkin anew window
Posted by Mindbridge <mi...@yahoo.com>.
Hi,
From what I can see, you want the persistent page properties (perhaps
only some of them) to be stored as part of the URL -- this will make things
work in the context you describe. We've been thinking about how to possibly
realize this, but it is tricky, and at the very least will require
JavaScript once you have more data to pass this way because of the
limitations on URL size. (you can check the archives of this list -- the
topic was storing data in cookies). Unfortunately, this is not currently
supported and there have been thoughts of not locking the page recorders at
the beginning of rendering, which would close this avenue altogether...
Personally, I am not very sure that what you describe is a very big
problem, but having the ability to put only certain persistent properties in
the request (while the rest can be in the session) is somethings that has
popped up a number of times. Perhaps there is some wisdom in implementing
this after all. My only big problem is that possible JavaScript
dependency...
Best regards,
-mb
----- Original Message -----
From: "Marilen Corciovei" <le...@nemesisit.rdsnet.ro>
To: "Tapestry development" <ta...@jakarta.apache.org>
Cc: <hl...@attbi.com>
Sent: Thursday, June 05, 2003 4:51 AM
Subject: RE: problem: how to avoid inconsistencies when a user open a linkin
anew window
> On Thu, 2003-06-05 at 01:47, Howard M. Lewis Ship wrote:
> > Do you have a specific issue that prevents you from using persistent
page properties?
> >
>
> Take this case: I have a dynamic category, products hierarchy. I then
> visit a page showing the categories and select one category in a page
> (shift-click) and another in other page (shift-click). Both pages will
> show the products for the category received as parameter. Can this be a
> persistent page property. As far as I know both pages share the save
> httpSession managed by a cookie. Assume then each page will have a
> number of contained components for instance a table. This will contain a
> direct link for sort. What happens it I store the category as a
> persistent page property, load page1, load page2 and the click to sort
> page1. I guess page1 will now show the sorted items in page2.
>
> the sequence is as follows:
>
> - load page1 in a new page with a parameter C1, store C1 in session
> - load page2 in a new page with a parameter C2, store C2 in session
> - click on page1 directLink
> - render page1 using C2 from session ?!
>
> Am I in mistake?
> Len
>
> My ideea is to write a directService that takes the original param C1
> when creating the gesture and embeds it in the link parameters.
>
>
>
> > --
> > Howard M. Lewis Ship
> > Creator, Tapestry: Java Web Components
> > http://jakarta.apache.org/tapestry
> >
> >
> >
> > > -----Original Message-----
> > > From: Marilen Corciovei [mailto:len@nemesisit.rdsnet.ro]
> > > Sent: Wednesday, June 04, 2003 11:24 AM
> > > To: tapestry-dev@jakarta.apache.org
> > > Subject: problem: how to avoid inconsistencies when a user
> > > open a link in anew window
> > >
> > >
> > > I posted this problem on the user group but I now think this
> > > is more of a developer nature. Maybe here can someone help.
> > >
> > > assume I have a page which gets some parameters, it uses them
> > > to render itself. The page also contains a table component.
> > > When the user clicks a table column which is a DirectLink
> > > this one will call the page again but with the original
> > > parameters lost. I am trying to find a way not to be forced
> > > to modify the table column to send the original parameters
> > > also. I was thinking of extending DirectService. I know how
> > > to handle parameter sending with my own links but not with
> > > others from existing components and I hope not to rewrote them.
> > >
> > > Len
> > >
> > > On Wed, 2003-06-04 at 17:11, Bill Lear wrote:
> > > > On , June 4, 2003 at 16:49:14 (+0300) Marilen Corciovei writes:
> > > > >I am having problem with users opening a link in a new window. I
> > > tried
> > > > >to store specific navigation data in the visit but this result in
> > > > >inconsistencies. My ideea was to make all the links carry some data
> > > as
> > > > >parameters. Can this be done in some way without modifind every
> > > > >component?
> > >
> > > --
> > > Marilen Corciovei <le...@nemesisit.rdsnet.ro>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> --
> Marilen Corciovei <le...@nemesisit.rdsnet.ro>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
RE: problem: how to avoid inconsistencies when a user open a link
in anew window
Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
On Thu, 2003-06-05 at 01:47, Howard M. Lewis Ship wrote:
> Do you have a specific issue that prevents you from using persistent page properties?
>
Take this case: I have a dynamic category, products hierarchy. I then
visit a page showing the categories and select one category in a page
(shift-click) and another in other page (shift-click). Both pages will
show the products for the category received as parameter. Can this be a
persistent page property. As far as I know both pages share the save
httpSession managed by a cookie. Assume then each page will have a
number of contained components for instance a table. This will contain a
direct link for sort. What happens it I store the category as a
persistent page property, load page1, load page2 and the click to sort
page1. I guess page1 will now show the sorted items in page2.
the sequence is as follows:
- load page1 in a new page with a parameter C1, store C1 in session
- load page2 in a new page with a parameter C2, store C2 in session
- click on page1 directLink
- render page1 using C2 from session ?!
Am I in mistake?
Len
My ideea is to write a directService that takes the original param C1
when creating the gesture and embeds it in the link parameters.
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/tapestry
>
>
>
> > -----Original Message-----
> > From: Marilen Corciovei [mailto:len@nemesisit.rdsnet.ro]
> > Sent: Wednesday, June 04, 2003 11:24 AM
> > To: tapestry-dev@jakarta.apache.org
> > Subject: problem: how to avoid inconsistencies when a user
> > open a link in anew window
> >
> >
> > I posted this problem on the user group but I now think this
> > is more of a developer nature. Maybe here can someone help.
> >
> > assume I have a page which gets some parameters, it uses them
> > to render itself. The page also contains a table component.
> > When the user clicks a table column which is a DirectLink
> > this one will call the page again but with the original
> > parameters lost. I am trying to find a way not to be forced
> > to modify the table column to send the original parameters
> > also. I was thinking of extending DirectService. I know how
> > to handle parameter sending with my own links but not with
> > others from existing components and I hope not to rewrote them.
> >
> > Len
> >
> > On Wed, 2003-06-04 at 17:11, Bill Lear wrote:
> > > On , June 4, 2003 at 16:49:14 (+0300) Marilen Corciovei writes:
> > > >I am having problem with users opening a link in a new window. I
> > tried
> > > >to store specific navigation data in the visit but this result in
> > > >inconsistencies. My ideea was to make all the links carry some data
> > as
> > > >parameters. Can this be done in some way without modifind every
> > > >component?
> >
> > --
> > Marilen Corciovei <le...@nemesisit.rdsnet.ro>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
--
Marilen Corciovei <le...@nemesisit.rdsnet.ro>