You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Matthias Keller <ma...@ergon.ch> on 2008/11/11 11:50:57 UTC

Howto mark a FormComponent as invalid without having a feedbackmessage?

Hi

I'm using a custom FormValidator to validate a group of  checkboxes. I 
want to raise an error whenever none of the checkboxes is checked.
In the effect I must have all checkboxes marked as invalid so that I can 
apply some style to them to visually display this too. Unfortunately 
when I add the error to every formcomponent concerned, I get 10 error 
messages with the same text.
Marking a FormComponent invalid by invoking  invalid()  doesn't work 
too, as this method does NOTHING by default. The only class overriding 
onInvalid() I found was 
org.apache.wicket.extensions.markup.html.form.palette.component.Recorder
Shouldn't  FormComponent.invalid()  also mark a component as invalid so 
that it returns  false  when asked for isValid() ?

Is there any other method to have them marked as invalid while only 
getting that one feedback message?

Thanks

Matt

-- 
matthias.keller@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
______________________________________________________________
e r g o n    smart people - smart software



Re: Howto mark a FormComponent as invalid without having a feedbackmessage?

Posted by Martin Grigorov <mg...@apache.org>.
What is the use case ?

On Thu, Jul 14, 2011 at 1:42 PM, rebecca <ri...@gmail.com> wrote:
> thanks Martin:-(
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Howto-mark-a-FormComponent-as-invalid-without-having-a-feedbackmessage-tp1871821p3667171.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Howto mark a FormComponent as invalid without having a feedbackmessage?

Posted by rebecca <ri...@gmail.com>.
thanks Martin:-(

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Howto-mark-a-FormComponent-as-invalid-without-having-a-feedbackmessage-tp1871821p3667171.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Howto mark a FormComponent as invalid without having a feedbackmessage?

Posted by Martin Grigorov <mg...@apache.org>.
Looking at the code the answer is No.

On Thu, Jul 14, 2011 at 1:29 PM, rebecca <ri...@gmail.com> wrote:
> Hello Dears,
>
> Regarding Matt's question from 2008 - Is there a way to mark a form
> component as invalid without using the error() method?
>
>
> Rebecca
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Howto-mark-a-FormComponent-as-invalid-without-having-a-feedbackmessage-tp1871821p3667147.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: IHeaderContributor of invisible Components

Posted by Benedikt Rothe <be...@qleo.de>.
 > There is no AjaxRequestTarget#onComponentTagBody()

Sorry: AjaxRequestTarget#respondHeaderContribution closes the 
HeaderResponse.
I'll try to switch to wicket 1.4.17.

Benedikt


Am 15.07.2011 17:32, schrieb Martin Grigorov:
> There is no AjaxRequestTarget#onComponentTagBody()
>
> The bug with #close() has been fixed in later version of Wicket.
>
> On Fri, Jul 15, 2011 at 6:25 PM, Benedikt Rothe<be...@qleo.de>  wrote:
>> I made some further investigations. I do think there is a bug in wicket
>> 1.4.14.
>>
>> My Ajax-Request add's *two* targets which shall be rerenderd:
>> class MyLink extends AjaxLink<Void>  {
>> ...
>>     public void onClick(AjaxRequestTarget target) {
>>       ... do Something and change visibilities ...
>>       target.addComponent(component1);
>>       target.addComponent(component2);
>>     }
>>   }
>>
>> If the JavaScript-Reference belongs to component2  the Reference will not be
>> rendered.
>> If I switch the order of the two targetAddComponet-Statements  the Reference
>> will be rendered.
>>
>> Code-Analysis:  The Ajax-Requests uses one HeaderResponse-Instance.
>> For each of the components the Method AjaxRequestTarget#onComponentTagBody
>> will
>> be called. After the first call onComponentTagBody will "close()" the
>> HeaderResponse-Instance.
>> Therefore the HeaderResponse-Instance rejects further Header-Contributions.
>>
>> Benedikt Rothe
>>
>>
>> Am 15.07.2011 16:50, schrieb Benedikt Rothe:
>>> Thank you for your good explanation.
>>>
>>> I will have to reflect about your explanation first. May be I'll come back
>>> :-)
>>>
>>>
>>>
>>> Am 15.07.2011 11:12, schrieb Martin Grigorov:
>>>> Wicket calls renderHead() for each component added in the
>>>> AjaxRequestTarget.
>>>> Then for each call of IHeaderResponse.renderXYZ() Wicket checks
>>>> whether this is static resource and whether it is already rendered. If
>>>> it is not then it renders it. If it is non-static (e.g.
>>>> renderOnDomReady or renderOnLoad) then it is contributed every time
>>>> the component is re-rendered.
>>>>
>>>> Better create a quickstart and attach it to Jira.
>>>>
>>>> On Fri, Jul 15, 2011 at 11:39 AM, Benedikt Rothe<be...@qleo.de>
>>>>   wrote:
>>>>>> Check Ajax Debug panel for errors.
>>>>> I did check the Ajax-Debug-Panel. No error.
>>>>>
>>>>> Situation:
>>>>>   A Component has JavaScript-header-Contributors but is invisible.
>>>>>   Visibility is switched during an AjaxRequest.
>>>>>
>>>>> What is Wicket's *supposed* to do?
>>>>> a) JavaScript-header-Contributor shall be mentioned in the Page although
>>>>> the
>>>>> Component is Wicket-Invisible
>>>>> b) JavaScript-header-Contributor shall be mentioned in
>>>>> "header-contribution"-Section of the wicket-ajax-response
>>>>> c) Wicket doesn't want to deal with a situation like this.
>>>>>
>>>>>
>>>>> Am 15.07.2011 09:46, schrieb Martin Grigorov:
>>>>>> Check Ajax Debug panel for errors.
>>>>>>
>>>>>> On Fri, Jul 15, 2011 at 10:35 AM, Benedikt
>>>>>> Rothe<be...@qleo.de>
>>>>>>   wrote:
>>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>>> added
>>>>>>>> to
>>>>>>>> the page or it's added but doesn't work?
>>>>>>> It is not added to the page.
>>>>>>> There's no script-tag.
>>>>>>>
>>>>>>>
>>>>>>> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>>> added
>>>>>>>> to
>>>>>>>> the page or it's added but doesn't work?
>>>>>>>> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>
>>>>>>>>   wrote:
>>>>>>>>> I have a problem with IHeaderContributor and invisible Components:
>>>>>>>>>
>>>>>>>>> A Panel "MyPanel" implements IHeaderContributor.
>>>>>>>>> The renderHead-Methods adds some JavaScript-References.
>>>>>>>>>
>>>>>>>>> When the page is rendered this panel is invisible.
>>>>>>>>> So these JavaScript-References are not loaded when the page is
>>>>>>>>> loaded.
>>>>>>>>>
>>>>>>>>> Later visibility is switched within an Ajax-Call and the MyPanel
>>>>>>>>> will
>>>>>>>>> be
>>>>>>>>> rendered.
>>>>>>>>> But than my JavaScript is not loaded.
>>>>>>>>>
>>>>>>>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is
>>>>>>>>> even
>>>>>>>>> called, but
>>>>>>>>> the call doesn't provoke anything concerning the output to the
>>>>>>>>> browser.
>>>>>>>>>
>>>>>>>>> Any suggestions?
>>>>>>>>> Benedikt
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>

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


Re: IHeaderContributor of invisible Components

Posted by Benedikt Rothe <be...@qleo.de>.
Martin,

I stated, that the "bug with close()" still occurs in Wicket 1.4.17.
I had a closer look. This was a mistake.
The bug is in Wicket 1.4.14 but *not* in Wicket 1.4.17.

Thanks and sorry
Benedikt

Am 15.07.2011 18:41, schrieb Martin Grigorov:
> ticket + quickstart
>
> On Fri, Jul 15, 2011 at 7:05 PM, Benedikt Rothe<be...@qleo.de>  wrote:
>>> The bug with #close() has been fixed in later version of Wicket.
>> wicket4.1.17 still has the bug.
>>
>> Am 15.07.2011 17:32, schrieb Martin Grigorov:
>>> There is no AjaxRequestTarget#onComponentTagBody()
>>>
>>> The bug with #close() has been fixed in later version of Wicket.
>>>
>>> On Fri, Jul 15, 2011 at 6:25 PM, Benedikt Rothe<be...@qleo.de>
>>>   wrote:
>>>> I made some further investigations. I do think there is a bug in wicket
>>>> 1.4.14.
>>>>
>>>> My Ajax-Request add's *two* targets which shall be rerenderd:
>>>> class MyLink extends AjaxLink<Void>    {
>>>> ...
>>>>     public void onClick(AjaxRequestTarget target) {
>>>>       ... do Something and change visibilities ...
>>>>       target.addComponent(component1);
>>>>       target.addComponent(component2);
>>>>     }
>>>>   }
>>>>
>>>> If the JavaScript-Reference belongs to component2  the Reference will not
>>>> be
>>>> rendered.
>>>> If I switch the order of the two targetAddComponet-Statements  the
>>>> Reference
>>>> will be rendered.
>>>>
>>>> Code-Analysis:  The Ajax-Requests uses one HeaderResponse-Instance.
>>>> For each of the components the Method
>>>> AjaxRequestTarget#onComponentTagBody
>>>> will
>>>> be called. After the first call onComponentTagBody will "close()" the
>>>> HeaderResponse-Instance.
>>>> Therefore the HeaderResponse-Instance rejects further
>>>> Header-Contributions.
>>>>
>>>> Benedikt Rothe
>>>>
>>>>
>>>> Am 15.07.2011 16:50, schrieb Benedikt Rothe:
>>>>> Thank you for your good explanation.
>>>>>
>>>>> I will have to reflect about your explanation first. May be I'll come
>>>>> back
>>>>> :-)
>>>>>
>>>>>
>>>>>
>>>>> Am 15.07.2011 11:12, schrieb Martin Grigorov:
>>>>>> Wicket calls renderHead() for each component added in the
>>>>>> AjaxRequestTarget.
>>>>>> Then for each call of IHeaderResponse.renderXYZ() Wicket checks
>>>>>> whether this is static resource and whether it is already rendered. If
>>>>>> it is not then it renders it. If it is non-static (e.g.
>>>>>> renderOnDomReady or renderOnLoad) then it is contributed every time
>>>>>> the component is re-rendered.
>>>>>>
>>>>>> Better create a quickstart and attach it to Jira.
>>>>>>
>>>>>> On Fri, Jul 15, 2011 at 11:39 AM, Benedikt
>>>>>> Rothe<be...@qleo.de>
>>>>>>   wrote:
>>>>>>>> Check Ajax Debug panel for errors.
>>>>>>> I did check the Ajax-Debug-Panel. No error.
>>>>>>>
>>>>>>> Situation:
>>>>>>>   A Component has JavaScript-header-Contributors but is invisible.
>>>>>>>   Visibility is switched during an AjaxRequest.
>>>>>>>
>>>>>>> What is Wicket's *supposed* to do?
>>>>>>> a) JavaScript-header-Contributor shall be mentioned in the Page
>>>>>>> although
>>>>>>> the
>>>>>>> Component is Wicket-Invisible
>>>>>>> b) JavaScript-header-Contributor shall be mentioned in
>>>>>>> "header-contribution"-Section of the wicket-ajax-response
>>>>>>> c) Wicket doesn't want to deal with a situation like this.
>>>>>>>
>>>>>>>
>>>>>>> Am 15.07.2011 09:46, schrieb Martin Grigorov:
>>>>>>>> Check Ajax Debug panel for errors.
>>>>>>>>
>>>>>>>> On Fri, Jul 15, 2011 at 10:35 AM, Benedikt
>>>>>>>> Rothe<be...@qleo.de>
>>>>>>>>   wrote:
>>>>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>>>>> added
>>>>>>>>>> to
>>>>>>>>>> the page or it's added but doesn't work?
>>>>>>>>> It is not added to the page.
>>>>>>>>> There's no script-tag.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>>>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>>>>> added
>>>>>>>>>> to
>>>>>>>>>> the page or it's added but doesn't work?
>>>>>>>>>> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>
>>>>>>>>>>   wrote:
>>>>>>>>>>> I have a problem with IHeaderContributor and invisible Components:
>>>>>>>>>>>
>>>>>>>>>>> A Panel "MyPanel" implements IHeaderContributor.
>>>>>>>>>>> The renderHead-Methods adds some JavaScript-References.
>>>>>>>>>>>
>>>>>>>>>>> When the page is rendered this panel is invisible.
>>>>>>>>>>> So these JavaScript-References are not loaded when the page is
>>>>>>>>>>> loaded.
>>>>>>>>>>>
>>>>>>>>>>> Later visibility is switched within an Ajax-Call and the MyPanel
>>>>>>>>>>> will
>>>>>>>>>>> be
>>>>>>>>>>> rendered.
>>>>>>>>>>> But than my JavaScript is not loaded.
>>>>>>>>>>>
>>>>>>>>>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is
>>>>>>>>>>> even
>>>>>>>>>>> called, but
>>>>>>>>>>> the call doesn't provoke anything concerning the output to the
>>>>>>>>>>> browser.
>>>>>>>>>>>
>>>>>>>>>>> Any suggestions?
>>>>>>>>>>> Benedikt
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>

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


Re: IHeaderContributor of invisible Components

Posted by Martin Grigorov <mg...@apache.org>.
ticket + quickstart

On Fri, Jul 15, 2011 at 7:05 PM, Benedikt Rothe <be...@qleo.de> wrote:
>> The bug with #close() has been fixed in later version of Wicket.
>
> wicket4.1.17 still has the bug.
>
> Am 15.07.2011 17:32, schrieb Martin Grigorov:
>>
>> There is no AjaxRequestTarget#onComponentTagBody()
>>
>> The bug with #close() has been fixed in later version of Wicket.
>>
>> On Fri, Jul 15, 2011 at 6:25 PM, Benedikt Rothe<be...@qleo.de>
>>  wrote:
>>>
>>> I made some further investigations. I do think there is a bug in wicket
>>> 1.4.14.
>>>
>>> My Ajax-Request add's *two* targets which shall be rerenderd:
>>> class MyLink extends AjaxLink<Void>  {
>>> ...
>>>    public void onClick(AjaxRequestTarget target) {
>>>      ... do Something and change visibilities ...
>>>      target.addComponent(component1);
>>>      target.addComponent(component2);
>>>    }
>>>  }
>>>
>>> If the JavaScript-Reference belongs to component2  the Reference will not
>>> be
>>> rendered.
>>> If I switch the order of the two targetAddComponet-Statements  the
>>> Reference
>>> will be rendered.
>>>
>>> Code-Analysis:  The Ajax-Requests uses one HeaderResponse-Instance.
>>> For each of the components the Method
>>> AjaxRequestTarget#onComponentTagBody
>>> will
>>> be called. After the first call onComponentTagBody will "close()" the
>>> HeaderResponse-Instance.
>>> Therefore the HeaderResponse-Instance rejects further
>>> Header-Contributions.
>>>
>>> Benedikt Rothe
>>>
>>>
>>> Am 15.07.2011 16:50, schrieb Benedikt Rothe:
>>>>
>>>> Thank you for your good explanation.
>>>>
>>>> I will have to reflect about your explanation first. May be I'll come
>>>> back
>>>> :-)
>>>>
>>>>
>>>>
>>>> Am 15.07.2011 11:12, schrieb Martin Grigorov:
>>>>>
>>>>> Wicket calls renderHead() for each component added in the
>>>>> AjaxRequestTarget.
>>>>> Then for each call of IHeaderResponse.renderXYZ() Wicket checks
>>>>> whether this is static resource and whether it is already rendered. If
>>>>> it is not then it renders it. If it is non-static (e.g.
>>>>> renderOnDomReady or renderOnLoad) then it is contributed every time
>>>>> the component is re-rendered.
>>>>>
>>>>> Better create a quickstart and attach it to Jira.
>>>>>
>>>>> On Fri, Jul 15, 2011 at 11:39 AM, Benedikt
>>>>> Rothe<be...@qleo.de>
>>>>>  wrote:
>>>>>>>
>>>>>>> Check Ajax Debug panel for errors.
>>>>>>
>>>>>> I did check the Ajax-Debug-Panel. No error.
>>>>>>
>>>>>> Situation:
>>>>>>  A Component has JavaScript-header-Contributors but is invisible.
>>>>>>  Visibility is switched during an AjaxRequest.
>>>>>>
>>>>>> What is Wicket's *supposed* to do?
>>>>>> a) JavaScript-header-Contributor shall be mentioned in the Page
>>>>>> although
>>>>>> the
>>>>>> Component is Wicket-Invisible
>>>>>> b) JavaScript-header-Contributor shall be mentioned in
>>>>>> "header-contribution"-Section of the wicket-ajax-response
>>>>>> c) Wicket doesn't want to deal with a situation like this.
>>>>>>
>>>>>>
>>>>>> Am 15.07.2011 09:46, schrieb Martin Grigorov:
>>>>>>>
>>>>>>> Check Ajax Debug panel for errors.
>>>>>>>
>>>>>>> On Fri, Jul 15, 2011 at 10:35 AM, Benedikt
>>>>>>> Rothe<be...@qleo.de>
>>>>>>>  wrote:
>>>>>>>>>
>>>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>>>> added
>>>>>>>>> to
>>>>>>>>> the page or it's added but doesn't work?
>>>>>>>>
>>>>>>>> It is not added to the page.
>>>>>>>> There's no script-tag.
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>>>>>>>>
>>>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>>>> added
>>>>>>>>> to
>>>>>>>>> the page or it's added but doesn't work?
>>>>>>>>> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>
>>>>>>>>>  wrote:
>>>>>>>>>>
>>>>>>>>>> I have a problem with IHeaderContributor and invisible Components:
>>>>>>>>>>
>>>>>>>>>> A Panel "MyPanel" implements IHeaderContributor.
>>>>>>>>>> The renderHead-Methods adds some JavaScript-References.
>>>>>>>>>>
>>>>>>>>>> When the page is rendered this panel is invisible.
>>>>>>>>>> So these JavaScript-References are not loaded when the page is
>>>>>>>>>> loaded.
>>>>>>>>>>
>>>>>>>>>> Later visibility is switched within an Ajax-Call and the MyPanel
>>>>>>>>>> will
>>>>>>>>>> be
>>>>>>>>>> rendered.
>>>>>>>>>> But than my JavaScript is not loaded.
>>>>>>>>>>
>>>>>>>>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is
>>>>>>>>>> even
>>>>>>>>>> called, but
>>>>>>>>>> the call doesn't provoke anything concerning the output to the
>>>>>>>>>> browser.
>>>>>>>>>>
>>>>>>>>>> Any suggestions?
>>>>>>>>>> Benedikt
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>>
>>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: IHeaderContributor of invisible Components

Posted by Benedikt Rothe <be...@qleo.de>.
>The bug with #close() has been fixed in later version of Wicket.

wicket4.1.17 still has the bug.

Am 15.07.2011 17:32, schrieb Martin Grigorov:
> There is no AjaxRequestTarget#onComponentTagBody()
>
> The bug with #close() has been fixed in later version of Wicket.
>
> On Fri, Jul 15, 2011 at 6:25 PM, Benedikt Rothe<be...@qleo.de>  wrote:
>> I made some further investigations. I do think there is a bug in wicket
>> 1.4.14.
>>
>> My Ajax-Request add's *two* targets which shall be rerenderd:
>> class MyLink extends AjaxLink<Void>  {
>> ...
>>     public void onClick(AjaxRequestTarget target) {
>>       ... do Something and change visibilities ...
>>       target.addComponent(component1);
>>       target.addComponent(component2);
>>     }
>>   }
>>
>> If the JavaScript-Reference belongs to component2  the Reference will not be
>> rendered.
>> If I switch the order of the two targetAddComponet-Statements  the Reference
>> will be rendered.
>>
>> Code-Analysis:  The Ajax-Requests uses one HeaderResponse-Instance.
>> For each of the components the Method AjaxRequestTarget#onComponentTagBody
>> will
>> be called. After the first call onComponentTagBody will "close()" the
>> HeaderResponse-Instance.
>> Therefore the HeaderResponse-Instance rejects further Header-Contributions.
>>
>> Benedikt Rothe
>>
>>
>> Am 15.07.2011 16:50, schrieb Benedikt Rothe:
>>> Thank you for your good explanation.
>>>
>>> I will have to reflect about your explanation first. May be I'll come back
>>> :-)
>>>
>>>
>>>
>>> Am 15.07.2011 11:12, schrieb Martin Grigorov:
>>>> Wicket calls renderHead() for each component added in the
>>>> AjaxRequestTarget.
>>>> Then for each call of IHeaderResponse.renderXYZ() Wicket checks
>>>> whether this is static resource and whether it is already rendered. If
>>>> it is not then it renders it. If it is non-static (e.g.
>>>> renderOnDomReady or renderOnLoad) then it is contributed every time
>>>> the component is re-rendered.
>>>>
>>>> Better create a quickstart and attach it to Jira.
>>>>
>>>> On Fri, Jul 15, 2011 at 11:39 AM, Benedikt Rothe<be...@qleo.de>
>>>>   wrote:
>>>>>> Check Ajax Debug panel for errors.
>>>>> I did check the Ajax-Debug-Panel. No error.
>>>>>
>>>>> Situation:
>>>>>   A Component has JavaScript-header-Contributors but is invisible.
>>>>>   Visibility is switched during an AjaxRequest.
>>>>>
>>>>> What is Wicket's *supposed* to do?
>>>>> a) JavaScript-header-Contributor shall be mentioned in the Page although
>>>>> the
>>>>> Component is Wicket-Invisible
>>>>> b) JavaScript-header-Contributor shall be mentioned in
>>>>> "header-contribution"-Section of the wicket-ajax-response
>>>>> c) Wicket doesn't want to deal with a situation like this.
>>>>>
>>>>>
>>>>> Am 15.07.2011 09:46, schrieb Martin Grigorov:
>>>>>> Check Ajax Debug panel for errors.
>>>>>>
>>>>>> On Fri, Jul 15, 2011 at 10:35 AM, Benedikt
>>>>>> Rothe<be...@qleo.de>
>>>>>>   wrote:
>>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>>> added
>>>>>>>> to
>>>>>>>> the page or it's added but doesn't work?
>>>>>>> It is not added to the page.
>>>>>>> There's no script-tag.
>>>>>>>
>>>>>>>
>>>>>>> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>>> added
>>>>>>>> to
>>>>>>>> the page or it's added but doesn't work?
>>>>>>>> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>
>>>>>>>>   wrote:
>>>>>>>>> I have a problem with IHeaderContributor and invisible Components:
>>>>>>>>>
>>>>>>>>> A Panel "MyPanel" implements IHeaderContributor.
>>>>>>>>> The renderHead-Methods adds some JavaScript-References.
>>>>>>>>>
>>>>>>>>> When the page is rendered this panel is invisible.
>>>>>>>>> So these JavaScript-References are not loaded when the page is
>>>>>>>>> loaded.
>>>>>>>>>
>>>>>>>>> Later visibility is switched within an Ajax-Call and the MyPanel
>>>>>>>>> will
>>>>>>>>> be
>>>>>>>>> rendered.
>>>>>>>>> But than my JavaScript is not loaded.
>>>>>>>>>
>>>>>>>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is
>>>>>>>>> even
>>>>>>>>> called, but
>>>>>>>>> the call doesn't provoke anything concerning the output to the
>>>>>>>>> browser.
>>>>>>>>>
>>>>>>>>> Any suggestions?
>>>>>>>>> Benedikt
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>

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


Re: IHeaderContributor of invisible Components

Posted by Martin Grigorov <mg...@apache.org>.
There is no AjaxRequestTarget#onComponentTagBody()

The bug with #close() has been fixed in later version of Wicket.

On Fri, Jul 15, 2011 at 6:25 PM, Benedikt Rothe <be...@qleo.de> wrote:
> I made some further investigations. I do think there is a bug in wicket
> 1.4.14.
>
> My Ajax-Request add's *two* targets which shall be rerenderd:
> class MyLink extends AjaxLink<Void> {
> ...
>    public void onClick(AjaxRequestTarget target) {
>      ... do Something and change visibilities ...
>      target.addComponent(component1);
>      target.addComponent(component2);
>    }
>  }
>
> If the JavaScript-Reference belongs to component2  the Reference will not be
> rendered.
> If I switch the order of the two targetAddComponet-Statements  the Reference
> will be rendered.
>
> Code-Analysis:  The Ajax-Requests uses one HeaderResponse-Instance.
> For each of the components the Method AjaxRequestTarget#onComponentTagBody
> will
> be called. After the first call onComponentTagBody will "close()" the
> HeaderResponse-Instance.
> Therefore the HeaderResponse-Instance rejects further Header-Contributions.
>
> Benedikt Rothe
>
>
> Am 15.07.2011 16:50, schrieb Benedikt Rothe:
>>
>> Thank you for your good explanation.
>>
>> I will have to reflect about your explanation first. May be I'll come back
>> :-)
>>
>>
>>
>> Am 15.07.2011 11:12, schrieb Martin Grigorov:
>>>
>>> Wicket calls renderHead() for each component added in the
>>> AjaxRequestTarget.
>>> Then for each call of IHeaderResponse.renderXYZ() Wicket checks
>>> whether this is static resource and whether it is already rendered. If
>>> it is not then it renders it. If it is non-static (e.g.
>>> renderOnDomReady or renderOnLoad) then it is contributed every time
>>> the component is re-rendered.
>>>
>>> Better create a quickstart and attach it to Jira.
>>>
>>> On Fri, Jul 15, 2011 at 11:39 AM, Benedikt Rothe<be...@qleo.de>
>>>  wrote:
>>>>>
>>>>> Check Ajax Debug panel for errors.
>>>>
>>>> I did check the Ajax-Debug-Panel. No error.
>>>>
>>>> Situation:
>>>>  A Component has JavaScript-header-Contributors but is invisible.
>>>>  Visibility is switched during an AjaxRequest.
>>>>
>>>> What is Wicket's *supposed* to do?
>>>> a) JavaScript-header-Contributor shall be mentioned in the Page although
>>>> the
>>>> Component is Wicket-Invisible
>>>> b) JavaScript-header-Contributor shall be mentioned in
>>>> "header-contribution"-Section of the wicket-ajax-response
>>>> c) Wicket doesn't want to deal with a situation like this.
>>>>
>>>>
>>>> Am 15.07.2011 09:46, schrieb Martin Grigorov:
>>>>>
>>>>> Check Ajax Debug panel for errors.
>>>>>
>>>>> On Fri, Jul 15, 2011 at 10:35 AM, Benedikt
>>>>> Rothe<be...@qleo.de>
>>>>>  wrote:
>>>>>>>
>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>> added
>>>>>>> to
>>>>>>> the page or it's added but doesn't work?
>>>>>>
>>>>>> It is not added to the page.
>>>>>> There's no script-tag.
>>>>>>
>>>>>>
>>>>>> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>>>>>>
>>>>>>> When you say "my javascript is not loaded", do you mean it's not
>>>>>>> added
>>>>>>> to
>>>>>>> the page or it's added but doesn't work?
>>>>>>> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>
>>>>>>>  wrote:
>>>>>>>>
>>>>>>>> I have a problem with IHeaderContributor and invisible Components:
>>>>>>>>
>>>>>>>> A Panel "MyPanel" implements IHeaderContributor.
>>>>>>>> The renderHead-Methods adds some JavaScript-References.
>>>>>>>>
>>>>>>>> When the page is rendered this panel is invisible.
>>>>>>>> So these JavaScript-References are not loaded when the page is
>>>>>>>> loaded.
>>>>>>>>
>>>>>>>> Later visibility is switched within an Ajax-Call and the MyPanel
>>>>>>>> will
>>>>>>>> be
>>>>>>>> rendered.
>>>>>>>> But than my JavaScript is not loaded.
>>>>>>>>
>>>>>>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is
>>>>>>>> even
>>>>>>>> called, but
>>>>>>>> the call doesn't provoke anything concerning the output to the
>>>>>>>> browser.
>>>>>>>>
>>>>>>>> Any suggestions?
>>>>>>>> Benedikt
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: IHeaderContributor of invisible Components

Posted by Benedikt Rothe <be...@qleo.de>.
I made some further investigations. I do think there is a bug in wicket 
1.4.14.

My Ajax-Request add's *two* targets which shall be rerenderd:
class MyLink extends AjaxLink<Void> {
...
     public void onClick(AjaxRequestTarget target) {
       ... do Something and change visibilities ...
       target.addComponent(component1);
       target.addComponent(component2);
     }
   }

If the JavaScript-Reference belongs to component2  the Reference will 
not be rendered.
If I switch the order of the two targetAddComponet-Statements  the 
Reference will be rendered.

Code-Analysis:  The Ajax-Requests uses one HeaderResponse-Instance.
For each of the components the Method 
AjaxRequestTarget#onComponentTagBody will
be called. After the first call onComponentTagBody will "close()" the 
HeaderResponse-Instance.
Therefore the HeaderResponse-Instance rejects further Header-Contributions.

Benedikt Rothe


Am 15.07.2011 16:50, schrieb Benedikt Rothe:
> Thank you for your good explanation.
>
> I will have to reflect about your explanation first. May be I'll come 
> back :-)
>
>
>
> Am 15.07.2011 11:12, schrieb Martin Grigorov:
>> Wicket calls renderHead() for each component added in the 
>> AjaxRequestTarget.
>> Then for each call of IHeaderResponse.renderXYZ() Wicket checks
>> whether this is static resource and whether it is already rendered. If
>> it is not then it renders it. If it is non-static (e.g.
>> renderOnDomReady or renderOnLoad) then it is contributed every time
>> the component is re-rendered.
>>
>> Better create a quickstart and attach it to Jira.
>>
>> On Fri, Jul 15, 2011 at 11:39 AM, Benedikt 
>> Rothe<be...@qleo.de>  wrote:
>>>> Check Ajax Debug panel for errors.
>>> I did check the Ajax-Debug-Panel. No error.
>>>
>>> Situation:
>>>   A Component has JavaScript-header-Contributors but is invisible.
>>>   Visibility is switched during an AjaxRequest.
>>>
>>> What is Wicket's *supposed* to do?
>>> a) JavaScript-header-Contributor shall be mentioned in the Page 
>>> although the
>>> Component is Wicket-Invisible
>>> b) JavaScript-header-Contributor shall be mentioned in
>>> "header-contribution"-Section of the wicket-ajax-response
>>> c) Wicket doesn't want to deal with a situation like this.
>>>
>>>
>>> Am 15.07.2011 09:46, schrieb Martin Grigorov:
>>>> Check Ajax Debug panel for errors.
>>>>
>>>> On Fri, Jul 15, 2011 at 10:35 AM, Benedikt 
>>>> Rothe<be...@qleo.de>
>>>>   wrote:
>>>>>> When you say "my javascript is not loaded", do you mean it's not 
>>>>>> added
>>>>>> to
>>>>>> the page or it's added but doesn't work?
>>>>> It is not added to the page.
>>>>> There's no script-tag.
>>>>>
>>>>>
>>>>> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>>>>> When you say "my javascript is not loaded", do you mean it's not 
>>>>>> added
>>>>>> to
>>>>>> the page or it's added but doesn't work?
>>>>>> On 14 Jul 2011 12:21, "Benedikt 
>>>>>> Rothe"<be...@qleo.de>      wrote:
>>>>>>> I have a problem with IHeaderContributor and invisible Components:
>>>>>>>
>>>>>>> A Panel "MyPanel" implements IHeaderContributor.
>>>>>>> The renderHead-Methods adds some JavaScript-References.
>>>>>>>
>>>>>>> When the page is rendered this panel is invisible.
>>>>>>> So these JavaScript-References are not loaded when the page is 
>>>>>>> loaded.
>>>>>>>
>>>>>>> Later visibility is switched within an Ajax-Call and the MyPanel 
>>>>>>> will
>>>>>>> be
>>>>>>> rendered.
>>>>>>> But than my JavaScript is not loaded.
>>>>>>>
>>>>>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel 
>>>>>>> is even
>>>>>>> called, but
>>>>>>> the call doesn't provoke anything concerning the output to the 
>>>>>>> browser.
>>>>>>>
>>>>>>> Any suggestions?
>>>>>>> Benedikt
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --------------------------------------------------------------------- 
>>>>>>>
>>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

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


Re: IHeaderContributor of invisible Components

Posted by Benedikt Rothe <be...@qleo.de>.
Thank you for your good explanation.

I will have to reflect about your explanation first. May be I'll come 
back :-)



Am 15.07.2011 11:12, schrieb Martin Grigorov:
> Wicket calls renderHead() for each component added in the AjaxRequestTarget.
> Then for each call of IHeaderResponse.renderXYZ() Wicket checks
> whether this is static resource and whether it is already rendered. If
> it is not then it renders it. If it is non-static (e.g.
> renderOnDomReady or renderOnLoad) then it is contributed every time
> the component is re-rendered.
>
> Better create a quickstart and attach it to Jira.
>
> On Fri, Jul 15, 2011 at 11:39 AM, Benedikt Rothe<be...@qleo.de>  wrote:
>>> Check Ajax Debug panel for errors.
>> I did check the Ajax-Debug-Panel. No error.
>>
>> Situation:
>>   A Component has JavaScript-header-Contributors but is invisible.
>>   Visibility is switched during an AjaxRequest.
>>
>> What is Wicket's *supposed* to do?
>> a) JavaScript-header-Contributor shall be mentioned in the Page although the
>> Component is Wicket-Invisible
>> b) JavaScript-header-Contributor shall be mentioned in
>> "header-contribution"-Section of the wicket-ajax-response
>> c) Wicket doesn't want to deal with a situation like this.
>>
>>
>> Am 15.07.2011 09:46, schrieb Martin Grigorov:
>>> Check Ajax Debug panel for errors.
>>>
>>> On Fri, Jul 15, 2011 at 10:35 AM, Benedikt Rothe<be...@qleo.de>
>>>   wrote:
>>>>> When you say "my javascript is not loaded", do you mean it's not added
>>>>> to
>>>>> the page or it's added but doesn't work?
>>>> It is not added to the page.
>>>> There's no script-tag.
>>>>
>>>>
>>>> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>>>> When you say "my javascript is not loaded", do you mean it's not added
>>>>> to
>>>>> the page or it's added but doesn't work?
>>>>> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>      wrote:
>>>>>> I have a problem with IHeaderContributor and invisible Components:
>>>>>>
>>>>>> A Panel "MyPanel" implements IHeaderContributor.
>>>>>> The renderHead-Methods adds some JavaScript-References.
>>>>>>
>>>>>> When the page is rendered this panel is invisible.
>>>>>> So these JavaScript-References are not loaded when the page is loaded.
>>>>>>
>>>>>> Later visibility is switched within an Ajax-Call and the MyPanel will
>>>>>> be
>>>>>> rendered.
>>>>>> But than my JavaScript is not loaded.
>>>>>>
>>>>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is even
>>>>>> called, but
>>>>>> the call doesn't provoke anything concerning the output to the browser.
>>>>>>
>>>>>> Any suggestions?
>>>>>> Benedikt
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail:users-help@wicket.apache.org
>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail:users-help@wicket.apache.org
>>
>>
>

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


Re: IHeaderContributor of invisible Components

Posted by Martin Grigorov <mg...@apache.org>.
Wicket calls renderHead() for each component added in the AjaxRequestTarget.
Then for each call of IHeaderResponse.renderXYZ() Wicket checks
whether this is static resource and whether it is already rendered. If
it is not then it renders it. If it is non-static (e.g.
renderOnDomReady or renderOnLoad) then it is contributed every time
the component is re-rendered.

Better create a quickstart and attach it to Jira.

On Fri, Jul 15, 2011 at 11:39 AM, Benedikt Rothe <be...@qleo.de> wrote:
>> Check Ajax Debug panel for errors.
>
> I did check the Ajax-Debug-Panel. No error.
>
> Situation:
>  A Component has JavaScript-header-Contributors but is invisible.
>  Visibility is switched during an AjaxRequest.
>
> What is Wicket's *supposed* to do?
> a) JavaScript-header-Contributor shall be mentioned in the Page although the
> Component is Wicket-Invisible
> b) JavaScript-header-Contributor shall be mentioned in
> "header-contribution"-Section of the wicket-ajax-response
> c) Wicket doesn't want to deal with a situation like this.
>
>
> Am 15.07.2011 09:46, schrieb Martin Grigorov:
>>
>> Check Ajax Debug panel for errors.
>>
>> On Fri, Jul 15, 2011 at 10:35 AM, Benedikt Rothe<be...@qleo.de>
>>  wrote:
>>>>
>>>> When you say "my javascript is not loaded", do you mean it's not added
>>>> to
>>>> the page or it's added but doesn't work?
>>>
>>> It is not added to the page.
>>> There's no script-tag.
>>>
>>>
>>> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>>>
>>>> When you say "my javascript is not loaded", do you mean it's not added
>>>> to
>>>> the page or it's added but doesn't work?
>>>> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>    wrote:
>>>>>
>>>>> I have a problem with IHeaderContributor and invisible Components:
>>>>>
>>>>> A Panel "MyPanel" implements IHeaderContributor.
>>>>> The renderHead-Methods adds some JavaScript-References.
>>>>>
>>>>> When the page is rendered this panel is invisible.
>>>>> So these JavaScript-References are not loaded when the page is loaded.
>>>>>
>>>>> Later visibility is switched within an Ajax-Call and the MyPanel will
>>>>> be
>>>>> rendered.
>>>>> But than my JavaScript is not loaded.
>>>>>
>>>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is even
>>>>> called, but
>>>>> the call doesn't provoke anything concerning the output to the browser.
>>>>>
>>>>> Any suggestions?
>>>>> Benedikt
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: IHeaderContributor of invisible Components

Posted by Benedikt Rothe <be...@qleo.de>.
>Check Ajax Debug panel for errors.

I did check the Ajax-Debug-Panel. No error.

Situation:
   A Component has JavaScript-header-Contributors but is invisible.
   Visibility is switched during an AjaxRequest.

What is Wicket's *supposed* to do?
a) JavaScript-header-Contributor shall be mentioned in the Page although 
the Component is Wicket-Invisible
b) JavaScript-header-Contributor shall be mentioned in 
"header-contribution"-Section of the wicket-ajax-response
c) Wicket doesn't want to deal with a situation like this.


Am 15.07.2011 09:46, schrieb Martin Grigorov:
> Check Ajax Debug panel for errors.
>
> On Fri, Jul 15, 2011 at 10:35 AM, Benedikt Rothe<be...@qleo.de>  wrote:
>>> When you say "my javascript is not loaded", do you mean it's not added to
>>> the page or it's added but doesn't work?
>> It is not added to the page.
>> There's no script-tag.
>>
>>
>> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>> When you say "my javascript is not loaded", do you mean it's not added to
>>> the page or it's added but doesn't work?
>>> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>    wrote:
>>>> I have a problem with IHeaderContributor and invisible Components:
>>>>
>>>> A Panel "MyPanel" implements IHeaderContributor.
>>>> The renderHead-Methods adds some JavaScript-References.
>>>>
>>>> When the page is rendered this panel is invisible.
>>>> So these JavaScript-References are not loaded when the page is loaded.
>>>>
>>>> Later visibility is switched within an Ajax-Call and the MyPanel will be
>>>> rendered.
>>>> But than my JavaScript is not loaded.
>>>>
>>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is even
>>>> called, but
>>>> the call doesn't provoke anything concerning the output to the browser.
>>>>
>>>> Any suggestions?
>>>> Benedikt
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>

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


Re: IHeaderContributor of invisible Components

Posted by Martin Grigorov <mg...@apache.org>.
Check Ajax Debug panel for errors.

On Fri, Jul 15, 2011 at 10:35 AM, Benedikt Rothe <be...@qleo.de> wrote:
>> When you say "my javascript is not loaded", do you mean it's not added to
>> the page or it's added but doesn't work?
>
> It is not added to the page.
> There's no script-tag.
>
>
> Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
>>
>> When you say "my javascript is not loaded", do you mean it's not added to
>> the page or it's added but doesn't work?
>> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>  wrote:
>>>
>>> I have a problem with IHeaderContributor and invisible Components:
>>>
>>> A Panel "MyPanel" implements IHeaderContributor.
>>> The renderHead-Methods adds some JavaScript-References.
>>>
>>> When the page is rendered this panel is invisible.
>>> So these JavaScript-References are not loaded when the page is loaded.
>>>
>>> Later visibility is switched within an Ajax-Call and the MyPanel will be
>>> rendered.
>>> But than my JavaScript is not loaded.
>>>
>>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is even
>>> called, but
>>> the call doesn't provoke anything concerning the output to the browser.
>>>
>>> Any suggestions?
>>> Benedikt
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: IHeaderContributor of invisible Components

Posted by Benedikt Rothe <be...@qleo.de>.
>When you say "my javascript is not loaded", do you mean it's not added to
>the page or it's added but doesn't work?

It is not added to the page.
There's no script-tag.


Am 14.07.2011 14:15, schrieb Rodrigo Heffner:
> When you say "my javascript is not loaded", do you mean it's not added to
> the page or it's added but doesn't work?
> On 14 Jul 2011 12:21, "Benedikt Rothe"<be...@qleo.de>  wrote:
>> I have a problem with IHeaderContributor and invisible Components:
>>
>> A Panel "MyPanel" implements IHeaderContributor.
>> The renderHead-Methods adds some JavaScript-References.
>>
>> When the page is rendered this panel is invisible.
>> So these JavaScript-References are not loaded when the page is loaded.
>>
>> Later visibility is switched within an Ajax-Call and the MyPanel will be
>> rendered.
>> But than my JavaScript is not loaded.
>>
>> Strange: During the Ajax-Call the renderHead-Method of MyPanel is even
>> called, but
>> the call doesn't provoke anything concerning the output to the browser.
>>
>> Any suggestions?
>> Benedikt
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>

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


Re: IHeaderContributor of invisible Components

Posted by Rodrigo Heffner <ro...@gmail.com>.
When you say "my javascript is not loaded", do you mean it's not added to
the page or it's added but doesn't work?
On 14 Jul 2011 12:21, "Benedikt Rothe" <be...@qleo.de> wrote:
> I have a problem with IHeaderContributor and invisible Components:
>
> A Panel "MyPanel" implements IHeaderContributor.
> The renderHead-Methods adds some JavaScript-References.
>
> When the page is rendered this panel is invisible.
> So these JavaScript-References are not loaded when the page is loaded.
>
> Later visibility is switched within an Ajax-Call and the MyPanel will be
> rendered.
> But than my JavaScript is not loaded.
>
> Strange: During the Ajax-Call the renderHead-Method of MyPanel is even
> called, but
> the call doesn't provoke anything concerning the output to the browser.
>
> Any suggestions?
> Benedikt
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

IHeaderContributor of invisible Components

Posted by Benedikt Rothe <be...@qleo.de>.
I have a problem with IHeaderContributor and invisible Components:

A Panel "MyPanel" implements IHeaderContributor.
The renderHead-Methods adds some JavaScript-References.

When the page is rendered this panel is invisible.
So these JavaScript-References are not loaded when the page is loaded.

Later visibility is switched within an Ajax-Call and the MyPanel will be 
rendered.
But than my JavaScript is not loaded.

Strange: During the Ajax-Call the renderHead-Method of MyPanel is even 
called, but
the call doesn't provoke anything concerning the output to the browser.

Any suggestions?
Benedikt





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


Re: Howto mark a FormComponent as invalid without having a feedbackmessage?

Posted by rebecca <ri...@gmail.com>.
Hello Dears,

Regarding Matt's question from 2008 - Is there a way to mark a form
component as invalid without using the error() method?


Rebecca

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Howto-mark-a-FormComponent-as-invalid-without-having-a-feedbackmessage-tp1871821p3667147.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Howto mark a FormComponent as invalid without having a feedbackmessage?

Posted by Jim Pinkham <pi...@gmail.com>.
Matt,

Try using a CheckGroup

- Jim.

On Tue, Nov 11, 2008 at 5:50 AM, Matthias Keller
<ma...@ergon.ch>wrote:

> Hi
>
> I'm using a custom FormValidator to validate a group of  checkboxes. I want
> to raise an error whenever none of the checkboxes is checked.
> In the effect I must have all checkboxes marked as invalid so that I can
> apply some style to them to visually display this too. Unfortunately when I
> add the error to every formcomponent concerned, I get 10 error messages with
> the same text.
> Marking a FormComponent invalid by invoking  invalid()  doesn't work too,
> as this method does NOTHING by default. The only class overriding
> onInvalid() I found was
> org.apache.wicket.extensions.markup.html.form.palette.component.Recorder
> Shouldn't  FormComponent.invalid()  also mark a component as invalid so
> that it returns  false  when asked for isValid() ?
>
> Is there any other method to have them marked as invalid while only getting
> that one feedback message?
>
> Thanks
>
> Matt
>
> --
> matthias.keller@ergon.ch  +41 44 268 83 98
> Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
> http://www.ergon.ch
> ______________________________________________________________
> e r g o n    smart people - smart software
>
>
>