Custom GWT component [message #662857] |
Fri, 01 April 2011 05:16  |
Eclipse User |
|
|
|
hello,
I created my own GWT component that inherits from composite and I managed to add it to my palette.Then i creates the XML file to specify the method invocation, but it does not work.
to do that i use this toturiel in NewComponentsToturiel.pdf and DesignerCustomizationAPI.PDF
the code of custum component is:
package com.sqsdqs.client;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
public class Mybutton extends Composite{
Button vermeg = new Button("VERMEG");
public Mybutton(){
VerticalPanel panel = new VerticalPanel();
panel.add(vermeg);
initWidget(panel);
}
public void setButton(){
Window.alert("jjjjj");
vermeg.setText("bhjbhj");
}
}
and the core of xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<component xmlns:scr="http://www.eclipse.org/wb/WBPComponent" name="Mybutton">
<creation>
<source><![CDATA[new com.component.client.Mybutton()]]></source>
<invocation signature="setButton()"/>
</creation>
</component>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08190 seconds