Modifying inline CSS in head of document

2008-04-03 Thread rzechner
I want to resize the height of my pages dynamically, therefore I need to 
set the height of some markup elements dynamically. I don't want to use 
Javascript (although I found a nice solution with jquery).

Is there a way to add a textblock like the following to the page header?

!--[if lt IE 8]
  style type=text/css
  #leftmenu{height:400px;} /*this value should is dynamic */
  /style
![endif]--

whereas the height of #leftmenu is set like this:

public abstract BasePage extends WebPage() {
...
WebClientInfo w = (WebClientInfo)getWebRequestCycle().getClientInfo();
ClientProperties cp = w.getProperties();
int minHeight = cp.getBrowserHeight();
//some imagination now
addToHeader{
  addStyle(#leftmenu, height, minHeight);
}


Thanks,

Roman




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Correct use of DateLabel in DataTable/AjaxFallbackDefaultDataTable

2008-03-26 Thread rzechner

Kai Mütz schrieb:

rzechner mailto:[EMAIL PROTECTED] wrote:
  

Hello!

I am not sure about how to correctly use the DateLabel in a
AjaxFallbackDefaultDataTable. The code below is oriented on the
samples found in
http://www.wicket-library.com/wicket-examples/repeater/
I want to display a table of  events (id, name, dateBegin, dateEnd)
which can also be selected. But my use of the DateLabel seems ...
*ehem* unelegently to me, but it works. What would be a simple and
elegant solution to display a Date object in a table?




I use something like:

public void populateItem(final Item item, final String componentId, final
IModel model) {
item.add(DateLabel.forDateStyle(componentId, new
PropertyModel(model.getObject(), dateBegin), SS));
}

HTH, Kai

  

*sigh* stupid me, thanks a lot!

regards, roman

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]