You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ben Tomasini <be...@gmail.com> on 2008/03/03 21:49:46 UTC

Question about Grid styles and paging for a simple HTML table

I am trying to use the Grid component to render an HTML table with
very specific CSS to make the table look like a table which is
currently being rendered with the displaytag library in a Struts2
application.  Our current style sheet uses CSS selectors based on the
simple element name without any classes.  This works well with
displaytag as it's default behavior is to output a simple table
without any CSS classes.

I am having two issues:

1) Applying styles.

My preference  would like to simply apply our existing styles to an
HTML table created by Tapestry without having to wrestle with the
default styles in place.  I looks like Tapestry's Grid component
specifies a total of 23 CSS attributes among its various styles for
the Grid and related components.  I know we can override these
attributes in our stylesheets, but this puts a rather annoying burden
on our CSS developer.  Another option would be to remove the default
tapestry stylesheet via application configuration, but this would have
negative side effects for other components such as the exception page.
 Is there a way to have the Grid component not render any style
classes?  Any other ideas would be appreciated.

2) Changing pager display

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


Re: Question about Grid styles and paging for a simple HTML table

Posted by Ben Tomasini <be...@gmail.com>.
The lean parameter only affects the rendering of styles for the cells,
which is a start.  The containing elements still contain styles.

Ben

On Mon, Mar 3, 2008 at 2:38 PM, Jonathan Barker
<jo...@gmail.com> wrote:
>
>  Take a look at the "lean" parameter in the grid docs:
>
>  http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/ta
>  pestry/corelib/components/Grid.html
>
>  Does that help?
>
>
>
>
>  > -----Original Message-----
>  > From: Ben Tomasini [mailto:ben.tomasini@gmail.com]
>  > Sent: Monday, March 03, 2008 3:55 PM
>  > To: Tapestry users
>  > Subject: Re: Question about Grid styles and paging for a simple HTML table
>  >
>  > Ooops, Hit enter too soon.  Here is a resend
>  >
>  > I am trying to use the Grid component to render an HTML table with
>  > very specific CSS to make the table look like a table which is
>  > currently being rendered with the displaytag library in a Struts2
>  > application.  Our current style sheet uses CSS selectors based on the
>  > simple element name without any classes.  This works well with
>  > displaytag as it's default behavior is to output a simple table
>  > without any CSS classes.
>  >
>  > I am having two issues:
>  >
>  > 1) Applying styles.
>  >
>  > My preference  would like to simply apply our existing styles to an
>  > HTML table created by Tapestry without having to wrestle with the
>  > default styles in place.  I looks like Tapestry's Grid component
>  > specifies a total of 23 CSS attributes among its various styles for
>  > the Grid and related components.  I know we can override these
>  > attributes in our stylesheets, but this puts a rather annoying burden
>  > on our CSS developer.  Another option would be to remove the default
>  > tapestry stylesheet via application configuration, but this would have
>  > negative side effects for other components such as the exception page.
>  >  Is there a way to have the Grid component not render any style
>  > classes or to use style classes we specify?  Any other ideas would be
>  > appreciated.
>  >
>  > 2) Changing pager display
>  >
>  > Is there a way to override the rendering of the pager, perahaps by
>  > specifiying an alternate block to use?
>  >
>  > With these in mind, am I better off not using the Grid component and
>  > creating my own Table component instead?
>  >
>  > Ben
>  >
>  >
>  >
>  > On Mon, Mar 3, 2008 at 12:49 PM, Ben Tomasini <be...@gmail.com>
>  > wrote:
>  > > I am trying to use the Grid component to render an HTML table with
>  > >  very specific CSS to make the table look like a table which is
>  > >  currently being rendered with the displaytag library in a Struts2
>  > >  application.  Our current style sheet uses CSS selectors based on the
>  > >  simple element name without any classes.  This works well with
>  > >  displaytag as it's default behavior is to output a simple table
>  > >  without any CSS classes.
>  > >
>  > >  I am having two issues:
>  > >
>  > >  1) Applying styles.
>  > >
>  > >  My preference  would like to simply apply our existing styles to an
>  > >  HTML table created by Tapestry without having to wrestle with the
>  > >  default styles in place.  I looks like Tapestry's Grid component
>  > >  specifies a total of 23 CSS attributes among its various styles for
>  > >  the Grid and related components.  I know we can override these
>  > >  attributes in our stylesheets, but this puts a rather annoying burden
>  > >  on our CSS developer.  Another option would be to remove the default
>  > >  tapestry stylesheet via application configuration, but this would have
>  > >  negative side effects for other components such as the exception page.
>  > >   Is there a way to have the Grid component not render any style
>  > >  classes?  Any other ideas would be appreciated.
>  > >
>  > >  2) Changing pager display
>  > >
>  >
>
>
> > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  > For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


RE: Question about Grid styles and paging for a simple HTML table

Posted by Jonathan Barker <jo...@gmail.com>.
Take a look at the "lean" parameter in the grid docs:

http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/ta
pestry/corelib/components/Grid.html

Does that help?


> -----Original Message-----
> From: Ben Tomasini [mailto:ben.tomasini@gmail.com]
> Sent: Monday, March 03, 2008 3:55 PM
> To: Tapestry users
> Subject: Re: Question about Grid styles and paging for a simple HTML table
> 
> Ooops, Hit enter too soon.  Here is a resend
> 
> I am trying to use the Grid component to render an HTML table with
> very specific CSS to make the table look like a table which is
> currently being rendered with the displaytag library in a Struts2
> application.  Our current style sheet uses CSS selectors based on the
> simple element name without any classes.  This works well with
> displaytag as it's default behavior is to output a simple table
> without any CSS classes.
> 
> I am having two issues:
> 
> 1) Applying styles.
> 
> My preference  would like to simply apply our existing styles to an
> HTML table created by Tapestry without having to wrestle with the
> default styles in place.  I looks like Tapestry's Grid component
> specifies a total of 23 CSS attributes among its various styles for
> the Grid and related components.  I know we can override these
> attributes in our stylesheets, but this puts a rather annoying burden
> on our CSS developer.  Another option would be to remove the default
> tapestry stylesheet via application configuration, but this would have
> negative side effects for other components such as the exception page.
>  Is there a way to have the Grid component not render any style
> classes or to use style classes we specify?  Any other ideas would be
> appreciated.
> 
> 2) Changing pager display
> 
> Is there a way to override the rendering of the pager, perahaps by
> specifiying an alternate block to use?
> 
> With these in mind, am I better off not using the Grid component and
> creating my own Table component instead?
> 
> Ben
> 
> 
> 
> On Mon, Mar 3, 2008 at 12:49 PM, Ben Tomasini <be...@gmail.com>
> wrote:
> > I am trying to use the Grid component to render an HTML table with
> >  very specific CSS to make the table look like a table which is
> >  currently being rendered with the displaytag library in a Struts2
> >  application.  Our current style sheet uses CSS selectors based on the
> >  simple element name without any classes.  This works well with
> >  displaytag as it's default behavior is to output a simple table
> >  without any CSS classes.
> >
> >  I am having two issues:
> >
> >  1) Applying styles.
> >
> >  My preference  would like to simply apply our existing styles to an
> >  HTML table created by Tapestry without having to wrestle with the
> >  default styles in place.  I looks like Tapestry's Grid component
> >  specifies a total of 23 CSS attributes among its various styles for
> >  the Grid and related components.  I know we can override these
> >  attributes in our stylesheets, but this puts a rather annoying burden
> >  on our CSS developer.  Another option would be to remove the default
> >  tapestry stylesheet via application configuration, but this would have
> >  negative side effects for other components such as the exception page.
> >   Is there a way to have the Grid component not render any style
> >  classes?  Any other ideas would be appreciated.
> >
> >  2) Changing pager display
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


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


Re: Question about Grid styles and paging for a simple HTML table

Posted by Howard Lewis Ship <hl...@gmail.com>.
On Mon, Mar 3, 2008 at 12:54 PM, Ben Tomasini <be...@gmail.com> wrote:
> Ooops, Hit enter too soon.  Here is a resend
>
>
>  I am trying to use the Grid component to render an HTML table with
>  very specific CSS to make the table look like a table which is
>  currently being rendered with the displaytag library in a Struts2
>  application.  Our current style sheet uses CSS selectors based on the
>  simple element name without any classes.  This works well with
>  displaytag as it's default behavior is to output a simple table
>  without any CSS classes.
>
>  I am having two issues:
>
>  1) Applying styles.
>
>  My preference  would like to simply apply our existing styles to an
>  HTML table created by Tapestry without having to wrestle with the
>  default styles in place.  I looks like Tapestry's Grid component
>  specifies a total of 23 CSS attributes among its various styles for
>  the Grid and related components.  I know we can override these
>  attributes in our stylesheets, but this puts a rather annoying burden
>  on our CSS developer.  Another option would be to remove the default
>  tapestry stylesheet via application configuration, but this would have
>  negative side effects for other components such as the exception page.
>   Is there a way to have the Grid component not render any style
>  classes or to use style classes we specify?  Any other ideas would be
>
> appreciated.

This should be easier, but currently is not.

One option would be to subclass Grid as, say, PlainGrid.

You could then provide a PlainGrid.tml file and remove the @class
attributes that are in place there.

>
>  2) Changing pager display
>
>  Is there a way to override the rendering of the pager, perahaps by
>  specifiying an alternate block to use?
>
>  With these in mind, am I better off not using the Grid component and
>  creating my own Table component instead?
>
>  Ben
>
>

You could use pagerposition="none" and supply your own component to
perform the paging.

>
>
>
>  On Mon, Mar 3, 2008 at 12:49 PM, Ben Tomasini <be...@gmail.com> wrote:
>  > I am trying to use the Grid component to render an HTML table with
>  >  very specific CSS to make the table look like a table which is
>  >  currently being rendered with the displaytag library in a Struts2
>  >  application.  Our current style sheet uses CSS selectors based on the
>  >  simple element name without any classes.  This works well with
>  >  displaytag as it's default behavior is to output a simple table
>  >  without any CSS classes.
>  >
>  >  I am having two issues:
>  >
>  >  1) Applying styles.
>  >
>  >  My preference  would like to simply apply our existing styles to an
>  >  HTML table created by Tapestry without having to wrestle with the
>  >  default styles in place.  I looks like Tapestry's Grid component
>  >  specifies a total of 23 CSS attributes among its various styles for
>  >  the Grid and related components.  I know we can override these
>  >  attributes in our stylesheets, but this puts a rather annoying burden
>  >  on our CSS developer.  Another option would be to remove the default
>  >  tapestry stylesheet via application configuration, but this would have
>  >  negative side effects for other components such as the exception page.
>  >   Is there a way to have the Grid component not render any style
>  >  classes?  Any other ideas would be appreciated.
>  >
>  >  2) Changing pager display
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: Question about Grid styles and paging for a simple HTML table

Posted by Ben Tomasini <be...@gmail.com>.
Ooops, Hit enter too soon.  Here is a resend

I am trying to use the Grid component to render an HTML table with
very specific CSS to make the table look like a table which is
currently being rendered with the displaytag library in a Struts2
application.  Our current style sheet uses CSS selectors based on the
simple element name without any classes.  This works well with
displaytag as it's default behavior is to output a simple table
without any CSS classes.

I am having two issues:

1) Applying styles.

My preference  would like to simply apply our existing styles to an
HTML table created by Tapestry without having to wrestle with the
default styles in place.  I looks like Tapestry's Grid component
specifies a total of 23 CSS attributes among its various styles for
the Grid and related components.  I know we can override these
attributes in our stylesheets, but this puts a rather annoying burden
on our CSS developer.  Another option would be to remove the default
tapestry stylesheet via application configuration, but this would have
negative side effects for other components such as the exception page.
 Is there a way to have the Grid component not render any style
classes or to use style classes we specify?  Any other ideas would be
appreciated.

2) Changing pager display

Is there a way to override the rendering of the pager, perahaps by
specifiying an alternate block to use?

With these in mind, am I better off not using the Grid component and
creating my own Table component instead?

Ben



On Mon, Mar 3, 2008 at 12:49 PM, Ben Tomasini <be...@gmail.com> wrote:
> I am trying to use the Grid component to render an HTML table with
>  very specific CSS to make the table look like a table which is
>  currently being rendered with the displaytag library in a Struts2
>  application.  Our current style sheet uses CSS selectors based on the
>  simple element name without any classes.  This works well with
>  displaytag as it's default behavior is to output a simple table
>  without any CSS classes.
>
>  I am having two issues:
>
>  1) Applying styles.
>
>  My preference  would like to simply apply our existing styles to an
>  HTML table created by Tapestry without having to wrestle with the
>  default styles in place.  I looks like Tapestry's Grid component
>  specifies a total of 23 CSS attributes among its various styles for
>  the Grid and related components.  I know we can override these
>  attributes in our stylesheets, but this puts a rather annoying burden
>  on our CSS developer.  Another option would be to remove the default
>  tapestry stylesheet via application configuration, but this would have
>  negative side effects for other components such as the exception page.
>   Is there a way to have the Grid component not render any style
>  classes?  Any other ideas would be appreciated.
>
>  2) Changing pager display
>

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