Posts

Showing posts from April, 2011

Alignment Smartgwt alineado center centrado layout

Alignment Smartgwt alineado center centrado layout ex.1 Center a element Label / centrar un elemento Label gwt   setAlign(Alignment.CENTER);  ex.2 VLayout and put layoutAlign :" center " on the HTMLPane . ex.3 Layout header = new HLayout(); header.setWidth100(); header.setHeight(24); header.addMember(new Button("Left")); header.addMember(new LayoutSpacer ()); header.addMember(new Button("Center")); header.addMember(new LayoutSpacer ()); header.addMember(new Button("Right")); layoutAlign - set on a member, alignment of a particular member, on the breadth axis defaultLayoutAlign - set on a layout, provides default for member.layoutAlign layout.align - alignment of all members on the length axis layoutAlign - situado en un miembro , la alineaciĆ³n de un miembro en particular , en el eje de la amplitud defaultLayoutAlign - situado en un layout , ofrece por defecto para member.layoutAlign layout . align

Smart gwt client combobox read only

 Smart gwt client combobox read only         combo_aplicacion.setTitleOrientation(TitleOrientation.TOP);         combo_aplicacion.setTitle("Por xxxx");         combo_aplicacion.setType("select");         combo_aplicacion.setRequired(true);         combo_aplicacion.setWidth(100);                combo_aplicacion.setValueField("id");         combo_aplicacion.setDisplayField("Name"); Convertir un combobox a read onlye

RestDataSource : example XPath datasource

 RestDataSource : example XPath datasource Ejemplo de un restdatasource mas xpath y manejo de  la respuesta con setResponseTransformHandler public class CurrentUserDS extends RestDataSource {     private static CurrentUserDS instance = null;     public static User getCurrentUser() {         if (instance == null) {             instance = new CurrentUserDS();                    }         instance.fetchData();         return null;     }     private CurrentUserDS() {         super();         setFields(new DataSourceTextField("key", "Key"),                 new DataSourceTextField("identity", "Identity"),                 new DataSourceTextField("nickname", "Nickname"));         setDataFormat(DSDataFormat.JSON);         setResponseTransformHandler(new ResponseTransformHandler() {             public void execute(DSResponse response, DSRequest request, Object data) {                 String key = XMLTools.selec

convert Array to records , pass array a record

 convert Array to records JavaScriptObject jsoArray = JSOHelper.html.convertMapToJavascriptObject(java.util.Map); Record[] records = Record.convertToRecordArray(jsoArray);   pass array a record