seges / acris

AcrIS is a modern framework serving as a base for applications, web sites and portals. It provides various tools and libraries to ease daily development. Build on top of Google web toolkit and provides sophisticated solution for security, beans binding, JSON protocol and usefull project skelets integrated with maven, hibernate, spring and gilead. You will get a prepared solution in box ready to use in your own project.
4 stars 1 forks source link

conditional binding #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Requested functionality:
- enabling or making field visible only when a condition is met
- defining such binding with chained method calls
- defining such binding and not requiring the panel to extend something directly

Example:
Binding.alter(this).enable(dateField).when("numberField").isNotNull();

Original issue reported on code.google.com by ladislav...@gmail.com on 16 Aug 2010 at 9:11

GoogleCodeExporter commented 9 years ago
Further requirement:
@BindingField(value=BeanWrapper.DATE,
              enabled={@Enabled(isNull={@IsNull(value=BeanWrapper.NUMBER,
                                                operator=@Type(OPERATOR.OR)), 
                                        @IsNull(BeanWrapper.NUMBER2)}, 
                operator=@Type(OPERATOR.AND)),
                       @Enabled(isNotNull=@IsNotNull(BeanWrapper.TEXT))})

or

@BindingField(BeanWrapper.DATE)
@Condition({@Enabled(isNull={@IsNull(value=BeanWrapper.NUMBER,
                                     operator=@Type(OPERATOR.OR)), 
                             @IsNull(BeanWrapper.NUMBER2)}, 
             operator=@Type(OPERATOR.AND)),
            @Enabled(isNotNull=@IsNotNull(BeanWrapper.TEXT))})

This could be translated in this way:
dateField is enabled when (numberField or number2Field is null) and textField 
is not null

Original comment by nejakyus...@gmail.com on 16 Aug 2010 at 9:57

GoogleCodeExporter commented 9 years ago

Original comment by ladislav...@gmail.com on 21 Aug 2010 at 9:08

GoogleCodeExporter commented 9 years ago

Original comment by ladislav...@gmail.com on 21 Aug 2010 at 9:10

GoogleCodeExporter commented 9 years ago

Original comment by ladislav...@gmail.com on 21 Aug 2010 at 9:13

GoogleCodeExporter commented 9 years ago
+18h - with fixes to listbox binding & bean wrapper equals/hashcode

Original comment by ladislav...@gmail.com on 23 Aug 2010 at 8:25