CSS bundles order does not seem stable when using an application

2013-03-17 Thread Sylvain Vieujot
My application is using a resourceBundle to concatenate CSS resources
via : getResourceBundles().addCssBundle( ... ).

My base wicket page, from which all others pages inherit starts
including the Bootstrap CSS, and then my other CSS :

public void renderHead(IHeaderResponse response) {
super.renderHead( response );
Bootstrap.renderHeadResponsive( response );

response.render( CssHeaderItem.forReference( BaseCssResourceReference.get() ) );
...
}

However, on some pages the Bootstrap CSS is included first, like on this
page : http://dubai.windcam.com/winds/gallery
Whilst on others, the mainCSSBundle is included first, like here :
http://dubai.windcam.com/winds/windDailyChart 
or here : http://dubai.windcam.com/winds/
And this breaks the CSS that overloads Bootstrap defaults.

What could be the cause of this ?

I thought that calling calling Bootstrap.renderHeadResponsive( response
) first would ensure this order.
Is there an other way to fix this order ?

Thank you,

Sylvain.


ListView does not repaint inside WebMarcupContainer using AjaxLink

2013-03-17 Thread meduolis
Hi, does anybody knows how to repaint ListView properly using AjaxLink?

This 
https://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html
https://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html  
does not work for me.

If I use Link, everything works. But not with AjaxLink. Help, please
===
Markup:

===
Java:

===



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ListView-does-not-repaint-inside-WebMarcupContainer-using-AjaxLink-tp4657300.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: ListView does not repaint inside WebMarcupContainer using AjaxLink

2013-03-17 Thread vineet semwal
ajax repainting will not work with wicket:container or
setrenderbodyonly(true)  as in that case component tag is not rendered in
html.another way is repainting grand(er) parent which doesn't have
setrenderbodyonly(true) or wicket:container


On Sun, Mar 17, 2013 at 3:22 PM, meduolis meduol...@gmail.com wrote:

 Hi, does anybody knows how to repaint ListView properly using AjaxLink?

 This
 https://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html
 https://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html
 does not work for me.

 If I use Link, everything works. But not with AjaxLink. Help, please

 ===
 Markup:


 ===
 Java:


 ===



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/ListView-does-not-repaint-inside-WebMarcupContainer-using-AjaxLink-tp4657300.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




-- 
regards,

Vineet Semwal


Re: CSS bundles order does not seem stable when using an application

2013-03-17 Thread Michael Haitz
you can add a dependency to the bootstrap resource reference in your own 
BaseCssResourceReference:

@Override
public Iterable? extends HeaderItem getDependencies() {
ListHeaderItem dependencies = new ArrayListHeaderItem();
dependencies.add(JavaScriptHeaderItem.forReference(Bootstrap.plain()));

return dependencies;
}

here's a short introduction to wicket resource management:

http://wicketinaction.com/2012/07/wicket-6-resource-management/

best,
Michael


Am 17.03.2013 um 07:09 schrieb Sylvain Vieujot sv.mailingli...@gmail.com:

 My application is using a resourceBundle to concatenate CSS resources
 via : getResourceBundles().addCssBundle( ... ).
 
 My base wicket page, from which all others pages inherit starts
 including the Bootstrap CSS, and then my other CSS :
 
 public void renderHead(IHeaderResponse response) {
super.renderHead( response );
Bootstrap.renderHeadResponsive( response );
 
 response.render( CssHeaderItem.forReference( BaseCssResourceReference.get() ) 
 );
...
 }
 
 However, on some pages the Bootstrap CSS is included first, like on this
 page : http://dubai.windcam.com/winds/gallery
 Whilst on others, the mainCSSBundle is included first, like here :
 http://dubai.windcam.com/winds/windDailyChart 
 or here : http://dubai.windcam.com/winds/
 And this breaks the CSS that overloads Bootstrap defaults.
 
 What could be the cause of this ?
 
 I thought that calling calling Bootstrap.renderHeadResponsive( response
 ) first would ensure this order.
 Is there an other way to fix this order ?
 
 Thank you,
 
 Sylvain.


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



Re: Serialization of DAO

2013-03-17 Thread Dan Retzlaff
Wicket only injects Components and Behaviors by default. To inject into
anything else, call Injector.get().inject(this) in its constructor.

On Fri, Mar 15, 2013 at 2:27 PM, Stephen Walsh 
step...@connectwithawalsh.com wrote:

 I have a much better understanding on this now.  Are there any plans to
 support injection on LDMs, or is there a suggested work around for this?

 It seems like you'd want a DAO service to get an object from the DB within
 a custom model so you can return that back to your component.

 ___
 Stephen Walsh | http://connectwithawalsh.com


 On Thu, Mar 14, 2013 at 5:03 PM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Take a look at wicket-examples and the unit tests in wicket-guice module.
 
 
  On Thu, Mar 14, 2013 at 10:53 PM, Stephen Walsh 
  step...@connectwithawalsh.com wrote:
 
   Any other thoughts on this?
  
   ___
   Stephen Walsh | http://connectwithawalsh.com
  
  
   On Thu, Mar 14, 2013 at 10:30 AM, Stephen Walsh 
   step...@connectwithawalsh.com wrote:
  
Thanks, Martin.  I intialize here, (which I just realized is not the
  best
spot):
   
private void setUpMongo() {
mongo = MongoUtil.getMongo();
morphia = new Morphia().map(Blog.class).map(Person.class);
blogDAO = new BlogDAO(mongo, morphia);
}
   
I am using the Wicket Guice module, and I think your second point is
  what
I was getting at.  From learning about Guice (
http://www.youtube.com/watch?feature=player_embeddedv=hBVJbzAagfs),
 I
thought the point was to initialize once and then reuse wherever
  needed.
I
figured initialization would happen in the application class.  Maybe
  I'm
misunderstanding.  If it's supposed to happen in the application
 class,
then I don't really have need for a module because I don't have an
interface in this case, right?
   
Thanks for the help on this.
   
___
Stephen Walsh | http://connectwithawalsh.com
   
   
On Thu, Mar 14, 2013 at 3:20 AM, Martin Grigorov 
 mgrigo...@apache.org
   wrote:
   
Hi,
   
I don't see how you initialize blogDAO. If you don't use wicket-ioc
   module
then you will need to lookup the DAO from the application whenever
 you
need
it:
   
public void onSubmit() {
   
  BlogDAO blogDao = MyApplication.get().getBlogDAO();
  blogDao.save(blog);
}
This way you wont keep reference to it in the page/component and it
  wont
be
serialized.
   
If you use wicket-guice module then you can do:
   
@Inject
private  BlogDAO blogDao;
   
and use it anywhere.
Wicket will use Guice to lookup the bean at component creation but
 the
bean
will be wrapped in a serializable proxy. That is a lightweight proxy
   will
be (de)serialized with the page.
This is the recommended way.
wicket-string works the same way.
wicket-cdi leaves the proxy creation to the CDI implementation.
   
   
   
On Thu, Mar 14, 2013 at 5:19 AM, Stephen Walsh 
step...@connectwithawalsh.com wrote:
   
 I'm attempting to implement Guice for my DAO connections as my
 JBoss
server
 keeps running out of memory.  Not entirely sure why that is, but
 I'm
hoping
 this is at least part of it.  I read through
 http://markmail.org/message/sz64l4eytzc3ctkh and understand why
 the
   DAO
 needs to be serialized, and I also followed


   
  
 
 https://cwiki.apache.org/confluence/display/WICKET/Wicket%2C+Guice+and+Ibatis+exampleto
 try and figure out where and how exactly to inject my DAO.

 My DAO already extends a basic DAO class that has all of the
 basics
   for
 getting stuff from the database.  Neither of these are interfaces
  (not
sure
 if this is a problem or not).  My DAO works just fine in panels,
 but
   as
 soon as it's on a page, it throws the not seralizable exception.
  Regardless it doesn't really solve the problem of really only
  needing
one
 DAO for the whole application instead of creating one whenever
 it's
needed
 in every place that it's needed.  If I understand dependency
   injection,
 then this is the whole point.

 Here's my class.  Hopefully someone can point me in the right
   direction
for
 this page and my application class:

 public class EditBlogEntry extends BasePage {

 private Logger logger =
LoggerFactory.getLogger(EditBlogEntry.class);

 private Mongo mongo;
 private Morphia morphia;
 private BlogDAO blogDAO;

 public EditBlogEntry(final Blog blogEntry) {
  // Add edit blogPost form to page
 Form? form = new Form(form);
 form.add(new Button(postIt) {
 @Override
 public void onSubmit() {
 // This merely gets a new mongo 

Re: CSS bundles order does not seem stable when using an application

2013-03-17 Thread Sylvain Vieujot
Unfortunately, this does not solve the issue.
It seems that if the page has a wicket:head tag, the order is
disturbed.
This was not the case when my application was not using
getResourceBundles().addCssBundle in the Application.init.

On Sun, 2013-03-17 at 16:26 +0100, Michael Haitz wrote:

 you can add a dependency to the bootstrap resource reference in your own 
 BaseCssResourceReference:
 
 @Override
 public Iterable? extends HeaderItem getDependencies() {
 ListHeaderItem dependencies = new ArrayListHeaderItem();
 
 dependencies.add(JavaScriptHeaderItem.forReference(Bootstrap.plain()));
 
 return dependencies;
 }
 
 here's a short introduction to wicket resource management:
 
 http://wicketinaction.com/2012/07/wicket-6-resource-management/
 
 best,
 Michael
 
 
 Am 17.03.2013 um 07:09 schrieb Sylvain Vieujot sv.mailingli...@gmail.com:
 
  My application is using a resourceBundle to concatenate CSS resources
  via : getResourceBundles().addCssBundle( ... ).
  
  My base wicket page, from which all others pages inherit starts
  including the Bootstrap CSS, and then my other CSS :
  
  public void renderHead(IHeaderResponse response) {
 super.renderHead( response );
 Bootstrap.renderHeadResponsive( response );
  
  response.render( CssHeaderItem.forReference( BaseCssResourceReference.get() 
  ) );
 ...
  }
  
  However, on some pages the Bootstrap CSS is included first, like on this
  page : http://dubai.windcam.com/winds/gallery
  Whilst on others, the mainCSSBundle is included first, like here :
  http://dubai.windcam.com/winds/windDailyChart 
  or here : http://dubai.windcam.com/winds/
  And this breaks the CSS that overloads Bootstrap defaults.
  
  What could be the cause of this ?
  
  I thought that calling calling Bootstrap.renderHeadResponsive( response
  ) first would ensure this order.
  Is there an other way to fix this order ?
  
  Thank you,
  
  Sylvain.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


Re: CSS bundles order does not seem stable when using an application

2013-03-17 Thread Michael Haitz
does adding the bootstrap css resource reference to the bundle solve your 
problem? 

sorry, i don't have access to the code at the moment.

Am 17.03.2013 um 21:46 schrieb Sylvain Vieujot sv.mailingli...@gmail.com:

 Unfortunately, this does not solve the issue.
 It seems that if the page has a wicket:head tag, the order is
 disturbed.
 This was not the case when my application was not using
 getResourceBundles().addCssBundle in the Application.init.
 
 On Sun, 2013-03-17 at 16:26 +0100, Michael Haitz wrote:
 
 you can add a dependency to the bootstrap resource reference in your own 
 BaseCssResourceReference:
 
@Override
public Iterable? extends HeaderItem getDependencies() {
ListHeaderItem dependencies = new ArrayListHeaderItem();

 dependencies.add(JavaScriptHeaderItem.forReference(Bootstrap.plain()));
 
return dependencies;
}
 
 here's a short introduction to wicket resource management:
 
 http://wicketinaction.com/2012/07/wicket-6-resource-management/
 
 best,
 Michael
 
 
 Am 17.03.2013 um 07:09 schrieb Sylvain Vieujot sv.mailingli...@gmail.com:
 
 My application is using a resourceBundle to concatenate CSS resources
 via : getResourceBundles().addCssBundle( ... ).
 
 My base wicket page, from which all others pages inherit starts
 including the Bootstrap CSS, and then my other CSS :
 
 public void renderHead(IHeaderResponse response) {
   super.renderHead( response );
   Bootstrap.renderHeadResponsive( response );
 
 response.render( CssHeaderItem.forReference( BaseCssResourceReference.get() 
 ) );
   ...
 }
 
 However, on some pages the Bootstrap CSS is included first, like on this
 page : http://dubai.windcam.com/winds/gallery
 Whilst on others, the mainCSSBundle is included first, like here :
 http://dubai.windcam.com/winds/windDailyChart 
 or here : http://dubai.windcam.com/winds/
 And this breaks the CSS that overloads Bootstrap defaults.
 
 What could be the cause of this ?
 
 I thought that calling calling Bootstrap.renderHeadResponsive( response
 ) first would ensure this order.
 Is there an other way to fix this order ?
 
 Thank you,
 
 Sylvain.
 
 
 -
 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: CSS bundles order does not seem stable when using an application

2013-03-17 Thread Sylvain Vieujot
Add the bootstrap css resource reference to the bundle would solve the
problem if it were possible.
Indeed the bootstrap css include references to images whose path is
relative to the bootstrap classpath. So adding bootstrap css to a bundle
whose path is not the same as bootstrap will break the bootstrap images.

On Sun, 2013-03-17 at 22:45 +0100, Michael Haitz wrote:

 does adding the bootstrap css resource reference to the bundle solve your 
 problem? 
 
 sorry, i don't have access to the code at the moment.
 
 Am 17.03.2013 um 21:46 schrieb Sylvain Vieujot sv.mailingli...@gmail.com:
 
  Unfortunately, this does not solve the issue.
  It seems that if the page has a wicket:head tag, the order is
  disturbed.
  This was not the case when my application was not using
  getResourceBundles().addCssBundle in the Application.init.
  
  On Sun, 2013-03-17 at 16:26 +0100, Michael Haitz wrote:
  
  you can add a dependency to the bootstrap resource reference in your own 
  BaseCssResourceReference:
  
 @Override
 public Iterable? extends HeaderItem getDependencies() {
 ListHeaderItem dependencies = new ArrayListHeaderItem();
 
  dependencies.add(JavaScriptHeaderItem.forReference(Bootstrap.plain()));
  
 return dependencies;
 }
  
  here's a short introduction to wicket resource management:
  
  http://wicketinaction.com/2012/07/wicket-6-resource-management/
  
  best,
  Michael
  
  
  Am 17.03.2013 um 07:09 schrieb Sylvain Vieujot sv.mailingli...@gmail.com:
  
  My application is using a resourceBundle to concatenate CSS resources
  via : getResourceBundles().addCssBundle( ... ).
  
  My base wicket page, from which all others pages inherit starts
  including the Bootstrap CSS, and then my other CSS :
  
  public void renderHead(IHeaderResponse response) {
super.renderHead( response );
Bootstrap.renderHeadResponsive( response );
  
  response.render( CssHeaderItem.forReference( 
  BaseCssResourceReference.get() ) );
...
  }
  
  However, on some pages the Bootstrap CSS is included first, like on this
  page : http://dubai.windcam.com/winds/gallery
  Whilst on others, the mainCSSBundle is included first, like here :
  http://dubai.windcam.com/winds/windDailyChart 
  or here : http://dubai.windcam.com/winds/
  And this breaks the CSS that overloads Bootstrap defaults.
  
  What could be the cause of this ?
  
  I thought that calling calling Bootstrap.renderHeadResponsive( response
  ) first would ensure this order.
  Is there an other way to fix this order ?
  
  Thank you,
  
  Sylvain.
  
  
  -
  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
 


Wicket job offer in Dubai

2013-03-17 Thread Sylvain Vieujot
We have a job opening for a good wicket developer.

Emirates REIT ( http://www.reit.ae ) needs to recuite a good developer
that is both good at programming and at suggesting ways to model and
improve our businesses and processes via the IT system.

The job will be based in Dubai, at the Dubai Financial Centre, and
includes expanding our intranet which is quite extensive and key to the
business, and working on a few other smaller projects.

The key skills are :
Wicket, Hibernate, Javascript, Maven and linux administration.

If interested, please contact me at : sylvain at companydomain.

Thank you.

Sylvain Vieujot.


Re: Wicket Ajax Debug Errors - how to debug?

2013-03-17 Thread Marios Skounakis
Did so - WICKET-5104 https://issues.apache.org/jira/browse/WICKET-5104

I still don't understand what the problem is. Despite the error things seem
to be working. Is it safe to ignore it, or should I find a workaround until
it is fixed?


On Sat, Mar 16, 2013 at 8:53 AM, Sven Meier s...@meiers.net wrote:

 Seems like this is caused by WICKET-4959.

 Please file a Jira issue.

 Sven


 On 03/15/2013 09:56 PM, Marios Skounakis wrote:

 Hi all,

 I am using a modal window as a substitute for messageboxes. E.g. I have a
 few forms with an ajax submit button, and I am using the modal window to
 first display a confirmation message, and if the user accepts it, to
 display a success / failure message.

 I am getting frequent errors in the Wicket Ajax Debug console. One is:
 *
 ERROR: *

 Wicket.Ajax.Call.**processEvaluation: Exception evaluating javascript:
 TypeError: Wicket.TimerHandles is undefined, text:
 (function(){clearTimeout(**Wicket.TimerHandles['**spinner21e']); delete
 Wicket.TimerHandles['**spinner21e'];})();

 The spinner control mentioned above is an image component with an
 AbstractAjaxTimerBehavior. In all cases of error, it has
 setVisibilityAllowed(false) (it's hidden).

 Usually the errors can be ignored and the page still functions normally.

 I've never really dug into the way ajax responses are handled so I'm not
 sure where to start in order to track this error down.

 Any ideas?
 Thanks in advance,
 Marios



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