You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Darío Vasconcelos <da...@gmail.com> on 2005/09/06 23:05:49 UTC

TabSet from Tassel encoding problem

Hi,

I downloaded TabSet from Tassel and liked it so much that I'm going to
replace my current navigation system with it. The only thing is, so
far, it chokes whenever a Tab name has international characters
(accents, for example). I'm guessing I might need to extend the
component to solve this problem, but thought I might as well ask here
first. Anyone tried this?

Regards,

Dario

-- 
I have enough money to last me the rest of my life, unless I buy something.
    Jackie Mason

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: TabSet from Tassel encoding problem

Posted by Darío Vasconcelos <da...@gmail.com>.
:-) No, unfortunately avoiding accents is not possible.

You know? Accents in javascript / CSS are always a problem, in fact I
would have been surprised if they worked.

You're right, in the source the tab names are escaped.

In the end, I extended your component to accept an optional String
parameter called tabNames, a comma-separated String with the labels of
the tabs. This way, I can avoid accents in the tab names and use more
complicated strings for the labels. On the way there, I learned how to
create and pack a library, so the whole experience was pretty
positive.

Thanks for your help,

Dario

On 9/7/05, Patrick Casey <pa...@adelphia.net> wrote:
> 
>         Hmmmm, I did a little poking around and what we've got is:
> 
>         We're writing out the tab titles from java via Howard's HTMLWriter
> which escapes it, and then it gets unescaped so it looks right on screen
> again. I suspect if you do a view source on the page you'll find that your
> tab names (in the UL) are, in fact escaped in the source although I might be
> wrong here and if so my theory of the crime may be suspect.
> 
>         As for the anchor tags, they're created by the tab control's
> javascript code, which basically takes the div if and mangles it to make an
> anchor out of it.
> 
>         Which brings us to what I think the source of the problem is.
> Somewhere between the .html page and the output, the div name is being
> escaped either by the XML parser on the way in, or somewhere in the
> outputstream.
> 
>         Unfortunately, I don't know how tapestry handles escaping of
> international characters well enough to take it from here.
> 
>         I don't suppose just avoiding accents would be an option? :(
>         --- Pat
> 
> > -----Original Message-----
> > From: Darío Vasconcelos [mailto:dario.vasconcelos@gmail.com]
> > Sent: Tuesday, September 06, 2005 2:26 PM
> > To: Tapestry users
> > Subject: Re: TabSet from Tassel encoding problem
> >
> > Thanks for your quick response.
> >
> > I guess "choking" wasn't the best word for it. The thing is, if the
> > tab name has an accent, it displays OK, but clicking on it has no
> > effect, since the sent parameter has now escaped HTTP characters. For
> > example, the string "Envío" displayes all right in the tab, but it is
> > being converted into "Env%C3%ADo", both in the URL and the id of the
> > corresponding <div>.
> >
> > My guess is that special characters don't work in HTML, javascript or
> > CSS, so a translation -into a "safe" character- would be needed...
> > that, or adding a new optional parameter to the component, something
> > like "tabNames"...
> >
> > Thanks
> >
> > On 9/6/05, Patrick Casey <pa...@adelphia.net> wrote:
> > >
> > >         Dario,
> > >
> > >         Thanks for the props on the tabset; I'm rather fond of it myself
> > > which is why Robert and I went through the trouble to package it up and
> > drop
> > > it on Tassel.
> > >
> > >         As for fixing your problem:
> > >
> > >         I might, or I might not, be able to help, depending on where the
> > > problem lies. If its something in Robert or my java code that's not
> > properly
> > > i18n safe, we can probably clean that up quickly. If its something in
> > the
> > > javascript & css though (which are open source that we didn't write), we
> > > won't necessarily have a leg up on you on shooting the problem.
> > >
> > >         With that being said though, what kind of "choking" are you
> > seeing
> > > :)? Are we talking garbled output, core dumps, nonsense characters?
> > >
> > >         Pop a little more information over and I'll see what I can do to
> > > help.
> > >
> > >         --- Pat
> > >
> > > > -----Original Message-----
> > > > From: Darío Vasconcelos [mailto:dario.vasconcelos@gmail.com]
> > > > Sent: Tuesday, September 06, 2005 2:06 PM
> > > > To: Tapestry users
> > > > Subject: TabSet from Tassel encoding problem
> > > >
> > > > Hi,
> > > >
> > > > I downloaded TabSet from Tassel and liked it so much that I'm going to
> > > > replace my current navigation system with it. The only thing is, so
> > > > far, it chokes whenever a Tab name has international characters
> > > > (accents, for example). I'm guessing I might need to extend the
> > > > component to solve this problem, but thought I might as well ask here
> > > > first. Anyone tried this?
> > > >
> > > > Regards,
> > > >
> > > > Dario
> > > >
> > > > --
> > > > I have enough money to last me the rest of my life, unless I buy
> > > > something.
> > > >     Jackie Mason
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > --
> > I have enough money to last me the rest of my life, unless I buy
> > something.
> >     Jackie Mason
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
I have enough money to last me the rest of my life, unless I buy something.
    Jackie Mason

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: TabSet from Tassel encoding problem

Posted by Patrick Casey <pa...@adelphia.net>.
	Hmmmm, I did a little poking around and what we've got is:

	We're writing out the tab titles from java via Howard's HTMLWriter
which escapes it, and then it gets unescaped so it looks right on screen
again. I suspect if you do a view source on the page you'll find that your
tab names (in the UL) are, in fact escaped in the source although I might be
wrong here and if so my theory of the crime may be suspect.

	As for the anchor tags, they're created by the tab control's
javascript code, which basically takes the div if and mangles it to make an
anchor out of it.

	Which brings us to what I think the source of the problem is.
Somewhere between the .html page and the output, the div name is being
escaped either by the XML parser on the way in, or somewhere in the
outputstream.

	Unfortunately, I don't know how tapestry handles escaping of
international characters well enough to take it from here.

	I don't suppose just avoiding accents would be an option? :(
	--- Pat

> -----Original Message-----
> From: Darío Vasconcelos [mailto:dario.vasconcelos@gmail.com]
> Sent: Tuesday, September 06, 2005 2:26 PM
> To: Tapestry users
> Subject: Re: TabSet from Tassel encoding problem
> 
> Thanks for your quick response.
> 
> I guess "choking" wasn't the best word for it. The thing is, if the
> tab name has an accent, it displays OK, but clicking on it has no
> effect, since the sent parameter has now escaped HTTP characters. For
> example, the string "Envío" displayes all right in the tab, but it is
> being converted into "Env%C3%ADo", both in the URL and the id of the
> corresponding <div>.
> 
> My guess is that special characters don't work in HTML, javascript or
> CSS, so a translation -into a "safe" character- would be needed...
> that, or adding a new optional parameter to the component, something
> like "tabNames"...
> 
> Thanks
> 
> On 9/6/05, Patrick Casey <pa...@adelphia.net> wrote:
> >
> >         Dario,
> >
> >         Thanks for the props on the tabset; I'm rather fond of it myself
> > which is why Robert and I went through the trouble to package it up and
> drop
> > it on Tassel.
> >
> >         As for fixing your problem:
> >
> >         I might, or I might not, be able to help, depending on where the
> > problem lies. If its something in Robert or my java code that's not
> properly
> > i18n safe, we can probably clean that up quickly. If its something in
> the
> > javascript & css though (which are open source that we didn't write), we
> > won't necessarily have a leg up on you on shooting the problem.
> >
> >         With that being said though, what kind of "choking" are you
> seeing
> > :)? Are we talking garbled output, core dumps, nonsense characters?
> >
> >         Pop a little more information over and I'll see what I can do to
> > help.
> >
> >         --- Pat
> >
> > > -----Original Message-----
> > > From: Darío Vasconcelos [mailto:dario.vasconcelos@gmail.com]
> > > Sent: Tuesday, September 06, 2005 2:06 PM
> > > To: Tapestry users
> > > Subject: TabSet from Tassel encoding problem
> > >
> > > Hi,
> > >
> > > I downloaded TabSet from Tassel and liked it so much that I'm going to
> > > replace my current navigation system with it. The only thing is, so
> > > far, it chokes whenever a Tab name has international characters
> > > (accents, for example). I'm guessing I might need to extend the
> > > component to solve this problem, but thought I might as well ask here
> > > first. Anyone tried this?
> > >
> > > Regards,
> > >
> > > Dario
> > >
> > > --
> > > I have enough money to last me the rest of my life, unless I buy
> > > something.
> > >     Jackie Mason
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> 
> 
> --
> I have enough money to last me the rest of my life, unless I buy
> something.
>     Jackie Mason
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: TabSet from Tassel encoding problem

Posted by Darío Vasconcelos <da...@gmail.com>.
Thanks for your quick response.

I guess "choking" wasn't the best word for it. The thing is, if the
tab name has an accent, it displays OK, but clicking on it has no
effect, since the sent parameter has now escaped HTTP characters. For
example, the string "Envío" displayes all right in the tab, but it is
being converted into "Env%C3%ADo", both in the URL and the id of the
corresponding <div>.

My guess is that special characters don't work in HTML, javascript or
CSS, so a translation -into a "safe" character- would be needed...
that, or adding a new optional parameter to the component, something
like "tabNames"...

Thanks 

On 9/6/05, Patrick Casey <pa...@adelphia.net> wrote:
> 
>         Dario,
> 
>         Thanks for the props on the tabset; I'm rather fond of it myself
> which is why Robert and I went through the trouble to package it up and drop
> it on Tassel.
> 
>         As for fixing your problem:
> 
>         I might, or I might not, be able to help, depending on where the
> problem lies. If its something in Robert or my java code that's not properly
> i18n safe, we can probably clean that up quickly. If its something in the
> javascript & css though (which are open source that we didn't write), we
> won't necessarily have a leg up on you on shooting the problem.
> 
>         With that being said though, what kind of "choking" are you seeing
> :)? Are we talking garbled output, core dumps, nonsense characters?
> 
>         Pop a little more information over and I'll see what I can do to
> help.
> 
>         --- Pat
> 
> > -----Original Message-----
> > From: Darío Vasconcelos [mailto:dario.vasconcelos@gmail.com]
> > Sent: Tuesday, September 06, 2005 2:06 PM
> > To: Tapestry users
> > Subject: TabSet from Tassel encoding problem
> >
> > Hi,
> >
> > I downloaded TabSet from Tassel and liked it so much that I'm going to
> > replace my current navigation system with it. The only thing is, so
> > far, it chokes whenever a Tab name has international characters
> > (accents, for example). I'm guessing I might need to extend the
> > component to solve this problem, but thought I might as well ask here
> > first. Anyone tried this?
> >
> > Regards,
> >
> > Dario
> >
> > --
> > I have enough money to last me the rest of my life, unless I buy
> > something.
> >     Jackie Mason
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
I have enough money to last me the rest of my life, unless I buy something.
    Jackie Mason

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: TabSet from Tassel encoding problem

Posted by Patrick Casey <pa...@adelphia.net>.
	Dario,

	Thanks for the props on the tabset; I'm rather fond of it myself
which is why Robert and I went through the trouble to package it up and drop
it on Tassel. 

	As for fixing your problem:

	I might, or I might not, be able to help, depending on where the
problem lies. If its something in Robert or my java code that's not properly
i18n safe, we can probably clean that up quickly. If its something in the
javascript & css though (which are open source that we didn't write), we
won't necessarily have a leg up on you on shooting the problem.

	With that being said though, what kind of "choking" are you seeing
:)? Are we talking garbled output, core dumps, nonsense characters?

	Pop a little more information over and I'll see what I can do to
help.

	--- Pat

> -----Original Message-----
> From: Darío Vasconcelos [mailto:dario.vasconcelos@gmail.com]
> Sent: Tuesday, September 06, 2005 2:06 PM
> To: Tapestry users
> Subject: TabSet from Tassel encoding problem
> 
> Hi,
> 
> I downloaded TabSet from Tassel and liked it so much that I'm going to
> replace my current navigation system with it. The only thing is, so
> far, it chokes whenever a Tab name has international characters
> (accents, for example). I'm guessing I might need to extend the
> component to solve this problem, but thought I might as well ask here
> first. Anyone tried this?
> 
> Regards,
> 
> Dario
> 
> --
> I have enough money to last me the rest of my life, unless I buy
> something.
>     Jackie Mason
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org