cancel
Showing results for 
Search instead for 
Did you mean: 

attribute on association ? +detecting new assoc. element ?

jbaton
Champ in-the-making
Champ in-the-making
Hi all,

My goal was to have an information tied to an association between two (custom type) documents.

Unfortunately, according to the xsd, the model does not allow that.

So as a workaround, I thought of adding a new assoc. (NA) to my type.
NA would contains objects of another custom type containing my additionnal info and what's necessary to identify my documents.

An object being automatically added to NA by using a custom behaviour (well, that's the idea)

BUT  :? , (Question 1) what policy should I use to detect that a new element has been added to my (main) association ?

At this time, I identified onUpdateNode.
The problem being that this "event" is … fired often.

Question 2 : if I have to use onUpdateNode, what can I use to discriminate the "add new element to association" -kind of update.


Other ideas of workarounds for the "info. on association" feature are welcome.


Thank you in advance for your help on this tricky point.


Jerome
1 REPLY 1

jbaton
Champ in-the-making
Champ in-the-making
Although I liked the "neat aspect" of the approach that creates automatically an element in a second association when an element is added to a first association, I resigned.

In my case, I'm customizing the default web client (DWC), so I put hooks in the  DWC code that calls my DAO when needed.
This alternative offers better control.
And anyway, that's not all to add the element, it has to be set with correct values.

The sh***y part is that it implies to create a custom JSF   *Editor to display/edit the data that has been put in the ghost association.


Jerome