Re: Getting new lines in RepeatingView

2012-02-28 Thread Eric Jablow
On Mon, Feb 27, 2012 at 6:14 PM, Dale Ogilvie dale_ogil...@trimble.comwrote:

 Using an override of RepeatView, I get better output. The only slight
 imperfection being that each individual row does not take it's starting
 cue from the position of the repeated element. I can live with that.


 Is there any way to do this in DEVELOPMENT mode only?

Alternatively, does Wicket come with an HTML minimizer?
Or will server auto-gzipping take care of that?

Respectfully,
Eric Jablow


Re: Getting new lines in RepeatingView

2012-02-28 Thread Martin Grigorov
On Tue, Feb 28, 2012 at 5:36 PM, Eric Jablow erjab...@gmail.com wrote:
 On Mon, Feb 27, 2012 at 6:14 PM, Dale Ogilvie dale_ogil...@trimble.comwrote:

 Using an override of RepeatView, I get better output. The only slight
 imperfection being that each individual row does not take it's starting
 cue from the position of the repeated element. I can live with that.


 Is there any way to do this in DEVELOPMENT mode only?

 Alternatively, does Wicket come with an HTML minimizer?
 Or will server auto-gzipping take care of that?

https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/htmlcompressor-parent


 Respectfully,
 Eric Jablow



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



RE: Getting new lines in RepeatingView

2012-02-27 Thread Dale Ogilvie
Using an override of RepeatView, I get better output. The only slight
imperfection being that each individual row does not take it's starting
cue from the position of the repeated element. I can live with that.

i.e. output now has the first element positioned per the template, the
remainder are left justified:

ul
lihello/li
ligoodbye/li
ligood morning/li
/ul


public class NewLineRepeatingView extends RepeatingView {

private static final long serialVersionUID = 1L;

public NewLineRepeatingView(String id) {
super(id);
}

public NewLineRepeatingView(String id, IModel? model) {
super(id, model);
}

@Override
protected void renderChild(Component child) {
super.renderChild(child);
getResponse().write(\n);
}

}


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



Re: Getting new lines in RepeatingView

2012-02-24 Thread Eric Jablow
On Fri, Feb 24, 2012 at 1:54 AM, Martin Grigorov mgrigo...@apache.org
wrote:
 Hi,

 I think you can override RepeatingView's
 org.apache.wicket.markup.repeater.AbstractRepeater#renderChild():
 {

  super.renderChild(component);

  getResponse().write(br/);

 }


I don't think br / is standards-compliant mid-ul. Wouldn't it be
simpler to use getResponse().write('\n')?

Eric


Getting new lines in RepeatingView

2012-02-23 Thread Dale Ogilvie
Hi,

 

From the docs:

 

Java:

 

RepeatingView view = new RepeatingView(repeater);

view.add(new Label(view.newChildId(), hello));

view.add(new Label(view.newChildId(), goodbye));

view.add(new Label(view.newChildId(), good morning));

add(view);

 

Markup:

 

  ul

  li wicket:id=repeater/li

  /ul

 

Yields:

 

  ul

  lihello/liligoodbye/liligood morning/li

  /ul

 

I want to have a new line after each repeating element. The generated
markup looks pretty messy with one massive long line making up all the
repeated elements.

 

Desired:

 

  ul

  lihello/li

  ligoodbye/li

  ligood morning/li

  /ul

 

How can I achieve this?

 

Thanks!

 

Dale

 



Re: Getting new lines in RepeatingView

2012-02-23 Thread Martin Grigorov
Hi,

I think you can override RepeatingView's
org.apache.wicket.markup.repeater.AbstractRepeater#renderChild():
{

 super.renderChild(component);

 getResponse().write(br/);

}

On Fri, Feb 24, 2012 at 4:24 AM, Dale Ogilvie dale_ogil...@trimble.com wrote:
 Hi,



 From the docs:



 Java:



 RepeatingView view = new RepeatingView(repeater);

 view.add(new Label(view.newChildId(), hello));

 view.add(new Label(view.newChildId(), goodbye));

 view.add(new Label(view.newChildId(), good morning));

 add(view);



 Markup:



  ul

  li wicket:id=repeater/li

  /ul



 Yields:



  ul

  lihello/liligoodbye/liligood morning/li

  /ul



 I want to have a new line after each repeating element. The generated
 markup looks pretty messy with one massive long line making up all the
 repeated elements.



 Desired:



  ul

  lihello/li

  ligoodbye/li

  ligood morning/li

  /ul



 How can I achieve this?



 Thanks!



 Dale






-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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