Re: ModalWindow update size

2010-11-27 Thread Steve Swinsburg
I just noticed that autosizing ModalWindows has made it into Wicket 1.5, heres 
the JIRA:
https://issues.apache.org/jira/secure/attachment/12456436/fix-WICKET-1.4.x.patch

Take a look at the patches, there is a method that sets the size of the window, 
might be something to borrow.

cheers,
Steve


On 19/11/2010, at 8:52 AM, andrea del bene wrote:

 Hi meduolis,
 
 in order to resize modal window you could try to use some JavaScript. Wicket 
 keeps track of modal window on client side with variable 
 Wicket.Window.current. To resize modal window you could write something like:
 
 var targetWindow = Wicket.Window.current.window;
 var targetContent = Wicket.Window.current.content;
 
 targetContent.style.height = '120px';
 targetWindow.style.width = '200px';
 
 You can run this script using appendJavascript method of ajax target.
 Just remember that this script could not work with IE 6 (sigh!) and that the 
 actual window height is the sum of content height and caption height. You 
 coul access to caption's fields through variable Wicket.Window.current.caption
 
 Bye.
 
 
 
 I have tried it already, but it does not help.
 
 on my panel I do this:
 
 
 modal.setInitialWidth(image.getWidth());
 modal.setInitialHeight(image.getHeigth());
  
 target.addComponent(modal);
 
 
 but on click nothing happens, no exceptions
 
 
 -
 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: ModalWindow update size

2010-11-27 Thread andrea del bene
Oh yes, I've forgotten to mention patch file. But keep in mind that it 
could not work under IE6...

I just noticed that autosizing ModalWindows has made it into Wicket 1.5, heres 
the JIRA:
https://issues.apache.org/jira/secure/attachment/12456436/fix-WICKET-1.4.x.patch

Take a look at the patches, there is a method that sets the size of the window, 
might be something to borrow.

cheers,
Steve


On 19/11/2010, at 8:52 AM, andrea del bene wrote:





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



Easyfying mounts in 1.5

2010-11-27 Thread Major Péter

Hi,

is there some specific reason, why WebApplication#mount is deprecated in 
1.5? It could be a really good shortcut:

mount(new MyMapper(, A.class);
rather then:
getRootRequestMapperAsCompound().add(new MyMapper(, A.class));

also PackageMapper looks really weird:
mount(new MountMapper(/error, new 
PackageMapper(PackageName.forClass(InternalServerError.class;


PackageMapper is a valid IRequestMapper, so I could write this:
mount(new PackageMapper(PackageName.forClass(InternalServerError.class)));
which is syntactically correct, but semantically it's a wtf. (what 
mountpath will be used then, would it even match?)

Thoughts?

Thanks,
Peter

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



Re: Easyfying mounts in 1.5

2010-11-27 Thread Martin Grigorov
Hi,

Currently we have :
WebApplication.mountPage(path, pageClass) which is a shortcut for
WebApplication.getRootRequestMapperAsCompound().add(new MountedMapper(path,
pageClass));

and org.apache.wicket.protocol.http.WebApplication.mountSharedResource(String,
ResourceReference) which is:
getResourceReferenceRegistry().registerResourceReference(reference);
getRootRequestMapperAsCompound().add(new ResourceMapper(path, reference));

I agree that
getRootRequestMapperAsCompound().add(new MountMapper(pMount, new
PackageMapper( PackageName.forClass(PackageMountedPage.class;
shows that mappers are flexible but it is also a bit scary. We can add
WebApplication#mountPackage(path, PackageName).

The last reasonable shortcut that we can add is
WebApplication#mountBookmarkable(path, pageClass) which will
be getRootRequestMapperAsCompound().add(new BookmarkableMapper(path,
pageClass));

What do you think ?

2010/11/27 Major Péter majorpe...@sch.bme.hu

 Hi,

 is there some specific reason, why WebApplication#mount is deprecated in
 1.5? It could be a really good shortcut:
 mount(new MyMapper(, A.class);
 rather then:
 getRootRequestMapperAsCompound().add(new MyMapper(, A.class));

 also PackageMapper looks really weird:
 mount(new MountMapper(/error, new
 PackageMapper(PackageName.forClass(InternalServerError.class;

 PackageMapper is a valid IRequestMapper, so I could write this:
 mount(new PackageMapper(PackageName.forClass(InternalServerError.class)));
 which is syntactically correct, but semantically it's a wtf. (what
 mountpath will be used then, would it even match?)
 Thoughts?

 Thanks,
 Peter

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




Re: navomatic example doesnt´t work

2010-11-27 Thread jsturnbull

Hello, 

I encountered the same problem. I found using addToBorder rather than add
fixed it though: 

public NavomaticBorder(final String id) 
{ 
super(id); 
addToBorder(new BoxBorder(navigationBorder)); 
addToBorder(new BoxBorder(bodyBorder)); 
}

I am using version 1.5
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3061760.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



Creating new session with WicketTester

2010-11-27 Thread Major Péter

Hi,

I'm trying to port my Wicket testcase to 1.5, and it looks like, that 
WicketTester#createRequestCycle() is gone now.

The test case is:
* create a session
* set a configuration option with a form
* invalidate session
* create new session
* assert that the session#getStyle now returns something else

There is a createNewSession function, but it has private access, so 
currently I don't really see a chance to do this test without recreating 
a new WicketTester object...

Any hints?

Thanks,
Peter

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



Re: WiQuery Dialog when used with Ajax

2010-11-27 Thread guydog28

Ernesto,

In the below snippet, sometimes it is not possible to ONLY  include the
content of the modal dialog in the ajax target.  There are times where a
parent of the dialog may be added to another AjaxRequestTarget (for some
reason other than just updating the dialog window - maybe to update a list
view that launches the modal).  In this case, the Dialog is destroyed as is
no longer displayed.  Is there anything that can be done to resolve this so
we don't have to work around the normal if you add the parent to the
target, the child will be updated approach?  Adding the parent in this case
destroys the child.


Ernesto Reinaldo Barreiro-4 wrote:
 
 
   target.addComponent(content);
   dialog.open(target);
 
 

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WiQuery-Dialog-when-used-with-Ajax-tp3009441p3061879.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: Easyfying mounts in 1.5

2010-11-27 Thread Jeremy Thomerson
How is your last suggestion different from mount page you mention first ?

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors

On Nov 27, 2010 12:17 PM, Martin Grigorov mgrigo...@apache.org wrote:

Hi,

Currently we have :
WebApplication.mountPage(path, pageClass) which is a shortcut for
WebApplication.getRootRequestMapperAsCompound().add(new MountedMapper(path,
pageClass));

and
org.apache.wicket.protocol.http.WebApplication.mountSharedResource(String,
ResourceReference) which is:
getResourceReferenceRegistry().registerResourceReference(reference);
getRootRequestMapperAsCompound().add(new ResourceMapper(path, reference));

I agree that
getRootRequestMapperAsCompound().add(new MountMapper(pMount, new
PackageMapper( PackageName.forClass(PackageMountedPage.class;
shows that mappers are flexible but it is also a bit scary. We can add
WebApplication#mountPackage(path, PackageName).

The last reasonable shortcut that we can add is
WebApplication#mountBookmarkable(path, pageClass) which will
be getRootRequestMapperAsCompound().add(new BookmarkableMapper(path,
pageClass));

What do you think ?

2010/11/27 Major Péter majorpe...@sch.bme.hu


 Hi,

 is there some specific reason, why WebApplication#mount is deprecated in
 1.5? It could ...


Re: Easyfying mounts in 1.5

2010-11-27 Thread Martin Grigorov
BookmarkableMapper produces something like:
/wicket/bookmarkable/com.example.MyPage

There is a mistake in the line below, it should be
WebApplication#mountBookmarkable(pageClass) which will
call getRootRequestMapperAsCompound().add(new
BookmarkableMapper(pageClass));
i.e. without the path

mountPage() uses MountedMapper which uses user-defined path

On Sat, Nov 27, 2010 at 9:40 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 How is your last suggestion different from mount page you mention first ?

 Jeremy Thomerson
 http://wickettraining.com
 -- sent from my smart phone, so please excuse spelling, formatting, or
 compiler errors

 On Nov 27, 2010 12:17 PM, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 Currently we have :
 WebApplication.mountPage(path, pageClass) which is a shortcut for
 WebApplication.getRootRequestMapperAsCompound().add(new MountedMapper(path,
 pageClass));

 and
 org.apache.wicket.protocol.http.WebApplication.mountSharedResource(String,
 ResourceReference) which is:
 getResourceReferenceRegistry().registerResourceReference(reference);
 getRootRequestMapperAsCompound().add(new ResourceMapper(path, reference));

 I agree that
 getRootRequestMapperAsCompound().add(new MountMapper(pMount, new
 PackageMapper( PackageName.forClass(PackageMountedPage.class;
 shows that mappers are flexible but it is also a bit scary. We can add
 WebApplication#mountPackage(path, PackageName).

 The last reasonable shortcut that we can add is
 WebApplication#mountBookmarkable(path, pageClass) which will
 be getRootRequestMapperAsCompound().add(new BookmarkableMapper(path,
 pageClass));

 What do you think ?

 2010/11/27 Major Péter majorpe...@sch.bme.hu


  Hi,
 
  is there some specific reason, why WebApplication#mount is deprecated in
  1.5? It could ...