[jboss-jira] [JBoss JIRA] Commented: (JBAS-1711) HTMLAdaptorServlet updateAttributes bug?
Dimitris Andreadis (JIRA)
jira-events at lists.jboss.org
Wed Aug 15 12:20:01 EDT 2007
[ http://jira.jboss.com/jira/browse/JBAS-1711?page=comments#action_12372319 ]
Dimitris Andreadis commented on JBAS-1711:
------------------------------------------
I think the side effect of what you want, would be to re-set to null all values that are empty, not just the one you alter.
> HTMLAdaptorServlet updateAttributes bug?
> ----------------------------------------
>
> Key: JBAS-1711
> URL: http://jira.jboss.com/jira/browse/JBAS-1711
> Project: JBoss Application Server
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Management services
> Affects Versions: JBossAS-3.2.7 Final, JBossAS-4.0.2RC1, JBossAS-4.0.1 Final, JBossAS-4.0.1 SP1
> Reporter: SourceForge User
> Priority: Minor
>
> SourceForge Submitter: raja05 .
> UpdateAttributes method in HtmlAdaptorServlet has a
> section of code something like
> while( paramNames.hasMoreElements() )
> {
> String param = (String) paramNames.nextElement();
> if( param.equals("name") ||
> param.equals("action") )
> continue;
> String value = request.getParameter(param);
> log.trace("name="+param+", value='"+value+"'");
> // Ignore null values, these are empty
> write-only fields
> if( value == null || value.length() == 0 )
> continue;
> attributes.put(param, value);
> }
> The check for value == null || value.length() == 0 is
> kind of wrong for my case.
> Im trying to use a XMBean that would store the values
> from the JMX-Console to a filestore that i have created
> using Properties.load(not the
> ObjectStreamPersistenceManager but something along the
> line that uses the Property.save to store the data in a
> name=value fashion).
> The problem im getting is that if i want to clear out
> any of the attributes that have been set already, the
> above code comes to the check of value.length() == 0
> and since its blank, just moves to the next request
> param. I would like to remove this check from there so
> that even though i blank out my value, i need that to
> get persisted.
> Please let me know if you need a detailed explanation
> or if the above is not clear
> I just need the value.length() == 0 check removed but
> not sure if thats going to cause an issue somewhere else.
> Thanks a bunch
> Raja
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list