You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by manugarciac <ma...@hotmail.com> on 2007/09/21 20:33:27 UTC
Need to tabulate something inside a select
I have a big select with several elements. I'm showing them in the select
with this method:
public String getIndentedDescription(){
String indentation = "";
for(int i=0; i<this.levels; i++){
indentation += "\t";
}
return indentation + this.description;
}
But even though the HTML source has the tabulations, I only see one space
(because HTML ignores spaces). I tried replacing the "\t" with some
" "s, but the "&" changes to its code so I end up seeing " "
inside the select, not int the source as intended...
--
View this message in context: http://www.nabble.com/Need-to-tabulate-something-inside-a-select-tf4497817.html#a12827342
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Need to tabulate something inside a select
Posted by Andreas Andreou <an...@di.uoa.gr>.
Create your own IOptionRenderer
that uses printRaw to output the values....
See
https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/DefaultOptionRenderer.java
On 9/21/07, manugarciac <ma...@hotmail.com> wrote:
>
>
> I have a big select with several elements. I'm showing them in the select
> with this method:
>
> public String getIndentedDescription(){
> String indentation = "";
> for(int i=0; i<this.levels; i++){
> indentation += "\t";
> }
> return indentation + this.description;
> }
>
>
> But even though the HTML source has the tabulations, I only see one space
> (because HTML ignores spaces). I tried replacing the "\t" with some
> " "s, but the "&" changes to its code so I end up seeing
> " " inside the select, not int the source as intended...
> --
> View this message in context:
> http://www.nabble.com/Need-to-tabulate-something-inside-a-select-tf4497817.html#a12827342
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting