|
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
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
_javascript_Reference. 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=""></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 > > [email protected] >
> 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 [email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
|