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

2012-11-17 Thread delta458
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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Intro, Wicket 6, RuntimeException error page

2012-11-17 Thread Rob Schroeder
Hi Jordi,

excellent, thanks!

It seems that the matter was discussed before, resulting in ticket 
https://issues.apache.org/jira/browse/WICKET-2659 with a proposal for a 
change to Wicket that would automatically pass an Exception to the page 
specified by getApplicationSettings().setInternalErrorPage if the page's 
class had a suitable constructor, but the proposal was voted down because 
of the existence of your approach.

Cheers,
Robert


On Sat, 17 Nov 2012 15:30:33 +0100, Jordi Deu-Pons wrote:

> Hi Robert,
> 
>  I'm using a custom error page in Wicket 6 adding a
> RequestCycleListener at WebApplication init like this:
> 
> /* In case of unhandled exception redirect it to a custom page */
> getRequestCycleListeners().add(new AbstractRequestCycleListener() {
> @Override
> public IRequestHandler onException(RequestCycle cycle,
> Exception e) {
> return new RenderPageRequestHandler(new
> PageProvider(new ExceptionErrorPage(e)));
> }
> });
> 
> Here you can see that you get the exception on the constructor.
> 
> I'm not sure if there is a better way to do this in Wicket 6.
> 
> Best regards,
> 
>  Jordi.
> 
> On Sat, Nov 17, 2012 at 2:18 PM, Rob Schroeder  wrote:
> > Hello,
> >
> > I'm a new list member and I'll start with a quick introduction:
> >
> > After one or two earlier, but aborted attempts to try and get into Wicket, 
> > I've
> > finally decided to take the plunge now, even if only for some pending 
> > personal
> > projects and possible future side-jobs. On my primary job as a Java SE/EE
> > developer, JSF will most probably become the one-and-only web framework for 
> > the
> > foreseeable future, which I don't like, but that's life.
> >
> > While the mentioned attempts were with Wicket 1.3 and 1.4, it probably would
> > seem stupid to start with anything but Wicket 6 now.
> >
> > It seems though that Wicket 6 introduced some major changes so that quite 
> > some
> > of the docs, tips & tricks to be found on the web are no more applicable,
> > including parts of the official Wicket Wiki and not really covered by the
> > migration hints either; at least that's my impression after my initial 
> > dabblings
> > in Wicket 6, which leads me to the first questions for which I found no 
> > hints so
> > far:
> >
> > In Wicket 1.5, there is a way to define a custom error page for
> > RuntimeExceptions which knows about the causing exception, by extending
> > WebRequestCycle and overriding the WebApplication's newRequestCycle method. 
> > In
> > Wicket 6, I can use getApplicationSettings().setInternalErrorPage and
> > getExceptionSettings().setUnexpectedExceptionDisplay, but within my error 
> > page
> > class I don't see my Exception, then. Did I miss something?
> >
> > Cheers,
> > Robert
> >
> >
> >
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> 
> 
> 
> -- 
> a10! i fins aviat.
> J:-Deu
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 




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



Re: Why is SortParam.getProperty generic?

2012-11-17 Thread Jochen Mader
I was just about to answer my own question.
We migrated a big part of our application to use LambdaJ instead of
PropertyModels. With getProperty being generic it's now possible to
use it instead of passing around strings.
Thanks,
Jochen

On Sat, Nov 17, 2012 at 4:01 PM, Jochen Mader  wrote:
> On Sat, Nov 17, 2012 at 3:42 PM, Sven Meier  wrote:
>> It's just that some devs wanted to use other things than strings to identify
>> the sort order:
>>
>>   https://issues.apache.org/jira/browse/WICKET-4535
>>
>> Perhaps Jesse has an example?
>>
>> Sven
>>
>>
>> On 11/17/2012 01:19 PM, Jochen Mader wrote:
>>>
>>> SortParam.getProperty doesn't return a String butIt might be due to the
>>> fact that I am sick but I don't get why
>>>
>>>   T.
>>> So far I always used getProperty as vasis for a PropertyModel to resolve
>>> things.
>>> Any hint would be appreciated,
>>> Jochen
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>

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



Re: Why is SortParam.getProperty generic?

2012-11-17 Thread Jochen Mader
On Sat, Nov 17, 2012 at 3:42 PM, Sven Meier  wrote:
> It's just that some devs wanted to use other things than strings to identify
> the sort order:
>
>   https://issues.apache.org/jira/browse/WICKET-4535
>
> Perhaps Jesse has an example?
>
> Sven
>
>
> On 11/17/2012 01:19 PM, Jochen Mader wrote:
>>
>> SortParam.getProperty doesn't return a String butIt might be due to the
>> fact that I am sick but I don't get why
>>
>>   T.
>> So far I always used getProperty as vasis for a PropertyModel to resolve
>> things.
>> Any hint would be appreciated,
>> Jochen
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Re: Why is SortParam.getProperty generic?

2012-11-17 Thread Sven Meier
It's just that some devs wanted to use other things than strings to 
identify the sort order:


  https://issues.apache.org/jira/browse/WICKET-4535

Perhaps Jesse has an example?

Sven


On 11/17/2012 01:19 PM, Jochen Mader wrote:

SortParam.getProperty doesn't return a String butIt might be due to the fact 
that I am sick but I don't get why
  T.
So far I always used getProperty as vasis for a PropertyModel to resolve things.
Any hint would be appreciated,
Jochen

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




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



Re: Intro, Wicket 6, RuntimeException error page

2012-11-17 Thread Jordi Deu-Pons
Hi Robert,

 I'm using a custom error page in Wicket 6 adding a
RequestCycleListener at WebApplication init like this:

/* In case of unhandled exception redirect it to a custom page */
getRequestCycleListeners().add(new AbstractRequestCycleListener() {
@Override
public IRequestHandler onException(RequestCycle cycle,
Exception e) {
return new RenderPageRequestHandler(new
PageProvider(new ExceptionErrorPage(e)));
}
});

Here you can see that you get the exception on the constructor.

I'm not sure if there is a better way to do this in Wicket 6.

Best regards,

 Jordi.

On Sat, Nov 17, 2012 at 2:18 PM, Rob Schroeder  wrote:
> Hello,
>
> I'm a new list member and I'll start with a quick introduction:
>
> After one or two earlier, but aborted attempts to try and get into Wicket, 
> I've
> finally decided to take the plunge now, even if only for some pending personal
> projects and possible future side-jobs. On my primary job as a Java SE/EE
> developer, JSF will most probably become the one-and-only web framework for 
> the
> foreseeable future, which I don't like, but that's life.
>
> While the mentioned attempts were with Wicket 1.3 and 1.4, it probably would
> seem stupid to start with anything but Wicket 6 now.
>
> It seems though that Wicket 6 introduced some major changes so that quite some
> of the docs, tips & tricks to be found on the web are no more applicable,
> including parts of the official Wicket Wiki and not really covered by the
> migration hints either; at least that's my impression after my initial 
> dabblings
> in Wicket 6, which leads me to the first questions for which I found no hints 
> so
> far:
>
> In Wicket 1.5, there is a way to define a custom error page for
> RuntimeExceptions which knows about the causing exception, by extending
> WebRequestCycle and overriding the WebApplication's newRequestCycle method. In
> Wicket 6, I can use getApplicationSettings().setInternalErrorPage and
> getExceptionSettings().setUnexpectedExceptionDisplay, but within my error page
> class I don't see my Exception, then. Did I miss something?
>
> Cheers,
> Robert
>
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
a10! i fins aviat.
J:-Deu

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



Intro, Wicket 6, RuntimeException error page

2012-11-17 Thread Rob Schroeder
Hello,

I'm a new list member and I'll start with a quick introduction:

After one or two earlier, but aborted attempts to try and get into Wicket, I've 
finally decided to take the plunge now, even if only for some pending personal 
projects and possible future side-jobs. On my primary job as a Java SE/EE 
developer, JSF will most probably become the one-and-only web framework for the 
foreseeable future, which I don't like, but that's life.

While the mentioned attempts were with Wicket 1.3 and 1.4, it probably would 
seem stupid to start with anything but Wicket 6 now. 

It seems though that Wicket 6 introduced some major changes so that quite some 
of the docs, tips & tricks to be found on the web are no more applicable, 
including parts of the official Wicket Wiki and not really covered by the 
migration hints either; at least that's my impression after my initial 
dabblings 
in Wicket 6, which leads me to the first questions for which I found no hints 
so 
far:

In Wicket 1.5, there is a way to define a custom error page for 
RuntimeExceptions which knows about the causing exception, by extending 
WebRequestCycle and overriding the WebApplication's newRequestCycle method. In 
Wicket 6, I can use getApplicationSettings().setInternalErrorPage and 
getExceptionSettings().setUnexpectedExceptionDisplay, but within my error page 
class I don't see my Exception, then. Did I miss something?

Cheers,
Robert







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



Why is SortParam.getProperty generic?

2012-11-17 Thread Jochen Mader
It might be due to the fact that I am sick but I don't get why
SortParam.getProperty doesn't return a String but T.
So far I always used getProperty as vasis for a PropertyModel to resolve things.
Any hint would be appreciated,
Jochen

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