Bond - Simple Application

View: New views
5 Messages — Rating Filter:   Alert me  

Bond - Simple Application

by Piers Rowan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Andrew,

I have managed to put together an Address Book application with Bond.
Bond seems very impressive as a way of taking a well thought out
database and creating a full blown app.

I have taken the simple.xml and paymaster.xml as a basis to have a two
window application (In simple.xml the list and record are in the same
window):

* address-view-window
* address-list-window

I can get the list open which is great but I can't work out how to click
a name on the list and refresh the "view" window with that record.

Can anyone help out with a suggestion?

<cell expand="true" xpos="1" ypos="1" xspan="2">
        <list name="contact_list" sortable="true" minheight="130">
                <column title="First Name">
                        <field>first_name</field>
                </column>
                <column title="Last Name">
                        <field>last_name</field>
                </column>
        </list>
</cell>

Many thanks

Piers

_______________________________________________
Bond-users mailing list
Bond-users@...
http://hcoop.net/cgi-bin/mailman/listinfo/bond-users

Re: Bond - Simple Application

by Dru-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Do you have the full XML for it?

If you have a <field> reference in the client sql it should link to it.
Ie.
<window name="master">
    <dbobject name="master">
    <sql>SELECT * FROM person</sql>
    <list>
    ....
    </list>
</window>

<window name="slave">
    <dbobject name="slave">
    <sql>SELECT * FROM address WHERE personid='<field
dbobjectsrc="master" table="person">id</field>'
    <list>
    ...
    </list>
    <entry> ....
</window>

What happens here, is when you navigate the list in master form, it updates
the contents of hte slave form automatically. It just needs something to
link the two, like a field, widget or loadby flag in the dbobject query.

Piers Rowan wrote:

> Hi Andrew,
>
> I have managed to put together an Address Book application with Bond.
> Bond seems very impressive as a way of taking a well thought out
> database and creating a full blown app.
>
> I have taken the simple.xml and paymaster.xml as a basis to have a two
> window application (In simple.xml the list and record are in the same
> window):
>
> * address-view-window
> * address-list-window
>
> I can get the list open which is great but I can't work out how to click
> a name on the list and refresh the "view" window with that record.
>
> Can anyone help out with a suggestion?
>
> <cell expand="true" xpos="1" ypos="1" xspan="2">
> <list name="contact_list" sortable="true" minheight="130">
> <column title="First Name">
> <field>first_name</field>
> </column>
> <column title="Last Name">
> <field>last_name</field>
> </column>
> </list>
> </cell>
>
> Many thanks
>
> Piers
>
> _______________________________________________
> Bond-users mailing list
> Bond-users@...
> http://hcoop.net/cgi-bin/mailman/listinfo/bond-users
>  


_______________________________________________
Bond-users mailing list
Bond-users@...
http://hcoop.net/cgi-bin/mailman/listinfo/bond-users

Re: Bond - Simple Application

by Piers Rowan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You're a legend it worked!


On Thu, 2007-11-01 at 14:12 +1300, Andrew Hill wrote:
> Do you have the full XML for it?

I'll post something to my web site and get back to you.

Perhaps my stumbling through BondDB / Postgres / etc may help other
developers wishing to rapidly create native Linux apps.

Many thanks

Piers


>
> If you have a <field> reference in the client sql it should link to it.
> Ie.
> <window name="master">
>     <dbobject name="master">
>     <sql>SELECT * FROM person</sql>
>     <list>
>     ....
>     </list>
> </window>
>
> <window name="slave">
>     <dbobject name="slave">
>     <sql>SELECT * FROM address WHERE personid='<field
> dbobjectsrc="master" table="person">id</field>'
>     <list>
>     ...
>     </list>
>     <entry> ....
> </window>
>
> What happens here, is when you navigate the list in master form, it updates
> the contents of hte slave form automatically. It just needs something to
> link the two, like a field, widget or loadby flag in the dbobject query.
>
> Piers Rowan wrote:
> > Hi Andrew,
> >
> > I have managed to put together an Address Book application with Bond.
> > Bond seems very impressive as a way of taking a well thought out
> > database and creating a full blown app.
> >
> > I have taken the simple.xml and paymaster.xml as a basis to have a two
> > window application (In simple.xml the list and record are in the same
> > window):
> >
> > * address-view-window
> > * address-list-window
> >
> > I can get the list open which is great but I can't work out how to click
> > a name on the list and refresh the "view" window with that record.
> >
> > Can anyone help out with a suggestion?
> >
> > <cell expand="true" xpos="1" ypos="1" xspan="2">
> > <list name="contact_list" sortable="true" minheight="130">
> > <column title="First Name">
> > <field>first_name</field>
> > </column>
> > <column title="Last Name">
> > <field>last_name</field>
> > </column>
> > </list>
> > </cell>
> >
> > Many thanks
> >
> > Piers
> >
> > _______________________________________________
> > Bond-users mailing list
> > Bond-users@...
> > http://hcoop.net/cgi-bin/mailman/listinfo/bond-users
> >  
>
>
> _______________________________________________
> Bond-users mailing list
> Bond-users@...
> http://hcoop.net/cgi-bin/mailman/listinfo/bond-users
--


Piers Rowan
Director
Extrastaff

Tel: 08 8202 4111
Mob: 0418 899 874

www.extrastaff.com.au

_______________________________________________
Bond-users mailing list
Bond-users@...
http://hcoop.net/cgi-bin/mailman/listinfo/bond-users

Re: Bond - Simple Application

by Dru-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I forgot to menton in the other email,
but if they are two different windows, but with the same data source
you need to specify that for every widget and have a childwindow
flag.

Ie
<window name="win1>
    <dbobject name="win1">
       <sql>select * from ...</sql>
    </dbobject>
    <childwindow>win2</childwindow>
</window>

<window name="win2">
  <entry>
    <field dbobjectsrc="win1" table="blah">foo</field>
    </entry>
</window>

Piers Rowan wrote:

> Hi Andrew,
>
> I have managed to put together an Address Book application with Bond.
> Bond seems very impressive as a way of taking a well thought out
> database and creating a full blown app.
>
> I have taken the simple.xml and paymaster.xml as a basis to have a two
> window application (In simple.xml the list and record are in the same
> window):
>
> * address-view-window
> * address-list-window
>
> I can get the list open which is great but I can't work out how to click
> a name on the list and refresh the "view" window with that record.
>
> Can anyone help out with a suggestion?
>
> <cell expand="true" xpos="1" ypos="1" xspan="2">
> <list name="contact_list" sortable="true" minheight="130">
> <column title="First Name">
> <field>first_name</field>
> </column>
> <column title="Last Name">
> <field>last_name</field>
> </column>
> </list>
> </cell>
>
> Many thanks
>
> Piers
>
> _______________________________________________
> Bond-users mailing list
> Bond-users@...
> http://hcoop.net/cgi-bin/mailman/listinfo/bond-users
>  


_______________________________________________
Bond-users mailing list
Bond-users@...
http://hcoop.net/cgi-bin/mailman/listinfo/bond-users

Re: Bond - Simple Application

by Piers Rowan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2007-11-01 at 14:12 +1300, Andrew Hill wrote:
> Do you have the full XML for it?
>


These are my notes, they may help out a novice or someone who just wants
to get stuck into using bonddb.

http://www.rowan.id.au/bondwiki/index.php/Basic_Address_Book


Please email me on or off list with any comments you wish to make.

(So far the hardest part about using bond is typing up my notes! :-)

Cheers

P

_______________________________________________
Bond-users mailing list
Bond-users@...
http://hcoop.net/cgi-bin/mailman/listinfo/bond-users