#106 Unable to update a boolean attribute

v1.0
closed-fixed
general (93)
5
2006-12-11
2006-11-01
No

I'm getting some script error in page when I try to
update a boolean or Boolean (Standard) MBean
Attribute. Hence the Attribute is not getting updated.

Discussion

  • Rakesh Kalra

    Rakesh Kalra - 2006-11-01

    Logged In: YES
    user_id=1058292

    We will look into it, but in the mean time, you can try
    using radio button,
    by changing the following property in
    JMANAGE_HOME/config/jmanage.properties:

    # HTML input type to be used for boolean attributes, one of
    "radio", "checkbox" or "select"
    jmanage.html.booleanInputType=checkbox

     
  • Rakesh Kalra

    Rakesh Kalra - 2006-11-05
    • status: open --> pending
     
  • Rakesh Kalra

    Rakesh Kalra - 2006-11-05

    Logged In: YES
    user_id=1058292

    I am not able to reproduce this problem. Can you please tell
    us which browser version you are using?

     
  • engimatic smile

    engimatic smile - 2006-11-07
    • status: pending --> open
     
  • engimatic smile

    engimatic smile - 2006-11-07

    Logged In: YES
    user_id=1634913

    I was using IE 6.0.2900 with XP Professional SP2. java version "1.5.0_09"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
    Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode)

    Hope this helps.

     
  • Rakesh Kalra

    Rakesh Kalra - 2006-11-10

    Logged In: YES
    user_id=1058292

    I don't have that environment, so I can't really reproduce it.

    But, I looked into the issue closely, and it seems like the
    issue is because there are multiple forms on the page with
    the same name.
    The form name "emptyForm" was being used to get to the
    hidden field on the form. I changed it to use "id" attribute
    to get the hidden field:

    RCS file:
    /cvsroot/jmanage/jmanage/webui/src/main/webapp/app/mbeanView.jsp,v
    retrieving revision 1.25
    90,92c95,96
    < function onclick_booleanCheckbox(formName, checkbox) {
    < var formObj = document.forms[formName];
    < formObj.elements[checkbox.value].value =
    checkbox.checked;
    ---
    > function onclick_booleanCheckbox(hiddenFieldId,
    checkbox) {
    > document.getElementById(hiddenFieldId).value =
    checkbox.checked;

    253,254c259,261
    < <input type="checkbox"
    name="dummy" value="<%=attrName%>"
    onClick="onclick_booleanCheckbox('emptyForm', this)"
    <%=attrValue.equals("true")?" CHECKED":""%>/>
    < <input type="hidden"
    name="<%=attrName%>" value="<%=attrValue%>"/>
    ---
    > <%-- TODO: In case of a checkbox, if
    Boolean is null, on submit, it gets set to false --%>
    > <input type="checkbox"
    name="dummy" value="<%=attrName%>"
    onClick="onclick_booleanCheckbox('<%=attrName%>_id', this)"
    <%="true".equals(attrValue)?" CHECKED":""%>/>
    > <input id="<%=attrName%>_id"
    type="hidden" name="<%=attrName%>" value="<%=attrValue%>"/>

    This fix will be available in the next release (should be
    out in few days).

     
  • Rakesh Kalra

    Rakesh Kalra - 2006-11-10
    • status: open --> pending-fixed
     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.