package org.mytest.client;

import com.google.gwt.user.client.ui.Button;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.data.DSCallback;
import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.data.DSResponse;
import com.smartgwt.client.types.VisibilityMode;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.tab.Tab;

public class MyTab extends Tab {

	public MyTab() {
		super();
	}

	public void fillTab(final Button button){

		WorldXmlDS privilegeDS = new WorldXmlDS();
		privilegeDS.fetchData(new Criteria(), new DSCallback(){

			@Override
			public void execute(DSResponse dsResponse, Object data,
					DSRequest dsRequest) {
				MyTab.this.setPane(getLayout(button));

			}});
		
	}

	private VLayout getLayout(Button button) {

		VLayout layout1 = new VLayout();
		layout1.setHeight100();
		layout1.setWidth100();
		layout1.addMember(button);

		return layout1;

	}

	
}
