Sure... that was a rather vague question (and I think I probably
abused the term 'metaprogramming' horribly).

Anyhoo, my project builds a metamodel from the pojo domain model
(equivalent to a Hibernate .hbm model), and then we use this to
programmatically create widgets on the UI corresponding to the
properties, collections and public operations exposed by the pojo.

I think my question really is: is there to write something like:

for(Field field: pojo.getClass().getFields()) {
    JavaFXWidgetThingy widget = new JavaFXWidgetThingy();  //
simplified: would actually want to create a widget of the correct sort
based on the field type

    ... wire up listeners and bindings on the widget for the field of
the pojo ...

    addToForm( widget );
}

The fact that the loop is driven from a metamodel is I suppose
irrelevant to the question.

Am I off base? does this make sense as a question?

Thx!
Dan

--------

On Sep 16, 10:52 pm, Joshua Marinacci <jos...@marinacci.org> wrote:
> can you define what you mean by 'metaprogramming' in this context?
> On Sep 16, 2009, at 2:31 PM, Dan Haywood wrote:
>
>
>
> > Hi all, first post!
>
> > Since we have knowledgeable people responding on another thread about
> > JavaFX, I have another question, namely, is there any way to do
> > metaprogramming in JavaFX.  I currently work on an open source
> > framework (below) that builds a generic OO UI from a metamodel, built
> > up programmatically.
>
> > I'm thinking that JavaFX is an obvious technology for a new UI, but
> > what I need to know is ... does JavaFX provide similar programmatic
> > APIs for assembling the layout?
>
> > Thx
> > Dan
> >http://danhaywood.com
> > "Domain Driven Design using Naked Objects",http://pragprog.com/titles/dhnako
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to