Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ajax="true" on b:radiobutton doesn't work #681

Closed
ggam opened this issue Apr 5, 2017 · 3 comments
Closed

ajax="true" on b:radiobutton doesn't work #681

ggam opened this issue Apr 5, 2017 · 3 comments
Assignees
Milestone

Comments

@ggam
Copy link
Collaborator

ggam commented Apr 5, 2017

<b:radiobutton ajax="true" /> seems to do a trick with a hidden input field wich has an oninput event.

Problem is, the browser only triggers the oninput event when text is manually written and not when the value is programmatically changed.

@stephanrauh
Copy link
Collaborator

The bug is slightly different. It never came to me to use the radiobutton without an onclick handler. So the default behavior kicks in. That's where things start to get strange: the default behavior is encoded in the hidden input field, where it doesn't belong. It should be implemented in the radio button.

Adding insult to injury, the hidden input field renders most attributes of the radiobutton. In general, this doesn't do much harm, but it's not the desired behavior. Deriving the RadioButtonRenderer from the InputTextRenderer doesn't seem to be the good idea it seemed to be at first glance.

stephanrauh added a commit that referenced this issue Apr 5, 2017
…ly: "input"). Also: better error messages.
@stephanrauh
Copy link
Collaborator

I've solved the bug by making "click" the default action. I've also uploaded a new developer snapshot to Maven Central. See #369 on how to get it.

I keep the issue open for the moment because I'm unhappy about the "pass through attribute" behavior of the hidden input field. In most cases, there's no harm except the size of the generated HTML code, but this changes by adding "style='display:block'". So it's sort of a time bomb.

@stephanrauh
Copy link
Collaborator

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants