Re: [Wicket-user] header contribution ordering
Mind you open an RFE for it than. It is probably not a big deal to implement (Wicket makes it realy easy). But we'd need a vote from the core committers to add yet another wicket tag Juergen On 6/24/06, Michael Day <[EMAIL PROTECTED]> wrote: > The problem is that you have to specify it in your java code. I > prefer to have the flexibility of only specifying it in the markup. > This allows me to use styles more effectively as I only have to > specify the CSS link in the markup files that require it. It's not a > big deal (it's just a preference), but I would bet that other people > will want it in the future also. > > On Jun 24, 2006, at 3:51 AM, Juergen Donnerstag wrote: > > > I haven't understood how that is different. Lets say this is a > > Page's markup > > (copied from previous mail) > >> > >> > >> My Template > >> > >> > >> > >> > >> > > > > what is the difference between the static css link and a dynamic > > one like > > add(HeaderContributor.forCss(MyChildPage.class, "MyChildCSS.css")); > > Both are referencing a css file. The html ouput will be the same. > > > > Juergen > > > > On 6/23/06, Michael Day <[EMAIL PROTECTED]> wrote: > >> I finally got around to this again, and I don't particularly like the > >> idea of using the following to add CSS contributions last: > >> > >> add(HeaderContributor.forCss(MyChildPage.class, "MyChildCSS.css")); > >> > >> The problem is that I'm trying to specify a CSS override file for > >> only *some* of my "styles/variations" of a particular page. So I > >> prefer not to have a wicket component linking to the CSS > >> contribution. Therefore, I'm thinking Davy's suggestion below might > >> be better. Is this difficult to implement? > >> > >> Thanks, > >> > >> Michael Day > >> > >> On 6/14/06, Davy De Durpel <[EMAIL PROTECTED]> wrote: > >>> > >>> I ran into a similar problem and my workaround was to use the "id" > >> attribute > >>> for overwriting a style.But that is not a clean solution since > >> it makes > >>> the CSS files very hard to read and you don't always have full > >> control of > >>> the "id" attribute value. > >>> > >>> Maybe we need an extra optional wicket tag to indicate the > >> position where we > >>> want the stuff to be inserted. That way we can link > >> our > >>> stylesheet after this tag so that we can easily overwrite any > >> style of any > >>> of the children. So this would be something like: > >>> > >>> > >>> > >>> My Template > >>> > >>> > >>> > >>> > >>> > >>> -- > >>> View this message in context: http://www.nabble.com/header- > >> contribution-ordering-t1768566.html#a4867200 > >>> Sent from the Wicket - User forum at Nabble.com. > >>> > >>> > >>> > >>> ___ > >>> Wicket-user mailing list > >>> [EMAIL PROTECTED] > >>> https://lists.sourceforge.net/lists/listinfo/wicket-user > >>> > >> > >> Using Tomcat but need to do more? Need to support web services, > >> security? > >> Get stuff done quickly with pre-integrated technology to make your > >> job easier > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache > >> Geronimo > >> http://sel.as-us.falkag.net/sel? > >> cmd=lnk&kid=120709&bid=263057&dat=121642 > >> ___ > >> Wicket-user mailing list > >> Wicket-user@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > > > > Using Tomcat but need to do more? Need to support web services, > > security? > > Get stuff done quickly with pre-integrated technology to make your > > job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel? > > cmd=lnk&kid=120709&bid=263057&dat=121642 > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
The problem is that you have to specify it in your java code. I prefer to have the flexibility of only specifying it in the markup. This allows me to use styles more effectively as I only have to specify the CSS link in the markup files that require it. It's not a big deal (it's just a preference), but I would bet that other people will want it in the future also. On Jun 24, 2006, at 3:51 AM, Juergen Donnerstag wrote: > I haven't understood how that is different. Lets say this is a > Page's markup > (copied from previous mail) >> >> >> My Template >> >> >> >> >> > > what is the difference between the static css link and a dynamic > one like > add(HeaderContributor.forCss(MyChildPage.class, "MyChildCSS.css")); > Both are referencing a css file. The html ouput will be the same. > > Juergen > > On 6/23/06, Michael Day <[EMAIL PROTECTED]> wrote: >> I finally got around to this again, and I don't particularly like the >> idea of using the following to add CSS contributions last: >> >> add(HeaderContributor.forCss(MyChildPage.class, "MyChildCSS.css")); >> >> The problem is that I'm trying to specify a CSS override file for >> only *some* of my "styles/variations" of a particular page. So I >> prefer not to have a wicket component linking to the CSS >> contribution. Therefore, I'm thinking Davy's suggestion below might >> be better. Is this difficult to implement? >> >> Thanks, >> >> Michael Day >> >> On 6/14/06, Davy De Durpel <[EMAIL PROTECTED]> wrote: >>> >>> I ran into a similar problem and my workaround was to use the "id" >> attribute >>> for overwriting a style.But that is not a clean solution since >> it makes >>> the CSS files very hard to read and you don't always have full >> control of >>> the "id" attribute value. >>> >>> Maybe we need an extra optional wicket tag to indicate the >> position where we >>> want the stuff to be inserted. That way we can link >> our >>> stylesheet after this tag so that we can easily overwrite any >> style of any >>> of the children. So this would be something like: >>> >>> >>> >>> My Template >>> >>> >>> >>> >>> >>> -- >>> View this message in context: http://www.nabble.com/header- >> contribution-ordering-t1768566.html#a4867200 >>> Sent from the Wicket - User forum at Nabble.com. >>> >>> >>> >>> ___ >>> Wicket-user mailing list >>> [EMAIL PROTECTED] >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >> >> Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your >> job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel? >> cmd=lnk&kid=120709&bid=263057&dat=121642 >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
I haven't understood how that is different. Lets say this is a Page's markup (copied from previous mail) > > > My Template > > > > > what is the difference between the static css link and a dynamic one like add(HeaderContributor.forCss(MyChildPage.class, "MyChildCSS.css")); Both are referencing a css file. The html ouput will be the same. Juergen On 6/23/06, Michael Day <[EMAIL PROTECTED]> wrote: > I finally got around to this again, and I don't particularly like the > idea of using the following to add CSS contributions last: > > add(HeaderContributor.forCss(MyChildPage.class, "MyChildCSS.css")); > > The problem is that I'm trying to specify a CSS override file for > only *some* of my "styles/variations" of a particular page. So I > prefer not to have a wicket component linking to the CSS > contribution. Therefore, I'm thinking Davy's suggestion below might > be better. Is this difficult to implement? > > Thanks, > > Michael Day > > On 6/14/06, Davy De Durpel <[EMAIL PROTECTED]> wrote: > > > > I ran into a similar problem and my workaround was to use the "id" > attribute > > for overwriting a style.But that is not a clean solution since > it makes > > the CSS files very hard to read and you don't always have full > control of > > the "id" attribute value. > > > > Maybe we need an extra optional wicket tag to indicate the > position where we > > want the stuff to be inserted. That way we can link > our > > stylesheet after this tag so that we can easily overwrite any > style of any > > of the children. So this would be something like: > > > > > > > > My Template > > > > > > > > > > > > -- > > View this message in context: http://www.nabble.com/header- > contribution-ordering-t1768566.html#a4867200 > > Sent from the Wicket - User forum at Nabble.com. > > > > > > > > ___ > > Wicket-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
I finally got around to this again, and I don't particularly like the idea of using the following to add CSS contributions last: add(HeaderContributor.forCss(MyChildPage.class, "MyChildCSS.css")); The problem is that I'm trying to specify a CSS override file for only *some* of my "styles/variations" of a particular page. So I prefer not to have a wicket component linking to the CSS contribution. Therefore, I'm thinking Davy's suggestion below might be better. Is this difficult to implement? Thanks, Michael Day On 6/14/06, Davy De Durpel <[EMAIL PROTECTED]> wrote: > > I ran into a similar problem and my workaround was to use the "id" attribute > for overwriting a style.But that is not a clean solution since it makes > the CSS files very hard to read and you don't always have full control of > the "id" attribute value. > > Maybe we need an extra optional wicket tag to indicate the position where we > want the stuff to be inserted. That way we can link our > stylesheet after this tag so that we can easily overwrite any style of any > of the children. So this would be something like: > > > > My Template > > > > > > -- > View this message in context: http://www.nabble.com/header- contribution-ordering-t1768566.html#a4867200 > Sent from the Wicket - User forum at Nabble.com. > > > > ___ > Wicket-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/wicket-user > Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
I saw the proposed solution. Thanks very much. I haven't had time to try it out yet, but it sounds like it will work perfectly. Thanks, Michael Day On Jun 16, 2006, at 3:32 AM, Davy De Durpel wrote: > > I don't know if you still follow this thread. Maybe you're waiting > for an > alert. That's why I reply to one of your mails so that you are > notified > about the propose solution further down the thread. > -- > View this message in context: http://www.nabble.com/header- > contribution-ordering-t1768566.html#a4896202 > Sent from the Wicket - User forum at Nabble.com. > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
I don't know if you still follow this thread. Maybe you're waiting for an alert. That's why I reply to one of your mails so that you are notified about the propose solution further down the thread. -- View this message in context: http://www.nabble.com/header-contribution-ordering-t1768566.html#a4896202 Sent from the Wicket - User forum at Nabble.com. ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
I will add a HowTo during the weekend. -- View this message in context: http://www.nabble.com/header-contribution-ordering-t1768566.html#a4896178 Sent from the Wicket - User forum at Nabble.com. ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
Didn't think about that. But you are right of course. The pages header contributions are added last. The only disadvantage I can think of is that you can not develop self-contained wicket components/widgets as you would always need to add this ref to the page. Well, not even that is true. getPage().add() of course works from everywhere. Very well, that is the way to make it. May be you can add a comment to the Wiki? Juergen On 6/15/06, Davy De Durpel <[EMAIL PROTECTED]> wrote: > > Well no. It would only solve my problem. How selfish of me to propose > something like that ;-) > > I felt so sorry this morning that I have searched for a real solution to > Michaels problem, and guess what I found it. > > All that needs to be done is add something similar to this at the end of the > child page constructor: > > add(HeaderContributor.forCss(MyChildPage.class, "MyChildCSS.css")); > > I have tested it and the result is that the link to MyChildCSS.css is the > very last item in the of the rendered page. And it even can be used > to solve my case :-) > > The limitation is that it only works for Wicket 1.2. It should also be > possible for the other versions but then Michael should have a look at > Eelco's blog about header contributions: > http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ > -- > View this message in context: > http://www.nabble.com/header-contribution-ordering-t1768566.html#a4878920 > Sent from the Wicket - User forum at Nabble.com. > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
Well no. It would only solve my problem. How selfish of me to propose something like that ;-) I felt so sorry this morning that I have searched for a real solution to Michaels problem, and guess what I found it. All that needs to be done is add something similar to this at the end of the child page constructor: add(HeaderContributor.forCss(MyChildPage.class, "MyChildCSS.css")); I have tested it and the result is that the link to MyChildCSS.css is the very last item in the of the rendered page. And it even can be used to solve my case :-) The limitation is that it only works for Wicket 1.2. It should also be possible for the other versions but then Michael should have a look at Eelco's blog about header contributions: http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ -- View this message in context: http://www.nabble.com/header-contribution-ordering-t1768566.html#a4878920 Sent from the Wicket - User forum at Nabble.com. ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
I don't think it solves Michaels problem, does it? May be should an attribute to wicket:head, e.g. order="first" and allow to set the preferred order with the Page (or the Page header container). Juergen On 6/14/06, Davy De Durpel <[EMAIL PROTECTED]> wrote: > > I ran into a similar problem and my workaround was to use the "id" attribute > for overwriting a style.But that is not a clean solution since it makes > the CSS files very hard to read and you don't always have full control of > the "id" attribute value. > > Maybe we need an extra optional wicket tag to indicate the position where we > want the stuff to be inserted. That way we can link our > stylesheet after this tag so that we can easily overwrite any style of any > of the children. So this would be something like: > > > > My Template > > > > > > -- > View this message in context: > http://www.nabble.com/header-contribution-ordering-t1768566.html#a4867200 > Sent from the Wicket - User forum at Nabble.com. > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
I ran into a similar problem and my workaround was to use the "id" attribute for overwriting a style.But that is not a clean solution since it makes the CSS files very hard to read and you don't always have full control of the "id" attribute value. Maybe we need an extra optional wicket tag to indicate the position where we want the stuff to be inserted. That way we can link our stylesheet after this tag so that we can easily overwrite any style of any of the children. So this would be something like: My Template -- View this message in context: http://www.nabble.com/header-contribution-ordering-t1768566.html#a4867200 Sent from the Wicket - User forum at Nabble.com. ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
no we can't simply change the order of visitChildren. It is used everywhere. Juergen On 6/13/06, Michael Day <[EMAIL PROTECTED]> wrote: > I haven't looked at visitChildren, but couldn't we reverse the > order? It makes more sense for the child pages to add their > contributions last, right? Either way, I think I'm going to abandon > the markup inheritance and simply use a border only. I haven't had > time to ensure this works as expected, but I assume it will. > > Michael Day > > On Jun 12, 2006, at 5:33 PM, Juergen Donnerstag wrote: > > > I was thinking about the first approach. Ok that doesn't work. > > Unfortunately I can not think of any other means to change the order. > > Wicket internally (HtmlHeaderContainer.renderHeaderSections) uses > > MarkupContainer.visitChildren() which determines the order. Currently > > that method is private final. Presuming we make it protected you could > > extend from HtmlHeaderContainer and implement your own "visitChildren" > > which takes another order into consideration. > > > >> From a "visitChildren" point of the ordering is correct, isn't it. It > > goes down the component hierarchy and the border is a child of > > ChildPage. > > > > Unfortunately I can not think of any other easy solution. It must > > apply to bordered pages only and not simply to any Border added to a > > Page. Border components which make a bordered page are identified by > > Border.setTransparentResolver(true). So another option, though I > > regard it a suboptimal solution, would to modify the > > HtmlHeaderContainer.renderHeaderSections implementation to change the > > visitChildren implementation to search for a Border (bordered page) > > first, than call visitChildren but exlude the border. That doesn't > > sound like good programming, does it. Any other idea? > > > > Juergen > > > > On 6/12/06, Michael Day <[EMAIL PROTECTED]> wrote: > >> If I understand you correctly, that wouldn't help. Do you mean that > >> I should just use markup inheritance with no borders? I can't do > >> that because I need to be able to change the border implementation at > >> runtime. > >> > >> Or do you mean that the BaseBorderPage would just add a border? If > >> so, that's what I tried =). The problem with that approach is that > >> the header contribution is in opposite order from what I expect. In > >> your example, Page's header contributions are listed above > >> BaseBorderPage's header contributions. This means that I can't > >> override stylesheets that were included in BaseBorderPage's header. > >> > >> On Jun 11, 2006, at 10:41 PM, Juergen Donnerstag wrote: > >> > >>> And why don't you create a BaseBorderPage -> BasePage -> Page. It > >>> would be separated than > >>> > >>> Juergen > >>> > >>> On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: > Yes, basically I have a border for all pages, but I add it in my > BasePage class. I did it this way so that I could easily change > border implementations in one class. > > I think I'm just going to abandon that method, and just add the > border on each page with a custom BorderFactory or something. > > On Jun 11, 2006, at 3:54 AM, Juergen Donnerstag wrote: > > > a) you can not change the order. > > b) Not sure I understood your component hierachy already and > > that is > > probably because you are using markup inheritance and the idea of > > bordered pages for the very same page? Not that it is forbidden > > but > > people are usually using only either one with markup inheritance > > being > > preferred as easier to understand/use. > > > > Juergen > > > > On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: > >> How can I change the ordering of header contributions? I have > >> Border > >>> ParentPage > ChildPage. The ParentPage has , while Border > >> and ChildPage have . The problem is that the > >> Border's > >> header contributions show below the ChildPage contributions. I > >> would > >> expect the other way around since, in my case, ChildPage is the > >> most > >> specific page. I'm trying to include a stylesheet in ChildPage > >> that > >> overrides a previous stylesheet that was included in the Border. > >> > >> That was longwinded and hard to explain. Hopefully it made > >> sense. > >> > >> Michael Day > >> > >> > >> ___ > >> Wicket-user mailing list > >> Wicket-user@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > > > > > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > ___ > Wicket-user mailing list > Wicket-us
Re: [Wicket-user] header contribution ordering
I haven't looked at visitChildren, but couldn't we reverse the order? It makes more sense for the child pages to add their contributions last, right? Either way, I think I'm going to abandon the markup inheritance and simply use a border only. I haven't had time to ensure this works as expected, but I assume it will. Michael Day On Jun 12, 2006, at 5:33 PM, Juergen Donnerstag wrote: > I was thinking about the first approach. Ok that doesn't work. > Unfortunately I can not think of any other means to change the order. > Wicket internally (HtmlHeaderContainer.renderHeaderSections) uses > MarkupContainer.visitChildren() which determines the order. Currently > that method is private final. Presuming we make it protected you could > extend from HtmlHeaderContainer and implement your own "visitChildren" > which takes another order into consideration. > >> From a "visitChildren" point of the ordering is correct, isn't it. It > goes down the component hierarchy and the border is a child of > ChildPage. > > Unfortunately I can not think of any other easy solution. It must > apply to bordered pages only and not simply to any Border added to a > Page. Border components which make a bordered page are identified by > Border.setTransparentResolver(true). So another option, though I > regard it a suboptimal solution, would to modify the > HtmlHeaderContainer.renderHeaderSections implementation to change the > visitChildren implementation to search for a Border (bordered page) > first, than call visitChildren but exlude the border. That doesn't > sound like good programming, does it. Any other idea? > > Juergen > > On 6/12/06, Michael Day <[EMAIL PROTECTED]> wrote: >> If I understand you correctly, that wouldn't help. Do you mean that >> I should just use markup inheritance with no borders? I can't do >> that because I need to be able to change the border implementation at >> runtime. >> >> Or do you mean that the BaseBorderPage would just add a border? If >> so, that's what I tried =). The problem with that approach is that >> the header contribution is in opposite order from what I expect. In >> your example, Page's header contributions are listed above >> BaseBorderPage's header contributions. This means that I can't >> override stylesheets that were included in BaseBorderPage's header. >> >> On Jun 11, 2006, at 10:41 PM, Juergen Donnerstag wrote: >> >>> And why don't you create a BaseBorderPage -> BasePage -> Page. It >>> would be separated than >>> >>> Juergen >>> >>> On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: Yes, basically I have a border for all pages, but I add it in my BasePage class. I did it this way so that I could easily change border implementations in one class. I think I'm just going to abandon that method, and just add the border on each page with a custom BorderFactory or something. On Jun 11, 2006, at 3:54 AM, Juergen Donnerstag wrote: > a) you can not change the order. > b) Not sure I understood your component hierachy already and > that is > probably because you are using markup inheritance and the idea of > bordered pages for the very same page? Not that it is forbidden > but > people are usually using only either one with markup inheritance > being > preferred as easier to understand/use. > > Juergen > > On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: >> How can I change the ordering of header contributions? I have >> Border >>> ParentPage > ChildPage. The ParentPage has , while Border >> and ChildPage have . The problem is that the >> Border's >> header contributions show below the ChildPage contributions. I >> would >> expect the other way around since, in my case, ChildPage is the >> most >> specific page. I'm trying to include a stylesheet in ChildPage >> that >> overrides a previous stylesheet that was included in the Border. >> >> That was longwinded and hard to explain. Hopefully it made >> sense. >> >> Michael Day >> >> >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >>> >>> ___ >>> Wicket-user mailing list >>> Wicket-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >>> >> >> >> >> ___ >
Re: [Wicket-user] header contribution ordering
I was thinking about the first approach. Ok that doesn't work. Unfortunately I can not think of any other means to change the order. Wicket internally (HtmlHeaderContainer.renderHeaderSections) uses MarkupContainer.visitChildren() which determines the order. Currently that method is private final. Presuming we make it protected you could extend from HtmlHeaderContainer and implement your own "visitChildren" which takes another order into consideration. >From a "visitChildren" point of the ordering is correct, isn't it. It goes down the component hierarchy and the border is a child of ChildPage. Unfortunately I can not think of any other easy solution. It must apply to bordered pages only and not simply to any Border added to a Page. Border components which make a bordered page are identified by Border.setTransparentResolver(true). So another option, though I regard it a suboptimal solution, would to modify the HtmlHeaderContainer.renderHeaderSections implementation to change the visitChildren implementation to search for a Border (bordered page) first, than call visitChildren but exlude the border. That doesn't sound like good programming, does it. Any other idea? Juergen On 6/12/06, Michael Day <[EMAIL PROTECTED]> wrote: > If I understand you correctly, that wouldn't help. Do you mean that > I should just use markup inheritance with no borders? I can't do > that because I need to be able to change the border implementation at > runtime. > > Or do you mean that the BaseBorderPage would just add a border? If > so, that's what I tried =). The problem with that approach is that > the header contribution is in opposite order from what I expect. In > your example, Page's header contributions are listed above > BaseBorderPage's header contributions. This means that I can't > override stylesheets that were included in BaseBorderPage's header. > > On Jun 11, 2006, at 10:41 PM, Juergen Donnerstag wrote: > > > And why don't you create a BaseBorderPage -> BasePage -> Page. It > > would be separated than > > > > Juergen > > > > On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: > >> Yes, basically I have a border for all pages, but I add it in my > >> BasePage class. I did it this way so that I could easily change > >> border implementations in one class. > >> > >> I think I'm just going to abandon that method, and just add the > >> border on each page with a custom BorderFactory or something. > >> > >> On Jun 11, 2006, at 3:54 AM, Juergen Donnerstag wrote: > >> > >>> a) you can not change the order. > >>> b) Not sure I understood your component hierachy already and that is > >>> probably because you are using markup inheritance and the idea of > >>> bordered pages for the very same page? Not that it is forbidden but > >>> people are usually using only either one with markup inheritance > >>> being > >>> preferred as easier to understand/use. > >>> > >>> Juergen > >>> > >>> On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: > How can I change the ordering of header contributions? I have > Border > > ParentPage > ChildPage. The ParentPage has , while Border > and ChildPage have . The problem is that the Border's > header contributions show below the ChildPage contributions. I > would > expect the other way around since, in my case, ChildPage is the > most > specific page. I'm trying to include a stylesheet in ChildPage > that > overrides a previous stylesheet that was included in the Border. > > That was longwinded and hard to explain. Hopefully it made sense. > > Michael Day > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > >>> > >>> > >>> ___ > >>> Wicket-user mailing list > >>> Wicket-user@lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/wicket-user > >>> > >>> > >> > >> > >> > >> ___ > >> Wicket-user mailing list > >> Wicket-user@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > > > > > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
If I understand you correctly, that wouldn't help. Do you mean that I should just use markup inheritance with no borders? I can't do that because I need to be able to change the border implementation at runtime. Or do you mean that the BaseBorderPage would just add a border? If so, that's what I tried =). The problem with that approach is that the header contribution is in opposite order from what I expect. In your example, Page's header contributions are listed above BaseBorderPage's header contributions. This means that I can't override stylesheets that were included in BaseBorderPage's header. On Jun 11, 2006, at 10:41 PM, Juergen Donnerstag wrote: > And why don't you create a BaseBorderPage -> BasePage -> Page. It > would be separated than > > Juergen > > On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: >> Yes, basically I have a border for all pages, but I add it in my >> BasePage class. I did it this way so that I could easily change >> border implementations in one class. >> >> I think I'm just going to abandon that method, and just add the >> border on each page with a custom BorderFactory or something. >> >> On Jun 11, 2006, at 3:54 AM, Juergen Donnerstag wrote: >> >>> a) you can not change the order. >>> b) Not sure I understood your component hierachy already and that is >>> probably because you are using markup inheritance and the idea of >>> bordered pages for the very same page? Not that it is forbidden but >>> people are usually using only either one with markup inheritance >>> being >>> preferred as easier to understand/use. >>> >>> Juergen >>> >>> On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: How can I change the ordering of header contributions? I have Border > ParentPage > ChildPage. The ParentPage has , while Border and ChildPage have . The problem is that the Border's header contributions show below the ChildPage contributions. I would expect the other way around since, in my case, ChildPage is the most specific page. I'm trying to include a stylesheet in ChildPage that overrides a previous stylesheet that was included in the Border. That was longwinded and hard to explain. Hopefully it made sense. Michael Day ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >>> >>> ___ >>> Wicket-user mailing list >>> Wicket-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wicket-user >>> >>> >> >> >> >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
And why don't you create a BaseBorderPage -> BasePage -> Page. It would be separated than Juergen On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: > Yes, basically I have a border for all pages, but I add it in my > BasePage class. I did it this way so that I could easily change > border implementations in one class. > > I think I'm just going to abandon that method, and just add the > border on each page with a custom BorderFactory or something. > > On Jun 11, 2006, at 3:54 AM, Juergen Donnerstag wrote: > > > a) you can not change the order. > > b) Not sure I understood your component hierachy already and that is > > probably because you are using markup inheritance and the idea of > > bordered pages for the very same page? Not that it is forbidden but > > people are usually using only either one with markup inheritance being > > preferred as easier to understand/use. > > > > Juergen > > > > On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: > >> How can I change the ordering of header contributions? I have Border > >>> ParentPage > ChildPage. The ParentPage has , while Border > >> and ChildPage have . The problem is that the Border's > >> header contributions show below the ChildPage contributions. I would > >> expect the other way around since, in my case, ChildPage is the most > >> specific page. I'm trying to include a stylesheet in ChildPage that > >> overrides a previous stylesheet that was included in the Border. > >> > >> That was longwinded and hard to explain. Hopefully it made sense. > >> > >> Michael Day > >> > >> > >> ___ > >> Wicket-user mailing list > >> Wicket-user@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > > > > > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
Yes, basically I have a border for all pages, but I add it in my BasePage class. I did it this way so that I could easily change border implementations in one class. I think I'm just going to abandon that method, and just add the border on each page with a custom BorderFactory or something. On Jun 11, 2006, at 3:54 AM, Juergen Donnerstag wrote: > a) you can not change the order. > b) Not sure I understood your component hierachy already and that is > probably because you are using markup inheritance and the idea of > bordered pages for the very same page? Not that it is forbidden but > people are usually using only either one with markup inheritance being > preferred as easier to understand/use. > > Juergen > > On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: >> How can I change the ordering of header contributions? I have Border >>> ParentPage > ChildPage. The ParentPage has , while Border >> and ChildPage have . The problem is that the Border's >> header contributions show below the ChildPage contributions. I would >> expect the other way around since, in my case, ChildPage is the most >> specific page. I'm trying to include a stylesheet in ChildPage that >> overrides a previous stylesheet that was included in the Border. >> >> That was longwinded and hard to explain. Hopefully it made sense. >> >> Michael Day >> >> >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] header contribution ordering
a) you can not change the order. b) Not sure I understood your component hierachy already and that is probably because you are using markup inheritance and the idea of bordered pages for the very same page? Not that it is forbidden but people are usually using only either one with markup inheritance being preferred as easier to understand/use. Juergen On 6/11/06, Michael Day <[EMAIL PROTECTED]> wrote: > How can I change the ordering of header contributions? I have Border > > ParentPage > ChildPage. The ParentPage has , while Border > and ChildPage have . The problem is that the Border's > header contributions show below the ChildPage contributions. I would > expect the other way around since, in my case, ChildPage is the most > specific page. I'm trying to include a stylesheet in ChildPage that > overrides a previous stylesheet that was included in the Border. > > That was longwinded and hard to explain. Hopefully it made sense. > > Michael Day > > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] header contribution ordering
How can I change the ordering of header contributions? I have Border > ParentPage > ChildPage. The ParentPage has , while Border and ChildPage have . The problem is that the Border's header contributions show below the ChildPage contributions. I would expect the other way around since, in my case, ChildPage is the most specific page. I'm trying to include a stylesheet in ChildPage that overrides a previous stylesheet that was included in the Border. That was longwinded and hard to explain. Hopefully it made sense. Michael Day ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user