Hello,
listas-gKsXbHVs43GLjhqoV9UUrw@xxxxxxxxxxxxxxxx wrote:
Hello all,
the application we use Chiba in basically has two kinds of user interface: forms
and listings of data. Actually, like many applications, there is a listing of
database rows where the user can select one of them to be edited. When one row
is selected by the user, he/she sees the form where the details of that row can
be changed.
For the forms we have been using Chiba. The listings are JSP and a few classes
behind it doing the hard work. However, now we have a new requirement: some
listings should have arbitrary controls, other than the list of rows, to perform
specific tasks.
For example, I may have a list of news and two fields, "start date" and "end
date" to filter the displayed news according to the provided date range. I need
to validate the input to these fields (in this case, both fields must be in date
format and the start date is required if the end date is provided).
Chiba is able to do this for us, but it cannot generate the listing as we need
it. We concluded that what we need behaves like a select with itemset, but it's
displayed somewhat like a repeat with output controls. Therefore, we developed a
custom Chiba control to generate our listing as a proof of concept and it worked
very well.
can you provide a screen-shot or something? - i'd really like to see that.
However, to make Chiba use it a few small changes had to be made on Chiba
itself. Namely, we changed XFormsElementFactory (method createXFormsElement to
instantiate our control), NamespaceCtx (added our control's namespace) and
XFormsConstants (added a new UI element).
We cannot commit to Chiba these changes as they are because it's not actual
XForms (hence why we used a different namespace). We could apply these changes
to Chiba everytime we update its version, but this is not a very intelligent
thing to keep doing. For me, the best solution is to change XFormsElementFactory
to allow components to be added as a kind of "plug-in" to be registered in
configuration files. This way, Chiba users could add their own components to
Chiba without changing Chiba itself.
first, don't be shy with your extensions. sure, we try to keep
conformance but we always open for extensions if they reasonably common
enough to go into Chiba and there's a clean way to mark them as
non-standard extensions. it's then up to the user to take the risk of
using these and breaking portability to other engines.
Does this seems to be a good idea?
definitely. we already had pluggable actions once, but disabled these
during a refactoring. why not extend this now for XFormsElements in
general? pleasing idea.
I think that this is not the right moment to introduce this feature to Chiba as
it's reaching 1.0 version, but the details of the implementation could be
discussed and then merged to a future 1.0.1 version.
so from now on ;)
If I left anything unclear, please let me know.
how does your markup for the new component look like? have you adapted
it to XForms standard extension element? like e.g.
<xf:select...>
<xf:label ../>
<xf:extension>
<foo:list ...>
</xf:extension>
</xf:select>
how do you support the UI generation? have you patched the xslt to
support the component or do you use some other mechanism for building
the UI?
thanks, very interesting input.
Joern
Flavio Costa
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Chiba-developer mailing list
Chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/chiba-developer
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
|