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

2013-03-18 Thread Michael Haitz
ok, didn't know that you use wicket:head. By default components are visited 
child-first and wicket:head before code contribution.

order should be something like that:

 1. child component wicket:head
 2. child component renderHead
 3. Page wicket:head
 4. Page renderHead

You can manipulate order by using FilteredHeaderItem. Here's a javascript 
example, but it works with css too.

https://github.com/martin-g/blogs/tree/master/wicket6-resource-management/src/main/java/com/wicketinaction/resourcemanagement/positioning



Am 17.03.2013 um 22:52 schrieb Sylvain Vieujot sv.mailingli...@gmail.com:

 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
 


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



How to append attribute for ListView item properly

2013-03-18 Thread meduolis
Hi, I try to append attribute for my list item using ajax link. But it does
not append.

Expected: class=image-box selected
Actual: class=image-box

=
Markup:

=
Java:

=



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-append-attribute-for-ListView-item-properly-tp4657312.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: CSS bundles order does not seem stable when using an application

2013-03-18 Thread armandoxxx
read this about resources:  resources management
http://wicketinaction.com/2012/07/wicket-6-resource-management/  

us PriorityHeaderItem() 

Regards

Armando





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-bundles-order-does-not-seem-stable-when-using-an-application-tp4657299p4657319.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: AjaxLazyLoadPanel update with target.addComponent

2013-03-18 Thread brazz
found a solution.
Here is a class which can be used for every long running interactions for
which you have an AjaxRequestTarget available.
You can use it instead of AjaxLazyLoadPanel, when creating a new instance of
your class is inappropriate.
I used the concept of callback script in AjaxLazyLoadPanel and reorganized
the handling:

Usage of the class:



The class:

*



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxLazyLoadPanel-update-with-target-addComponent-tp4657120p4657320.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: Gmap3 Geocoding shows Status 610

2013-03-18 Thread Dieter Tremel
Am 16.03.2013 22:43, schrieb Vishal Popat:
 I am using GMap3 from here: 
 https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/gmap3-parent/gmap3.
  My Geocoding has recently stopped working and is showing Status 610. Google 
 searching shows that this is all related to GMap2 being deprecated etc (There 
 maybe other reasons why I am getting a 610).
 
 However, when looking here: 
 https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/gmap3-parent/gmap3/src/main/java/org/wicketstuff/gmap/geocoder/Geocoder.java.
  The encoding url looks like it is from Gmap v2 (see here: 
 https://developers.google.com/maps/documentation/geocoding/index), which 
 would explain the 610.
 
 Am I mistaken?

Hello Vishal,

I have the same problem and think you are right. Geocoder#encode in
Version 6.5.0 uses an old URL and parses the return value as CSV,
whereas https://developers.google.com/maps/documentation/geocoding/ only
talks about JSON and XML return values. The unit test of Geocoder fails
with error code 610.

Unfortunately I changed a few weeks ago from an own solution to the
wicketstuff gmap3 solution for not to reinvent the wheel. Now I will
have a look at my solution again.

Martin, is there an issue for this or should we open one?

Dieter


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



Wizard customization

2013-03-18 Thread Entropy
Googling, I found an old post by a guy promising to post some examples of
customizing the wizard extension, but I can't seem to find those, so I will
ask here instead:

How exactly does one customize the wicket wizard?  I have three steps,
fairly simple, all three are mandatory and can be done in order only.  But
visually:

1) I want to get rid of that black border the wizard uses
2) I want to customize the look and feel of the buttons to conform with my
app's button style.

But I'm not in control of the HTML for this item.  How do I control these?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wizard-customization-tp4657328.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



lost session and error modal

2013-03-18 Thread infiniter
I added an ajax behavior to maintain the session alive. However in certain
cases the page can still expire and the session can still be lost, so I'm
showing an error modal using #getFailureScript(). But I'm facing a problem,
which is, for example, when the user refreshes the page the failure script
error modal will show up a couple of secs, but of course that's not cool.
If you have dealt with this or have suggestions, please let me know. Thanks.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/lost-session-and-error-modal-tp4657329.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: Wizard customization

2013-03-18 Thread Entropy
Question 3: Also, my page is being thrown off by the nested table structures
that the Wizard component generates.  My webby guy says he didn't anticipate
that when he wrote our templates and it really demolishes the look and feel. 
Is there a way I can control the HTML the wizard generates?  To make it just
use divs or something?

I have a hunch I am going to have to give up on the Wizard entirely.  Which
makes me a sad panda.

Anyone have ideas on how to rescue this?  because Wizard seemed like such a
good fit for the process flow.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wizard-customization-tp4657328p4657332.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-atmosphere] Spring Security context while rendering subscribed components

2013-03-18 Thread Emond Papegaaij
Hi,

I'm sorry for the late reply, but I haven't been well last week.
Wicket-atmosphere follows the wicket request cycle. Perhaps you can add a
RequestCycleListener to setup the context? Keep in mind though that this
listener is also called for normal requests. Let me know if this is ok for
you. Another solution would be to add another listener system, but I think
it's better to try to use existing systems before adding another wheel.

Best regards,
Emond
Op 8 mrt. 2013 14:31 schreef Andrei Badea andrei.ba...@movzx.net het
volgende:

 Our Wicket application uses Spring Security for authentication and
 authorization. All service methods check that the current user (in the
 Spring Security context) has the right to execute the method.

 When the subscribed components are rendered for an Atmosphere broadcast,
 the security context is not the right one. We call EventBus.post() in a
 background (non-HTTP) thread, so there is no security context at all (and
 even if it were, its user would not be the right one).

 I can use ResourceRegistrationListener to keep track of the
 resource-UUID-to-user assignment, but I see no way to set the user into the
 security context before the subscribed components are rendered. Is there
 one? If not, it is conceivable to add one, such as some sort of hook to
 EventBus.post()? The security context would ideally be set around
 postToSingleResource(), and it must be reset after all resources have been
 handled.

 Thank you,

 Andrei


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




Re: Wizard customization

2013-03-18 Thread Sébastien Gautrin
I'll just answer quickly for now (still at work and don't want to stay 
too much longer), and complete later if noone else has detailed it more.


Basically what you need to customize the generated HTML is to extend the 
Wizard class with your own (e.g. class MyWizard extends Wizard), and 
then create a markup file for MyWizard: this is the markup Wicket will 
then use. Of course, you'll need to have adequate wicket:id in your 
markup (so start by copying the content of the markup file for the 
Wizard that you can find in the jar).


Entropy wrote:

Question 3: Also, my page is being thrown off by the nested table structures
that the Wizard component generates.  My webby guy says he didn't anticipate
that when he wrote our templates and it really demolishes the look and feel.
Is there a way I can control the HTML the wizard generates?  To make it just
use divs or something?

I have a hunch I am going to have to give up on the Wizard entirely.  Which
makes me a sad panda.

Anyone have ideas on how to rescue this?  because Wizard seemed like such a
good fit for the process flow.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wizard-customization-tp4657328p4657332.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



Selenium powered WicketTester

2013-03-18 Thread sauli.ketola
About a year ago I started thinking about trying to implement a Selenium
based WicketTester. Little over a week ago a finally decided to give it a
try. So far it's been easier than I had imagined. It's in a early stage but
I decided to share it at this point for comments and new ideas.

Take a look at it here:
https://github.com/ketola/wicket-selenium/wiki/WicketSeleniumTester

At least with the simple tests that I've done so far it seems to perform
surprisingly well.

I've also found some similar attempts:

Wicket Page Test: http://wicketpagetest.sourceforge.net/. 
At least based on my understanding this is focused on testing just pages. I
wanted to try to implement something similar to WicketTester.

Also seems Igor Vaynberg has been working on ideas to replace WicketTester
(https://github.com/ivaynberg/WicketTesterSandbox) but seems this hasn't
been worked on a while.


Everyone's welcome to comment and join :)

@SauliKetola



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Selenium-powered-WicketTester-tp4657335.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: CSS bundles order does not seem stable when using an application

2013-03-18 Thread Sylvain Vieujot
The PriorityHeaderItem solved the problem.

Thank you !

On Mon, 2013-03-18 at 05:49 -0700, armandoxxx wrote:

 read this about resources:  resources management
 http://wicketinaction.com/2012/07/wicket-6-resource-management/  
 
 us PriorityHeaderItem() 
 
 Regards
 
 Armando
 
 
 
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/CSS-bundles-order-does-not-seem-stable-when-using-an-application-tp4657299p4657319.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
 


CompoundPropertyModel binding direction

2013-03-18 Thread Lucio Crusca
I'm trying to use CompoundPropertyModel in a form I dynamically create with a 
RepeatingView. I use the CompoundPropertyModel#bind method to bind each input 
tag to the corresponding java bean property.

Binding from java bean to html does work (the fields get filled), while the 
other way around (onSubmit) does break... the reported error is no get method 
defined ... singlePanelForCurrentRow, where singlePanelForCurrentRow is the 
wicket:id I use to attach the repeating input tags.

I don't know what to search for on Google, because searching obvious terms 
(CompoundPropertyModel binding and the like) yelds trivial examples, but 
nothing similar to my needs.

Here is a quickstart demonstrating the issue, try clicking submit:

http://www.virtualbit.it/download/sparsi/example.zip

Thanks in advance
Lucio.

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



Re: lost session and error modal

2013-03-18 Thread Bernard
Hi,

Perhaps you can afford to look at this from a simplified perspective.

I am thinking of two levels of sophistication:

1) the page simply refreshes after expiry. The user then has to repeat
the action with a new session. This is Wicket default behavoir.

2) In the case where the Wicket server state is not logically vital (
it is only technically required to prevent harm in complex cases) we
could expect that Wicket responds with the requested AJAX behavior
after re-creating the page and storing it in the new session.

For 2), there is a suggestion for improvement that you might be
interested in if you would benefit from Wicket responding to your ajax
call with the expected result even after session expiry:

Optionally execute Callback Behavior on Re-construction after Expiry
https://issues.apache.org/jira/browse/WICKET-5070


Regards,

Bernard





So , 


On Mon, 18 Mar 2013 09:24:49 -0700 (PDT), you wrote:

I added an ajax behavior to maintain the session alive. However in certain
cases the page can still expire and the session can still be lost, so I'm
showing an error modal using #getFailureScript(). But I'm facing a problem,
which is, for example, when the user refreshes the page the failure script
error modal will show up a couple of secs, but of course that's not cool.
If you have dealt with this or have suggestions, please let me know. Thanks.


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