Thanks Eelco, I will test it.

Jan

"Eelco Hillenius" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I just commited improvements for header contributions. I created
behavior HeaderContributor which allows you to contribute to the page
header without being bound to the static class structure. Furthermore,
this would be a good basis for cleaning up our ajax support; they now
implement IHeaderContributor and have methods for writing to the
header, but using this new behaviors are more strongly typed and all
the filtering of double contributions is put in the behavior as an
implementation detail. It can be used like:

add(HeaderContributor.forCssReference(MyPanel.class, "mystyle.css"));

Preferably in constructors as their greatest value is for creating
custom components still.

Have fun with it, and as always be patient a few hours before it'll
show up in annonymous CVS.

Eelco


On 3/6/06, jan_bar <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I created standalone class out of WebMarkupWithAssociatedMarkup, it
required
> just a small typing. The ctor now takes WebMarkupContainer (Form in my
> case), all occurences of 'this' now use the 'container', class
> HeaderPartContainer extends WebMarkupContainer and I have to add public
> setMyMarkupStream() that calls protected setMarkupStream(). Usage is
similar
> like in Panel. To my surprice it works without further debugging/tweaking.
>
> Jan
>
> "Juergen Donnerstag" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Yes, it is about having an extra markup file with Form (or any other
> Component) but ONLY <wicket:head> would be taken from that file. That
> used to work and it still does if you derive your component from
> WebMarkupWithAssociatedMarkup, but of course you can not use it with
> Form. I tried Jan's suggestion already and made it a helper class, but
> it would required a) plenty of parameters and b) we'd need to make a
> couple more methods public (or add even more parameter to the methd
> call). My first approach (though I didnt spend to much time on it)
> looked fairly ugly.
>
> renderHead(): That's actually where WebMarkupWithAssociatedContainer
> taps in (see Panel, Border)
>
> And I dont want to move all the stuff from
> WebMarkupContainerWithAssociatedMarkup into WebMarkupContainer. I dont
> think this pretty nice either. What we would need were extend java
> access model like you and Jon were discussing on Eclipsezone.
>
> Juergen
>
> On 3/6/06, jan_bar <[EMAIL PROTECTED]> wrote:
> >
> > For me it would be nice if
> > WebMarkupContainerWithAssociatedMarkup is standalone class.
> > I can put it as a member to my Form and use it in renderHead().
> >
> > Jan
> >
> >
> > "Johan Compagner" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > But a form component (so not a panel with own markup)
> > can contribute to a header just fine:
> >
> > public void renderHead(HtmlHeaderContainer container)
> >
> > But i guess the discussion is here that even for non own markup
components
> > we need
> > to search for markup where the header part is in??
> >
> > Or do i misunderstand the discussion we have here?
> >
> > The problem i have with that renderHead call is that i need to do some
> > tricky stuff so
> > that when i have 2 components on the same page the headers is not
> > contributed twice
> > But that is easy done with a boolean or thread local field
> >
> > johan
> >
> >
> >
> > On 3/6/06, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
> > > I agree with the inconvenience Jan has. I have an other example... I
> > > was working on a slider this weekend, based on the Yahoo slider
> > > javascript component. It would be nice to let this be a form component
> > > that can participate in form validation, population, etc, but also to
> > > use  markup with this form, including header contribution. Currently,
> > > you either have to make the component a panel, and nest a form
> > > component in that and let that pass any interesting events thu to the
> > > parent, or you have to extend formcomponent and write a lot of
> > > duplicate code - the code that's now in both Panel and
> > > WebMarkupContainerWithAssociatedMarkup - yourself.
> > >
> > > It would be nice if there was an easier/ more elegant way.
> > >
> > > Eelco
> > >
> > >
> > > On 3/5/06, jan_bar <[EMAIL PROTECTED] > wrote:
> > > >
> > > > I will try to express myself better and I will add bug report if
> needed.
> > > >
> > > > In Wicket 1.1 I had a ValidatedForm class that inherits from Form.
> That
> > > > class does client form validation (uses fvalidate scripts). The
> > > > ValidatedForm needs to add the scripts (and css) to the Page markup
> > where
> > > > the form is used. In Wicket I created ValidateForm.html with
> > <wicket:head>,
> > > > put the scrripts there and use JavaScriptReference. With Wicket 1.2
> > (beta)
> > > > it doesn't work. The reason is that Wicket doesn't read the
associated
> > > > markup for Form.
> > > > I think I can create new class out of
> > > > WebMarkupContainerWithAssociatedMarkup, add it as a
> > member
> > > > of my ValidatedForm and in onComponentTagBody() call
> > > > renderAssociatedMarkup(). But there should be easier way.
> > > >
> > > > I think, that the same problem applies to FormComponent subclasses.
If
> I
> > > > want to tweak the Button with some clever scripts but use it as
Button
> > in
> > > > Java, I can't.
> > > >
> > > > I hope I was clear enough, thanks, Jan
> > > >
> > > > "Johan Compagner" <[EMAIL PROTECTED]> wrote in message
> > > >
> > news:[EMAIL PROTECTED]
> > ...
> > > > please add a bug report, and describe or attach a test what you
> exactly
> > do.
> > > >
> > > > johan
> > > >
> > > >
> > > >
> > > > On 3/4/06, jan_bar < [EMAIL PROTECTED] > wrote:
> > > > > Hi,
> > > > >
> > > > > I am migrating Wicket 1.1.1 application to Wicket 1.2 (snapshot
> > 20060302).
> > > > > It seems that wicket:header doesn't work. My WebPage contains a
> > MyForm.
> > > > The
> > > > > MyForm inherits from From and markup has <wicket:head> section.
This
> > > > section
> > > > > is not shown in the final markup. This worked in previous version.
I
> > tried
> > > > > to debug but I am lost, because I don't have deep knowledge of
> Wicket.
> > > > > Where can I check why the <wicket:head> is ignored?
> > > > >
> > > > > Thanks, Jan
> > > > >
> > > > > This the inherited MyForm markup:
> > > > >
> > > > > <html>
> > > > > <head>
> > > > > <meta name="author" content="jan_bar" />
> > > > > <wicket:head>
> > > > > <script type="text/javascript"
> > > > src="fvalidate/fValidate.config.js"></script>
> > > > > </wicket:head>
> > > > > </head>
> > > > > <body>
> > > > > </body>
> > > > > </html>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > -------------------------------------------------------
> > > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > > language
> > > > > that extends applications into web and mobile media. Attend the
live
> > > > webcast
> > > > > and join the prime developer group breaking into this new coding
> > > > territory!
> > > > >
> > > >
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> > > > > _______________________________________________
> > > > > Wicket-user mailing list
> > > > > Wicket-user@lists.sourceforge.net
> > > > >
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > >
> > > >
> > > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > language
> > > that extends applications into web and mobile media. Attend the live
> > webcast
> > > and join the prime developer group breaking into this new coding
> > territory!
> > >
> > http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
> that extends applications into web and mobile media. Attend the live
webcast
> and join the prime developer group breaking into this new coding
territory!
> http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
> that extends applications into web and mobile media. Attend the live
webcast
> and join the prime developer group breaking into this new coding
territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to