pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B.L. Zeebub" <roger.var...@googlemail.com>
Subject Re: Advice for a newbie
Date Thu, 24 Jun 2010 12:43:29 GMT

Chris,

Thanks for the response. I'd already started with the TableView. You say
that I can use just a Pivot List for my datasource. I couldn't get it to
work with a simple list unless my Pivot list was a list of maps. I've
attached my wtkx file and the code I use to load it below. How do I modify
it to use a simple list of strings? 

Regards


To initialize the tableview;

		messages = new ArrayList<Map<String,String>>();
		TableView tv = (TableView) wtkxSerializer.get("tableView");
		tv.setTableData(messages);

to load it;
public void notify(GenesisEvent event) {
		HashMap<String,String> map = new HashMap<String,String>();
		map.put("info",event.getMessage());
		messages.add(map);
		
	}



<Window title="Genesis Client" maximized="true"
	    xmlns:wtkx="http://pivot.apache.org/wtkx"
	    xmlns="org.apache.pivot.wtk">
	<content>	
	<Border styles="{color:10}">
	            <content>
	                <ScrollPane>
	                    <view>
							<TableView wtkx:id="tableView">
	                            <columns>
	                                <TableView.Column name="info" width="500"
headerData="Header"/>
	                            </columns>
	                        </TableView>    	
	                    </view>
	                </ScrollPane>
	            </content>
	        </Border>
	    </content>
   	</Window>


-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Advice-for-a-newbie-tp919140p919398.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Mime
View raw message