setValue for reference property inside OnChange

2013-02-25
2013-02-27
  • Rommel Lagera

    Rommel Lagera - 2013-02-25

    I did something like this:

    // inside OnChange action
    // where student was retrieved using Xpersistence.getManager
    getView().setValue("student.id", student.getId());
    
    // in the model
    @ManyToOne(fetch=FetchType.LAZY, optional=false)
    @ReferenceView("Selection")
    @SearchListCondition("${active} = 't'")
    @Required
    private Student student;
    

    The display for the reference property "student" does not update after the setValue. But when you click the "Save" button the display updates. This indicates the property was set correctly. But how can I update the display after the setValue for a reference property?

     
  • Javier Paniza

    Javier Paniza - 2013-02-27

    Hi Rommel,

    I think you have put this question twice.
    Look here.

     

Log in to post a comment.