Controls in xbl:implementation?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Controls in xbl:implementation?

gino-m
Dear all,

Is there a way to define controls, namely xxforms:dialog, in the xbl:implementation section of an XBL component?

More specifically, I am trying to wrap a search dialog which is used by many different fields into an XBL component.  I noticed that in the DHTML, there is a separate instance of the dialog, table, etc. for each instance of my XBL component.

Ideally, I would like to have one hidden dialog with many triggers.  Depending on which trigger opened the dialog, the selected search result would get copied to the appropriate field.  It would be nice if I could package the trigger and singleton dialog into one XBL rather than two (e.g. dialog and trigger).  Also, I anticipate some messy scoping and/or event model-problems having two separate components talk to each other this way (though I may be wrong).

How would you approach this?  Your feedback is very welcome.

-Gino
Gino Miceli
Forest Information Systems Specialist
Food and Agriculture Organization of the United Nations
FAO-Finland Cooperation Programme
Sustainable Forest Management in a Changing Climate
Forest Management Division, Rm. D-406
Viale delle Terme di Caracalla, s.n.c.
00153 Rome, Italy
http://www.fao.org/forestry
Reply | Threaded
Open this post in threaded view
|

Re: Controls in xbl:implementation?

Alessandro  Vernet
Administrator
Gino,

On Fri, Mar 26, 2010 at 3:07 AM, gino-m <[hidden email]> wrote:
> Is there a way to define controls, namely xxforms:dialog, in the
> xbl:implementation section of an XBL component?

Yes, you can use an xxforms:dialog in the implementation of one of
your components. In fact, we are doing this in the fr:dialog-select
component.

> More specifically, I am trying to wrap a search dialog which is used by many
> different fields into an XBL component.  I noticed that in the DHTML, there
> is a separate instance of the dialog, table, etc. for each instance of my
> XBL component.

If you have multiple instances of the dialog, in the HTML served to
the browser, you'll have multiple dialogs, as in theory you could have
multiple open dialogs at the same time. There are cases of course
where this could be optimized.

> Ideally, I would like to have one hidden dialog with many triggers.
> Depending on which trigger opened the dialog, the selected search result
> would get copied to the appropriate field.  It would be nice if I could
> package the trigger and singleton dialog into one XBL rather than two (e.g.
> dialog and trigger).  Also, I anticipate some messy scoping and/or event
> model-problems having two separate components talk to each other this way
> (though I may be wrong).

You should be fine creating one component for this, but let us know if
you find any problem along the way.

Alex
--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: Controls in xbl:implementation?

gino-m

Hi Alessandro,

 

Thanks for your answer.  I tried several ways of doing this, but possibly because of my own inexperience, I  couldn’t get it to work.  In the end I opted to create two separate components; one for the dialog, and one for the trigger.  A custom event opens the dialog and carries the require context parameters.

 

Also, I had trouble using two instances of my dialog component because the contained fr:datatable on one of the instances would always resize incorrectly, expanding all the rows so that the table would stretch to the specified @height, rather than filling the remaining empty rows with empty space.  I wanted to isolate the problem but I have a deadline looming so had to postpone for now.   Has anyone else see this happening?

 

Gino

Gino Miceli
Forest Information Systems Specialist
Food and Agriculture Organization of the United Nations
FAO-Finland Cooperation Programme
Sustainable Forest Management in a Changing Climate
Forest Management Division, Rm. D-406
Viale delle Terme di Caracalla, s.n.c.
00153 Rome, Italy
http://www.fao.org/forestry
Reply | Threaded
Open this post in threaded view
|

Re: RE: Controls in xbl:implementation?

Alessandro  Vernet
Administrator
Gino,

The initialization of datatable is quite tricky (to say the least!). I
am wondering if you would have this same if the datatable was used in
two xxforms:dialog in the same page?

Alex

On Tue, Mar 30, 2010 at 12:40 AM, gino-m <[hidden email]> wrote:

> Hi Alessandro,
>
>
>
> Thanks for your answer.  I tried several ways of doing this, but possibly
> because of my own inexperience, I  couldn’t get it to work.  In the end I
> opted to create two separate components; one for the dialog, and one for the
> trigger.  A custom event opens the dialog and carries the require context
> parameters.
>
>
>
> Also, I had trouble using two instances of my dialog component because the
> contained fr:datatable on one of the instances would always resize
> incorrectly, expanding all the rows so that the table would stretch to the
> specified @height, rather than filling the remaining empty rows with empty
> space.  I wanted to isolate the problem but I have a deadline looming so had
> to postpone for now.   Has anyone else see this happening?
>
>
>
> Gino
>
> Gino Miceli Forestry Information Systems Specialist Food and Agriculture
> Organization of the United Nations FAO-Finland Cooperation Programme
> Sustainable Forest Management in a Changing Climate Forest Management
> Division, Rm. D-406 Forestry Department Viale delle Terme di Caracalla,
> s.n.c. 00153 Rome, Italy Tel: +39 06 570.56765 Fax: +39 06 570.55137
> Website: http://www.fao.org/forestry
> ________________________________
> View this message in context: RE: Controls in xbl:implementation?
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet