Not sure I understand what needs to be done. I guess I'll wait until
tomorrow until the "that is how the output must look like" question is
solved.

Juergen

On 5/4/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
i guess in this case we need to capture the head output of the component
during ajax render and dump it into the markup before the component.

Juergen are you reading with us? do you think this is feasible?

-Igor



On 5/4/06, RĂ¼diger Schulz <[EMAIL PROTECTED]> wrote:
> > right, and that is the main problem to solve. is a <script tag
> > legal in the middle of html? because maybe we can capture the head
> > output and just insert it into html
>
> <script> Tags in the middle of HTML are working in all browsers I ever
> had to use this. I'm not 100% sure if it's legal, but I think the main
> reason for putting JavaScript in the head is, that it is definitly
> loaded before any markup is using it.
>
>
> > -Igor
>
>
> > On 5/4/06, Bruno Borges < [EMAIL PROTECTED]> wrote:
> > Igor, I'm not sure if browsers support the "update head" thing
> > (probably not), but one "first step" solution is to notify the
> > component that it is been added through Ajax, so the component must
> > generate a "load" function and return that function name to the Ajax
> > call, so the Ajax JS can call that function "postprocessing".
>
> > Of course, the main problem still continues: how to add the .js
> > file of DatePicker/anything else, to the html page dynamically.
>
>
> > On 5/4/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > yes, there is a problem indeed with components that need head
> > contribution and are added via ajax. the problem is that when the
> > component is added via ajax its header contribution is ingored
> > because the head section is not updated. so in case of the
> > datepicker the js it needs is never added to the page.
>
> > im not really sure what the good solution for this is. maybe we
> > can update the head, but do browsers take that into account? will a
> > <script tag added to head via outerhtml replacement be processed by
> > the browser? can you even use outer/innerHtml on elements in the
> > head region of the page?
>
> > any thoughts/ideas are welcome.
>
>
> > -igor
>
>
>
> > On 5/3/06, Bruno Borges <[EMAIL PROTECTED]> wrote:
> > Oh, one mistake in the code I sent.
>
> > - The id for newUserLink I'm using is "newUser";
>
> > Everything works: AjaxLink replacing the div, the panel, submit,
> > etc. Only the datePicker JS isn't working!
>
> > Regards,
>
>
>
> > On 5/4/06, Bruno Borges < [EMAIL PROTECTED]> wrote:
> > I'm trying to load a Form Panel's child, and this panel is been loaded
through an AjaxLink.
>
> > The DatePicker icon doesn't work. The calendar doesn't shows up.
> > Is there any incompatibility between loading panels with Ajax and
> > DatePicker within?
>
> > My code looks like this:
>
> > class Index extends WebPage {
> > <constructor> {
> > final Label welcome = new Label("bodyPanel", "Welcome");
> > add(welcome);
>
> > AjaxLink goHome = new AjaxLink("home") {
> > ... {
> > getPage().replace(welcome);
>
> > target.addComponent(welcome);
>
> > }
>
> > };
>
> > AjaxLink newUserLink = AjaxLink("home") {
> > ... {
> > UserFormPanel panel = new UserFormPanel("bodyPanel");
>
> > getPage().replace(panel);
>
> > target.addComponent(panel);
>
> > }
>
> > };
>
> > add(newUserLink);
> > add(goHome);
>
> > }
>
>
> > }
>
> > class UserFormPanel extends Panel {
> > <constructor> {
> > add(new UserForm("userForm"));
>
> > }
>
> > }
>
> > class UserForm extends Form {
> > <constructor> {
> > ... // other basic fields like 'username', 'email', 'password'
>
>
> > // Date field "fieldBirthday"
> > RequiredTextField fieldBirthday = new
> > RequiredTextField("birthday", Date.class);
> > fieldBirthday
> > .add(DateValidator.maximum(Calendar.getInstance().getTime()));
> > add(fieldBirthday);
>
> > // DatePicker for "fieldBirthday"
> > DatePickerSettings settings = new DatePickerSettings();
> > settings.setIfFormat("%d/%m/%Y");
> > settings.setWeekNumbers(false);
> > DatePicker datePicker = new DatePicker("datePicker", fieldBirthday ,
settings);
> > add(datePicker);
>
> > }
>
> > }
>
>
> > I can say for sure: the datepicker component was working
> > perfectly before opening the panel through AjaxLink (actually,
> > UserFormPanel was UserFormPage before this).
> > Am I missing something here?
>
> > Regards,
>
> > --
> > Bruno Borges
> > [EMAIL PROTECTED]
> > Sun Certified Java Programmer for 1.4
> > Sun Certified Web Component Developer for 1.4
>
>
>
>
>
>
> > --
> > Bruno Borges
> > [EMAIL PROTECTED]
> > Sun Certified Java Programmer for 1.4
> > Sun Certified Web Component Developer for 1.4
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------
> 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?cmdlnk&kid0709&bid&3057&dat1642
> _______________________________________________
> 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&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to