You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Entropy <bl...@gmail.com> on 2014/05/30 23:26:45 UTC
ComponentFeedbackPanel near radio group not working
I am mystified. I have an error panel at the top of my page that show the
errors for the page, but near each control is ALSO a ComponentFeedbackPanel
to show the error near the control. These work fine for every control
except this radio group. The error shows up top, has the right label, but
does not show near the control. The tag is there, the component is added to
the hierarchy. I looked a view source and could see the error messages near
the other controls, but not this one. I scanned to see if I accidentally
hide the thing anywhere, and it does not appear so.
HTML:
<div wicket:id="taskForceContainer" class="checks">
wall of text deleted for brevity
<wicket:container wicket:id="taskForceRadio">
<ul id="taskForceRadio">
<li>
<input wicket:id="taskForceRadioYes" type="radio" name="adtype"
/><label>Yes</label>
</li>
<li>
<input wicket:id="taskForceRadioNo" type="radio" name="adtype"
/><label>No</label>
</li>
</ul>
</wicket:container>
</div>
Java:
//TASK FORCE
WebMarkupContainer taskForceContainer = new
WebMarkupContainer("taskForceContainer"){
@Override
public boolean isVisible() {
return isEnabledInHierarchy() && super.isVisible();
}
};
oagForm.add(taskForceContainer);
RadioGroup<ShareRequest> group = new
RadioGroup<ShareRequest>("taskForceRadio", new
PropertyModel<ShareRequest>(request, "sharingTAAgreement")){
@Override
public boolean isVisible() {
return isEnabledInHierarchy();
}
};
group.setRequired(true);
group.setLabel(new Model<String>("Task Force Agreement"));
taskForceContainer.add(group);
taskForceContainer.setVisible(!isFCF());
group.add(new Radio<String>("taskForceRadioYes", new Model<String>("Y")));
group.add(new Radio<String>("taskForceRadioNo", new Model<String>("N")));
taskForceContainer.add(new Label("taskForceRadioReadOnly", new
Model<String>(decodeYesNo(request.getSharingTAAgreement()))) {
@Override
public boolean isVisible() {
return !this.getParent().get("taskForceRadio").isEnabledInHierarchy();
}
});
taskForceContainer.add(new ComponentFeedbackPanel("errTaskForce",
group).setEscapeModelStrings(false));
You can see that I am adding the group to the componentfeedbackpanel and so
forth. Any idea why this control isn't whoing the messages?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077.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: ComponentFeedbackPanel near radio group not working
Posted by Entropy <bl...@gmail.com>.
DOH! I should have responded earlier. This turned out to be a cut &
paste error. A different part of the code was doing something
similar, the code was cut & pasted, but the ID was unchanged, and so a
different ComponentFeedbackPanel was ALSO bound to that control, and,
I presume, was taking the errors away from the one that was supposed
to get them.
Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx
On Tue, Jun 3, 2014 at 10:26 PM, Paul Bors [via Apache Wicket]
<ml...@n4.nabble.com> wrote:
> Do you use any custom feedback filters?
>
> Have a great day,
> Paul Bors
>
>> On May 31, 2014, at 9:29 AM, Entropy <[hidden email]> wrote:
>>
>> On the group. It's the required rule. You can see group is set to
>> required.
>> And group is bound to the component feedback panel.
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077p4666079.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
> ~ Thank you,
> Paul@Bors.ws
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077p4666109.html
> To unsubscribe from ComponentFeedbackPanel near radio group not working,
> click here.
> NAML
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077p4666118.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: ComponentFeedbackPanel near radio group not working
Posted by Paul BorČ™ <pa...@bors.ws>.
Do you use any custom feedback filters?
Have a great day,
Paul Bors
> On May 31, 2014, at 9:29 AM, Entropy <bl...@gmail.com> wrote:
>
> On the group. It's the required rule. You can see group is set to required.
> And group is bound to the component feedback panel.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077p4666079.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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: ComponentFeedbackPanel near radio group not working
Posted by Entropy <bl...@gmail.com>.
On the group. It's the required rule. You can see group is set to required.
And group is bound to the component feedback panel.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077p4666079.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: ComponentFeedbackPanel near radio group not working
Posted by Sven Meier <sv...@meiers.net>.
Hi,
I've adjusted RadioGroupPage from wicket-examples to use a
FormComponentPanel and a required group, and everything works as expected.
Where is the error coming from? From a validator? Is it reported on the
group or taskForceContainer ?
Regards
Sven
On 05/30/2014 11:26 PM, Entropy wrote:
> I am mystified. I have an error panel at the top of my page that show the
> errors for the page, but near each control is ALSO a ComponentFeedbackPanel
> to show the error near the control. These work fine for every control
> except this radio group. The error shows up top, has the right label, but
> does not show near the control. The tag is there, the component is added to
> the hierarchy. I looked a view source and could see the error messages near
> the other controls, but not this one. I scanned to see if I accidentally
> hide the thing anywhere, and it does not appear so.
>
> HTML:
> <div wicket:id="taskForceContainer" class="checks">
>
> wall of text deleted for brevity
> <wicket:container wicket:id="taskForceRadio">
> <ul id="taskForceRadio">
> <li>
> <input wicket:id="taskForceRadioYes" type="radio" name="adtype"
> /><label>Yes</label>
> </li>
> <li>
> <input wicket:id="taskForceRadioNo" type="radio" name="adtype"
> /><label>No</label>
> </li>
> </ul>
> </wicket:container>
>
>
> </div>
>
> Java:
> //TASK FORCE
> WebMarkupContainer taskForceContainer = new
> WebMarkupContainer("taskForceContainer"){
> @Override
> public boolean isVisible() {
> return isEnabledInHierarchy() && super.isVisible();
> }
> };
> oagForm.add(taskForceContainer);
> RadioGroup<ShareRequest> group = new
> RadioGroup<ShareRequest>("taskForceRadio", new
> PropertyModel<ShareRequest>(request, "sharingTAAgreement")){
> @Override
> public boolean isVisible() {
> return isEnabledInHierarchy();
> }
> };
> group.setRequired(true);
> group.setLabel(new Model<String>("Task Force Agreement"));
> taskForceContainer.add(group);
> taskForceContainer.setVisible(!isFCF());
> group.add(new Radio<String>("taskForceRadioYes", new Model<String>("Y")));
> group.add(new Radio<String>("taskForceRadioNo", new Model<String>("N")));
> taskForceContainer.add(new Label("taskForceRadioReadOnly", new
> Model<String>(decodeYesNo(request.getSharingTAAgreement()))) {
> @Override
> public boolean isVisible() {
> return !this.getParent().get("taskForceRadio").isEnabledInHierarchy();
> }
> });
> taskForceContainer.add(new ComponentFeedbackPanel("errTaskForce",
> group).setEscapeModelStrings(false));
>
> You can see that I am adding the group to the componentfeedbackpanel and so
> forth. Any idea why this control isn't whoing the messages?
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/ComponentFeedbackPanel-near-radio-group-not-working-tp4666077.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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org