package authoritymanager.client;

import java.util.ArrayList;

import java.util.List;


import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.user.client.Element;

public class XMLExample {
	
}
/*
public class XMLExample extends LayoutContainer {  
	  
	  protected void onRender(Element parent, int index) {  
	    super.onRender(parent, index);  
	    setLayout(new FlowLayout(10));  
	  
	    List<ColumnConfig> columns = new ArrayList<ColumnConfig>();  
	    columns.add(new ColumnConfig("username", "Username", 100));  
	    columns.add(new ColumnConfig("password", "Password", 165));  
	    columns.add(new ColumnConfig("access", "Access type", 100));  
	      
	  
	    // create the column model  
	    ColumnModel cm = new ColumnModel(columns);  
	  
	    // defines the xml structure  
	    ModelType type = new ModelType();  
	    type.setRoot("login");  
	    type.setRecordName("user");  
	    type.addField("username", "username");  
	    type.addField("password", "password");  
	    type.addField("access", "access");  
	      
	  
	    // use a http proxy to get the data  
	    
	    
	    RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,  
	        GWT.getHostPageBaseURL() + "data/login.xml");  
	    HttpProxy<String> proxy = new HttpProxy<String>(builder);  
	  
	    // need a loader, proxy, and reader
	    XmlLoadResultReader<ListLoadResult<ModelData>> reader = new XmlLoadResultReader<ListLoadResult<ModelData>>(  
	        type);  
	  
	    final BaseListLoader<ListLoadResult<ModelData>> loader = new BaseListLoader<ListLoadResult<ModelData>>(  
	        proxy, reader);  
	    loader.addLoadListener(new LoadListener() {
	    	@Override
	    	public void handleEvent(LoadEvent e) {	    		
	    		super.handleEvent(e);
	    	}
	    }) ;
	    ListStore<ModelData> store = new ListStore<ModelData>(loader);  
	    final Grid<ModelData> grid = new Grid<ModelData>(store, cm);  
	    grid.setBorders(true);  
	    grid.setLoadMask(true);  
	    grid.getView().setEmptyText("Please hit the load button.");  
	    grid.setAutoExpandColumn("username");  
	    
	    
	    ContentPanel panel = new ContentPanel();  
	    panel.setFrame(true);  
	    panel.setCollapsible(true);  
	    panel.setAnimCollapse(false);  
	    panel.setButtonAlign(HorizontalAlignment.CENTER);  
	    //panel.setIcon(Resources.ICONS.table());  
	    panel.setHeading("XML Table Demo");  
	    panel.setLayout(new FitLayout());
	    panel.setBorders(true) ;
	    panel.add(grid);  
	    panel.setSize(575, 350);  
	  
	    // add buttons  
	    Button load = new Button("Load XML", new SelectionListener<ButtonEvent>() {  
	      public void componentSelected(ButtonEvent ce) {  
	        loader.load();  
	      }  
	    });  
	    Label lbl = new Label(GWT.getHostPageBaseURL() + "data/login.xml") ;
	    panel.add(lbl) ;
	    panel.addButton(load);  
	  
	    add(panel);  
	  
	  }  
	  
	}  
*/