Wat you could try to do is make that markup container a transparantresolver. Then the components can be added to the page itself
2007/11/18, nlif <[EMAIL PROTECTED]>: > > I tried adding an attributeModifier to the Page class, and it doesn't work > (the "dir" attribute is not added to the html element). > > I then tried creating a WebMarkupContainer (and adding wicket:id to the html > element in my html file), but this throws an exception. I think it's because > I did it in my base-page class, and there are classes that extend it, and > their components are not added to my webMarkupContainer. > > Last, I tried using a MarkupFilter, like this: > > getApplication().getMarkupSettings().setMarkupParserFactory(new > IMarkupParserFactory() > { > public MarkupParser newMarkupParser(MarkupResourceStream > resource) > { > MarkupParser parser = new MarkupParser(new > XmlPullParser(), resource); > parser.appendMarkupFilter(new AbstractMarkupFilter() > { > public MarkupElement nextTag() > throws ParseException > { > // Get the next tag. If null, no more tags > are available > final ComponentTag tag = (ComponentTag) > getParent().nextTag(); > > if (tag == null) > { > return tag; > } > > if ("html".equals(tag.getName())) > { > tag.addBehavior(new > AttributeModifier("dir", true, new Model("rtl"))); > } > > return tag; > } > }); > > return parser; > } > }); > > > I used a debugger to verify it indeed executes the addBehavior() line, but > still - no "dir" attribute is added to the html. > > I cannot seem to find anywhere in the forum a specific example. There are > only general suggestions, such as "use MarkupFilter" or "add an > AttributeModifier"... I guess an code-sample would be helpful. > > Thanks again, > Naaman > > > > > > -- > View this message in context: > http://www.nabble.com/How-can-I-switch-page-direction-%28LTR-RTL%29--tf4805391.html#a13817345 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]