Re: Migration 1.4 -> 7.0: org.apache.wicket.markup.html.link.PageLink

2015-08-21 Thread Sébastien Gautrin

Hi Martin,

I just noted something while writing my answer to this thread: the link 
on http://wicket.apache.org/learn/#guide for Wicket 6 migration guide is 
broken, or rather the redirection of http://s.apache.org/wicket6migrate 
is broken: it leads to 
https://cwiki.apache.org/confluence/display/WICKET/Migrating+to+Wicket+6.0 
when the actual migration guide is at 
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+6.0



On 21/08/15 12:20, Martin Grigorov wrote:

Hi,

The easy fix is: use BookmarkablePageLink.

The class has been deprecated for 1.5 and removed for 6.x, I think.
I will be easier for you if you upgrade from 1.4 to 1.5, then to 6.x and
finally to 7.0.0.
This way you will see the deprecation warnings and the new suggestions.


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Aug 21, 2015 at 12:13 PM, Jörg Schaible <
joerg.schai...@swisspost.com> wrote:


Hi,

I have never worked with Wicket, but should migrating an application from
1.4.x to 7.0. I am searching a replacement for
org.apache.wicket.markup.html.link.PageLink. It no longer available and is
not mentioned anywhere in the migration guides.

Following elements are added in the constructor of a derived WebPage:

= %< ===
  final DataDetachableModel DataDetachableModel = new
DataDetachableModel(model);
  add(new FilterForm("filterForm", dataDetachableModel));
  add(new DataTable("data", dataDetachableModel));
  add(new PageLink("newData", DataCreatePage.class));
= %< ===

The PageLink class no longer exists ...

What can I use now?

Cheers,
Jörg


-
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: Migration 1.4 -> 7.0: org.apache.wicket.markup.html.link.PageLink

2015-08-21 Thread Sébastien Gautrin

You should most likely do incremental migration, e.g.:

 * 1.4.x -> 1.5.x
 * 1.5.x -> 6.0.x
 * 6.0.x -> 7.0.x

In between each migration, check what is now deprecated, which then will 
most likely have information about its replacements.


As for your specific issue, there's some information that seems somewhat 
relative to that in the Wicket 7 migration guide




  InlineFrame uses IPageProvider WICKET-5347
  

IPageLink has been removed because it was superseded by IPageProvider. 
Its last usage has been removed from InlineFrame



Having still yet to migrate from 1.5.x I cannot help you more though.


On 21/08/15 12:13, Jörg Schaible wrote:

Hi,

I have never worked with Wicket, but should migrating an application from
1.4.x to 7.0. I am searching a replacement for
org.apache.wicket.markup.html.link.PageLink. It no longer available and is
not mentioned anywhere in the migration guides.

Following elements are added in the constructor of a derived WebPage:

= %< ===
  final DataDetachableModel DataDetachableModel = new
DataDetachableModel(model);
  add(new FilterForm("filterForm", dataDetachableModel));
  add(new DataTable("data", dataDetachableModel));
  add(new PageLink("newData", DataCreatePage.class));
= %< ===

The PageLink class no longer exists ...

What can I use now?

Cheers,
Jörg


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





Re: Handling page refresh or redirect when the server reboots

2014-09-16 Thread Sébastien Gautrin

I don't have a "wicket-way" for this. However, if I had to do something like 
that, I'd try the following simple and extremely basic approach (which would need to be 
refined to be more than just an ugly hack)

1. after the action triggering the upgrade process, trigger a javascript on the 
client side
2. this javascript would poll a given url (e.g. current page or application 
home or a specific bookmarkmable page, the latter being probably better)
1. as long as the polled url does not return (within a short timeout) or 
returns an error code (depending on your setup: if the app is behind a proxy, 
you'd expect a 502/503 error as long as the app is not up)
2. once the poll returns a non-error, the javascript would trigger the 
redirect (it could also probably trigger a modal login form on the current page 
instead)

Note that I myself feel this approach would be very hacky and is most likely 
not the best way to do it with wicket, but this should at least work for your 
purpose, and maybe give you an idea on how to do it better.

On 10/09/14 23:03, msalman wrote:

So we have this feature of online server upgrade in which the user can start
an upgrade on the server while still logged into the (wicket) web app.  This
starts some scripts in the bacground which bring the  jboss server down,
upgrade the db, upgrade the ear file, etc., and then restart the jboss
server.  When the server comes back up we would like the user to be
redirected to the login page of the app automatically.  The last part does
not work.  At this time we just have a message telling the user to refresh
the page and when everything is ready he will be sent to the login page.

Is there a good robust way to make sure that the page is automatically
refreshed and the login page is presented?  Is it even possible to do it?
Personally I don't think this is not a good idea but this feature is a
requirement and I want to explore it as much as possible.


Appreciate any help.

Thanks.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Handling-page-refresh-or-redirect-when-the-server-reboots-tp4667465.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 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



Re: i18n in reusable panels / markup traversing question

2013-02-28 Thread Sébastien Gautrin

Hello,

For your property discovery mechanism, I'm not sure I really see how 
this works (sounds interesting though). However, what you want for 
traversing the component hierarchy upon initializing your panel is to 
delay the initialization after the panel has been added.


And there is a method defined in Component exactly for this purpose: 
onInitialize() (well this is on wicket 1.5, but I don't think it has 
changed in wicket 6). Basically you would do in this method (don't 
forget to call super.onInitialize() though) whatever you would 
otherwise have done in the constructor but requires access to the 
component hierarchy.



This method is meant to be used as an alternative to initialize 
components. Usually the component's constructor is used for this task, 
but sometimes a component cannot be initialized in isolation, it may 
need to access its parent component or its markup in order to fully 
initialize. This method is invoked once per component's lifecycle when 
a path exists from this component to the Page thus providing the 
component with an atomic callback when the component's environment is 
built out.



Hope this helps.

On Thu 28 Feb 2013 09:53:12 CET, Patrick Davids wrote:

Hi all,
I have a question concerning resuable panels, translation and the markup
traversing.

e.g. I have a page, which has its own property file providing
translation for a delete button.
This page deletes, lets say "Cars", so the buttons label should "delete
car".

On this page is a resuable panel for the delete action. Opening a
dialog... ask the user, to be sure etc. and here also, the headline
should be "delete car"

So, the panel should try to find the nearest label "delete" in the
markup hierarchy.

But: I always run into problems finding these labels, because the
component (on its init) is not part of a markup hierarchy, yet.
Cannot find key exception...

What I dont want to do is, giving all page specific texts and
translation to the reusable delete panel.
Doing so I loose this great wicket feature, just traversing the hierachy
tring to find the nearest matching translation.

What I'm doing wrong? How can I handle this in a best way?
Must be something easy, I just cannot see...

kind regards
Patrick
-
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: Eclipse or IntelliJ

2013-02-20 Thread Sébastien Gautrin
Personally I've been using IDEA since version 11, always on Linux, and 
from my view it's on the contrary quite faster than Eclipse, with a 
maven support that is not riddled with bugs.


Version 11 was as far as I'm concerned actually much cleaner and nicer 
than Eclipse ever was, and with version 12, the darkula theme is simply 
amazing: if I had to go back to work with Eclipse, the first I'd need 
would be to find a theme for it as close as possible as that theme.


P.S. for the cost part of IDEA that has been mentioned previously in the 
discussion, for those of you who work on Open Source projects, there's 
the Open Source Project License which gives you access to the full IDEA 
for free (same applies for Classroom License).


William Speirs wrote:

I've always used Eclipse and am currently using Juno. The Maven support got
much better, but other stupid things seem to have "broke." For example,
switching tabs into the XML editor (or pom editor) seems to require
calculating Pi to 10 million digits each time. Actually, I think there is a
memory leak somewhere and its just a GC going off, I should load it in
VisualVM and see. There are other annoying things about Eclipse with
respect to settings, but they can usually be "fixed" by editing some file
in the .settings directory.

Tried IntelliJ once and it was terribly slow (and looked a bit ugly on
Linux)... maybe I should try 12?

At the end of the day... anything's better than vim/emacs :-)

Bill-



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



Re: Strange behavior of TextField and AjaxFormComponentUpdatingBehavior

2012-11-28 Thread Sébastien Gautrin
Well with the library linked by Cédric which let's you have "html5 
placeholder" for older browsers, you actually don't have to touch 
anything in the layout to use that. All you need to do is have your 
wicket component (TextField most likely) contribute to the header the js 
dependencies (with renderHead(Response)), as well as attach to it an 
AttributeModifier which will define the "placeholder" attribute. (and if 
you don't need support for older browsers, all you need it then the 
AttributeModifier).


Dmitriy Neretin wrote:

Thank you guys, but unfortunately I have some constraints related to the
layout etc. and I can't avoid them...

Dmitriy

2012/11/28 Cedric Gatay 


For the placeholder thing you can use the standard HTML5 way with a
polyfill such as the following (with Modernizr it will only be loaded if
the client need it) :
https://github.com/ginader/HTML5-placeholder-polyfill
__
Cedric Gatay
http://www.bloggure.info | http://cedric.gatay.fr |
@Cedric_Gatay<http://twitter.com/Cedric_Gatay>



On Wed, Nov 28, 2012 at 10:32 AM, Sébastien Gautrin <
sebastien.gaut...@gmail.com> wrote:


Actually I'd recommend not puting the placeholder in the input itself,
assuming you don't have to support old browsers that most other now have
stopped supporting a few years back. Depending on the browser of your
users, you can:
- use the html5 placeholder attribute (best way to do that, but you won't
support ie < 10)
- have the placeholder appear in the input while it's not; one nice
technique is to use a label/span that you will move above the input with
css (using position attribute and z-index); then you have a little
javascript that will simply change the opacity of that placeholder
depending on conditions: with an initial opacity of 1, you can put it at
0.5 when the user focus the field, and at 0 once he entered anything.
Advantages of that compared to putting the placeholder in the input is

you

don't have to worry about the placeholder value being actually submitted

by

the client, and that you won't have any bloat to have the placeholder

back

if the user empty the field.

Note that for the second option, you need opacity, and thus either IE8+

or

have the proprietary ms syntax for that (IE5-7 using filter:
alpha(opacity=50);, IE8 using -ms-filter:"progid:**
DXImageTransform.Microsoft.**Alpha(Opacity=50)";)


Sven Meier wrote:


"oncklick"
... or "onclick" ?

I'd recommend a javascript only solution without round-trip to the

server.

http://stackoverflow.com/**questions/2851794/clear-text-**
onclick-textfield<

http://stackoverflow.com/questions/2851794/clear-text-onclick-textfield>

Sven

On 11/27/2012 05:09 PM, Dmitriy Neretin wrote:


Hi wicket-users,

I have a question about a combination of the TextField and
AjaxFormComponentUpdatingBehav**ior.

I have a text field with content. Just to indicate what user should
enter.
For example a day text filed, which already contains following "DD".
I do it by following:
dayField.setModel(Model.of("**DD"));

My idea now is to delete this text automatically. For example with
"oncklick" event. What I did is:

dayField.add(new AjaxFormComponentUpdatingBehav**ior("oncklick"){

  onUpdate(){
 doSomeStuff
}
});

So, the problem now is it doesn't work at first time! For example I

click

in the field, delete the text, insert another text, leave the field.
Click
in the filed again and only then onUpdate method performs. But it

doesn't

perform at first time and I don't understand why...

Can somebody help me?

Regards,
Dmitriy





--**--**-

To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<

users-unsubscr...@wicket.apache.org>

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



--**--**-
To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<

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: Strange behavior of TextField and AjaxFormComponentUpdatingBehavior

2012-11-28 Thread Sébastien Gautrin
Actually I'd recommend not puting the placeholder in the input itself, 
assuming you don't have to support old browsers that most other now have 
stopped supporting a few years back. Depending on the browser of your 
users, you can:
- use the html5 placeholder attribute (best way to do that, but you 
won't support ie < 10)
- have the placeholder appear in the input while it's not; one nice 
technique is to use a label/span that you will move above the input with 
css (using position attribute and z-index); then you have a little 
javascript that will simply change the opacity of that placeholder 
depending on conditions: with an initial opacity of 1, you can put it at 
0.5 when the user focus the field, and at 0 once he entered anything.
Advantages of that compared to putting the placeholder in the input is 
you don't have to worry about the placeholder value being actually 
submitted by the client, and that you won't have any bloat to have the 
placeholder back if the user empty the field.


Note that for the second option, you need opacity, and thus either IE8+ 
or have the proprietary ms syntax for that (IE5-7 using filter: 
alpha(opacity=50);, IE8 using 
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";)


Sven Meier wrote:

"oncklick"


... or "onclick" ?

I'd recommend a javascript only solution without round-trip to the 
server.


http://stackoverflow.com/questions/2851794/clear-text-onclick-textfield

Sven

On 11/27/2012 05:09 PM, Dmitriy Neretin wrote:

Hi wicket-users,

I have a question about a combination of the TextField and
AjaxFormComponentUpdatingBehavior.

I have a text field with content. Just to indicate what user should 
enter.

For example a day text filed, which already contains following "DD".
I do it by following:
   dayField.setModel(Model.of("DD"));

My idea now is to delete this text automatically. For example with
"oncklick" event. What I did is:

dayField.add(new AjaxFormComponentUpdatingBehavior("oncklick"){

 onUpdate(){
doSomeStuff
}
});

So, the problem now is it doesn't work at first time! For example I 
click
in the field, delete the text, insert another text, leave the field. 
Click
in the filed again and only then onUpdate method performs. But it 
doesn't

perform at first time and I don't understand why...

Can somebody help me?

Regards,
Dmitriy




-
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:link + component images

2012-11-27 Thread Sébastien Gautrin

Why use a blob rather than a text/longtext field?

Sandor Feher wrote:

Hi,

I use tinymce as editor, storing the content in a blob field and intro in a
varchar2 field. At my showcontent page I dig this out and display like this:

add(new Label("cikk",new Model(c.getIntro())).setEscapeModelStrings(false));

add(new Label("cikk",new Model(new
String(c.getFullArticle(.setEscapeModelStrings(false));

...

My showpage.html snippet:



So the problem is if I insert some images belong to tinymce component e.g.
emoticons they get broken.
If I put them into intro then it works fine but if i do it the same  into
the content (which is blob) then they get broken.


thnx., Sandor



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-link-component-images-tp4654258.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: Manual procedure to update Wicket for NetBeans

2012-11-22 Thread Sébastien Gautrin
For your exact situation, I suppose the maven-gae-plugin 
(https://github.com/maven-gae-plugin/maven-gae-plugin ) will solve your 
problem.


For other situations where there's no maven plugin to do what whas done 
in an ant task, there's a maven-antrun-plugin 
(http://maven.apache.org/plugins/maven-antrun-plugin/ ) which allows you 
to run ant task within the maven build process.


Ian Marshall wrote:

Martin Grigorov-4 wrote

Hi Ian,

Thanks for sharing !

May I ask you why you avoid Maven ?
With Maven (and similar dependency management tools) I just change X.Y.Z
to
X.Y.Z+1 in one place and continue working without bothering with all these
steps.

1.  The documentation for Google App Engine for Java (GAE/J) specifies
certain Ant scripts for doing useful things such as application building and
DataNucleus JDO datastore code "enhancement", so I do not want to drop Ant.

2.  I know almost nothing above Maven, except that this seems to be simple
to use with little configuration required to obtain the .jar (and source?)
files needed (and perhaps build an application too?).

3.  I do not know if Maven and Ant are incompatible, although I feel that
they are.

To conclude, I feel that Maven is good and the "modern, sensible way to go",
but for now I'll stick to Ant, in order to avoid the possible requirement to
change all my GAE/J Ant scripts to Maven things.

I'm happy to be told that I am wrong in all this!

I had to change my procedure for Wicket 6 to include the use of Maven.org,
in order to obtain source code files which I could no longer find in the
download mirrors. I shall be happy to update this procedure in the future to
reflect future changes or improvements if you want me to (just let me know
where it resides (if you want to use it)), even though I guess that Maven is
more the future than Ant is.


Ian



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Manual-procedure-to-update-Wicket-for-NetBeans-tp4654064p4654092.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: Which Twitter Bootstrap to use?

2012-10-22 Thread Sébastien Gautrin
It's just some classic use of numbers instead of vowels. Read it as 
you'd read "Lord Nikkon" (if I'm not mistaken, it's a reference to the 
1995 movie, Hackers)


 Original Message 
Subject: Re: Which Twitter Bootstrap to use?
From: Chris Colman 
To: users@wicket.apache.org
Date: 2012-10-22


Ok, thanks for that summary.

On another note: Is there a correct pronunciation of "l0rdn1kk0n"? If so, what 
is it? =]



-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com]
Sent: Monday, 22 October 2012 9:00 PM
To: users@wicket.apache.org
Subject: Re: Which Twitter Bootstrap to use?

The core Wicket Bootstrap currently just provides the bootstrap
artifacts. And for the foreseeable future, I don't expect it to go
beyond that too much.

I still am on the fence on:

- whether a Bootstrap component library should be part of Wicket
- whether l0rdn1kk0n's implementation is the way to go

If you need a component library now, you should really use
l0rdn1kk0n's implementation. Currently that project has the freedom to
move at a different pace than Wicket, so that is a benefit. If/whether
that ends up at Apache is unknown.

At €-dayjob we are starting to develop Bootstrap applications and we
are experimenting with building our own component libraries. If they
end up looking like l0rdn1kk0n's bootstrap implementation, we'll
gladly move to that project, and start advocating its adoption as a
wicket core project, or start pointing folks at that particular
implementation.

For now, Wicket's bootstrap is just there to support the new examples
and might be folded into them. I think the wicket examples are a
special case that usually don't have the same requirements for
components as your typical 'enterprise' application, and wouldn't
benefit of l0rdn1kk0n's implementation.

Martijn

On Sun, Oct 21, 2012 at 2:43 AM, Chris Colman
 wrote:

We've ported our app to Wicket 6.2 and are now looking to start using
Twitter Bootstrap.

Is this a correct summary of the current state Twitter Bootstrap support
in Wicket?

1.  The Wicket experimental does not provide any component
implementations. It merely provides a class for convenient inclusion of
the appropriate CSS + JS resources required for Twitter Bootstrap to
work via doing this in any page class that requires it:
 @Override
public void renderHead(IHeaderResponse response) {
 super.renderHead(response);

 Bootstrap.renderHead(response);
}

2.   The l0rdn1kk0n Wicket-Bootstrap project (pity about the weird
name!) has a few Wicket components specialized for Twitter Bootstrap use
and includes support for some free Bootstrap schemes.

Some questions:

How far off before Wicket bootstrap experimental gets some native wicket
components?
Could Wicket bootstrap experimental integrate the work of the
l0rdn1kk0n, bringing in some of it's components to leverage of existing
work by that project?
Will Wicket bootstrap experimental be so radically different to the
l0rdn1kk0n that porting to Wicket bootstrap experimental will be a
bothersome task when it's ready?

Chris Colman




--
Become a Wicket expert, learn from the best: http://wicketinaction.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




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



Re: Reseting a textField of an upload form

2012-10-05 Thread Sébastien Gautrin
You can actually put the wicket namespace for child pages and 
components, wicket will only use for its rendering what's inside 
 for the child pages, and what's inside  
for your panels (as well as what's in  for header 
contributions).


antechrestos wrote:

Well it works fine!
I will look for a good plugin for editing markups...
I use page inheritance . Hence adding the wicket namespace only works for my
mother page :'(
Anyway thank you both :)



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Reseting-a-textField-of-an-upload-form-tp4652632p4652680.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: Wicket and jQuery UI

2012-10-02 Thread Sébastien Gautrin

Hi Pointbreak,

At least for wicket-jquery-ui, it offers also pure behaviours 
integration for jquery extensions that are pure behaviours (such as 
Droppable). I think wiQuery does as well. For ease of defining such 
things for you own component, it is the main goal of wicket-jquery-ui; 
take a look at the three tutorials Sebastien made (sebfz1) for 
wicket-jquery-ui: 
http://code.google.com/p/wicket-jquery-ui/w/list?q=label:How-To (note: 
Sebastien is the author of wicket-jquery-ui).


More on the topic, I as well would welcome experience returns from 
people who used both (though personally I'm inclined to use 
wicket-jquery-ui at the moment, but that's also because I'm biaised 
after having been really impressed at how fast Sebastien integrated run 
fox software Datepicker component to wicket-jquery-ui while doing his 
tutorial#3).


Pointbreak wrote:

It's a very long time ago that I looked at the API's, so it's likely
things have changed since that time. But the problem I had with both
products is that they are mostly component based API's (meaning they
offer an Accordion component, Autocomplete component, etc.). Imho, a
much more flexible approach for JQuery integration is to offer all
jquery-ui functionality as behaviors. That way existing components (both
from core, other libraries, or your own code) can more easily be
augmented with jqeury-ui functionality. And since it's easy enough to do
it yourself with a few lines of code, I opted to don't use these
libraries at all.
There are a few things that require more thought (e.g. jQuery Tab-UI
combined integrated with Wicket-Ajax functionality, but at least back
then these frameworks didn't offer that in a flexible way either).

So I would say, check the libraries for how you are supposed to add the
jquery functionality (behavior vs component hierarchy), and don't be
afraid to just roll your own if necessary. It's not that much extra
functionality that the library offers over just using raw Wicket and
jQuery.

My 2cnts.

On Tue, Oct 2, 2012, at 13:02, ronny.v...@consult.nordea.com wrote:

Hi

I was not thinking about  the base, ie AbstractDefaultAjaxBehavior.

I was thinking about using one off the API - several components - could
be accordion? could be some effects etc.

So I was thinking about who has tried out both API's - has some
experiences and suggest this API because bla bla.

Hope I explain myself fully here.

- Ronny

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: 02 October 2012 08:52
To: users@wicket.apache.org
Subject: Re: Wicket and jQuery UI

Hi,

On Tue, Oct 2, 2012 at 9:28 AM,   wrote:

Hi Wicket

I have been looking at a) wiQuery and b) wicket-jquery-ui

What API to use when doing a bridge between Wicket and jQuery UI?

What exactly do you need ?

The "bridge" is AbstractDefaultAjaxBehavior - the base Ajax behavior.


Recommendations and experience would be very much welcomed.

Thanks in advance!

Best regards/Med venlig hilsen
Ronny Voss

Nordea Bank Danmark A/S
Online & Securities Processing Solutions Strandgade 3
DK-1401 København K
Mobile: +45 26711952
E-mail:
ronny.v...@consult.nordea.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: Datepicker with range selection support

2012-09-26 Thread Sébastien Gautrin
I'll do that. I had looked at the content of the 1.2.3-SNAPSHOT on 
sonatype and didn't see anything either. However, if there was not a 
clean between deploying the 6.0.1 and the 1.2.3, that might very well be 
the cause. I noticed several times in the past few quirks with maven 
like that where it wouldn't recompile some files after switching 
versions/branches while they had changed on disk.


I'll keep you informed after testing tonight.

Sébastien

 Original Message 
*Subject: *Re: Datepicker with range selection support
*From: *Sebastien 
*To: *users@wicket.apache.org
*Date: *2012-09-26

Hi Sebastien,

Well, I am a little bit confused because it is technically almost
impossible to deploy a wrong version.
I checked the 1.2.3-SNAPSHOT source on the Nexus repository and it seems to
be correct.

What I know is that I deployed the 1.2.3-SNAPSHOT just after the
6.0.1-SNAPSHOT. I remember I did not recompile explicitly (but deploy phase
comes after compile and install) and the branch switching may have caused a
kind of mistake. To be sure, I will clean/install/deploy a new snapshot
tonight. If you can retry tomorrow morning and let me know, it would be
nice!

Thanks & best regards,
Sebastien.

On Wed, Sep 26, 2012 at 11:25 AM, Sébastien Gautrin <
sebastien.gaut...@gmail.com> wrote:


I had noticed that, although I had in my pom version 1.2.3-SNAPSHOT for
wicket-jquery-ui, and when maven fetched it from the sonatype repository,
it would lead to the error. But when installing the snapshot from source
(from master as I needed the 1.5.x version), without changing the
wicket-jquery-ui dependency version, it'd work.

The situation is the same with the samples (and for the samples, that
can't be a dependency configuration mistake of mine).

So I'd really think there's something wrong with the 1.2.3-SNAPSHOT on
sonatype (the one from September 22).

Note : just noticed that in the earlier mail I had forgotten to tell I was
requesting 1.2.3-SNAPSHOT for a wicket 1.5.8 app, and installing from
master, so I wasn't very clear in the end, sorry.

Sébastien

 Original Message 
*Subject: *Re: Datepicker with range selection support
*From: *Sebastien 
*To: *users@wicket.apache.org
*Date: *2012-09-26

  Agreed with Martin; that's also explain why it is working when you build

it
manually (the default branch - master - is the wicket 1.5.x version).
Please note that the snapshot repository hosts both 1.2.3-SNAPSHOT (for
wicket 1.5.x) and 6.0.1-SNAPSHOT (for wicket 6.0.0).

Sorry if it was not clear enough,
Sebastien.

On Wed, Sep 26, 2012 at 8:50 AM, Martin Grigorov 
wrote:

  It seems you use Wicket 1.5.x with wicket-jquery-ui 6.x which depends

on Wicket 6.0.0

On Wed, Sep 26, 2012 at 3:48 AM, Sebastien Gautrin
 wrote:


Hi,

Me again. I started looking into integrating your RangeDatePicker (with


the


text field for now), but I get I an odd error when using the snapshots


for


sonatype repository, which I also get when running the samples. I get it
with jetty:run and tomcat:run, with oracle jdk7, open jdk7 and open jdk6
(see below for the stacktrace).

However if I build the snapshots myself, it works smoothly, so there


might


have been some kind of bug when you packaged them (well, to be honest I


have


absolutely no idea where that can come from).

Have a good night.

Sébastien

 stacktrace ===

ERROR - DefaultExceptionMapper - Unexpected error occurred
org.apache.wicket.**WicketRuntimeException: Method onRequest of
interface
org.apache.wicket.behavior.**IBehaviorListener targeted at

  com.googlecode.wicket.jquery.**ui.plugins.datepicker.**

RangeDatePicker$2@62565d57


on component [ [Component id = datepicker> threw an exception
  at

  org.apache.wicket.**RequestListenerInterface.**internalInvoke(**

RequestListenerInterface.java:**270)


  at

  org.apache.wicket.**RequestListenerInterface.**invoke(**

RequestListenerInterface.java:**241)


  at

  org.apache.wicket.request.**handler.**ListenerInterfaceRequestHandle**

r.invokeListener(**ListenerInterfaceRequestHandle**r.java:255)


  at

  org.apache.wicket.request.**handler.**ListenerInterfaceRequestHandle**

r.respond(**ListenerInterfaceRequestHandle**r.java:234)


  at

  org.apache.wicket.request.**cycle.RequestCycle$**

HandlerExecutor.respond(**RequestCycle.java:784)


  at

  org.apache.wicket.request.**RequestHandlerStack.execute(**

RequestHandlerStack.java:64)


  at

  org.apache.wicket.request.**cycle.RequestCycle.execute(**

RequestCycle.java:255)


  at

  org.apache.wicket.request.**cycle.RequestCycle.**

processRequest(RequestCycle.**java:212)


  at

  org.apache.wicket.request.**cycle.RequestCycle.**

processRequestAndDetach(**RequestCycle.java:283)


  at

  org.apache.wicket.protocol.**http.WicketFilter.**

processRequest(Wicket

Re: Datepicker with range selection support

2012-09-26 Thread Sébastien Gautrin
t(AbstractHttpConnection.java:452)

 at


org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884)

 at


org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938)

 at

org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)

 at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
 at


org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)

 at


org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)

 at


org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)

 at


org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)

 at


org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)

 at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at


sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

 at


sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 at java.lang.reflect.Method.invoke(Method.java:601)
 at


org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:260)

 ... 35 more
Caused by: java.lang.IncompatibleClassChangeError: Found class
org.apache.wicket.ajax.AjaxRequestTarget, but interface was expected
 at


com.googlecode.wicket.jquery.ui.plugins.datepicker.RangeDatePickerTextField$1.onValueChanged(RangeDatePickerTextField.java:117)

 at


com.googlecode.wicket.jquery.ui.plugins.datepicker.RangeDatePicker.onEvent(RangeDatePicker.java:128)

 at


org.apache.wicket.settings.def.FrameworkSettings.dispatchEvent(FrameworkSettings.java:127)

 at
org.apache.wicket.ComponentEventSender.send(ComponentEventSender.java:73)
 at org.apache.wicket.Component.send(Component.java:4503)
 at


com.googlecode.wicket.jquery.ui.ajax.JQueryAjaxBehavior.respond(JQueryAjaxBehavior.java:134)

 at


org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:369)

 ... 40 more



On 24/09/12 13:00, Sebastien wrote:

James, thanks for your comment.
Yes, the demo site is a functional wicket app. You can get the source at
the github project.

Sebastien, you are welcome!
Thanks to let me know what you finally did...

Best regards,
Sebastien.

On Mon, Sep 24, 2012 at 3:06 AM, James Eliyezar 
wrote:


This is really amazing Sebastien.
wicket-jquery-ui is really feature rich.

Is the demo site a wicket app?

On Mon, Sep 24, 2012 at 1:38 AM, Sébastien Gautrin <
sebastien.gaut...@gmail.com> wrote:


Wow,

This is simply terrific. I will sift through all this in the next

weeks.

All I can say is a big thanks for everything!

Sébastien



-
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: Datepicker with range selection support

2012-09-23 Thread Sébastien Gautrin

Wow,

This is simply terrific. I will sift through all this in the next weeks.

All I can say is a big thanks for everything!

Sébastien

On 22/09/12 19:00, Sebastien wrote:

Hi Sebastien.

wicket-jquery-ui has the goal to integrate jQuery UI widgets as Wicket
components; but it's also designed to integrate (easily, I guess) any
jQuery plugins (that's what I tend to evince in the tutorial series...).

So, I played around with the fox-run-software (range-)date-picker... I
noticed that the (kind-of) drop-down box which displays the date-picker is
not shipped in the library and should therefore be achieved out of the box,
as stated here:
http://www.foxrunsoftware.net/articles/javascript/date-range-picker-similar-to-google-analytics/

Given this, I did integrate two components (for both Wicket 1.5.8 & Wicket
6.0.0):
The first one is a RangeDatePicker, which is designed - when used alone -
to be an 'inline' widget, with an ajax behavior triggered on 'change'
event. This component can serves as base for more complex component, like a
google-analytics-date-picker (you will notice that the change event is
triggered on every date click... A merge request - that provide an
'onRangeChanged' event - is in stand-by since a month and has therefore not
been merged yet). The second component relies on this first one and on a
TextField to make the RangeDatePickerTextField (which indeed is a
FormComponent). It should be closed to the component you are looking for...

http://www.7thweb.net/wicket-jquery-ui/plugins/datepicker/RangeDatePickerTextFieldPage

If it fits your needs, you can either use it (released as
com.googlecode.wicket-jquery-ui:jquery-ui-plugin:1.2.3-SNAPSHOT) or have a
look at github project to see how it works. Sure, do not hesitate to have a
look at the other integrations as well (wicket-select2 is a prime example,
and the other jQuery integrations too).

If you have any questions, do not hesitate to use the forum (you may find
the link on the demo site's homepage)

Best regards,
Sebastien.

On Fri, Sep 21, 2012 at 4:37 PM, Sébastien Gautrin <
sebastien.gaut...@gmail.com> wrote:


Well,

If you make a tutorial about creating a plugin using wicket-jquery-ui,
even though it'll be for wicket 6, it should be relatively simply adaptable
to do the same for wicket 1.5 (unless there's a huge lot of changes between
the two for wicket-jquery-ui which is quite possible considering wicket 6
comes with jquery support unlike 1.5).

I'll take a look at your current how tos for wicket-jquery-ui (we don't
use wicket-jquery-ui for the moment - we have a few components using
wiquery and a couple very old components using jquery-ui in a crappy way),
but that's always interesting to see what's out there and how it works.

I'll take a closer look on wicket-select2 as well, as I suppose it could
be a good inspiration to integrate the fox run software datepicker library
(which is not using jquery-ui).

Regards,

Sébastien

Sebastien wrote:


Hi again,

Well... I was looking for a jQuery plugin for the 3rd part of my HowTo's,
about creating a plugin using wicket-jquery-ui.
Maybe will I play with that one in the coming days... (just note that it
will be over Wicket 6)

Regards,
Sebastien.






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



Re: Datepicker with range selection support

2012-09-21 Thread Sébastien Gautrin

Well,

If you make a tutorial about creating a plugin using wicket-jquery-ui, 
even though it'll be for wicket 6, it should be relatively simply 
adaptable to do the same for wicket 1.5 (unless there's a huge lot of 
changes between the two for wicket-jquery-ui which is quite possible 
considering wicket 6 comes with jquery support unlike 1.5).


I'll take a look at your current how tos for wicket-jquery-ui (we don't 
use wicket-jquery-ui for the moment - we have a few components using 
wiquery and a couple very old components using jquery-ui in a crappy 
way), but that's always interesting to see what's out there and how it 
works.


I'll take a closer look on wicket-select2 as well, as I suppose it could 
be a good inspiration to integrate the fox run software datepicker 
library (which is not using jquery-ui).


Regards,

Sébastien

Sebastien wrote:

Hi again,

Well... I was looking for a jQuery plugin for the 3rd part of my HowTo's,
about creating a plugin using wicket-jquery-ui.
Maybe will I play with that one in the coming days... (just note that it
will be over Wicket 6)

Regards,
Sebastien.


On Fri, Sep 21, 2012 at 3:53 PM, Sébastien Gautrin <
sebastien.gaut...@gmail.com> wrote:


Hi,

I was envisaging it working like the js lib I linked. Creating a component
that would embed to Datepickers linked together (adding in that component
the logical restrictions such that enforcing start date to be prior end
date) would be indeed relatively easy, and we actually have something
similar in our application right now. Though, our ui designers provided us
with a draft with a behavior as in the link (that's how I discovered that
library), and the idea would be to add to our application something with a
similar behaviour (replacing our old dual input components).

If there had been such an integration out there, that would have been
great. Otherwise I'll have to plan some time to figure a way to hack that
lib into our application, and try to negociate time to build an actual and
proper integration of that library (because on the short term, a proper
integration would take too long, so that will unfortunately be the dirty
and not really reusable way first).

Regards,

Sébastien

Sebastien wrote:


Hi Sebastien,

I am wondering how you imagine your range datepicker... Do you figure a
component embedding 2 datepickers like in the jQuery UI demo site, where
the user selects alternativey the start date and the end date:
http://jqueryui.com/demos/**datepicker/#date-range<http://jqueryui.com/demos/datepicker/#date-range>

Or a component displaying a single datepicker and the range selection is
made inside the widget, like in the link you provided ?

For the first case, it can be achieved quite easily (I can provide it as a
component for wicket-jquery-ui). The second case cannot be handled as
jQuery UI does not provide such functionality (AFAIK)....

Best regards,
Sebastien.

On Fri, Sep 21, 2012 at 1:14 PM, Sébastien Gautrin <
sebastien.gaut...@gmail.com> wrote:

  Hi,

I was wondering if there was any wicket component out there for a
Datepicker supporting selecting a range of dates. I've looked a bit and
couldn't find any (the wicket-extensions' Datepicker doesn't, the wiquery
datepicker doesn't, nor does the wicket-jquery datepicker).

I didn't find actually many actual js lib that would support that (mainly
http://foxrunsoftware.github.com/DatePicker/<http://**
foxrunsoftware.github.com/**DatePicker/<http://foxrunsoftware.github.com/DatePicker/>

),

so I guess it's not very likely there's already a wicket integration of
such a lib.

Thanks,

Sébastien

--**
--**-
To unsubscribe, e-mail: 
users-unsubscribe@wicket.**apa**che.org<http://apache.org>

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




--**--**-
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: Datepicker with range selection support

2012-09-21 Thread Sébastien Gautrin

Hi,

I was envisaging it working like the js lib I linked. Creating a 
component that would embed to Datepickers linked together (adding in 
that component the logical restrictions such that enforcing start date 
to be prior end date) would be indeed relatively easy, and we actually 
have something similar in our application right now. Though, our ui 
designers provided us with a draft with a behavior as in the link 
(that's how I discovered that library), and the idea would be to add to 
our application something with a similar behaviour (replacing our old 
dual input components).


If there had been such an integration out there, that would have been 
great. Otherwise I'll have to plan some time to figure a way to hack 
that lib into our application, and try to negociate time to build an 
actual and proper integration of that library (because on the short 
term, a proper integration would take too long, so that will 
unfortunately be the dirty and not really reusable way first).


Regards,

Sébastien

Sebastien wrote:

Hi Sebastien,

I am wondering how you imagine your range datepicker... Do you figure a
component embedding 2 datepickers like in the jQuery UI demo site, where
the user selects alternativey the start date and the end date:
http://jqueryui.com/demos/datepicker/#date-range

Or a component displaying a single datepicker and the range selection is
made inside the widget, like in the link you provided ?

For the first case, it can be achieved quite easily (I can provide it as a
component for wicket-jquery-ui). The second case cannot be handled as
jQuery UI does not provide such functionality (AFAIK)

Best regards,
Sebastien.

On Fri, Sep 21, 2012 at 1:14 PM, Sébastien Gautrin <
sebastien.gaut...@gmail.com> wrote:


Hi,

I was wondering if there was any wicket component out there for a
Datepicker supporting selecting a range of dates. I've looked a bit and
couldn't find any (the wicket-extensions' Datepicker doesn't, the wiquery
datepicker doesn't, nor does the wicket-jquery datepicker).

I didn't find actually many actual js lib that would support that (mainly
http://foxrunsoftware.github.**com/DatePicker/<http://foxrunsoftware.github.com/DatePicker/>),
so I guess it's not very likely there's already a wicket integration of
such a lib.

Thanks,

Sébastien

--**--**-
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



Datepicker with range selection support

2012-09-21 Thread Sébastien Gautrin

Hi,

I was wondering if there was any wicket component out there for a 
Datepicker supporting selecting a range of dates. I've looked a bit and 
couldn't find any (the wicket-extensions' Datepicker doesn't, the 
wiquery datepicker doesn't, nor does the wicket-jquery datepicker).


I didn't find actually many actual js lib that would support that 
(mainly http://foxrunsoftware.github.com/DatePicker/), so I guess it's 
not very likely there's already a wicket integration of such a lib.


Thanks,

Sébastien

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



Re: disabling ajax submit button

2012-09-12 Thread Sébastien Gautrin
Which wicket version ? (I ask because I see you are using several calls 
that are deprecated in 1.5).
Besides, within the declaration of your inner class, don't try to access 
the variable you are defining

(and without declaring it final, it should normally not compile anyway).

Not changing the deprecated calls, this should probably look like :

add(new SimpleAttributeModifier("disabled", "disabled"));
target.addComponent(this);

 Original Message 
*Subject: *disabling ajax submit button
*From: *Anna Simbirtsev 
*To: *users@wicket.apache.org
*Date: *2012-09-12

Hi

I am trying to disable ajax submit button after it has been clicked.

AjaxSubmitLink  submitButton1 =  new AjaxSubmitLink("submitButton1") {

 private static final long serialVersionUID = 1L;


 protected void onSubmit(AjaxRequestTarget target, final Form
form)
 {
 submitButton1.add(
 new SimpleAttributeModifier("disabled",
"disabled"));

 target.addComponent(submitButton1);
 }


This does not work.:(





Re: wicket-select2 as AutoCompleteTextField replacement

2012-09-12 Thread Sébastien Gautrin

Hi,

If you only need a static list of initial choices (non ajax), you 
should be able to simply use select2's tagging support with something 
like (didn't test it):

// model is your IModel for the selected data
Select2Choice choice = new Select2Choice("choice", 
model);

choice.getSettings().setTags("A", "B", "C");

You can of course also use a Select2MultiChoice for multiple choices.

Now if you need Ajax support, it's somewhat more complex, though for 
the simple case where you don't need to mix static choices and ajax, 
you could use a standard Select2Choice (or MultiChoice), and in the 
query method of your choice provider prepend the query string to the 
list of results.



On Wed 12 Sep 2012 11:33:38 CEST, Thomas Götz wrote:

I want to use wicket-select2 as a replacement for Wicket's AutoCompleteTextField. Is it 
somehow possible to accept user input that is not contained in the list of choices? Say, 
my choices list returns [A, B, C] but user may also enter "D" in the textfield. 
How can I achieve this?

-Tom


-
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: [1.5] [6.0] dynamically named CSS, JS & images resources

2012-07-20 Thread Sébastien Gautrin

Hi,

In your case, the general idea would be to create a ResourceReference to 
your downloaded css & js files, and then on your base page to contribute 
them dynamically with


@Override
public void renderHead(IHeaderResponse response) {
ResourceReference jsRef = [...]
ResourceReference cssRef = [...]
response.renderJavaScriptReference(jsRef);
response.renderCSSReference(cssRef);
}

Now for creating the ResourceReference for your files, there's several 
options depending on what you want to do:
- if you want to refer directly to the external css/js, just do 
response.renderJavaScriptReference("http://example.com/jsfile.js";); I 
wouldn't do that unless the other site is a site you control and want to 
use as a CDN
- you could load the data from the db: 
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ gives 
an example for images, wouldn't be much different with a file
- you could save the downloaded files in a specific directory, mount 
that directory as a sharedresourcereference, and serve the files that 
way: see http://stackoverflow.com/a/9232848 for more information


There's probably other ways (better maybe) though.


Pierre Goupil wrote:

Good evening,

I'd like to contribute CSSs & JSs to my  for which names I don't
know. More precisely, I'd like to be able to download a .zip, unzip it and
contribute its CSS & JS content to the , plus being able to display
the images of the zip thanks to the links in the CSS.

Regarding the downloading and unzipping steps, it's easy. But for the
header contributions, I can't figure out how to do that since :

1) I don't know the names of the CSS & JS files before download

2) the CSS files link to the images using their regular names, but Wicket
appends characters of its own to their names.

What I'm trying to achieve is to be able to switch (at run-time) my app's
theme by downloading a new one on a themes website, like
http://www.freecsstemplates.org/

I use Wicket 1.5.7 but a solution for Wicket 6.0 is OK as well.

Any help will be much appreciated.

Regards,

Pierre Goupil





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



Re: Intercept AjaxRequestTarget

2012-07-18 Thread Sébastien Gautrin
>From memory (not sure, I read that while looking for something else), any Ajax 
>request generate automatically an IEvent event that is broadcasted to the 
>application. If so, you could override the onEvent(IEvent event) method of 
>your FeedbackPanel so that it adds itself to the target of all Ajax event that 
>are triggered:

@Override
public void onEvent(IEvent event) {
if (event.getPayload() instanceof AjaxRequestTarget) {
((AjaxRequestTarget)event.getPayload()).add(this);
}
}

With this your custom FeedbackPanel, it will add itself to the 
AjaxRequestTarget automatically.

Hope this helps and I remembered correctly ;)

On 07/18/2012 09:17 PM, LeaveNewb wrote:
> wheleph wrote
>> Hello everyone!
>>
>> My application has a lot of ajax components. And every time validation
>> error occurs I need to add my FeedbackPanel to AjaxRequestTarget. Is there
>> a way to do it automatically? I mean to add my FeedbackPanel to every ajax
>> response 
>>
>> wheleph
>>
> We accomplished this in our Wicket 1.4 application by overriding
> newAjaxRequestTarget() in our WebApplication class, like this:
>
>
>   @Override
>   public AjaxRequestTarget newAjaxRequestTarget( Page page )
>   {
>   AjaxRequestTarget t = super.newAjaxRequestTarget( page );
>   if( t!=null )
>   t.addComponent( getFeedbackPanel() );
>
>   return t;
>   }
>
> Unfortunately in 1.5 this function is *final*, so it can't be overwritten. 
> So I'm looking for a way to do this as well.  Did you every get this
> working?
>
> Can anyone point me in the right direction?
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Intercept-AjaxRequestTarget-tp1850904p4650605.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: How to Logout

2012-07-18 Thread Sébastien Gautrin

Hi,

The LogoutPage in the application I work on is quite simple:
- first we invalidate the session with session.invalidateNow() like you do
- second we throw a RestartResponseAtInterceptPageException with the 
Page we want the user to go to after the logout process (actually we use 
it with the class of the Page we want, but you can pass it an instance 
of a Page).


Hope this will help.


 Original Message 
Subject: How to Logout
From: Matthias Keller 
To: users@wicket.apache.org
Date: 2012-07-18


Hi

I'm trying to implement a simple logout mechanism with the need of
complete session termination.

For this I created a LogoutPage and mounted it using
mountPage("/logout", LogoutPage.class);

Now this page contains multiple components and a link to change
langugage etc, therefore it is stateful.
But when I perform a session.invalidate(Now)() in the page's
constructor, the user gets redirected to /logout?0 with a new session
ID. Probably though the page was stored in the previous session so it
doesn't exist with the new one, then he gets redirected back to /logout,
back to /logout?0 and so on.

What do I have to do to implement this simple logout page?

Thanks

Matt



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