cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emanuele Maiarelli <maiarelli.emanu...@gmail.com>
Subject Re: Swing / Data views
Date Fri, 31 May 2013 16:19:04 GMT
I suggest to use a "fresh" context for every form you gonna instance, that
will avoid leaving uncommitted objects around in one single context.

You can eventually avoid reflection , since every cayenne objects have
static string fields containing method names, that can be readen/written
using readPropery/writeProperty methods eg:
a.readProperty(AutomCat.AC_CODE_PROPERTY);.

Handling prefetchs in some automated way is also usefull.



2013/5/31 Andrew Faust <arjfandy@gmail.com>

> Hi Chris.  About 2 years ago I developed a desktop java app, using Swing
> and Cayenne.  I was using Eclipse becuase there is a free plug-in called *
> WindowBuilderPro*, that allows you to visually create your Swing views.
> Anyway this tool also had some kind of Data-Binding support; however, I did
> not use that....I simply had code that would do like....
>
> On view show....
>
> someEditBox.setText(myCayennePoJo.getLastName())
>
> and, on "save"
>
> myCayennePoJo.setLastName(someEditBox.getText())
>
> At this point, if I were to develop something like that again, I would
> develop the screens & POJOs so the UI control names & POJO prop names are
> the same and then have some *reflection* type code to do the heavy moving.
>
>
> On Fri, May 31, 2013 at 11:19 AM, Chris Walters <walters@id.com> wrote:
>
> > I have a need to bind some Cayenne data objects to Swing components in a
> > Netbeans platform-based app.  Google tells me there used to be something
> > called Data Views.  Are they completely gone?  Any other recommendations
> > for binding data objects to Swing components if so?
> >
> > Am I showing how out of touch I am by even contemplating this
> combination?
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message