JSTL conditional check

前端 未结 2 1038
借酒劲吻你
借酒劲吻你 2021-02-02 14:52

On my current page I am using JSTL to check if data is available for my form. Problem I am facing is \"if there is no data I am not seeing the text fields either\". I can solve

2条回答
  •  无人共我
    2021-02-02 15:45

    You can have multiple conditions in a test.

    
        
    
    

    But you can also use the empty keyword to do both a nullcheck and lengthcheck.

    
        
    
    

    That's the best what you can get, now. If you need to reuse the same condition elsewhere in the page, then you could also save it by .

    
    ...
    
        
    
    ...
    
        Foo
    
    

提交回复
热议问题