You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Will Scheidegger <wi...@mac.com> on 2005/07/13 12:00:03 UTC
Best practice: Regular view and printer friendly view
I've got a "RegularView" component that is being wrapped around a
BasePage subclass with the RenderBody component. This RegularView
component makes up the page frame, is responsible for the navigation
and so on.
Now I would like to display the same content with a different component
wrapped around it - a printer friendly view without the navigation and
other stuff. Is there any way to choose at request time what component
to wrap around a BasePage subclass?
Cheers,
Will
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best practice: Regular view and printer friendly view
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 13, 2005, at 11:48 AM, Konstantin Ignatyev wrote:
> Please stop that CSS push!
> CSS kind of working
Please stop the negativity surrounding CSS :)
While the support of CSS in various browsers is all over the map, it
is well worth web developers to embrace what it offers. There is
much elegance to be found with using CSS properly, especially in the
world of AJAX and "behaviors".
Skinning in Tapestry will be a nice addition, no question, but I
certainly would not recommend its use for stylistic changes that can
be accomplished using CSS. Whether printing falls into the category
of skin or CSS would depend on the nature of what needs to be
different from the browser view to the printer view, but I would
certainly recommend CSS as the first attempt.
Erik
> , but what many people need
> (including me) is the Skins support in Tapestry.
>
> If I recall correctly there were plans to add skinning
> support in Tapestry in the similar to the localization
> fashion.
>
> For example border_prn.html would be for Printing.
> Such kind of skinning is extremely useful for per
> something customization more robust and flexible than
> CSS.
>
> What has happened to those plans?
>
> --- Davor Hrg <hr...@gmail.com> wrote:
>
>
>> actually, there is a simple way of doing it with css
>>
>> check this out:
>>
>>
> http://www.4guysfromrolla.com/demos/printMediaCss.html
>
>>
>> which is actualy a link I chose randomly from this
>> google search:
>>
>>
> http://www.google.com/search?hl=en&q=css+print+@media
>
>>
>>
>> On 7/13/05, Ron Piterman <mp...@vollbio.de> wrote:
>>
>>>
>>> You can change your border component:
>>>
>>> <span jwcid="@Conditional"
>>>
>> condition="ognl:printer">
>>
>>> printer layout...
>>> <span jwcid="@RenderBody"/>
>>> </span>
>>>
>
>
>
> Konstantin Ignatyev
>
>
>
>
> PS: If this is a typical day on planet earth, humans will add
> fifteen million tons of carbon to the atmosphere, destroy 115
> square miles of tropical rainforest, create seventy-two miles of
> desert, eliminate between forty to one hundred species, erode
> seventy-one million tons of topsoil, add 2,700 tons of CFCs to the
> stratosphere, and increase their population by 263,000
>
> Bowers, C.A. The Culture of Denial: Why the Environmental
> Movement Needs a Strategy for Reforming Universities and Public
> Schools. New York: State University of New York Press, 1997: (4)
> (5) (p.206)
>
> ---------------------------------------------------------------------
> 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: Best practice: Regular view and printer friendly view
Posted by Ron Piterman <mp...@vollbio.de>.
You can do something similar with the delegate component.
ציטוט Will Scheidegger:
> Skins itself would not do all I would like to have. I'm really missing a
> component that dynamically instantiates a subcomponent according to a
> binding it gets. In addition that component should be "transparent".
> I've started to look at BaseComponent to see if I could write one
> myself, but I do not completely understand the Tapestry way of page
> rendering yet...
>
> -Will
>
> On 13.07.2005, at 17:48, Konstantin Ignatyev wrote:
>
>> Please stop that CSS push!
>> CSS kind of working, but what many people need
>> (including me) is the Skins support in Tapestry.
>>
>> If I recall correctly there were plans to add skinning
>> support in Tapestry in the similar to the localization
>> fashion.
>>
>> For example border_prn.html would be for Printing.
>> Such kind of skinning is extremely useful for per
>> something customization more robust and flexible than
>> CSS.
>>
>> What has happened to those plans?
>>
>> --- Davor Hrg <hr...@gmail.com> wrote:
>>
>>> actually, there is a simple way of doing it with css
>>>
>>> check this out:
>>>
>> http://www.4guysfromrolla.com/demos/printMediaCss.html
>>
>>>
>>> which is actualy a link I chose randomly from this
>>> google search:
>>>
>> http://www.google.com/search?hl=en&q=css+print+@media
>>
>>>
>>>
>>> On 7/13/05, Ron Piterman <mp...@vollbio.de> wrote:
>>>
>>>>
>>>> You can change your border component:
>>>>
>>>> <span jwcid="@Conditional"
>>>
>>> condition="ognl:printer">
>>>
>>>> printer layout...
>>>> <span jwcid="@RenderBody"/>
>>>> </span>
>>
>>
>>
>>
>> Konstantin Ignatyev
>>
>>
>>
>>
>> PS: If this is a typical day on planet earth, humans will add fifteen
>> million tons of carbon to the atmosphere, destroy 115 square miles of
>> tropical rainforest, create seventy-two miles of desert, eliminate
>> between forty to one hundred species, erode seventy-one million tons
>> of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase
>> their population by 263,000
>>
>> Bowers, C.A. The Culture of Denial: Why the Environmental Movement
>> Needs a Strategy for Reforming Universities and Public Schools. New
>> York: State University of New York Press, 1997: (4) (5) (p.206)
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best practice: Regular view and printer friendly view
Posted by Will Scheidegger <wi...@mac.com>.
Skins itself would not do all I would like to have. I'm really missing
a component that dynamically instantiates a subcomponent according to a
binding it gets. In addition that component should be "transparent".
I've started to look at BaseComponent to see if I could write one
myself, but I do not completely understand the Tapestry way of page
rendering yet...
-Will
On 13.07.2005, at 17:48, Konstantin Ignatyev wrote:
> Please stop that CSS push!
> CSS kind of working, but what many people need
> (including me) is the Skins support in Tapestry.
>
> If I recall correctly there were plans to add skinning
> support in Tapestry in the similar to the localization
> fashion.
>
> For example border_prn.html would be for Printing.
> Such kind of skinning is extremely useful for per
> something customization more robust and flexible than
> CSS.
>
> What has happened to those plans?
>
> --- Davor Hrg <hr...@gmail.com> wrote:
>
>> actually, there is a simple way of doing it with css
>>
>> check this out:
>>
> http://www.4guysfromrolla.com/demos/printMediaCss.html
>>
>> which is actualy a link I chose randomly from this
>> google search:
>>
> http://www.google.com/search?hl=en&q=css+print+@media
>>
>>
>> On 7/13/05, Ron Piterman <mp...@vollbio.de> wrote:
>>>
>>> You can change your border component:
>>>
>>> <span jwcid="@Conditional"
>> condition="ognl:printer">
>>> printer layout...
>>> <span jwcid="@RenderBody"/>
>>> </span>
>
>
>
> Konstantin Ignatyev
>
>
>
>
> PS: If this is a typical day on planet earth, humans will add fifteen
> million tons of carbon to the atmosphere, destroy 115 square miles of
> tropical rainforest, create seventy-two miles of desert, eliminate
> between forty to one hundred species, erode seventy-one million tons
> of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase
> their population by 263,000
>
> Bowers, C.A. The Culture of Denial: Why the Environmental Movement
> Needs a Strategy for Reforming Universities and Public Schools. New
> York: State University of New York Press, 1997: (4) (5) (p.206)
>
> ---------------------------------------------------------------------
> 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: Best practice: Regular view and printer friendly view
Posted by Konstantin Ignatyev <kg...@yahoo.com>.
Please stop that CSS push!
CSS kind of working, but what many people need
(including me) is the Skins support in Tapestry.
If I recall correctly there were plans to add skinning
support in Tapestry in the similar to the localization
fashion.
For example border_prn.html would be for Printing.
Such kind of skinning is extremely useful for per
something customization more robust and flexible than
CSS.
What has happened to those plans?
--- Davor Hrg <hr...@gmail.com> wrote:
> actually, there is a simple way of doing it with css
>
> check this out:
>
http://www.4guysfromrolla.com/demos/printMediaCss.html
>
> which is actualy a link I chose randomly from this
> google search:
>
http://www.google.com/search?hl=en&q=css+print+@media
>
>
> On 7/13/05, Ron Piterman <mp...@vollbio.de> wrote:
> >
> > You can change your border component:
> >
> > <span jwcid="@Conditional"
> condition="ognl:printer">
> > printer layout...
> > <span jwcid="@RenderBody"/>
> > </span>
Konstantin Ignatyev
PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000
Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best practice: Regular view and printer friendly view
Posted by Davor Hrg <hr...@gmail.com>.
actually, there is a simple way of doing it with css
check this out:
http://www.4guysfromrolla.com/demos/printMediaCss.html
which is actualy a link I chose randomly from this google search:
http://www.google.com/search?hl=en&q=css+print+@media
On 7/13/05, Ron Piterman <mp...@vollbio.de> wrote:
>
> You can change your border component:
>
> <span jwcid="@Conditional" condition="ognl:printer">
> printer layout...
> <span jwcid="@RenderBody"/>
> </span>
>
> <span jwcid="@Conditional" condition="ognl:printer" inverse="ognl:true>
> Normal layout...
> <span jwcid="@RenderBody"/>
> </span>
>
> now the printer method can access a state object, a page property or
> whatever.
>
>
>
> Will Scheidegger:
> > I've got a "RegularView" component that is being wrapped around a
> > BasePage subclass with the RenderBody component. This RegularView
> > component makes up the page frame, is responsible for the navigation and
> > so on.
> >
> > Now I would like to display the same content with a different component
> > wrapped around it - a printer friendly view without the navigation and
> > other stuff. Is there any way to choose at request time what component
> > to wrap around a BasePage subclass?
> >
> > Cheers,
> > Will
> >
> >
> > ---------------------------------------------------------------------
> > 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: Best practice: Regular view and printer friendly view
Posted by Ron Piterman <mp...@vollbio.de>.
You can change your border component:
<span jwcid="@Conditional" condition="ognl:printer">
printer layout...
<span jwcid="@RenderBody"/>
</span>
<span jwcid="@Conditional" condition="ognl:printer" inverse="ognl:true>
Normal layout...
<span jwcid="@RenderBody"/>
</span>
now the printer method can access a state object, a page property or
whatever.
Will Scheidegger:
> I've got a "RegularView" component that is being wrapped around a
> BasePage subclass with the RenderBody component. This RegularView
> component makes up the page frame, is responsible for the navigation and
> so on.
>
> Now I would like to display the same content with a different component
> wrapped around it - a printer friendly view without the navigation and
> other stuff. Is there any way to choose at request time what component
> to wrap around a BasePage subclass?
>
> Cheers,
> Will
>
>
> ---------------------------------------------------------------------
> 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: Best practice: Regular view and printer friendly view
Posted by Pedro Abelleira Seco <pe...@usc.es>.
Then look at Block - RenderBlock.
El Mér, 13-07-2005 a las 14:28 +0200, Will Scheidegger escribió:
> That might work. It would require a third component though. I was
> hoping that there was something like WebObjects WOSwitchComponent where
> you can provide a component name as binding and it will instantiate the
> appropriate component at runtime.
>
> -Will
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best practice: Regular view and printer friendly view
Posted by Will Scheidegger <wi...@mac.com>.
That might work. It would require a third component though. I was
hoping that there was something like WebObjects WOSwitchComponent where
you can provide a component name as binding and it will instantiate the
appropriate component at runtime.
-Will
On 13.07.2005, at 12:13, Pedro Abelleira Seco wrote:
> What about some code like this:
>
> RegularView.html:
>
> <span jwcid="@Conditional" condition="xxx1">
> <span jwcid="@Border1"><span jwcid="@RenderBody"/></span>
> </span>
> <span jwcid="@Conditional" condition="xxx2">
> <span jwcid="@Border2"><span jwcid="@RenderBody"/></span>
> </span>
> <span jwcid="@Conditional" condition="xxx3">
> <span jwcid="@Border3"><span jwcid="@RenderBody"/></span>
> </span>
>
> where condition is evaluated at runtime?
>
>
> El Mér, 13-07-2005 a las 12:00 +0200, Will Scheidegger escribió:
>> I've got a "RegularView" component that is being wrapped around a
>> BasePage subclass with the RenderBody component. This RegularView
>> component makes up the page frame, is responsible for the navigation
>> and so on.
>>
>> Now I would like to display the same content with a different
>> component
>> wrapped around it - a printer friendly view without the navigation and
>> other stuff. Is there any way to choose at request time what component
>> to wrap around a BasePage subclass?
>>
>> Cheers,
>> Will
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Best practice: Regular view and printer friendly view
Posted by Pedro Abelleira Seco <pe...@usc.es>.
What about some code like this:
RegularView.html:
<span jwcid="@Conditional" condition="xxx1">
<span jwcid="@Border1"><span jwcid="@RenderBody"/></span>
</span>
<span jwcid="@Conditional" condition="xxx2">
<span jwcid="@Border2"><span jwcid="@RenderBody"/></span>
</span>
<span jwcid="@Conditional" condition="xxx3">
<span jwcid="@Border3"><span jwcid="@RenderBody"/></span>
</span>
where condition is evaluated at runtime?
El Mér, 13-07-2005 a las 12:00 +0200, Will Scheidegger escribió:
> I've got a "RegularView" component that is being wrapped around a
> BasePage subclass with the RenderBody component. This RegularView
> component makes up the page frame, is responsible for the navigation
> and so on.
>
> Now I would like to display the same content with a different component
> wrapped around it - a printer friendly view without the navigation and
> other stuff. Is there any way to choose at request time what component
> to wrap around a BasePage subclass?
>
> Cheers,
> Will
>
>
> ---------------------------------------------------------------------
> 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