You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2011/08/28 13:18:34 UTC
Re: 1.5: Content cannot be added below Body inside Border?
it should be possible
show the java code
On Sun, Aug 28, 2011 at 2:19 PM, <bh...@actrix.gen.nz> wrote:
> Hi,
>
> The following markup is used to stuff a form component inside the body
> of a border where validation feedback is displayed below the form
> component:
>
> <wicket:border>
> <wicket:body>Form Component</wicket:body>
> <!-- feedbackContainer because of the <br/> tag that has to be
> removed
> if feedbackLabel is empty -->
> <span wicket:id = "feedbackContainer"><br/>
> <span wicket:id="feedbackLabel">Feedback here</span>
> </span>
> </wicket:border>
>
> In 1.4, this works as expected.
>
> In 1.5, I get an error:
>
> Unable to find component with id 'feedbackContainer' in
> [FormFeedbackBelowBorder [Component id = emailFeedback]]
> Expected:
> 'formPanel:registerForm:emailFeedback.feedbackContainer'.
> Found with similar names:
> 'formPanel:registerForm:emailFeedback:emailFeedback_body:feedbackContainer'
>
> It looks like Wicket thinks that the feedbackContainer is inside the
> bodyContainer which it obviously isn't.
>
> Is it no longer possible in 1.5 to add wicket tags inside
> <wicket:border> but outside its <wicket:body>?
>
> Thanks,
>
> Bernard
>
> ---------------------------------------------------------------------
> 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: 1.5: Content cannot be added below Body inside Border?
Posted by bh...@actrix.gen.nz.
Thanks Martin, it works.
On Sun, 28 Aug 2011 14:35:02 +0300, you wrote:
>Border.add() delegates to .addToBodyContainer().
>Use .addToBorder() to add something that is ot of the body.
>It is in the migration guide
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: 1.5: Content cannot be added below Body inside Border?
Posted by Martin Grigorov <mg...@apache.org>.
Border.add() delegates to .addToBodyContainer().
Use .addToBorder() to add something that is ot of the body.
It is in the migration guide
On Sun, Aug 28, 2011 at 2:29 PM, <bh...@actrix.gen.nz> wrote:
>
>
> public class FormFeedbackBelowBorder extends Border implements
> IFeedback {
>
> private static final long serialVersionUID = 1L;
> private String inputStyleClassNormal;
> private String inputStyleClassFeedback;
> private MyFeedbackLabel feedbackLabel;
> // feedbackContainer: So we can make it invisible.
> private WebMarkupContainer feedbackContainer;
> // component: Required for filters
> private Component component;
>
> public FormFeedbackBelowBorder(final String id, Component
> component,
> final String inputStyleClassNormal, final String
> inputStyleClassFeedback) {
> super(id);
> this.component = component;
> this.inputStyleClassNormal = inputStyleClassNormal;
> this.inputStyleClassFeedback = inputStyleClassFeedback;
> // Insert component into <wicket:body/> of this container:
> this.getBodyContainer().add(component);
> // MarkupContainer is required so that the <br/> can be hidden
> if no
> // feedback is shown
> this.feedbackContainer =
> new WebMarkupContainer("feedbackContainer");
> this.feedbackLabel = new MyFeedbackLabel("feedbackLabel",
> component);
> this.feedbackContainer.add(this.feedbackLabel);
> add(this.feedbackContainer);
> }
>
> Regards,
>
> Bernard
>
>
>
>
> On Sun, 28 Aug 2011 14:18:34 +0300, you wrote:
>
>>it should be possible
>>show the java code
>>
>>On Sun, Aug 28, 2011 at 2:19 PM, <bh...@actrix.gen.nz> wrote:
>>> Hi,
>>>
>>> The following markup is used to stuff a form component inside the body
>>> of a border where validation feedback is displayed below the form
>>> component:
>>>
>>> <wicket:border>
>>> <wicket:body>Form Component</wicket:body>
>>> <!-- feedbackContainer because of the <br/> tag that has to be
>>> removed
>>> if feedbackLabel is empty -->
>>> <span wicket:id = "feedbackContainer"><br/>
>>> <span wicket:id="feedbackLabel">Feedback here</span>
>>> </span>
>>> </wicket:border>
>>>
>>> In 1.4, this works as expected.
>>>
>>> In 1.5, I get an error:
>>>
>>> Unable to find component with id 'feedbackContainer' in
>>> [FormFeedbackBelowBorder [Component id = emailFeedback]]
>>> Expected:
>>> 'formPanel:registerForm:emailFeedback.feedbackContainer'.
>>> Found with similar names:
>>> 'formPanel:registerForm:emailFeedback:emailFeedback_body:feedbackContainer'
>>>
>>> It looks like Wicket thinks that the feedbackContainer is inside the
>>> bodyContainer which it obviously isn't.
>>>
>>> Is it no longer possible in 1.5 to add wicket tags inside
>>> <wicket:border> but outside its <wicket:body>?
>>>
>>> Thanks,
>>>
>>> Bernard
>>>
>>> ---------------------------------------------------------------------
>>> 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: 1.5: Content cannot be added below Body inside Border?
Posted by bh...@actrix.gen.nz.
public class FormFeedbackBelowBorder extends Border implements
IFeedback {
private static final long serialVersionUID = 1L;
private String inputStyleClassNormal;
private String inputStyleClassFeedback;
private MyFeedbackLabel feedbackLabel;
// feedbackContainer: So we can make it invisible.
private WebMarkupContainer feedbackContainer;
// component: Required for filters
private Component component;
public FormFeedbackBelowBorder(final String id, Component
component,
final String inputStyleClassNormal, final String
inputStyleClassFeedback) {
super(id);
this.component = component;
this.inputStyleClassNormal = inputStyleClassNormal;
this.inputStyleClassFeedback = inputStyleClassFeedback;
// Insert component into <wicket:body/> of this container:
this.getBodyContainer().add(component);
// MarkupContainer is required so that the <br/> can be hidden
if no
// feedback is shown
this.feedbackContainer =
new WebMarkupContainer("feedbackContainer");
this.feedbackLabel = new MyFeedbackLabel("feedbackLabel",
component);
this.feedbackContainer.add(this.feedbackLabel);
add(this.feedbackContainer);
}
Regards,
Bernard
On Sun, 28 Aug 2011 14:18:34 +0300, you wrote:
>it should be possible
>show the java code
>
>On Sun, Aug 28, 2011 at 2:19 PM, <bh...@actrix.gen.nz> wrote:
>> Hi,
>>
>> The following markup is used to stuff a form component inside the body
>> of a border where validation feedback is displayed below the form
>> component:
>>
>> <wicket:border>
>> <wicket:body>Form Component</wicket:body>
>> <!-- feedbackContainer because of the <br/> tag that has to be
>> removed
>> if feedbackLabel is empty -->
>> <span wicket:id = "feedbackContainer"><br/>
>> <span wicket:id="feedbackLabel">Feedback here</span>
>> </span>
>> </wicket:border>
>>
>> In 1.4, this works as expected.
>>
>> In 1.5, I get an error:
>>
>> Unable to find component with id 'feedbackContainer' in
>> [FormFeedbackBelowBorder [Component id = emailFeedback]]
>> Expected:
>> 'formPanel:registerForm:emailFeedback.feedbackContainer'.
>> Found with similar names:
>> 'formPanel:registerForm:emailFeedback:emailFeedback_body:feedbackContainer'
>>
>> It looks like Wicket thinks that the feedbackContainer is inside the
>> bodyContainer which it obviously isn't.
>>
>> Is it no longer possible in 1.5 to add wicket tags inside
>> <wicket:border> but outside its <wicket:body>?
>>
>> Thanks,
>>
>> Bernard
>>
>> ---------------------------------------------------------------------
>> 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