pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan cheng <ccp...@hotmail.com>
Subject RE: ItemRender Layout question
Date Wed, 28 Dec 2011 07:49:20 GMT

in renderer function, is this going to work? 
	public void render(Object item, int index, ListView listView,
			boolean selected, boolean checked, boolean highlighted,
			boolean disabled) {
		if (item != null && item instanceof Tab.LogView) {
			Tab.LogView logview = (Tab.LogView) item;
			fieldsflowPane = logview.fieldsPane;
I couldn't get logview.fieldsPane to be shown in fieldsflowPane.How to assign the logview.fieldsPane
into fieldsflowPane?How to change a component's parent reference?
From: ccp999@hotmail.com
To: user@pivot.apache.org
Subject: ItemRender Layout question
Date: Tue, 27 Dec 2011 14:21:45 +0000

I'm trying render a list of list view with a nested list view.  Despite all my effort,  I
can't get it display on screen.
Here is the snippet of code:
	public void addNode(Person person) throws
			IOException, SerializationException {

		BXMLSerializer bxmlSerializer = new BXMLSerializer();
		LogItemRenderer logItemRenderer = (LogItemRenderer) bxmlSerializer

		ListView listView = new ListView();

		org.apache.pivot.collections.List<LogView> logviewlist = new org.apache.pivot.collections.ArrayList<LogView>();
		for (Log log : person.getLogs()) {
			if (log instanceof Log) {
				Log restclientlog = (Log) log;
				ListView sysfieldlistView = new ListView();
				sysfieldlistView.setItemRenderer(new FieldItemRenderer());
				org.apache.pivot.collections.List<Field> syslist = new ArrayList<Field>();
				for (Field field : restclientlog.sysFields) {
				FlowPane flowPane = new FlowPane();
				logviewlist.add(new LogView(log, flowPane));
		Accordion.setHeaderData(listView, "Log");

Both FieldItemRender and LogItemRenderer follow your ListViewItemRenderer and most component
show up properly except the content of FlowPane.
I have no idea why the content in the FlowPane can't show up.
Any help?
View raw message