problem with generation text in javascript code

View: New views
5 Messages — Rating Filter:   Alert me  

problem with generation text in javascript code

by paul wolanski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
Yesterday I've faced with problem with generating javascript code.
On page I've inserted code:
i.e.:

<wicket:extend>
        <form><script type="text/javascript">
      appInitialize("here should be generated string"); //
generated string should be pasted as a param
....
</wicket:extend>

I want to mention, that I would not mix my application with velocity,
which IMHO could be here the easiest solution..

Thank you in advance for all answers.
Cheers,
Paul

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


Re: problem with generation text in javascript code

by martin-g :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

make <script> element a Wicket citizen :-)
<script wicket:id="myScript">...</script>

El vie, 30-10-2009 a las 14:32 +0100, pawel wolanski escribió:

> Hello,
> Yesterday I've faced with problem with generating javascript code.
> On page I've inserted code:
> i.e.:
>
> <wicket:extend>
> <form><script type="text/javascript">
>       appInitialize("here should be generated string"); //
> generated string should be pasted as a param
> ....
> </wicket:extend>
>
> I want to mention, that I would not mix my application with velocity,
> which IMHO could be here the easiest solution..
>
> Thank you in advance for all answers.
> Cheers,
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


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


Re: problem with generation text in javascript code

by paul wolanski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Martin,
Hmmm it looks like a little bit dirty trick, because I will have to print out whole initialization between <script> tags...
I'll try to find another way to resolve that.
Thank you for help Martin.
I appreciate that.

Cheers,
Paul

martin-g wrote:
make <script> element a Wicket citizen :-)
<script wicket:id="myScript">...</script>

El vie, 30-10-2009 a las 14:32 +0100, pawel wolanski escribió:
> Hello,
> Yesterday I've faced with problem with generating javascript code.
> On page I've inserted code:
> i.e.:
>
> <wicket:extend>
> <form><script type="text/javascript">
>       appInitialize("here should be generated string"); //
> generated string should be pasted as a param
> ....
> </wicket:extend>
>
> I want to mention, that I would not mix my application with velocity,
> which IMHO could be here the easiest solution..
>
> Thank you in advance for all answers.
> Cheers,
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


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

Re: problem with generation text in javascript code

by igor.vaynberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

you can use TextTemplateHeaderContributor to externalize the template
and define replacement vars.

-igor

On Fri, Oct 30, 2009 at 10:09 AM, paul wolanski <mikolayek@...> wrote:

>
> Hello Martin,
> Hmmm it looks like a little bit dirty trick, because I will have to print
> out whole initialization between <script> tags...
> I'll try to find another way to resolve that.
> Thank you for help Martin.
> I appreciate that.
>
> Cheers,
> Paul
>
>
> martin-g wrote:
>>
>> make <script> element a Wicket citizen :-)
>> <script wicket:id="myScript">...</script>
>>
>> El vie, 30-10-2009 a las 14:32 +0100, pawel wolanski escribió:
>>> Hello,
>>> Yesterday I've faced with problem with generating javascript code.
>>> On page I've inserted code:
>>> i.e.:
>>>
>>> <wicket:extend>
>>>      <form><script type="text/javascript">
>>>       appInitialize("here should be generated string"); //
>>> generated string should be pasted as a param
>>> ....
>>> </wicket:extend>
>>>
>>> I want to mention, that I would not mix my application with velocity,
>>> which IMHO could be here the easiest solution..
>>>
>>> Thank you in advance for all answers.
>>> Cheers,
>>> Paul
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@...
>>> For additional commands, e-mail: users-help@...
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/problem-with-generation-text-in-javascript-code-tp26130184p26133706.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

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


Re: problem with generation text in javascript code

by paul wolanski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
Thank you Igor. it is what I've looked for.
Another solution is using VelocityPanel, which I did not wanted to use..

- paul


igor.vaynberg wrote:
you can use TextTemplateHeaderContributor to externalize the template
and define replacement vars.

-igor

On Fri, Oct 30, 2009 at 10:09 AM, paul wolanski <mikolayek@gmail.com> wrote:
>
> Hello Martin,
> Hmmm it looks like a little bit dirty trick, because I will have to print
> out whole initialization between <script> tags...
> I'll try to find another way to resolve that.
> Thank you for help Martin.
> I appreciate that.
>
> Cheers,
> Paul
>
>
> martin-g wrote:
>>
>> make <script> element a Wicket citizen :-)
>> <script wicket:id="myScript">...</script>
>>
>> El vie, 30-10-2009 a las 14:32 +0100, pawel wolanski escribió:
>>> Hello,
>>> Yesterday I've faced with problem with generating javascript code.
>>> On page I've inserted code:
>>> i.e.:
>>>
>>> <wicket:extend>
>>>      <form><script type="text/javascript">
>>>       appInitialize("here should be generated string"); //
>>> generated string should be pasted as a param
>>> ....
>>> </wicket:extend>
>>>
>>> I want to mention, that I would not mix my application with velocity,
>>> which IMHO could be here the easiest solution..
>>>
>>> Thank you in advance for all answers.
>>> Cheers,
>>> Paul
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/problem-with-generation-text-in-javascript-code-tp26130184p26133706.html
> Sent from the Wicket - User 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
>
>

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