- 
    Type:Bug 
- 
    Resolution: Invalid
- 
    Priority:Normal 
- 
    None
- 
    Affects Version/s: 8.0.1
- 
    Component/s: General
- 
    Security Level: Jimmy
- 
    None
- 
        ZK 8.0.2 S1
- 
        None
Due to the new interlocking logic in HtmlBasedComponent I have to do too much to switch between specific height/width or v/hflex for a component.
For example, if I have set a component to be flexible i.e. previously called
component.setHflex("1")
then due to the new logic, to set it to a specific width with no hFlex I must do this:
component.setHflex("min"); component.setWidth(null); component.setHflex(null); component.setWidth(width);
This could be simplified by checking for null/empty in the get/set flex, width and height methods:
public void setHeight(String height) { if (height != null && !height.isEmpty() && getVflex() != null && !getVflex().equals("min")) { throw new UiException("Not allowed to set vflex and height at the same time except vflex=\"min\""); } } public void setWidth(String width) { if (width != null && !width.isEmpty() && getHflex() != null && !getHflex().equals("min")) { throw new UiException("Not allowed to set hflex and width at the same time except hflex=\"min\""); } } public void setVflex(String flex) { if (flex != null && !flex.isEmpty() && getHeight() != null && !"min".equals(flex)) { throw new UiException("Not allowed to set vflex and height at the same time except vflex=\"min\""); } } public void setHflex(String flex) { if (flex != null && !flex.isEmpty() && getWidth() != null && !"min".equals(flex)) { throw new UiException("Not allowed to set hflex and width at the same time except hflex=\"min\""); } }
- relates to
- 
                    ZK-3215 Improve switching between height/width and hflex/vflex -         
- Closed
 
-         
