You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-dev@incubator.apache.org by "Trevor Oldak (JIRA)" <xa...@incubator.apache.org> on 2007/09/20 15:49:31 UTC

[jira] Created: (XAP-516) Widgets: ComboBox: Text attribute not being reported correctly in Mozilla

Widgets: ComboBox: Text attribute not being reported correctly in Mozilla
-------------------------------------------------------------------------

                 Key: XAP-516
                 URL: https://issues.apache.org/jira/browse/XAP-516
             Project: XAP
          Issue Type: Bug
          Components: Widgets: Other
            Reporter: Trevor Oldak


Put the following in a xal file:
<xal xmlns="http://openxal.org/ui/html">
	<mco xmlns="http://openxal.org/core/mco" id="jsMco" class="JsMCO" src="JsMCO.js"/>
	<rootPane>
		<freePane width="1024px" height="768px">
			<button id="button" height="25px" text="Button" width="100px" x="90px" y="130px" onCommand="mco:jsMco.onCommand(event, tfield)"/>
			<comboBox id="cbox" text="comboBox" height="25px" width="100px" x="30px" y="40px">
				<listBox>
					<listItem text="List Item #1"/>
					<listItem text="List Item #2"/>
					<listItem text="List Item #3"/>
				</listBox>
			</comboBox>
			<textField id="tfield" height="25px" text="TextField" width="200px" x="170px" y="40px"/>
		</freePane>
	</rootPane>
</xal>

And the following in an MCO:
// Default Parameterless Constructor
JsMCO = function() {
};

// Scope: Local, Selected Component: button, Selected Event: onCommand
JsMCO.prototype.onCommand = function(event, tfield){
	var cboxText = event.session.getDocumentContainer().getUiDocument().getElementById("cbox").getAttribute("text");
	tfield.setAttribute("text", cboxText);
};

In mozilla, when the button is clicked, the text field should take the text value of the combobox, which should be thhe selected listItem.
However, in mozilla, the text attribute never changes from its original value. If one  isn't set, an error is thrown.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.