Re: ModalWindow with Panel - HeaderContributor in Panel not called

2011-05-12 Thread Marieke Vandamme
Igor, 

Thanks for the answer, and you're right indeed. 
I forgot that I added code in my HeaderContributor that checked if it was an
ajax request. Because I found it useless so re-add all the css + js to the
page just when you're readding your form after validation or something. But
when using the HeaderContributor with the modalwindow, I can never be
certain that the css / js is already loaded or not. 
So I just removed my ajax-check, and now it's working. But can I maybe add
some test to check if my HomeMadeReusabel component is inside a ModalWindow?
Because now I re-add the js + css every time on an ajax call, and most of
the time it's not necessary. 

Thanks! Marieke Vandamme

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ModalWindow-with-Panel-HeaderContributor-in-Panel-not-called-tp3514628p3516743.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ModalWindow with Panel - HeaderContributor in Panel not called

2011-05-12 Thread Igor Vaynberg
wicket keeps track of header contributions and doesnt contribute the
same contribution more then once.

-igor


On Thu, May 12, 2011 at 1:24 AM, Marieke Vandamme
marieke.vanda...@tvh.be wrote:
 Igor,

 Thanks for the answer, and you're right indeed.
 I forgot that I added code in my HeaderContributor that checked if it was an
 ajax request. Because I found it useless so re-add all the css + js to the
 page just when you're readding your form after validation or something. But
 when using the HeaderContributor with the modalwindow, I can never be
 certain that the css / js is already loaded or not.
 So I just removed my ajax-check, and now it's working. But can I maybe add
 some test to check if my HomeMadeReusabel component is inside a ModalWindow?
 Because now I re-add the js + css every time on an ajax call, and most of
 the time it's not necessary.

 Thanks! Marieke Vandamme

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/ModalWindow-with-Panel-HeaderContributor-in-Panel-not-called-tp3514628p3516743.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ModalWindow with Panel - HeaderContributor in Panel not called

2011-05-12 Thread Nicklas Johnson
On a related note, has anyone experienced HeaderContributors being
ineffective in IE8 when added via an ajax event?

The scenario is that a component with an attached Ibehavior which in turn
provides several Javascript HeaderContributors is added to an ajax target
(eg, target.addComponent(fooComponent)).

In Firefox the HeaderContributor seems to be added and evaluated correctly,
and the behavior works as expected.  In IE8, however, the contributed
Javascript appears not to be evaluated.

We are able to work around it by pre-adding the HeaderContributors prior to
the ajax event being fired, but that's kind of a messy solution... Would
rather see IE8 doing the right thing.

(Still need to get up to the latest 1.4, so it's possible that this problem
has already been addressed, though I'm curious if it is or was a known
problem with that dreadful browser.)

   Nick


On 5/12/11 9:51 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:

 wicket keeps track of header contributions and doesnt contribute the
 same contribution more then once.
 
 -igor
 
 
 On Thu, May 12, 2011 at 1:24 AM, Marieke Vandamme
 marieke.vanda...@tvh.be wrote:
 Igor,
 
 Thanks for the answer, and you're right indeed.
 I forgot that I added code in my HeaderContributor that checked if it was an
 ajax request. Because I found it useless so re-add all the css + js to the
 page just when you're readding your form after validation or something. But
 when using the HeaderContributor with the modalwindow, I can never be
 certain that the css / js is already loaded or not.
 So I just removed my ajax-check, and now it's working. But can I maybe add
 some test to check if my HomeMadeReusabel component is inside a ModalWindow?
 Because now I re-add the js + css every time on an ajax call, and most of
 the time it's not necessary.
 
 Thanks! Marieke Vandamme
 
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/ModalWindow-with-Panel-HeaderContr
 ibutor-in-Panel-not-called-tp3514628p3516743.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

-- 
Nicklas Johnson -=- N6OL
TXBU Software Engineer
Ask is not a noun.  You mean request, requirement, or question.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ModalWindow with Panel - HeaderContributor in Panel not called

2011-05-11 Thread Igor Vaynberg
it is contributed, but wont be visible using view-source because it is
added dynamically via ajax and is not in the original source of the
page.

-igor

On Wed, May 11, 2011 at 6:02 AM, Marieke Vandamme
marieke.vanda...@tvh.be wrote:
 Hello,

 This is my situation:
 Page
  |- ModalWindow
           |- Panel
                   |- HomeMadeReusableComponent
                                   |- HeaderContributor

 In this HeaderContributor I override renderHead(IHeaderResponse response).
 I thought that everything I wrote to the response would end up in my Page,
 but it doesn't...

 I know that one option would be to add the HeaderContributor directly to the
 page, but then I have duplicate code that is now needly inside my
 HomeMadeReusableComponent.

 I tried to add the HeaderContributer inside my HomeMadeReusableComponent to
 the page instead then adding it to the component, but HeaderContributors are
 defined inside the component constructor and then my page isn't ready yet.

 Can anyone help me or give me any hints?
 Thanks in advance ! Marieke vandamme

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/ModalWindow-with-Panel-HeaderContributor-in-Panel-not-called-tp3514628p3514628.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org