Menu

Default Value Transient Class

2014-12-03
2014-12-08
  • Medasha Govender

    Hi all,

    I have a Transient class containing a few fields. I would like to default a field in the class to a default value when the class is loaded. Is this possible on a Transient class ?

    Thanks in advance.

    Regards

    Med

     
  • Javier Paniza

    Javier Paniza - 2014-12-05

    Hi Med,

    of course, it's possible. Just define @DefaultValueCalculator for your properties and call to getView().reset() from an on-init action.


    Help others in this forum as I help you.

     
  • Medasha Govender

    Thanks Javier. It worked. Much appreciated.

    Med

     

Log in to post a comment.