RE: JPA annotations

2012-12-21 Thread Chris Colman
I thought anything EJB was taken off the menu years ago to stop people
getting very sick - Doctor's orders ;)


>-Original Message-
>From: Martin Grigorov [mailto:mgrigo...@apache.org]
>Sent: Friday, 21 December 2012 11:42 PM
>To: users@wicket.apache.org
>Subject: Re: JPA annotations
>
>Hi,
>
>The page cannot be a bean, so it cannot be @Stateless.
>Better create a stateless EJB which has a reference to
@PersistenceUnit:
>
>class MyPage extends WebPage {
>
>  @EJB
>  private MyBean ejb;
>
>  
>  ejb.store(entity)
>
>}
>
>interface MyBean {
>  void store(Entity entity)
>}
>
>@Stateless
>class MyBeanImpl implements MyBean {
>   @PersistenceUnit
>   private EntityManagerFactory emf;
>
>@Override
>public void store(Entity entity) {
>emf.getEntityManager().persist(entity);
>}
>}
>
>P.S. I haven't used JavaEE since its early days of 1.5 version so
excuse me
>if I don't follow some best practices.
>
>
>On Fri, Dec 21, 2012 at 2:30 PM, Lucio Crusca  wrote:
>
>> Hello *,
>>
>> I've started this short thread on the tomEE users ml:
>>
>> http://markmail.org/message/3asqvvptnkieknq5
>>
>> The final answer sounds to me like "if you want to use resources
>injection
>> through JPA annotations in a wicket application, your best bet is
Java-
>EE-
>> Inject"
>>
>> https://github.com/wicketstuff/core/wiki/Java-EE-Inject
>>
>> which in turn states that:
>>
>> "With JavaEE Inject you can use in your wicket components three
>> annotations:
>> @EJB, @PersistenceUnit, @Resource".
>>
>> What about @Entity, @Table, @Id, @GeneratedValue and friends?
>>
>> What's the simplest way to use JPA annotations and dependency
injection
>> threreof in a wicket application?
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>--
>Martin Grigorov
>jWeekend
>Training, Consulting, Development
>http://jWeekend.com 

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



RE: [Announce] wicket-dashboard

2012-12-21 Thread Paul Bors
Hey Decebal,

Thanks for your effort in creating the wicket-dashboard!

That's how I got started with HighCharts and your dashboard :)

I already created a wicket-dashboard-highcharts project using your trunk
version of the wicket-dashboard project which I should either forward to you
or perhaps you can give me instructions on how to add it to your project.

The two integrate quite easily once you configure both to run the same
version of jQuery and now either project allows you to do so.

I'm going on vacation for the next 2 weeks and when I get back I'm in charge
of putting together a demo using wicket-dashboard and wicked-charts
(HighCharts).

~ Thank you,
  Paul Bors

-Original Message-
From: Decebal Suiu [mailto:decebal.s...@asf.ro] 
Sent: Wednesday, December 19, 2012 7:14 AM
To: users@wicket.apache.org
Subject: RE: [Announce] wicket-dashboard

Thanks Paul for your interest. I'm curios to see how your dashboard looks
(and maybe some code that shows us how to integrate highcharts as widget in
wicket-dashboard; maybe we can create a wicket-dashboard-highcharts
project).

Best regards,
Decebal



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Announce-wicket-dashboard-tp46523
08p4654927.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



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



Re: delete messages

2012-12-21 Thread Sven Meier

Hi Dirk,

that doesn't look correct. Once rendered the messages should be cleared.
Please create a quickstart.

Sven

On 12/21/2012 06:44 PM, Dirk Wichmann wrote:

Hi Martin,

thanks for your reply, but that is not my problem,
Example:
1) the user entered invalid password -> error feedback message is shown
2) the user opens the modal and in the modal the error messages from 
the login page will be displayed.


thats the call of the modal:

AjaxFallbackLink lPasswordMissedLink = new 
AjaxFallbackLink("passwordMissed") {

@Override
public void onClick(AjaxRequestTarget target) {
target.add(passwordMissed); // I have tryed both 
passwordMissed is the modal and lFeedbackPanel the feedback panel

//target.add(lFeedbackPanel);
passwordMissed.show(target);
}
};

Thanks in advance
Cheers
Dirk


Am 21.12.2012 09:04, schrieb Martin Grigorov:

Hi,

The feedback messages are rendered in FeedbackPanel. Once rendered 
they are

removed at the server side. So the next render of the FeedbackPanel will
remove them from the UI too.

Example:
1) the user enters invalid password -> an error feedback message is 
shown

2) the user opens the Modal to reset/re-send his password -> code:
success("The new password is sent to m...@example.com");
target.add(feedbackPanel);

target.add(feedbackPanel); will re-render the FeedbackPanel and this 
will

replace the message from 1) with the one from 2)



On Thu, Dec 20, 2012 at 10:51 PM, Dirk Wichmann 
wrote:



Hi all,

since a view month I use wicket 6.1.1 and I'm new here, so I hope 
that I'm

able to describe my problem so you can understand it right.
I have implemented a login panel, inside this panel I have a modal 
window
(ModalWindow) where the user is able to put in his mail address, so 
I can

send him his password / new password.
If there are errors in the main login panel, e.g. user unknown, the 
error

message will be displayed and everything is fine.
The problem is, if I open the modal window the error messages from main
panel will be displayed.
Is there any possibility to reset / delete the old messages?? With 
google

I found a view solutions, but they're described for wicket 1.n...

Thanks in advance
Kind regards
Dirk

--**--**- 

To unsubscribe, e-mail: 
users-unsubscribe@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: Wicket 6 API docs incomplete

2012-12-21 Thread Ian Marshall
That's good to hear, Martin. All seems to be fine now.

Ian


Martin Grigorov-4 wrote
> Hi,
> 
> Thanks!
> This is known. It is because the last Javadoc build failed due to "No
> space
> left on device":
> http://ci.apache.org/builders/wicket-master/builds/950/steps/MasterShellCommand/logs/stdio
> 
> 
> On Thu, Dec 20, 2012 at 7:27 PM, Ian Marshall <

> IanMarshall.UK@

> >wrote:
> 
>> Hello,
>>
>> I just wanted to let people know that the above javadocs are incomplete
>> for
>> me.
>>
>> Reproduction steps
>> --
>>   ·  Visit the Apache Wicket home page at: http://wicket.apache.org
>>   ·  Follow the link "API Docs" | "Wicket 6" at:
>> http://ci.apache.org/projects/wicket/apidocs/6.0.x
>>   ·  Follow the link to the classes CheckBox or Label
>>   ·  I get the web response "(404 -) No Such Resource - File not found."
>>   ·  The javadocs for Wicket 1.5 are fine for me.
>>
>> I hope this helps.
>>
>> Ian Marshall
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-API-docs-incomplete-tp4654977.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: 

> users-unsubscribe@.apache

>> For additional commands, e-mail: 

> users-help@.apache

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





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-API-docs-incomplete-tp4654977p4655011.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: delete messages

2012-12-21 Thread Dirk Wichmann

Hi Martin,

thanks for your reply, but that is not my problem,
Example:
1) the user entered invalid password -> error feedback message is shown
2) the user opens the modal and in the modal the error messages from the 
login page will be displayed.


thats the call of the modal:

AjaxFallbackLink lPasswordMissedLink = new 
AjaxFallbackLink("passwordMissed") {

@Override
public void onClick(AjaxRequestTarget target) {
target.add(passwordMissed); // I have tryed both 
passwordMissed is the modal and lFeedbackPanel the feedback panel

//target.add(lFeedbackPanel);
passwordMissed.show(target);
}
};

Thanks in advance
Cheers
Dirk


Am 21.12.2012 09:04, schrieb Martin Grigorov:

Hi,

The feedback messages are rendered in FeedbackPanel. Once rendered they are
removed at the server side. So the next render of the FeedbackPanel will
remove them from the UI too.

Example:
1) the user enters invalid password -> an error feedback message is shown
2) the user opens the Modal to reset/re-send his password -> code:
success("The new password is sent to m...@example.com");
target.add(feedbackPanel);

target.add(feedbackPanel); will re-render the FeedbackPanel and this will
replace the message from 1) with the one from 2)



On Thu, Dec 20, 2012 at 10:51 PM, Dirk Wichmann wrote:


Hi all,

since a view month I use wicket 6.1.1 and I'm new here, so I hope that I'm
able to describe my problem so you can understand it right.
I have implemented a login panel, inside this panel I have a modal window
(ModalWindow) where the user is able to put in his mail address, so I can
send him his password / new password.
If there are errors in the main login panel, e.g. user unknown, the error
message will be displayed and everything is fine.
The problem is, if I open the modal window the error messages from main
panel will be displayed.
Is there any possibility to reset / delete the old messages?? With google
I found a view solutions, but they're described for wicket 1.n...

Thanks in advance
Kind regards
Dirk

--**--**-
To unsubscribe, e-mail: 
users-unsubscribe@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: JPA annotations

2012-12-21 Thread Martin Grigorov
http://jweekend.co.uk/dev/LegUp

You may need to upgrade dependencies' versions.


On Fri, Dec 21, 2012 at 6:13 PM, Lucio Crusca  wrote:

> In data venerdì 21 dicembre 2012 17:01:59, Martin Grigorov ha scritto:
> > Spring Java Config, @Configuration, @Bean
>
> Ok thanks, but there are other things that make me prefer Guice over
> Spring,
> if possible. Is it possible? Can Guice be used to make JPA annotations
> work in
> wicket apps?
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: JPA annotations

2012-12-21 Thread Lucio Crusca
In data venerdì 21 dicembre 2012 17:01:59, Martin Grigorov ha scritto:
> Spring Java Config, @Configuration, @Bean

Ok thanks, but there are other things that make me prefer Guice over Spring, 
if possible. Is it possible? Can Guice be used to make JPA annotations work in 
wicket apps?


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



Re: JPA annotations

2012-12-21 Thread Martin Grigorov
Spring Java Config, @Configuration, @Bean


On Fri, Dec 21, 2012 at 5:58 PM, Lucio Crusca  wrote:

> In data venerdì 21 dicembre 2012 15:10:11, Martin Grigorov ha scritto:
> >
> > I think Spring is still dominant in this area.
>
> Hmm, I've had a look, too much xml for my taste... what about Guice? Can
> it be
> used as alternative to Spring to have JPA annotations working with Wicket?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: JPA annotations

2012-12-21 Thread Lucio Crusca
In data venerdì 21 dicembre 2012 15:10:11, Martin Grigorov ha scritto:
> 
> I think Spring is still dominant in this area.

Hmm, I've had a look, too much xml for my taste... what about Guice? Can it be 
used as alternative to Spring to have JPA annotations working with Wicket?

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



Re: JPA annotations

2012-12-21 Thread Martin Grigorov
On Fri, Dec 21, 2012 at 4:07 PM, Lucio Crusca  wrote:

> In data venerdì 21 dicembre 2012 13:41:36, Martin Grigorov ha scritto:
> > Hi,
> >
> > The page cannot be a bean, so it cannot be @Stateless.
> > Better create a stateless EJB which has a reference to @PersistenceUnit:
>
> Thanks for pointing that out.
>
> > class MyPage extends WebPage {
> >
> >   @EJB
> >   private MyBean ejb;
> >
> >   
> >   ejb.store(entity)
> >
> > }
> >
> > interface MyBean {
> >   void store(Entity entity)
> > }
> >
> > @Stateless
> > class MyBeanImpl implements MyBean {
> >@PersistenceUnit
> >private EntityManagerFactory emf;
> >
> > @Override
> > public void store(Entity entity) {
> > emf.getEntityManager().persist(entity);
> > }
> > }
>
> Ok, but what about Java-EE-Inject? Is that the standard (most widely used)
> way
> to integrate JPA (or hibernate) into wicket applications?
>
>
I think Spring is still dominant in this area.


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


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


Re: JPA annotations

2012-12-21 Thread Lucio Crusca
In data venerdì 21 dicembre 2012 13:41:36, Martin Grigorov ha scritto:
> Hi,
> 
> The page cannot be a bean, so it cannot be @Stateless.
> Better create a stateless EJB which has a reference to @PersistenceUnit:

Thanks for pointing that out.

> class MyPage extends WebPage {
> 
>   @EJB
>   private MyBean ejb;
> 
>   
>   ejb.store(entity)
> 
> }
> 
> interface MyBean {
>   void store(Entity entity)
> }
> 
> @Stateless
> class MyBeanImpl implements MyBean {
>@PersistenceUnit
>private EntityManagerFactory emf;
> 
> @Override
> public void store(Entity entity) {
> emf.getEntityManager().persist(entity);
> }
> }

Ok, but what about Java-EE-Inject? Is that the standard (most widely used) way 
to integrate JPA (or hibernate) into wicket applications?



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



Re: JPA annotations

2012-12-21 Thread Martin Grigorov
Hi,

The page cannot be a bean, so it cannot be @Stateless.
Better create a stateless EJB which has a reference to @PersistenceUnit:

class MyPage extends WebPage {

  @EJB
  private MyBean ejb;

  
  ejb.store(entity)

}

interface MyBean {
  void store(Entity entity)
}

@Stateless
class MyBeanImpl implements MyBean {
   @PersistenceUnit
   private EntityManagerFactory emf;

@Override
public void store(Entity entity) {
emf.getEntityManager().persist(entity);
}
}

P.S. I haven't used JavaEE since its early days of 1.5 version so excuse me
if I don't follow some best practices.


On Fri, Dec 21, 2012 at 2:30 PM, Lucio Crusca  wrote:

> Hello *,
>
> I've started this short thread on the tomEE users ml:
>
> http://markmail.org/message/3asqvvptnkieknq5
>
> The final answer sounds to me like "if you want to use resources injection
> through JPA annotations in a wicket application, your best bet is Java-EE-
> Inject"
>
> https://github.com/wicketstuff/core/wiki/Java-EE-Inject
>
> which in turn states that:
>
> "With JavaEE Inject you can use in your wicket components three
> annotations:
> @EJB, @PersistenceUnit, @Resource".
>
> What about @Entity, @Table, @Id, @GeneratedValue and friends?
>
> What's the simplest way to use JPA annotations and dependency injection
> threreof in a wicket application?
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


JPA annotations

2012-12-21 Thread Lucio Crusca
Hello *,

I've started this short thread on the tomEE users ml:

http://markmail.org/message/3asqvvptnkieknq5

The final answer sounds to me like "if you want to use resources injection 
through JPA annotations in a wicket application, your best bet is Java-EE-
Inject"

https://github.com/wicketstuff/core/wiki/Java-EE-Inject

which in turn states that:

"With JavaEE Inject you can use in your wicket components three annotations:
 
@EJB, @PersistenceUnit, @Resource". 

What about @Entity, @Table, @Id, @GeneratedValue and friends? 

What's the simplest way to use JPA annotations and dependency injection 
threreof in a wicket application?



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



Re: Autocomplete for mentions how to use Twitter

2012-12-21 Thread Martin Grigorov
http://jakiestfu.github.com/Mention.js/


On Fri, Dec 21, 2012 at 1:56 PM, Raul  wrote:

> Hello, I have the same problem as Alpiske, does anyone have any idea how to
> do this?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Autocomplete-for-mentions-how-to-use-Twitter-tp4654876p4654999.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
>
>


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


Re: Autocomplete for mentions how to use Twitter

2012-12-21 Thread Raul
Hello, I have the same problem as Alpiske, does anyone have any idea how to
do this?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Autocomplete-for-mentions-how-to-use-Twitter-tp4654876p4654999.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: Wicket 6.4.0 Session/URL bug?

2012-12-21 Thread Martijn Dashorst
On Fri, Dec 21, 2012 at 1:41 AM, Chris Colman
 wrote:
> Oh, I didn't realize there was a separate ASF based repository.

That is the canonical one. The github ones were just mirrors. "If it
ain't at Apache it isn't Apache™"

> It there a manual (human) based process for changes migrating from the
> ASF repos to the github one or is it automated?

It is automated, but fails fairly often. And it is just triggered once a day.

Martijn

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



Re: Wicket create image from file system outside web application directory

2012-12-21 Thread Martin Grigorov
Why do you use  ExternalLink link = new ExternalLink("link",
urlForWordAsImage.toString());
 ?

You need to show an image.
I guess if you click on this link it will hit the resource reference.


On Thu, Dec 20, 2012 at 1:24 PM, Arun Chauhan  wrote:

> hi,
>
> I tried to debug the code and I found out that control is not coming to
> internal /ImageResource/ class which is returning bytes.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-create-image-from-file-system-outside-web-application-directory-tp4654932p4654974.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
>
>


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


Re: delete messages

2012-12-21 Thread Martin Grigorov
Hi,

The feedback messages are rendered in FeedbackPanel. Once rendered they are
removed at the server side. So the next render of the FeedbackPanel will
remove them from the UI too.

Example:
1) the user enters invalid password -> an error feedback message is shown
2) the user opens the Modal to reset/re-send his password -> code:
success("The new password is sent to m...@example.com");
target.add(feedbackPanel);

target.add(feedbackPanel); will re-render the FeedbackPanel and this will
replace the message from 1) with the one from 2)



On Thu, Dec 20, 2012 at 10:51 PM, Dirk Wichmann wrote:

> Hi all,
>
> since a view month I use wicket 6.1.1 and I'm new here, so I hope that I'm
> able to describe my problem so you can understand it right.
> I have implemented a login panel, inside this panel I have a modal window
> (ModalWindow) where the user is able to put in his mail address, so I can
> send him his password / new password.
> If there are errors in the main login panel, e.g. user unknown, the error
> message will be displayed and everything is fine.
> The problem is, if I open the modal window the error messages from main
> panel will be displayed.
> Is there any possibility to reset / delete the old messages?? With google
> I found a view solutions, but they're described for wicket 1.n...
>
> Thanks in advance
> Kind regards
> Dirk
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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