Hi Joakim,

I haven't used your component so I am probably not the best person to comment 
in this respect, since I wouldn't know enough about the implementation; I can 
only comment on my own solutions... I have written two types of breadcrumb 
components in the past for Tapestry 4 and 5, and what worked best for me was to 
decide first what school of thought I wanted to follow, then the rest was easy:

1. Location-based breadcrumbs: Which show the user where they are in the 
website’s hierarchy, for this I use a sitemap (mine is xml based since I 
started with T4), but another option I haven't explored yet, but might be worth 
been considering is using an annotated page class combined with an enum to 
resolve the parent in the hierarchy. Once you have the parent you need very 
little more to create this type of trail.

2. Attribute-based breadcrumbs: I have not implemented this type of breadcrumb, 
but its the easiest to implement given you would know the current page, and 
then derive all the attributes for the page from it.

3. Path-based breadcrumbs: To implement this I used a stack, which works almost 
like a browser history (back button); the next link clicked then binds itself 
to the previous on the stack. With a bit of clever logic and storing a 
reference to the parent you can easily detect duplicates when traversing the 
stack and truncate the stack accordingly when the same link is clicked twice. 
Again not very complicated.

So to answer your question:
> Do you know of something more reliable? One option would of course be
> to look at the last item in the crumb-list but since it's possible to
> have pages that are not added to the crumb-list it's a bit unreliable
> as well.
The classic example is an error page or a generic message page, you sometimes 
don't quite know where to put it... for path based breadcrumbs this is a no 
brainier, for location based breadcrumbs this is exactly why you always need a 
reference to a 'parent' even if its the root, which gives you the flexibility 
to decide case by case.

> I could of course keep a separate list of pages regardless of if it
> has the BreadCrumb-annotation or not.
Which is what I am doing using an XML site map, some would say yuck! but if its 
hierarchical data its a perfect fit, of course you could try the annotation 
with enum approach, I use something similar  to design site hierarchy's when 
using portlets. 

Kind regards,
Peter

----- Original Message -----
From: "Joakim Olsson" <joa...@unbound.se>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Monday, 31 October, 2011 09:33:50 GMT +02:00 Athens, Bucharest, Istanbul
Subject: Re: Input string 'login;jsessionid=082793EE9A197CEB7F7750090DD0423D' 
is not valid; the character ';' at position 6 is not valid.

Hi,

The referer-header is not something that I rely on, it's only used as
a value-add. It's used together with the BreadCrumbReset-annotation
where it's possible to say that the crumb-trail should not be reset
when the user comes from one of the specified pages. The worst thing
that would happen is that the crumb-trail is reset when it shouldn't
have been. Annoying enough probably though.

Do you know of something more reliable? One option would of course be
to look at the last item in the crumb-list but since it's possible to
have pages that are not added to the crumb-list it's a bit unreliable
as well.

I could of course keep a separate list of pages regardless of if it
has the BreadCrumb-annotation or not.

Regards,
Joakim


On Mon, Oct 31, 2011 at 8:27 AM,  <p.stavrini...@albourne.com> wrote:
> Hi Joakim,
>
> Regardless of the issue with the ';' , I would rethink using the referer 
> header since its a pretty unreliable header, in-fact IE does not always pass 
> it along deliberately, I have noticed this in my own code, and this is backed 
> up by various supporting tickets like: http://support.microsoft.com/kb/178066
>
> Kind regards,
> Peter
>
> ----- Original Message -----
> From: "Joakim Olsson" <joa...@unbound.se>
> To: "Tapestry users" <users@tapestry.apache.org>
> Sent: Saturday, 29 October, 2011 14:34:33 GMT +02:00 Athens, Bucharest, 
> Istanbul
> Subject: Re: Input string 'login;jsessionid=082793EE9A197CEB7F7750090DD0423D' 
> is not valid; the character ';' at position 6 is not valid.
>
> The problem I have seen is when Tapestry is trying to extract the
> EventContext from the path. It's using URLEncoderImpl.decode which
> chokes on the ; since it probably should have been encoded before
> being put on the URL.
>
> I think the servlet-container usually handles this but in the case
> with tapestry-breadcrumbs the Referer-header is used to get the
> referring page and it might contain the jsessionid. Not Tapestrys
> fault in this case
>
> I don't know regarding Tapestry 5.1.x though. Haven't used it in a
> long time now.
>
> Regards,
> Joakim
>
>
> On Fri, Oct 28, 2011 at 3:08 AM, Szemere Szemere
> <szemereszem...@gmail.com> wrote:
>> I see the too in development. Version 5.1.2?
>>
>> Szemere
>>
>> On 27 Oct 2011, at 16:43, Muhammad Gelbana <m.gelb...@gmail.com> wrote:
>>
>>> Please specify the exact scenario to reproduce this issue and state the
>>> version you are using
>>>
>>> On Thu, Oct 27, 2011 at 12:17 PM, Leon Derks 
>>> <leon.de...@aurumeurope.com>wrote:
>>>
>>>>
>>>> Hello
>>>>
>>>> I see this error message a lot. Almost always after my first login
>>>> attempt...
>>>>
>>>> What is causing this error?
>>>>
>>>> Input string 'login;jsessionid=082793EE9A197CEB7F7750090DD0423D' is not
>>>> valid; the character ';' at position 6 is not valid.
>>>>
>>>> regards,
>>>> Leon
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>> --
>>> *Regards,*
>>> *Muhammad Gelbana
>>> Java Developer*
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to