java - Using if else with jsp from data-bind -
so don't know how describe question best way since never worked in jsp before, , jumped in project , needs finish it.
sorry if unclear, ask me , i'll try reply fast.
so got language check html tags, looks this:
<p data-bind="if: 'en_us' == currentlang()">english text</p>
which works fine, want put in if/else statement.
in php, write like:
<?php if((currentlang() == 'en_us)) { echo 'english text'; else { echo 'italian text'; } ?>
so how do this, checking currentlang() in .jsp file?
i try use f:subview tag (http://docs.oracle.com/cd/e17802_01/j2ee/javaee/javaserverfaces/2.0/docs/pdldocs/facelets/f/subview.html) , put condition in rendered attribute
<f:subview rendered="if: 'en_us' == currentlang()">english text </f:subview>
i think should work.
Comments
Post a Comment