You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Strittmatter, Stephan" <St...@siemens.com> on 2005/10/25 11:25:28 UTC

[PROPOSAL] PRETTY_HTML, was [RE: JFS's html output]

Hi,

some weeks ago I tried this option also without having pretty code.

Just for discussion: 
Why implement the "pretty-html" option in every renderer?
I think, it would be easier to postprocess the content in the framework
before returning the complete html-content to the browser. What do you
think?
I found e.g. http://sourceforge.net/projects/jtidy which could do this
probably.
Does anybody know an other Java library which could do this job?

The big efford would be, that you could use the RI of SUN also and the
content would also be pretty formatted then.

Regards,

Stephan

> -----Original Message-----
> From: Bruno Aranda [mailto:brunoaranda@gmail.com] 
> Sent: Monday, October 24, 2005 4:25 PM
> To: MyFaces Discussion
> Subject: Re: JFS's html output
> 
> Yes, that's the option I was talking about, but AFAIK the
> functionality is not implemented for most of the component renderers,
> leaving it almost useless... Every render should check the value of
> this property and render carriage returns to output a readable html,
> 
> Regards,
> 
> Bruno
> 
> 2005/10/24, CONNER, BRENDAN (SBCSI) <bc...@sbc.com>:
> > I know that there's an option you can put into your web.xml 
> file that's
> > supposed to take care of that, although I haven't 
> experimented with it:
> >
> >     <context-param>
> >         <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> >         <param-value>true</param-value>
> >         <description>
> >             If true, rendered HTML code will be formatted, 
> so that it is
> > "human readable".
> >             i.e. additional line separators and whitespace will be
> > written, that do not
> >             influence the HTML code.
> >             Default: "true"
> >         </description>
> >     </context-param>
> >
> > - Brendan
> >
> > -----Original Message-----
> > From: Nicola Benaglia [mailto:nicola.benaglia@idra-spa.it]
> > Sent: Monday, October 24, 2005 5:12 AM
> > To: users@myfaces.apache.org
> > Subject: JFS's html output
> >
> >
> > Hi !
> > I was wondering why my JFS's output is not friendly human readable.
> > I looked into my generated HTML page and the code is not at all
> > indented.
> > Is that a normal JSF behaviour or is there a way to get a little bit
> > more readable code ?
> >
> > Thank you,
> > Nico
> > ---
> >
> > Questa mail ed eventuali suoi allegati sono strettamente 
> confidenziali.
> > Se
> > ricevete per errore questa mail, Vi preghiamo cortesemente di
> > cancellarla
> > immediatamente e di segnalare l'errore a chi ve l'ha 
> spedita. Se Voi non
> > siete
> > il reale destinatario di questa mail non siete autorizzati 
> alla copia,
> > alla
> > distribuzione e alla stampa di essa ne tantomeno ad una eventuale
> > modifica
> > dei contenuti.
> >
> > This message and any attachments are confidential and 
> intended solely
> > for
> > the addressees. If you receive this message in error, 
> please delete it
> > and
> > immediately notify the sender. If the reader of this 
> message is not the
> > intended recipient, you are hereby notified that any 
> unauthorized use,
> > copying, publication, printing or dissemination is 
> prohibited. E-mails
> > are
> > susceptible to alteration.
> >
> 

Re: [PROPOSAL] PRETTY_HTML, was [RE: JFS's html output]

Posted by Volker Weber <us...@weber-oldenburg.de>.
I prefer to add a additional filter instead of doing this in the
ExtensionFilter.

jtidy has already a filter for this:

http://jtidy.sourceforge.net/multiproject/jtidyservlet/filter.html

regards

 Volker

Martin Marinschek wrote:
> Well, you might want to do it in IE?
> 
> something like JTidy in our ExtensionFilter might be a good option.
> 
> regards,
> 
> Martin
> 
> On 10/25/05, Werner Punz <we...@gmx.at> wrote:
> 
>>I have not checked out the code yet, but I guess
>>the easiest solution to deal with it would be a servlet
>>filter.
>>
>>Maybe a phase listener also would be possible.
>>
>>But why implement it at all, to my experience
>>the Mozilla plugin gives excellent results.
>>
>>Werner
>>
>>
>>Strittmatter, Stephan wrote:
>>
>>>Hi,
>>>
>>>some weeks ago I tried this option also without having pretty code.
>>>
>>>Just for discussion:
>>>Why implement the "pretty-html" option in every renderer?
>>>I think, it would be easier to postprocess the content in the framework
>>>before returning the complete html-content to the browser. What do you
>>>think?
>>>I found e.g. http://sourceforge.net/projects/jtidy which could do this
>>>probably.
>>>Does anybody know an other Java library which could do this job?
>>>
>>>The big efford would be, that you could use the RI of SUN also and the
>>>content would also be pretty formatted then.
>>>
>>>Regards,
>>>
>>>Stephan
>>>
>>>
>>>
>>>>-----Original Message-----
>>>>From: Bruno Aranda [mailto:brunoaranda@gmail.com]
>>>>Sent: Monday, October 24, 2005 4:25 PM
>>>>To: MyFaces Discussion
>>>>Subject: Re: JFS's html output
>>>>
>>>>Yes, that's the option I was talking about, but AFAIK the
>>>>functionality is not implemented for most of the component renderers,
>>>>leaving it almost useless... Every render should check the value of
>>>>this property and render carriage returns to output a readable html,
>>>>
>>>>Regards,
>>>>
>>>>Bruno
>>>>
>>>>2005/10/24, CONNER, BRENDAN (SBCSI) <bc...@sbc.com>:
>>>>
>>>>
>>>>>I know that there's an option you can put into your web.xml
>>>>
>>>>file that's
>>>>
>>>>
>>>>>supposed to take care of that, although I haven't
>>>>
>>>>experimented with it:
>>>>
>>>>
>>>>>   <context-param>
>>>>>       <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
>>>>>       <param-value>true</param-value>
>>>>>       <description>
>>>>>           If true, rendered HTML code will be formatted,
>>>>
>>>>so that it is
>>>>
>>>>
>>>>>"human readable".
>>>>>           i.e. additional line separators and whitespace will be
>>>>>written, that do not
>>>>>           influence the HTML code.
>>>>>           Default: "true"
>>>>>       </description>
>>>>>   </context-param>
>>>>>
>>>>>- Brendan
>>>>>
>>>>>-----Original Message-----
>>>>>From: Nicola Benaglia [mailto:nicola.benaglia@idra-spa.it]
>>>>>Sent: Monday, October 24, 2005 5:12 AM
>>>>>To: users@myfaces.apache.org
>>>>>Subject: JFS's html output
>>>>>
>>>>>
>>>>>Hi !
>>>>>I was wondering why my JFS's output is not friendly human readable.
>>>>>I looked into my generated HTML page and the code is not at all
>>>>>indented.
>>>>>Is that a normal JSF behaviour or is there a way to get a little bit
>>>>>more readable code ?
>>>>>
>>>>>Thank you,
>>>>>Nico
>>>>>---
>>>>>
>>>>>Questa mail ed eventuali suoi allegati sono strettamente
>>>>
>>>>confidenziali.
>>>>
>>>>
>>>>>Se
>>>>>ricevete per errore questa mail, Vi preghiamo cortesemente di
>>>>>cancellarla
>>>>>immediatamente e di segnalare l'errore a chi ve l'ha
>>>>
>>>>spedita. Se Voi non
>>>>
>>>>
>>>>>siete
>>>>>il reale destinatario di questa mail non siete autorizzati
>>>>
>>>>alla copia,
>>>>
>>>>
>>>>>alla
>>>>>distribuzione e alla stampa di essa ne tantomeno ad una eventuale
>>>>>modifica
>>>>>dei contenuti.
>>>>>
>>>>>This message and any attachments are confidential and
>>>>
>>>>intended solely
>>>>
>>>>
>>>>>for
>>>>>the addressees. If you receive this message in error,
>>>>
>>>>please delete it
>>>>
>>>>
>>>>>and
>>>>>immediately notify the sender. If the reader of this
>>>>
>>>>message is not the
>>>>
>>>>
>>>>>intended recipient, you are hereby notified that any
>>>>
>>>>unauthorized use,
>>>>
>>>>
>>>>>copying, publication, printing or dissemination is
>>>>
>>>>prohibited. E-mails
>>>>
>>>>
>>>>>are
>>>>>susceptible to alteration.
>>>>>
>>>>
>>
> 
> 
> --
> 
> http://www.irian.at
> Your JSF powerhouse -
> JSF Trainings in English and German
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

Re: [PROPOSAL] PRETTY_HTML, was [RE: JFS's html output]

Posted by Martin Marinschek <ma...@gmail.com>.
Well, you might want to do it in IE?

something like JTidy in our ExtensionFilter might be a good option.

regards,

Martin

On 10/25/05, Werner Punz <we...@gmx.at> wrote:
> I have not checked out the code yet, but I guess
> the easiest solution to deal with it would be a servlet
> filter.
>
> Maybe a phase listener also would be possible.
>
> But why implement it at all, to my experience
> the Mozilla plugin gives excellent results.
>
> Werner
>
>
> Strittmatter, Stephan wrote:
> > Hi,
> >
> > some weeks ago I tried this option also without having pretty code.
> >
> > Just for discussion:
> > Why implement the "pretty-html" option in every renderer?
> > I think, it would be easier to postprocess the content in the framework
> > before returning the complete html-content to the browser. What do you
> > think?
> > I found e.g. http://sourceforge.net/projects/jtidy which could do this
> > probably.
> > Does anybody know an other Java library which could do this job?
> >
> > The big efford would be, that you could use the RI of SUN also and the
> > content would also be pretty formatted then.
> >
> > Regards,
> >
> > Stephan
> >
> >
> >>-----Original Message-----
> >>From: Bruno Aranda [mailto:brunoaranda@gmail.com]
> >>Sent: Monday, October 24, 2005 4:25 PM
> >>To: MyFaces Discussion
> >>Subject: Re: JFS's html output
> >>
> >>Yes, that's the option I was talking about, but AFAIK the
> >>functionality is not implemented for most of the component renderers,
> >>leaving it almost useless... Every render should check the value of
> >>this property and render carriage returns to output a readable html,
> >>
> >>Regards,
> >>
> >>Bruno
> >>
> >>2005/10/24, CONNER, BRENDAN (SBCSI) <bc...@sbc.com>:
> >>
> >>>I know that there's an option you can put into your web.xml
> >>
> >>file that's
> >>
> >>>supposed to take care of that, although I haven't
> >>
> >>experimented with it:
> >>
> >>>    <context-param>
> >>>        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
> >>>        <param-value>true</param-value>
> >>>        <description>
> >>>            If true, rendered HTML code will be formatted,
> >>
> >>so that it is
> >>
> >>>"human readable".
> >>>            i.e. additional line separators and whitespace will be
> >>>written, that do not
> >>>            influence the HTML code.
> >>>            Default: "true"
> >>>        </description>
> >>>    </context-param>
> >>>
> >>>- Brendan
> >>>
> >>>-----Original Message-----
> >>>From: Nicola Benaglia [mailto:nicola.benaglia@idra-spa.it]
> >>>Sent: Monday, October 24, 2005 5:12 AM
> >>>To: users@myfaces.apache.org
> >>>Subject: JFS's html output
> >>>
> >>>
> >>>Hi !
> >>>I was wondering why my JFS's output is not friendly human readable.
> >>>I looked into my generated HTML page and the code is not at all
> >>>indented.
> >>>Is that a normal JSF behaviour or is there a way to get a little bit
> >>>more readable code ?
> >>>
> >>>Thank you,
> >>>Nico
> >>>---
> >>>
> >>>Questa mail ed eventuali suoi allegati sono strettamente
> >>
> >>confidenziali.
> >>
> >>>Se
> >>>ricevete per errore questa mail, Vi preghiamo cortesemente di
> >>>cancellarla
> >>>immediatamente e di segnalare l'errore a chi ve l'ha
> >>
> >>spedita. Se Voi non
> >>
> >>>siete
> >>>il reale destinatario di questa mail non siete autorizzati
> >>
> >>alla copia,
> >>
> >>>alla
> >>>distribuzione e alla stampa di essa ne tantomeno ad una eventuale
> >>>modifica
> >>>dei contenuti.
> >>>
> >>>This message and any attachments are confidential and
> >>
> >>intended solely
> >>
> >>>for
> >>>the addressees. If you receive this message in error,
> >>
> >>please delete it
> >>
> >>>and
> >>>immediately notify the sender. If the reader of this
> >>
> >>message is not the
> >>
> >>>intended recipient, you are hereby notified that any
> >>
> >>unauthorized use,
> >>
> >>>copying, publication, printing or dissemination is
> >>
> >>prohibited. E-mails
> >>
> >>>are
> >>>susceptible to alteration.
> >>>
> >>
> >
>
>


--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

Re: [PROPOSAL] PRETTY_HTML, was [RE: JFS's html output]

Posted by Werner Punz <we...@gmx.at>.
I have not checked out the code yet, but I guess
the easiest solution to deal with it would be a servlet
filter.

Maybe a phase listener also would be possible.

But why implement it at all, to my experience
the Mozilla plugin gives excellent results.

Werner


Strittmatter, Stephan wrote:
> Hi,
> 
> some weeks ago I tried this option also without having pretty code.
> 
> Just for discussion: 
> Why implement the "pretty-html" option in every renderer?
> I think, it would be easier to postprocess the content in the framework
> before returning the complete html-content to the browser. What do you
> think?
> I found e.g. http://sourceforge.net/projects/jtidy which could do this
> probably.
> Does anybody know an other Java library which could do this job?
> 
> The big efford would be, that you could use the RI of SUN also and the
> content would also be pretty formatted then.
> 
> Regards,
> 
> Stephan
> 
> 
>>-----Original Message-----
>>From: Bruno Aranda [mailto:brunoaranda@gmail.com] 
>>Sent: Monday, October 24, 2005 4:25 PM
>>To: MyFaces Discussion
>>Subject: Re: JFS's html output
>>
>>Yes, that's the option I was talking about, but AFAIK the
>>functionality is not implemented for most of the component renderers,
>>leaving it almost useless... Every render should check the value of
>>this property and render carriage returns to output a readable html,
>>
>>Regards,
>>
>>Bruno
>>
>>2005/10/24, CONNER, BRENDAN (SBCSI) <bc...@sbc.com>:
>>
>>>I know that there's an option you can put into your web.xml 
>>
>>file that's
>>
>>>supposed to take care of that, although I haven't 
>>
>>experimented with it:
>>
>>>    <context-param>
>>>        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
>>>        <param-value>true</param-value>
>>>        <description>
>>>            If true, rendered HTML code will be formatted, 
>>
>>so that it is
>>
>>>"human readable".
>>>            i.e. additional line separators and whitespace will be
>>>written, that do not
>>>            influence the HTML code.
>>>            Default: "true"
>>>        </description>
>>>    </context-param>
>>>
>>>- Brendan
>>>
>>>-----Original Message-----
>>>From: Nicola Benaglia [mailto:nicola.benaglia@idra-spa.it]
>>>Sent: Monday, October 24, 2005 5:12 AM
>>>To: users@myfaces.apache.org
>>>Subject: JFS's html output
>>>
>>>
>>>Hi !
>>>I was wondering why my JFS's output is not friendly human readable.
>>>I looked into my generated HTML page and the code is not at all
>>>indented.
>>>Is that a normal JSF behaviour or is there a way to get a little bit
>>>more readable code ?
>>>
>>>Thank you,
>>>Nico
>>>---
>>>
>>>Questa mail ed eventuali suoi allegati sono strettamente 
>>
>>confidenziali.
>>
>>>Se
>>>ricevete per errore questa mail, Vi preghiamo cortesemente di
>>>cancellarla
>>>immediatamente e di segnalare l'errore a chi ve l'ha 
>>
>>spedita. Se Voi non
>>
>>>siete
>>>il reale destinatario di questa mail non siete autorizzati 
>>
>>alla copia,
>>
>>>alla
>>>distribuzione e alla stampa di essa ne tantomeno ad una eventuale
>>>modifica
>>>dei contenuti.
>>>
>>>This message and any attachments are confidential and 
>>
>>intended solely
>>
>>>for
>>>the addressees. If you receive this message in error, 
>>
>>please delete it
>>
>>>and
>>>immediately notify the sender. If the reader of this 
>>
>>message is not the
>>
>>>intended recipient, you are hereby notified that any 
>>
>>unauthorized use,
>>
>>>copying, publication, printing or dissemination is 
>>
>>prohibited. E-mails
>>
>>>are
>>>susceptible to alteration.
>>>
>>
>