OK,
I'll try to describe my problem and maybe it will clear up yours.
I'm not sure, but hey, who knows.

We have a customized button.
Basically what it does is:
1. I force the user to put <button> in the markup (with the check tag
method).
2. I add in the content between the <button> and </button> a table.
3. This table has three columns with gifs so I can manipulate how the button
looks like.
4. When move over, the gifs are changing to different color.
5. All of this is by using a behavior.
And now comes the problem:
We also add JS after rendering:
    @Override
    protected void onAfterRender() {
        if (isVisible()) {
            getResponse().write(Consts.getResizeScript(getMarkupId()));
        }
        super.onAfterRender();
    }

The resize script has this this (only a small portion):
...
strBuilder.append("document.getElementById('btnObj_");
...
(after the underscore we add the id)
And the problem:
When I used a modal window with a Panel that have this button, I got a
script error.
Looking at FireBug, I saw that it doesn't find the element.
I guessed that because the panel is hidden, the button is not there so we
get null.
I tried to add setOutputMarkupPlaceholderTag(true);
but it didn't help.
When I switched the modal to use a Page (just made my panel to a page), it
worked.

So,
1. Wicket experts, what do you think?
2. cartina - do you think my problem is related to yours?


On Wed, Sep 10, 2008 at 10:21 AM, cartina84 <[EMAIL PROTECTED]> wrote:

>
> I need use a panel because I must replace it to another when the user
> choose
> an option.
>
>
>
> egolan74 wrote:
> >
> > cartina, nanotech,
> > I had similar problem. (I will ask it when I have time to compose it well
> > :)
> > )
> > Try to use a page with the Modal and not a panel.
> > The change should be pretty easy.
> >
> > Hope that will help
> >
> > On Tue, Sep 9, 2008 at 4:19 PM, cartina84 <[EMAIL PROTECTED]>
> wrote:
> >
> >>
> >>  I am having the same problem in IE7 on a ModalWindow with a Panel, with
> >> a
> >> DateTextField and a DatePicker attached to it. if I set the date the
> >> calendar does not appare. i try to use wicket 1.4m2-m3 but problem
> >> remain..
> >> If I remove date from the datetextfield and click on calendar again then
> >> calendar appare.
> >> Someone have the solution?
> >>
> >>
> >> Michael Mehrle wrote:
> >> >
> >> > I have a DateField inside a modal and when clicking on the date icon
> >> > it's throwing a 'unknown runtime error' in IE's JavaScript console.
> >> > Works in Safari and Firefox.
> >> >
> >> >
> >> >
> >> > Is this a commonly known problem?
> >> >
> >> >
> >> >
> >> > Michael
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/DateField-throwing-runtime-error-in-IE-only-tp17379574p19392243.html
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > Eyal Golan
> > [EMAIL PROTECTED]
> >
> > Visit: http://jvdrums.sourceforge.net/
> > LinkedIn: http://www.linkedin.com/in/egolan74
> >
> > P Save a tree. Please don't print this e-mail unless it's really
> necessary
> >
> >
> > -----
> > Eyal Golan
> > [EMAIL PROTECTED]
> >
> > Visit: JVDrums
> > LinkedIn: LinkedIn
> >
>
> --
> View this message in context:
> http://www.nabble.com/DateField-throwing-runtime-error-in-IE-only-tp17379574p19407961.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P Save a tree. Please don't print this e-mail unless it's really necessary

Reply via email to