You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by delta458 <de...@hotmail.com> on 2012/11/17 18:56:04 UTC

Include one .js file into another .js file in wicket

Hello,

I have 2 .js files.

Invoice.js: content is something like:
/var price
var recipient
.../

Rules.js: content is something like:
/if(price > 100){
    //do Something
}/

What I need: I need to include the Invoice.js into Rules.js.
What my application does: I fill in a form and with compound proporty model
my POJO Invoice.java will be set. If I submit my form. The Invoice Object
will be mapped to the Invoice.js file. That means

/var price;/ inside Invoice.js will be generated from /private double
price;/ inside Invoice.java 

Then Rules.js should be able to read var price.
But how can I include my Invoice.js into the Rules.js in wicket?

Any help appreciated!
regards



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Include-one-js-file-into-another-js-file-in-wicket-tp4653973.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Include one .js file into another .js file in wicket

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Check org.apache.wicket.util.template.PackageTextTemplate
and org.apache.wicket.util.string.interpolator.MapVariableInterpolator.


On Sat, Nov 17, 2012 at 7:56 PM, delta458 <de...@hotmail.com> wrote:

> Hello,
>
> I have 2 .js files.
>
> Invoice.js: content is something like:
> /var price
> var recipient
> .../
>
> Rules.js: content is something like:
> /if(price > 100){
>     //do Something
> }/
>
> What I need: I need to include the Invoice.js into Rules.js.
> What my application does: I fill in a form and with compound proporty model
> my POJO Invoice.java will be set. If I submit my form. The Invoice Object
> will be mapped to the Invoice.js file. That means
>
> /var price;/ inside Invoice.js will be generated from /private double
> price;/ inside Invoice.java
>
> Then Rules.js should be able to read var price.
> But how can I include my Invoice.js into the Rules.js in wicket?
>
> Any help appreciated!
> regards
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Include-one-js-file-into-another-js-file-in-wicket-tp4653973.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>