Announcement Announcement Module
No announcement yet.
2 formModels on a page Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 2 formModels on a page

    I am using form's Dirty flag to set dirty flag on the domain bean, domain bean relates to a record in the database. In my situation I have 2 beans on a page, these beans relate to different tables, I need to set dirty flags on these beans, but if I have one form model I have not way to separate "dirtiness" of domain beans.

    I was trying to pass Nested form model to a form derived from AbstractForm and add child, but I cannot do this, getFormModel returns Validating form model.

    What shold I do? Thanks.

  • #2
    I found better way, change in

    public void setValue(Object value) {
    // TODO: make this thread safe
    try {
    settingBeanProperty = true;
    beanWrapper.setPropertyValue(propertyPath, value);

    String flagPath = "updated";
    if ( propertyPath.lastIndexOf(".") > 0 ) {
    flagPath = propertyPath.substring(0, propertyPath.lastIndexOf(".") + 1) + flagPath;
    try {
    beanWrapper.setPropertyValue(flagPath, new Boolean(true));
    } catch (FatalBeanException e) {
    finally {
    settingBeanProperty = false;
    fireValueChange(savedPropertyValue, getValue());

    The framework is great!


    • #3
      what's your mean?

      I can't catch