Hi all!
Short class descriptions (getters / setters left out):
Code:
class Newspaper #123; private Maplt;String, Pricegt; prices; // Lazy loaded hibernate collection
#125;
class Price #123; private Double dollar; private Double euro;
#125;
Binding in jsp (different price for each weekday):
Code:
lt;c#58;forEach begin=quot;1quot; end=quot;7quot; varStatus=quot;loopStatusquot;gt; lt;spring#58;bind path=quot;newspaper.prices#91;$#123;loopStatus.index#125;#93;.dollarquot;gt; lt;input type=quot;textquot; name=quot;$#123;status.expression#125;quot; value=quot;$#123;status.value#125;quot;/gt; lt;/spring#58;bindgt; lt;spring#58;bind path=quot;newspaper.prices#91;$#123;loopStatus.index#125;#93;.euroquot;gt; lt;input type=quot;textquot; name=quot;$#123;status.expression#125;quot; value=quot;$#123;status.value#125;quot;/gt; lt;/spring#58;bindgt;
lt;/c#58;forEachgt;
This works if the map contains all keys from 1-7, but how do I handle cases where the map only contains 1-5? |