Sure, it will work :)
I wanted only to point out the eval function of Freemarker. That solved us in 
the past (and present) different bad situations.



-----Messaggio originale-----
Da: [email protected] [mailto:[email protected]] 
Per conto di Nils Breunese
Inviato: martedì 17 febbraio 2015 15:37
A: Magnolia User-List
Oggetto: Re: [magnolia-user] Static Field with dynamic values

Matteo Pelucco (Tinext) wrote:

> Option 1, easy: use Freemarker eval
> In dialogs, enter something like "model.getItemPrice(123)" and then 
> with Freemarker use content.property?eval Option 2, more challenging 
> (but funny!): use AngularJS or similar In dialogs, enter something like 
> "{{item[123].price}} (or similar!!) and with AngularJS (or whatever you want) 
> inject the logic to retrieve price in JS world.

I'd just enter the item id (123) in the dialog and call model.getItemPrice(id) 
from your FreeMarker/JSP template. Why wouldn't that work?

Nils.




----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, 
E-mail to: <[email protected]>
----------------------------------------------------------------



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to