Re: Multiple columns using div with last one on each row different

2010-07-14 Thread Charles Deal
Is your layout fixed at 3 columns?  If so, you should be able to add that
AttributeModifer to every third item in the repeater.

If it is not fixed, but is a liquid layout where the number of columns could
change when the browser (or container) is resized, then there is really no
way for wicket to put the attr on the right cell.  Instead, you will
probably need a JavaScipt solution on the client.  Are you using any of the
JS frameworks (jQuery, MooTools, etc)?  If so, that framework may have
facilities to make this easier.  I feel like this shouldn't be a tough job
for jQuery and a resize event.

On Tue, Jul 13, 2010 at 11:48 PM, Chris Colman chr...@stepaheadsoftware.com
 wrote:

 That would probably not work because the child at the end of each row is
 not necessarily the last child in the 'containing object'.

 The container is the category which has n products eg.,

 P1 P2 P3 P4 P5 P6 P7 P8

 Where P8 would be the last child

 But I need P3 and P6 to be marked as 'last cell'.



 -Original Message-
 From: Anh [mailto:7za...@gmail.com]
 Sent: Wednesday, 14 July 2010 1:19 PM
 To: users@wicket.apache.org
 Subject: Re: Multiple columns using div with last one on each row
 different
 
 Not familiar with the blueprint framework, but is there some reason
 you could not use
 
 whatever:last-child {
 
 }
 
 CSS pseudo-selector?
 
 On Tue, Jul 13, 2010 at 7:16 PM, Chris Colman
 chr...@stepaheadsoftware.com wrote:
  I'm using wicket to generate HTML and Compass/Blueprint to manage the
  CSS.
 
  I have a multi column layout with a product in each cell like:
 
 
  P1   P2   P3
  P4   P5   P6
  P7
 
  Etc.,
 
  With the blueprint CSS framework you need to specify a slightly
  different CSS 'class' (eg., lastCell) for the last item in each row
  and that uses different CSS that does not append an extra 'space' in the
  grid as it does for the previous cells in that row.
 
  I know that I can use
 
 new SimpleAttributeModifier(class, lastCell));
 
  when populating the list view but to do that I need to know how many
  cells will appear in each row. What if I didn't want to hard code that
  and leave it up to the markup to decide. Is there any wicket markup
  trick that I can use to tell wicket to insert a special 'class' value
  into the 'last cell' on each row?
 
 -Original Message-
 From: Francisco Diaz Trepat - gmail
  [mailto:francisco.diaztre...@gmail.com]
 Sent: Wednesday, 14 July 2010 6:13 AM
 To: Wicket-Users
 Subject: Any Italian wicket maniacs out there?
 
 Hi, I would like to ask some Italian users about something personal.
 
 If any, and don't mind please contact me privately. I'll surely
  appreciate
 it.
 
 regards,
 
 f(t)
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




RE: Multiple columns using div with last one on each row different

2010-07-14 Thread Chris Colman
Is your layout fixed at 3 columns?  If so, you should be able to add
that
AttributeModifer to every third item in the repeater.

That's the approach I took. I assumed it's fixed at 3 columns for now
and did the change in Java code in the repeater. If I ever need a
different column count I'll have to go with a more elaborate solution
but this works fine for now.

If it is not fixed, but is a liquid layout where the number of columns
could
change when the browser (or container) is resized, then there is really
no
way for wicket to put the attr on the right cell.  Instead, you will
probably need a JavaScipt solution on the client.  Are you using any of
the
JS frameworks (jQuery, MooTools, etc)?  

Not yet but hoping to integrate jQuery soon.

If so, that framework may have
facilities to make this easier.  I feel like this shouldn't be a tough
job
for jQuery and a resize event.

On Tue, Jul 13, 2010 at 11:48 PM, Chris Colman
chr...@stepaheadsoftware.com
 wrote:

 That would probably not work because the child at the end of each row
is
 not necessarily the last child in the 'containing object'.

 The container is the category which has n products eg.,

 P1 P2 P3 P4 P5 P6 P7 P8

 Where P8 would be the last child

 But I need P3 and P6 to be marked as 'last cell'.



 -Original Message-
 From: Anh [mailto:7za...@gmail.com]
 Sent: Wednesday, 14 July 2010 1:19 PM
 To: users@wicket.apache.org
 Subject: Re: Multiple columns using div with last one on each row
 different
 
 Not familiar with the blueprint framework, but is there some reason
 you could not use
 
 whatever:last-child {
 
 }
 
 CSS pseudo-selector?
 
 On Tue, Jul 13, 2010 at 7:16 PM, Chris Colman
 chr...@stepaheadsoftware.com wrote:
  I'm using wicket to generate HTML and Compass/Blueprint to manage
the
  CSS.
 
  I have a multi column layout with a product in each cell like:
 
 
  P1   P2   P3
  P4   P5   P6
  P7
 
  Etc.,
 
  With the blueprint CSS framework you need to specify a slightly
  different CSS 'class' (eg., lastCell) for the last item in each
row
  and that uses different CSS that does not append an extra 'space'
in
the
  grid as it does for the previous cells in that row.
 
  I know that I can use
 
 new SimpleAttributeModifier(class, lastCell));
 
  when populating the list view but to do that I need to know how
many
  cells will appear in each row. What if I didn't want to hard code
that
  and leave it up to the markup to decide. Is there any wicket
markup
  trick that I can use to tell wicket to insert a special 'class'
value
  into the 'last cell' on each row?
 
 -Original Message-
 From: Francisco Diaz Trepat - gmail
  [mailto:francisco.diaztre...@gmail.com]
 Sent: Wednesday, 14 July 2010 6:13 AM
 To: Wicket-Users
 Subject: Any Italian wicket maniacs out there?
 
 Hi, I would like to ask some Italian users about something
personal.
 
 If any, and don't mind please contact me privately. I'll surely
  appreciate
 it.
 
 regards,
 
 f(t)
 
 
-
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 

-
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Multiple columns using div with last one on each row different

2010-07-13 Thread Chris Colman
I'm using wicket to generate HTML and Compass/Blueprint to manage the
CSS.

I have a multi column layout with a product in each cell like:


P1   P2   P3
P4   P5   P6
P7

Etc.,

With the blueprint CSS framework you need to specify a slightly
different CSS 'class' (eg., lastCell) for the last item in each row
and that uses different CSS that does not append an extra 'space' in the
grid as it does for the previous cells in that row.

I know that I can use 

new SimpleAttributeModifier(class, lastCell));

when populating the list view but to do that I need to know how many
cells will appear in each row. What if I didn't want to hard code that
and leave it up to the markup to decide. Is there any wicket markup
trick that I can use to tell wicket to insert a special 'class' value
into the 'last cell' on each row?

-Original Message-
From: Francisco Diaz Trepat - gmail
[mailto:francisco.diaztre...@gmail.com]
Sent: Wednesday, 14 July 2010 6:13 AM
To: Wicket-Users
Subject: Any Italian wicket maniacs out there?

Hi, I would like to ask some Italian users about something personal.

If any, and don't mind please contact me privately. I'll surely
appreciate
it.

regards,

f(t)

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Multiple columns using div with last one on each row different

2010-07-13 Thread Anh
Not familiar with the blueprint framework, but is there some reason
you could not use

whatever:last-child {

}

CSS pseudo-selector?

On Tue, Jul 13, 2010 at 7:16 PM, Chris Colman
chr...@stepaheadsoftware.com wrote:
 I'm using wicket to generate HTML and Compass/Blueprint to manage the
 CSS.

 I have a multi column layout with a product in each cell like:


 P1   P2   P3
 P4   P5   P6
 P7

 Etc.,

 With the blueprint CSS framework you need to specify a slightly
 different CSS 'class' (eg., lastCell) for the last item in each row
 and that uses different CSS that does not append an extra 'space' in the
 grid as it does for the previous cells in that row.

 I know that I can use

        new SimpleAttributeModifier(class, lastCell));

 when populating the list view but to do that I need to know how many
 cells will appear in each row. What if I didn't want to hard code that
 and leave it up to the markup to decide. Is there any wicket markup
 trick that I can use to tell wicket to insert a special 'class' value
 into the 'last cell' on each row?

-Original Message-
From: Francisco Diaz Trepat - gmail
 [mailto:francisco.diaztre...@gmail.com]
Sent: Wednesday, 14 July 2010 6:13 AM
To: Wicket-Users
Subject: Any Italian wicket maniacs out there?

Hi, I would like to ask some Italian users about something personal.

If any, and don't mind please contact me privately. I'll surely
 appreciate
it.

regards,

f(t)

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Multiple columns using div with last one on each row different

2010-07-13 Thread Chris Colman
That would probably not work because the child at the end of each row is not 
necessarily the last child in the 'containing object'.

The container is the category which has n products eg.,

P1 P2 P3 P4 P5 P6 P7 P8

Where P8 would be the last child

But I need P3 and P6 to be marked as 'last cell'.



-Original Message-
From: Anh [mailto:7za...@gmail.com]
Sent: Wednesday, 14 July 2010 1:19 PM
To: users@wicket.apache.org
Subject: Re: Multiple columns using div with last one on each row
different

Not familiar with the blueprint framework, but is there some reason
you could not use

whatever:last-child {

}

CSS pseudo-selector?

On Tue, Jul 13, 2010 at 7:16 PM, Chris Colman
chr...@stepaheadsoftware.com wrote:
 I'm using wicket to generate HTML and Compass/Blueprint to manage the
 CSS.

 I have a multi column layout with a product in each cell like:


 P1   P2   P3
 P4   P5   P6
 P7

 Etc.,

 With the blueprint CSS framework you need to specify a slightly
 different CSS 'class' (eg., lastCell) for the last item in each row
 and that uses different CSS that does not append an extra 'space' in the
 grid as it does for the previous cells in that row.

 I know that I can use

        new SimpleAttributeModifier(class, lastCell));

 when populating the list view but to do that I need to know how many
 cells will appear in each row. What if I didn't want to hard code that
 and leave it up to the markup to decide. Is there any wicket markup
 trick that I can use to tell wicket to insert a special 'class' value
 into the 'last cell' on each row?

-Original Message-
From: Francisco Diaz Trepat - gmail
 [mailto:francisco.diaztre...@gmail.com]
Sent: Wednesday, 14 July 2010 6:13 AM
To: Wicket-Users
Subject: Any Italian wicket maniacs out there?

Hi, I would like to ask some Italian users about something personal.

If any, and don't mind please contact me privately. I'll surely
 appreciate
it.

regards,

f(t)

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org