Re: Redirecting to another page in a WebPage constructor

2011-03-11 Thread vineet semwal
if he actually needs *redirection* then

throw new ImmediateRedirectException(RedirectToPage.class,params);

public class ImmediateRedirectException extends
AbstractRestartResponseException{
public ImmediateRedirectException(Class? extends Page
pageClass,PageParameters params)
{
RequestCycle requestCycle=RequestCycle.get();
requestCycle.setRedirect(true);
requestCycle.setResponsePage(pageClass, params);
}

}

On Fri, Mar 11, 2011 at 12:43 PM, Maarten Billemont lhun...@gmail.com wrote:
 On 10 Mar 2011, at 13:25, vineetsemwal wrote:

 use restartresponseexception

 While drf may not have meant what he said, RestartResponseException will not 
 actually redirect to another page, it will just load the other page as a 
 response to the current page's URL.  That is often very confusing for users, 
 especially when the current page is mounted.
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-- 
thank you,

regards,
Vineet Semwal

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



problem using pre post ajax handlers

2011-03-11 Thread Thijs

Hi,

I have the following issue.
I have a separate js that on window.onload calls:
Wicket.Ajax.registerPreCallHandler(foo);
Wicket.Ajax.registerPostCallHandler(bar);
Wicket.Ajax.registerFailureHandler(bar);
This works great however not on the first page load when there is no 
session yet.


The session starts on the page visited so every resource gets 
;sessionid=xyz appended

http://localhost:8080/xyz/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=48703E4E37189E284112EA7A8CD6F8DB?w:lm=1299841674
Then on the first ajax-call it re-downloads all resources (including 
wicket-event.js and wicket-ajax.js) but this time without the ;sessionid 
appended. This seems to cause the registration of the pre and post 
handlers to be forgotten. And they are never called again.


So I have 2 questions.
1. How can I prevent the resources from being downloaded twice (which 
would prevent the issue from happening in the first place).
2. If 1. can't be done. How can I re-register the pre and post handlers? 
So that subsequent ajax calls keep calling my Javascript in there pre 
and post calls?


thanks

Thijs


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



Re: problem using pre post ajax handlers

2011-03-11 Thread Pedro Santos
looks like a bug, open a ticket + quickstart please

On Fri, Mar 11, 2011 at 8:08 AM, Thijs vonk.th...@gmail.com wrote:

 Hi,

 I have the following issue.
 I have a separate js that on window.onload calls:
 Wicket.Ajax.registerPreCallHandler(foo);
 Wicket.Ajax.registerPostCallHandler(bar);
 Wicket.Ajax.registerFailureHandler(bar);
 This works great however not on the first page load when there is no
 session yet.

 The session starts on the page visited so every resource gets
 ;sessionid=xyz appended

 http://localhost:8080/xyz/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=48703E4E37189E284112EA7A8CD6F8DB?w:lm=1299841674
 Then on the first ajax-call it re-downloads all resources (including
 wicket-event.js and wicket-ajax.js) but this time without the ;sessionid
 appended. This seems to cause the registration of the pre and post handlers
 to be forgotten. And they are never called again.

 So I have 2 questions.
 1. How can I prevent the resources from being downloaded twice (which would
 prevent the issue from happening in the first place).
 2. If 1. can't be done. How can I re-register the pre and post handlers? So
 that subsequent ajax calls keep calling my Javascript in there pre and post
 calls?

 thanks

 Thijs


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




-- 
Pedro Henrique Oliveira dos Santos


Wicket-dnd, unable to use with RepeatingViews

2011-03-11 Thread lucast
Hi Everyone,
I am having behaviour problems when I add wicket-dnd DragSource and
DropTarget to a WebMarkupContainer that is created inside a loop and it is
added to a RepeatingView.

The problem is that when I drag  and drop a list item from one container to
the other, sometimes it drops it on the intended container but most of the
time it drops it on the container I initially dragged it from. I need to
drag and drop several times before I get the expected result.

In implementing this, I added three WebMarkupContainers to a RepeatingView.
The WebMarkupContainer is simple. It has a ListView, DragSource and
DropTarget much the same way as on the wicket-dnd list example page. The
only difference is that I have multiple of these, created inside a loop, and
I am adding them to the RepeatingView.

How can I have multiple WebMarkupContainers with wicket-dnd draggable and
droppable behaviours added to it and having the WebMarkupContainers added to
the RepeatingView? Is there a better way to implement this?

I know it might have to do with using the same div and class in the html
(div.guestDragDropListView) for each WebMarkupContainer but I'm creating
them inside a loop so having unique div and class for each
WebMarkupContainer is not a possibility, really.

Has anyone encountered a similar problem like this? This is a show stopper
for me so I would really, really appreciate any help, no matter how small.

I'm attaching a simple example to demonstrate my predicament.
http://apache-wicket.1842946.n4.nabble.com/file/n3347961/HomePage.java
HomePage.java 
http://apache-wicket.1842946.n4.nabble.com/file/n3347961/HomePage.html
HomePage.html 
http://apache-wicket.1842946.n4.nabble.com/file/n3347961/style.css style.css 
Thank you in advance,
Lucas






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-dnd-unable-to-use-with-RepeatingViews-tp3347961p3347961.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: problem using pre post ajax handlers

2011-03-11 Thread Thijs
I've been trying to create a quickstart displaying the problem all 
afternoon. But I can't seem to get it to generate resources links with 
;sessionid's in them.
While in my own application, when I do session.get().bind() on a 
stripped down page it does. So I'll be trying to get this to show up 
first...


Thijs

On 11-3-2011 12:33, Pedro Santos wrote:

looks like a bug, open a ticket + quickstart please

On Fri, Mar 11, 2011 at 8:08 AM, Thijsvonk.th...@gmail.com  wrote:


Hi,

I have the following issue.
I have a separate js that on window.onload calls:
Wicket.Ajax.registerPreCallHandler(foo);
Wicket.Ajax.registerPostCallHandler(bar);
Wicket.Ajax.registerFailureHandler(bar);
This works great however not on the first page load when there is no
session yet.

The session starts on the page visited so every resource gets
;sessionid=xyz appended

http://localhost:8080/xyz/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=48703E4E37189E284112EA7A8CD6F8DB?w:lm=1299841674
Then on the first ajax-call it re-downloads all resources (including
wicket-event.js and wicket-ajax.js) but this time without the ;sessionid
appended. This seems to cause the registration of the pre and post handlers
to be forgotten. And they are never called again.

So I have 2 questions.
1. How can I prevent the resources from being downloaded twice (which would
prevent the issue from happening in the first place).
2. If 1. can't be done. How can I re-register the pre and post handlers? So
that subsequent ajax calls keep calling my Javascript in there pre and post
calls?

thanks

Thijs


-
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



Stateless Wicket and Ajax

2011-03-11 Thread Serban Balamaci
Hello everybody.
I'm interested in Wicket for a public site. I want to use stateless pages in
order to have nice looking pages indexed by Google(no JSESSIONID in the url)

There is an approach to remove JSESSIONID from the url for search bots but I
do not like it since that would mean that any link to another page contained
in that page would cause a Page Expired error since the session is lost thus
no deep page navigation.

So how would you implement AJAX since having AjaxLinks and even
AjaxEventBehaviour makes a stateless page become statefull? 
There is the jolira tools wicket-stateless which provides
StatelessAjaxFallbackLink, but it seems that there is the link is inside a
repeater it could be that the component is inside a repeater make your
component return false in getStatelessHint() which pretty much means that
the page becomes statefull.

I'm even considering using JQuery for AJAX and so looked at WiQuery with
WiQueryAbstractAjaxBehavior but alas it extends AbstractDefaultAjaxBehavior. 

So perhaps using JQuery ajax requesting from with a generic WebPage serving
wicket panels based on page parameters? This seems a poor approach.

In the end, what other framework would you recommend? Preferably JAVA based.
Maybe Play framework(not a fan of the templating sintax)?  

Thank you.

-
http://balamaci.wordpress.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3348266.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



Deserialize/cache components in Ajax rendering and other scenarios

2011-03-11 Thread Brown, Berlin [GCG-PFS]
It looks like caching and the deserializing of pages only happens when
the user revisits a page or goes back to a page?
 
Is there any serialization/deserialization that is done to panels if
they are just rerendered through ajax?  If your whole site is ajax based
(where most of the content is not rendered through pages but panels), I
guess we don't get the benefits of the wicket caching?
 
Also, does anyone have more information when the wicket page caching
kicks in?  I only see it deserialize a page when you visit the
javascript back button.
 


Re: problem using pre post ajax handlers

2011-03-11 Thread Pedro Santos
you can disable the browser cookies, than the sessionid will show up

On Fri, Mar 11, 2011 at 11:19 AM, Thijs vonk.th...@gmail.com wrote:

 I've been trying to create a quickstart displaying the problem all
 afternoon. But I can't seem to get it to generate resources links with
 ;sessionid's in them.
 While in my own application, when I do session.get().bind() on a stripped
 down page it does. So I'll be trying to get this to show up first...

 Thijs


 On 11-3-2011 12:33, Pedro Santos wrote:

 looks like a bug, open a ticket + quickstart please

 On Fri, Mar 11, 2011 at 8:08 AM, Thijsvonk.th...@gmail.com  wrote:

  Hi,

 I have the following issue.
 I have a separate js that on window.onload calls:
 Wicket.Ajax.registerPreCallHandler(foo);
 Wicket.Ajax.registerPostCallHandler(bar);
 Wicket.Ajax.registerFailureHandler(bar);
 This works great however not on the first page load when there is no
 session yet.

 The session starts on the page visited so every resource gets
 ;sessionid=xyz appended


 http://localhost:8080/xyz/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=48703E4E37189E284112EA7A8CD6F8DB?w:lm=1299841674
 Then on the first ajax-call it re-downloads all resources (including
 wicket-event.js and wicket-ajax.js) but this time without the ;sessionid
 appended. This seems to cause the registration of the pre and post
 handlers
 to be forgotten. And they are never called again.

 So I have 2 questions.
 1. How can I prevent the resources from being downloaded twice (which
 would
 prevent the issue from happening in the first place).
 2. If 1. can't be done. How can I re-register the pre and post handlers?
 So
 that subsequent ajax calls keep calling my Javascript in there pre and
 post
 calls?

 thanks

 Thijs


 -
 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




-- 
Pedro Henrique Oliveira dos Santos


Re: problem using pre post ajax handlers

2011-03-11 Thread Thijs

Looks like I found it.

Turns out that somewhere between 1.4.10 and 1.4.16 something changed and 
jsessionid's get stripped from resources.

I'll do some further testing but it seems to work ok now.

Thanks
Thijs


On 11-3-2011 16:18, Pedro Santos wrote:

you can disable the browser cookies, than the sessionid will show up

On Fri, Mar 11, 2011 at 11:19 AM, Thijsvonk.th...@gmail.com  wrote:


I've been trying to create a quickstart displaying the problem all
afternoon. But I can't seem to get it to generate resources links with
;sessionid's in them.
While in my own application, when I do session.get().bind() on a stripped
down page it does. So I'll be trying to get this to show up first...

Thijs


On 11-3-2011 12:33, Pedro Santos wrote:


looks like a bug, open a ticket + quickstart please

On Fri, Mar 11, 2011 at 8:08 AM, Thijsvonk.th...@gmail.com   wrote:

  Hi,

I have the following issue.
I have a separate js that on window.onload calls:
Wicket.Ajax.registerPreCallHandler(foo);
Wicket.Ajax.registerPostCallHandler(bar);
Wicket.Ajax.registerFailureHandler(bar);
This works great however not on the first page load when there is no
session yet.

The session starts on the page visited so every resource gets
;sessionid=xyz appended


http://localhost:8080/xyz/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js;jsessionid=48703E4E37189E284112EA7A8CD6F8DB?w:lm=1299841674
Then on the first ajax-call it re-downloads all resources (including
wicket-event.js and wicket-ajax.js) but this time without the ;sessionid
appended. This seems to cause the registration of the pre and post
handlers
to be forgotten. And they are never called again.

So I have 2 questions.
1. How can I prevent the resources from being downloaded twice (which
would
prevent the issue from happening in the first place).
2. If 1. can't be done. How can I re-register the pre and post handlers?
So
that subsequent ajax calls keep calling my Javascript in there pre and
post
calls?

thanks

Thijs


-
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: Stateless Wicket and Ajax

2011-03-11 Thread Vojtěch Krása
Hi,
check this
http://apache-wicket.1842946.n4.nabble.com/Removing-the-jsessionid-for-SEO-td1854094.html
no error should occur.

2011/3/11 Serban Balamaci serban.balam...@asf.ro

 Hello everybody.
 I'm interested in Wicket for a public site. I want to use stateless pages
 in
 order to have nice looking pages indexed by Google(no JSESSIONID in the
 url)

 There is an approach to remove JSESSIONID from the url for search bots but
 I
 do not like it since that would mean that any link to another page
 contained
 in that page would cause a Page Expired error since the session is lost
 thus
 no deep page navigation.

 So how would you implement AJAX since having AjaxLinks and even
 AjaxEventBehaviour makes a stateless page become statefull?
 There is the jolira tools wicket-stateless which provides
 StatelessAjaxFallbackLink, but it seems that there is the link is inside a
 repeater it could be that the component is inside a repeater make your
 component return false in getStatelessHint() which pretty much means that
 the page becomes statefull.

 I'm even considering using JQuery for AJAX and so looked at WiQuery with
 WiQueryAbstractAjaxBehavior but alas it extends
 AbstractDefaultAjaxBehavior.

 So perhaps using JQuery ajax requesting from with a generic WebPage serving
 wicket panels based on page parameters? This seems a poor approach.

 In the end, what other framework would you recommend? Preferably JAVA
 based.
 Maybe Play framework(not a fan of the templating sintax)?

 Thank you.

 -
 http://balamaci.wordpress.com
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3348266.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



wicket-tree implementation

2011-03-11 Thread Erik Johansson
Hello.

I am trying out wicket-tree, by Sven Maier. However I can't figure out  what
is needed to get it to display the tree properly.

 

It shows the content as its toString method. I have overridden it at the
ITreeProvider.model-method, but that isn't it, it seems. The original
object's toString() is not at all appropriate in the tree.

 

Where should I do the override in this case?

 

I am using Wicket 1.4.15 and wicket-tree 0.4.1

 

 

Erik Johansson

 



Re: entity manager in webapp

2011-03-11 Thread Cristiano Gavião

Well, warp-persist became Guice-Persist... and it is part of 3.0:

dependency
groupIdcom.google.inject.extensions/groupId
artifactIdguice-persist/artifactId
version3.0-rc3/version
/dependency

dependency
groupIdcom.google.inject.extensions/groupId
artifactIdguice-servlet/artifactId
version3.0-rc3/version
/dependency

cheers

Cristiano

On 10/03/11 12:01, Witold Czaplewski wrote:

IMO warp-persist is dead and Guice 3.0 should be final soon (rc3 is out now):
http://code.google.com/p/google-guice/downloads/list


Witold

Am Thu, 10 Mar 2011 15:31:19 +0100
schrieb Bas Goorenb...@iswd.nl:


Which is basically warp-persist, but integrated into guice. But as far
as I know, it will be only be integrated as of guice 3.0;

Bas

Op 10-3-2011 15:29, nino martinez wael schreef:

I'd go for guice persist if thats an option..

2011/3/10 Bas Goorenb...@iswd.nl


Have a look at databinder or warp-persist for a better implementation.

Should you go with your own implementation, do not forget to clear the
ThreadLocal at the end of the request to prevent:
a) leaking
b) re-using an EntityManager from a previous request (most if not all
application servers use a thread pool)

Bas

Op 10-3-2011 13:12, Duro schreef:

   Hi guys, is this an option to store the JPA entity manager for a wicket

webapp:
public class DBUtil {
 private static EntityManagerFactory entityManagerFactory = Persistence
 .createEntityManagerFactory(db);
 private static ThreadLocalEntityManager   emHolder = new
ThreadLocalEntityManager() {
 protected EntityManager initialValue() {
 return entityManagerFactory.createEntityManager();
 };
 };

 public static User getUser(String userName) {
 return emHolder.get().find(User.class, userName);
 }

..

If not, thanks for possible better solutions, Juraj

-
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: wicket-tree implementation

2011-03-11 Thread Sven Meier

Hi Erik,

you can override a factory method in a tree subclass:

@Override
protected Component newContentComponent(String id, 
IModelFoo model)

{
return new FolderFoo(id, this, model) {
protected IModel? newLabelModel(IModelFoo model)
{
// decide how to render each foo, e.g. use a 
property model

return new PropertyModelString(model, bar);
}
};
}

Have fun

Sven

On 03/11/2011 05:37 PM, Erik Johansson wrote:

Hello.

I am trying out wicket-tree, by Sven Maier. However I can't figure out  what
is needed to get it to display the tree properly.

It shows the content as its toString method. I have overridden it at the
ITreeProvider.model-method, but that isn't it, it seems. The original
object's toString() is not at all appropriate in the tree.

Where should I do the override in this case?

I am using Wicket 1.4.15 and wicket-tree 0.4.1

Erik Johansson


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



Re: Stateless Wicket and Ajax

2011-03-11 Thread robert.mcguinness
I built a stateless site using the 
http://code.google.com/p/jolira-tools/wiki/stateless Jolira Tools  and it
worked out great, you just have to get used to using PageParameters for
everything (contructors, pagination, etc).  



During development I had conditional breakpoints in locations that would
indicate statefulness (the Stateless annotation wasn't working as expected
at the time)



Component.isStateless
Session.isTemporary
Session.bind


I'm trying to convert the stateful components to Wicket 1.5 but I'm not too
familiar with the new Wicket version yet so it's a slow process.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3348781.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



wicket version 2.0 ?

2011-03-11 Thread blr
Hi,

I read on the documentation in the Wicket version 2.0 for the Wicket
version 2.0 ...
On Wicket site, i see only the version 1.4x or 1.5rc what is this version
2.0 ?

Thanks,

blr


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-version-2-0-tp3348827p3348827.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 version 2.0 ?

2011-03-11 Thread Igor Vaynberg
old version that has been scrapped.

-igor


On Fri, Mar 11, 2011 at 10:52 AM, blr lr.b21...@gmail.com wrote:
 Hi,

 I read on the documentation in the Wicket version 2.0 for the Wicket
 version 2.0 ...
 On Wicket site, i see only the version 1.4x or 1.5rc what is this version
 2.0 ?

 Thanks,

 blr


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-version-2-0-tp3348827p3348827.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-dnd, unable to use with RepeatingViews

2011-03-11 Thread Sven Meier

Hi Lucas,

I'll try to reproduce the problem here.

Best regards

Sven

On 03/11/2011 12:57 PM, lucast wrote:

Hi Everyone,
I am having behaviour problems when I add wicket-dnd DragSource and
DropTarget to a WebMarkupContainer that is created inside a loop and it is
added to a RepeatingView.


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



Re: Stateless Wicket and Ajax

2011-03-11 Thread Martin Grigorov
On Fri, Mar 11, 2011 at 8:28 PM, robert.mcguinness 
robert.mcguinness@gmail.com wrote:

 I built a stateless site using the
 http://code.google.com/p/jolira-tools/wiki/stateless Jolira Tools  and it
 worked out great, you just have to get used to using PageParameters for
 everything (contructors, pagination, etc).



 During development I had conditional breakpoints in locations that would
 indicate statefulness (the Stateless annotation wasn't working as expected
 at the time)



 Component.isStateless
 Session.isTemporary
 Session.bind


 I'm trying to convert the stateful components to Wicket 1.5 but I'm not too
 familiar with the new Wicket version yet so it's a slow process.

 Here they are: https://github.com/martin-g/wicket-stateless
https://github.com/martin-g/wicket-statelessBut a tweak in Behaviors.java
is needed to work fine.
I'll try to improve that soon.


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Stateless-Wicket-and-Ajax-tp3348266p3348781.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




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


RE: Wicket thinks setOutputMarkupId property is not set to true

2011-03-11 Thread MZemeck
I've run into this using tab-panels, you have to get the target right by 
calling getParent() or something similar.  If you look at the rendered 
html the wicket id's can help yo track down the component you need to 
target.




From:   Coleman, Chris chris.cole...@thalesgroup.com.au
To: users@wicket.apache.org users@wicket.apache.org
Date:   03/11/2011 01:00 AM
Subject:RE: Wicket thinks setOutputMarkupId property is not set to 
true



Hmmm, it is in a tab panel so it could be the scenario you mention. I'll 
check out that theory.

Chris

-Original Message-
From: Bertrand Guay-Paquet [mailto:ber...@step.polymtl.ca] 
Sent: Friday, 11 March 2011 4:56 PM
To: users@wicket.apache.org
Subject: Re: Wicket thinks setOutputMarkupId property is not set to true

You did say that you set output markup ID to true on both components, 
but maybe you should double check that. I had a very similar problem 
once with an AjaxTabbedPanel that went like this:

1-The first displayed panel (tab) did not have setOutputMarkupId(true);
2-When the second tab is selected Wicket does a replace() to replace the 
first tab panel and overwrites the OutputMarkupId flag of the second 
panel which does setOutputMarkupId(true) in its constructor.

Maybe you have a chain of replaces where the first panel doesn't have 
setOutputMarkupId(true)?

Regards,
Bertrand

On 11/03/2011 12:04 AM, Coleman, Chris wrote:
 I should add that this is on 1.5-rc2. Previously on 1.4.16 the exact 
same code (except for package renames) worked fine.

 Chris

 -Original Message-
 From: Coleman, Chris [mailto:chris.cole...@thalesgroup.com.au]
 Sent: Friday, 11 March 2011 4:02 PM
 To: users@wicket.apache.org
 Subject: Wicket thinks setOutputMarkupId property is not set to true

 I get this error even though I set output markup ID to true on the 
component that is being replaced (and the one that is replacing it):


 Root cause:

 java.lang.IllegalArgumentException: cannot update component that does 
not have setOutputMarkupId property set to true. Component: 
[PackageDetailsPanel [Component id = panel]]
   at 
org.apache.wicket.ajax.AjaxRequestTarget.add(AjaxRequestTarget.java:375)
   at 
org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:356)
 Any idea how this can happen?



 
DISCLAIMER:---
 This e-mail transmission and any documents, files and previous e-mail 
messages
 attached to it are private and confidential. They may contain 
proprietary or copyright
 material or information that is subject to legal professional privilege. 
They are for
 the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
 copying, alteration, storage or distribution of, or reliance on, this 
message is
 strictly prohibited. No part may be reproduced, adapted or transmitted 
without the
 written permission of the owner. If you have received this transmission 
in error, or
 are not an authorised recipient, please immediately notify the sender by 
return email,
 delete this message and all copies from your e-mail system, and destroy 
any printed
 copies. Receipt by anyone other than the intended recipient should not 
be deemed a
 waiver of any privilege or protection. Thales Australia does not warrant 
or represent
 that this e-mail or any documents, files and previous e-mail messages 
attached are
 error or virus free.
 
--




 
DISCLAIMER:---
 This e-mail transmission and any documents, files and previous e-mail 
messages
 attached to it are private and confidential. They may contain 
proprietary or copyright
 material or information that is subject to legal professional privilege. 
They are for
 the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
 copying, alteration, storage or distribution of, or reliance on, this 
message is
 strictly prohibited. No part may be reproduced, adapted or transmitted 
without the
 written permission of the owner. If you have received this transmission 
in error, or
 are not an authorised recipient, please immediately notify the sender by 
return email,
 delete this message and all copies from your e-mail system, and destroy 
any printed
 copies. Receipt by anyone other than the intended recipient should not 
be deemed a
 waiver of any privilege or protection. Thales Australia does not warrant 
or represent
 that this e-mail or any documents, files and previous e-mail messages 
attached are
 error or virus free.
 
--


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




RE: Wicket thinks setOutputMarkupId property is not set to true

2011-03-11 Thread MZemeck
Note, I'm referring to ajax-tab-panels which are ajax ready by default...



From:   mzem...@osc.state.ny.us
To: users@wicket.apache.org
Date:   03/11/2011 03:11 PM
Subject:RE: Wicket thinks setOutputMarkupId property is not set to 
true



I've run into this using tab-panels, you have to get the target right by 
calling getParent() or something similar.  If you look at the rendered 
html the wicket id's can help yo track down the component you need to 
target.




From:   Coleman, Chris chris.cole...@thalesgroup.com.au
To: users@wicket.apache.org users@wicket.apache.org
Date:   03/11/2011 01:00 AM
Subject:RE: Wicket thinks setOutputMarkupId property is not set to 

true



Hmmm, it is in a tab panel so it could be the scenario you mention. I'll 
check out that theory.

Chris

-Original Message-
From: Bertrand Guay-Paquet [mailto:ber...@step.polymtl.ca] 
Sent: Friday, 11 March 2011 4:56 PM
To: users@wicket.apache.org
Subject: Re: Wicket thinks setOutputMarkupId property is not set to true

You did say that you set output markup ID to true on both components, 
but maybe you should double check that. I had a very similar problem 
once with an AjaxTabbedPanel that went like this:

1-The first displayed panel (tab) did not have setOutputMarkupId(true);
2-When the second tab is selected Wicket does a replace() to replace the 
first tab panel and overwrites the OutputMarkupId flag of the second 
panel which does setOutputMarkupId(true) in its constructor.

Maybe you have a chain of replaces where the first panel doesn't have 
setOutputMarkupId(true)?

Regards,
Bertrand

On 11/03/2011 12:04 AM, Coleman, Chris wrote:
 I should add that this is on 1.5-rc2. Previously on 1.4.16 the exact 
same code (except for package renames) worked fine.

 Chris

 -Original Message-
 From: Coleman, Chris [mailto:chris.cole...@thalesgroup.com.au]
 Sent: Friday, 11 March 2011 4:02 PM
 To: users@wicket.apache.org
 Subject: Wicket thinks setOutputMarkupId property is not set to true

 I get this error even though I set output markup ID to true on the 
component that is being replaced (and the one that is replacing it):


 Root cause:

 java.lang.IllegalArgumentException: cannot update component that does 
not have setOutputMarkupId property set to true. Component: 
[PackageDetailsPanel [Component id = panel]]
   at 
org.apache.wicket.ajax.AjaxRequestTarget.add(AjaxRequestTarget.java:375)
   at 
org.apache.wicket.ajax.AjaxRequestTarget.addComponent(AjaxRequestTarget.java:356)
 Any idea how this can happen?



 
DISCLAIMER:---
 This e-mail transmission and any documents, files and previous e-mail 
messages
 attached to it are private and confidential. They may contain 
proprietary or copyright
 material or information that is subject to legal professional privilege. 

They are for
 the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
 copying, alteration, storage or distribution of, or reliance on, this 
message is
 strictly prohibited. No part may be reproduced, adapted or transmitted 
without the
 written permission of the owner. If you have received this transmission 
in error, or
 are not an authorised recipient, please immediately notify the sender by 

return email,
 delete this message and all copies from your e-mail system, and destroy 
any printed
 copies. Receipt by anyone other than the intended recipient should not 
be deemed a
 waiver of any privilege or protection. Thales Australia does not warrant 

or represent
 that this e-mail or any documents, files and previous e-mail messages 
attached are
 error or virus free.
 
--




 
DISCLAIMER:---
 This e-mail transmission and any documents, files and previous e-mail 
messages
 attached to it are private and confidential. They may contain 
proprietary or copyright
 material or information that is subject to legal professional privilege. 

They are for
 the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
 copying, alteration, storage or distribution of, or reliance on, this 
message is
 strictly prohibited. No part may be reproduced, adapted or transmitted 
without the
 written permission of the owner. If you have received this transmission 
in error, or
 are not an authorised recipient, please immediately notify the sender by 

return email,
 delete this message and all copies from your e-mail system, and destroy 
any printed
 copies. Receipt by anyone other than the intended recipient should not 
be deemed a
 waiver of any privilege or protection. Thales Australia does not warrant 

or represent
 that this e-mail or any documents, files and previous e-mail messages 
attached are
 error or virus free.
 

Re: Wicket-dnd, unable to use with RepeatingViews

2011-03-11 Thread Sven Meier

Hi Lucas,

I fixed a JavaScript bug in wicket-dnd:

  http://code.google.com/p/wicket-dnd/issues/detail?id=7

Please retry with 0.4-snapshot.

Thanks for your report

Sven

On 03/11/2011 12:57 PM, lucast wrote:

Hi Everyone,
I am having behaviour problems when I add wicket-dnd DragSource and
DropTarget to a WebMarkupContainer that is created inside a loop and 
it is

added to a RepeatingView.



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



Re: Fate of CompressedResourceReference in Wicket 1.5?

2011-03-11 Thread Matt Brictson
Opened:

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

-- 
Matt

On Mar 9, 2011, at 11:02 PM, Martin Grigorov wrote:

 File a ticket please.
 
 On Thu, Mar 10, 2011 at 3:01 AM, Matt Brictson m...@55minutes.com wrote:
 
 Hi,
 
 CompressedResourceReference in trunk is basically empty and has the comment
 TODO NG. A quick search through the source leads me to believe that
 IResourceSettings#getDisableGZipCompression() is also unused.
 
 In other words, gzipping of resources is not implemented in Wicket 1.5.
 
 Are there plans to do so? Part of me thinks that maybe this feature should
 be dropped, as compression makes more sense to handle at the servlet
 container or web server layer (e.g. mod_deflate).
 
 Thoughts?
 
 --
 Matt
 
 
 -
 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 http://jweekend.com/


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



Re: Wicket-dnd, unable to use with RepeatingViews

2011-03-11 Thread lucast
Thank you so much, Sven. I'll try it straight away.
Regards,
Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-dnd-unable-to-use-with-RepeatingViews-tp3347961p3349218.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



Large session store in target/work directory when running tests

2011-03-11 Thread Alec Swan
Hello,

I have a problem with my tests writing too much stuff in the session
store located in target/work directory. This problem was discussed in
this thread 
http://markmail.org/thread/aaa2ub2ltcuhpqub#query:wicketmockservlet%20file%20store+page:1+mid:p3gf5wq75qi64lsp+state:results
.

I followed the recommendation by overriding newSessionStore() as shown
below, but still see a bunch of files created in work/target
directory. What am I doing wrong?

@Override
 protected ISessionStore newSessionStore() {
  return new HttpSessionStore(this);
 }

Thanks

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