package ch.raffael.util.binding;

/**
 * Common base class for presentation model members. This is actually used for the fluent
 * API only, for tracking the presentation model. You may choose not to extend this class,
 * however, you'll then have to find your own solutions for realising a fluent API. ;)
 *
 * @author <a href="mailto:herzog@raffael.ch">Raffael Herzog</a>
 */
public class PresentationModelMember {

    PresentationModel presentationModel;

    protected <T extends PresentationModelMember> T add(T member) {
        member.presentationModel = presentationModel;
        presentationModel.add(member);
        return member;
    }

}

@@ -575,16 +575,63 @@
 nModel;%0A
+        if ( presentationModel != null ) %7B%0A    
         
@@ -661,16 +661,26 @@
 ember);%0A
+        %7D%0A
         

Fix NPE in PresentationModelMember if no PM is attached.