pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chaska <eltxaskarri...@hotmail.com>
Subject Newbie query
Date Fri, 23 Nov 2012 09:51:55 GMT

I am trying to do an interface wit Apache Pivot. It is the first time I use
this, and I am not very experienced with Java nor XML neither.

I want to insert a table (with a bit of logic), which is in a .bxml, into a
border which is in a more complex .bxml. All is in a package called
tutorials.  That is the situation:

*table1.bxml (the small table)*
<layout:Datum title="Table Views" maximized="true"
    xmlns:bxml="http://pivot.apache.org/bxml"
    xmlns:content="org.apache.pivot.wtk.content"
    xmlns:tableviews="tutorials"
    xmlns:layout="tutorials"
    xmlns="org.apache.pivot.wtk">

        <ScrollPane horizontalScrollBarPolicy="fill">
            <TableView bxml:id="tableView">

               ---
          <columnHeader>
                <TableViewHeader tableView="$tableView"
sortMode="single_column"/>
            </columnHeader>
        </ScrollPane>
</layout:Datum>

*Datum.java (to sort columns)*
package tutorials;
 
import java.net.URL;
 
import org.apache.pivot.util.concurrent.TaskExecutionException;
import org.apache.pivot.wtk.media.Image;
 
public class Datum {---}

*borders.bxml (The "big" bxml)*

<Window title="Borders" maximized="true"
    xmlns:bxml="http://pivot.apache.org/bxml"
    xmlns="org.apache.pivot.wtk">
    <Border title="Borde general" styles="{color:'#0000A0',
titleColor:'#000000', thickness:10,
                cornerRadii:20, padding:30}">
    	<Label text="Borde tapado"
        styles="{horizontalAlignment:'center', verticalAlignment:'bottom',
wrapText:true}"/>
    
    <TablePane styles="{horizontalSpacing:10}">
        <columns>
            <TablePane.Column width="1*"/>
            <TablePane.Column width="4*"/>
        </columns>
 
        <TablePane.Row height="1*">
        	
            <Border title="Borde izquierdo" styles="{padding:1}">
            	*<bxml:include bxml:id="busqev" src="busqev.bxml"/>* 
                ---
            </Border>
</Window>

*Main.java*
package tutorials;

import org.apache.pivot.beans.BXMLSerializer;
import org.apache.pivot.collections.Map;
import org.apache.pivot.wtk.Application;
import org.apache.pivot.wtk.DesktopApplicationContext;
import org.apache.pivot.wtk.Display;
import org.apache.pivot.wtk.Window;
 
public class Main4 implements Application {
    private Window window = null;
 
    @Override
    public void startup(Display display, Map<String, String> properties)
        throws Exception {
        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        window = (Window)bxmlSerializer.readObject(Main4.class,
"tabla1.bxml");
        window.open(display);
    }


The outpup is "class.tutorials is not a sequence". I dont know how to
include table1.bxml into borders.bxml without destroy the link with Datum.
java (and the logic with it)

Thak you very much, and sorry about the long post and the terrible English
=(




--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Newbie-query-tp4022247.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Mime
View raw message