PDA

View Full Version : [CLOSED] change icon of a label from directmethod



CarpFisher
Jun 18, 2012, 4:23 PM
I've got the javascript error

Uncaught TypeError: Object [object Object] has no method 'setIconClass'

when changing the icon of a label from a directmethod. Is that a bug? Thanks

Please use the following code to test:




<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>


<script runat="server">

[DirectMethod]
public void change()
{
lblTest.Text = "test2";
lblTest.Icon = Ext.Net.Icon.Cancel;
}

</script>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:label runat="server" ID="lblTest" Icon="Accept" Text="test">
</ext:label>
<ext:button runat="server" text="change!">
<Listeners>
<Click Handler="#{DirectMethods}.change()"></Click>
</Listeners>
</ext:button>
</form>
</body>
</html>

Vladimir
Jun 18, 2012, 4:44 PM
Thanks for the report. Fixed in SVN