Re: BookmarkablePageLinks using relative vs absolute paths

2010-05-31 Thread Paul Szulc
one think I dont understand. you said thhat you've changed the root to /
instead of /wicketpages, but later on you said that /myservlet should
redirect to /wicketpages/about.

On Mon, May 31, 2010 at 4:34 AM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 Our web application uses wicket with an assortment of utility servlets
 that we use to service requests with specific paths. In order to use
 forwarding instead of redirecting we recently, as suggested on this
 list, switched our wicket app filter to use the /* (root) context
 instead of the the more specific context that we used to use eg.,
 /wicketpages. This has enabled us to overcome many problems we were
 having with our collection of wicket/raw servlets.

 We now have another issue:

 A servlet with a pattern, say /myservlet needs to do a forward to a path
 whose response is produced by a wicket mounted BookmarkablePage, let's
 say /wicketpages/home. This all works fine except when we click on a
 BookmarkablePageLinkS created in that page (eg., /wicketpages/contact,
 /wicketpages/aboutus etc).

 Instead of the URL pointing to eg.,

 /wicketpages/aboutus

 it points to

 /myservlet/wicketpages/aboutus

 Which obviously fails because our wicket BookmarkablePages are mounted
 at  paths like /wicketpages/aboutus not /myservlet/wicketpages/aboutus.

 Is there a way to tell wicket that the context is something different to
 what it is and so form a correct 'relative' URL? If I could fool wicket
 into thinking that the context path is root / then that would work I
 would think.

 The problem is not limited to BookmarkablePageLinks - all AJAX
 behaviours also fail as well when the /myservlet page is accessed but
 work fine when the page is accessed via /wicketpages/home.

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




-- 
Best regards,
Paul Szulc

http://paulszulc.wordpress.com


RE: BookmarkablePageLinks using relative vs absolute paths

2010-05-31 Thread Chris Colman
What I meant was that the wicket filter is mapped to:

/*

But the associated servlets in the app all have their own, more specific
paths like

/myservlet etc.,

As the wicket filter now is a 'catch all' for all paths I had to extend
WicketFilter and override the doFilter method to bypass Wicket for the
paths that are specific to the servlets (eg., /myservlet)

However . I think I've solved my problem in another way:

For the particular servlet that I am having problems with I just decided
to implement it in wicket instead of a dedicated servlet: i.e. made a
Bookmarkable page for it and then to a redirect via
RestartRedirectException to the appropriate wicket home page. Seems to
be all working quite 'goodly' now :)



-Original Message-
From: Paul Szulc [mailto:paul.sz...@gmail.com]
Sent: Monday, 31 May 2010 4:19 PM
To: users@wicket.apache.org
Subject: Re: BookmarkablePageLinks using relative vs absolute paths

one think I dont understand. you said thhat you've changed the root to
/
instead of /wicketpages, but later on you said that /myservlet should
redirect to /wicketpages/about.

On Mon, May 31, 2010 at 4:34 AM, Chris Colman
chr...@stepaheadsoftware.comwrote:

 Our web application uses wicket with an assortment of utility
servlets
 that we use to service requests with specific paths. In order to use
 forwarding instead of redirecting we recently, as suggested on this
 list, switched our wicket app filter to use the /* (root) context
 instead of the the more specific context that we used to use eg.,
 /wicketpages. This has enabled us to overcome many problems we were
 having with our collection of wicket/raw servlets.

 We now have another issue:

 A servlet with a pattern, say /myservlet needs to do a forward to a
path
 whose response is produced by a wicket mounted BookmarkablePage,
let's
 say /wicketpages/home. This all works fine except when we click on a
 BookmarkablePageLinkS created in that page (eg.,
/wicketpages/contact,
 /wicketpages/aboutus etc).

 Instead of the URL pointing to eg.,

 /wicketpages/aboutus

 it points to

 /myservlet/wicketpages/aboutus

 Which obviously fails because our wicket BookmarkablePages are
mounted
 at  paths like /wicketpages/aboutus not
/myservlet/wicketpages/aboutus.

 Is there a way to tell wicket that the context is something different
to
 what it is and so form a correct 'relative' URL? If I could fool
wicket
 into thinking that the context path is root / then that would work
I
 would think.

 The problem is not limited to BookmarkablePageLinks - all AJAX
 behaviours also fail as well when the /myservlet page is accessed but
 work fine when the page is accessed via /wicketpages/home.

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




--
Best regards,
Paul Szulc

http://paulszulc.wordpress.com

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



Re: Guice 2 / WarpPersist Wicket

2010-05-31 Thread nino martinez wael
Okay tried moving the @Inject from the setter to the field
declaration, still not working. Tried to add the keyword transient to
the field, still not working :/ Im a little lost here for once..
Remember it's only when my loadable detachable models are called the
2nd time, on first load it works.. The injector part of the ldms look
like this, and im on wicket 1.4.9:

import org.apache.wicket.injection.web.InjectorHolder;

import com.google.inject.Inject;
import com.netdesign.codan.dao.PhoneDao;

public class ClassWithDao {

public ClassWithDao() {

InjectorHolder.getInjector().inject(this);
}

@Inject
private transient PhoneDao phoneDao;

public PhoneDao getPhoneDao() {
return phoneDao;
}

public void setPhoneDao(PhoneDao phoneDao) {
this.phoneDao = phoneDao;
}

}


2010/5/28 nino martinez wael nino.martinez.w...@gmail.com:
 Hi Guys

 I wanted to try out the now working wicket injector holder for my
 webapp. But I keep getting:
 java.lang.IllegalStateException: EntityManager is closed
     at 
 org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66)
     at 
 org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:93)

 I've traced it so far that it's not an issue with page creation or
 page reloads. But seems to be when my detachablemodels or
 datasources(inmethod) are being loaded. It's like the entity manager
 gets closed after a request and never opened again.

 I followed this guide:
 http://www.atomicgamer.com/dev/2009/10/wicket-guice-2-0-warp-persist-2-0/

 web.xml looks like this:

        filter
                filter-namewarpPersistFilter/filter-name
                
 filter-classcom.wideplay.warp.persist.PersistenceFilter/filter-class
        /filter

        filter-mapping
                filter-namewarpPersistFilter/filter-name
                url-pattern/*/url-pattern
        /filter-mapping

        filter-mapping
                filter-namewicket.WicketWarp/filter-name
                url-pattern/*/url-pattern
        /filter-mapping

 And my warpmodule like this:

                Module warpModule = PersistenceService.usingJpa().across(
                                UnitOfWork.REQUEST).forAll(
                                Matchers.annotatedWith(Transactional.class), 
 Matchers.any())
                                .buildModule();

 WicketApplication:
       �...@override
        protected void init() {
                super.init();
                addComponentInstantiationListener(new 
 GuiceComponentInjector(this,
                                getGuiceInjector()));
        }
        protected Injector getGuiceInjector() {
                return Guice.createInjector(new Module());
        }


 In advance thanks, and please ask if I forgot something. Otherwise I
 have to roll back and ask a singleton for the dao each time and that
 would be really undesirable.

 -Nino


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



Re: Guice 2 / WarpPersist Wicket

2010-05-31 Thread nino martinez wael
As workaround for now I am doing this, but are a very ugly way:



2010/5/31 nino martinez wael nino.martinez.w...@gmail.com:
 Okay tried moving the @Inject from the setter to the field
 declaration, still not working. Tried to add the keyword transient to
 the field, still not working :/ Im a little lost here for once..
 Remember it's only when my loadable detachable models are called the
 2nd time, on first load it works.. The injector part of the ldms look
 like this, and im on wicket 1.4.9:

 import org.apache.wicket.injection.web.InjectorHolder;

 import com.google.inject.Inject;
 import com.netdesign.codan.dao.PhoneDao;

 public class ClassWithDao {

        public ClassWithDao() {

                InjectorHolder.getInjector().inject(this);
        }

       �...@inject
        private transient PhoneDao phoneDao;

        public PhoneDao getPhoneDao() {
                return phoneDao;
        }

        public void setPhoneDao(PhoneDao phoneDao) {
                this.phoneDao = phoneDao;
        }

 }


 2010/5/28 nino martinez wael nino.martinez.w...@gmail.com:
 Hi Guys

 I wanted to try out the now working wicket injector holder for my
 webapp. But I keep getting:
 java.lang.IllegalStateException: EntityManager is closed
     at 
 org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66)
     at 
 org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:93)

 I've traced it so far that it's not an issue with page creation or
 page reloads. But seems to be when my detachablemodels or
 datasources(inmethod) are being loaded. It's like the entity manager
 gets closed after a request and never opened again.

 I followed this guide:
 http://www.atomicgamer.com/dev/2009/10/wicket-guice-2-0-warp-persist-2-0/

 web.xml looks like this:

        filter
                filter-namewarpPersistFilter/filter-name
                
 filter-classcom.wideplay.warp.persist.PersistenceFilter/filter-class
        /filter

        filter-mapping
                filter-namewarpPersistFilter/filter-name
                url-pattern/*/url-pattern
        /filter-mapping

        filter-mapping
                filter-namewicket.WicketWarp/filter-name
                url-pattern/*/url-pattern
        /filter-mapping

 And my warpmodule like this:

                Module warpModule = PersistenceService.usingJpa().across(
                                UnitOfWork.REQUEST).forAll(
                                Matchers.annotatedWith(Transactional.class), 
 Matchers.any())
                                .buildModule();

 WicketApplication:
       �...@override
        protected void init() {
                super.init();
                addComponentInstantiationListener(new 
 GuiceComponentInjector(this,
                                getGuiceInjector()));
        }
        protected Injector getGuiceInjector() {
                return Guice.createInjector(new Module());
        }


 In advance thanks, and please ask if I forgot something. Otherwise I
 have to roll back and ask a singleton for the dao each time and that
 would be really undesirable.

 -Nino



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



Re: Guice 2 / WarpPersist Wicket

2010-05-31 Thread nino martinez wael
Argh, hotkeys in gmail, and daughter jumping around , heres the code
notice the extra call in acessor method:

import org.apache.wicket.injection.web.InjectorHolder;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;

import com.google.inject.Inject;
import com.netdesign.codan.dao.PhoneDao;

public abstract class DetachableModelWithDaoT extends
LoadableDetachableModelT implements IModelT {

@Inject
private transient PhoneDao phoneDao;

public DetachableModelWithDao() {
InjectorHolder.getInjector().inject(this);
}

public PhoneDao getPhoneDao() {
InjectorHolder.getInjector().inject(this);
return phoneDao;
}

public void setPhoneDao(PhoneDao phoneDao) {
this.phoneDao = phoneDao;
}

}


2010/5/31 nino martinez wael nino.martinez.w...@gmail.com:
 As workaround for now I am doing this, but are a very ugly way:



 2010/5/31 nino martinez wael nino.martinez.w...@gmail.com:
 Okay tried moving the @Inject from the setter to the field
 declaration, still not working. Tried to add the keyword transient to
 the field, still not working :/ Im a little lost here for once..
 Remember it's only when my loadable detachable models are called the
 2nd time, on first load it works.. The injector part of the ldms look
 like this, and im on wicket 1.4.9:

 import org.apache.wicket.injection.web.InjectorHolder;

 import com.google.inject.Inject;
 import com.netdesign.codan.dao.PhoneDao;

 public class ClassWithDao {

        public ClassWithDao() {

                InjectorHolder.getInjector().inject(this);
        }

       �...@inject
        private transient PhoneDao phoneDao;

        public PhoneDao getPhoneDao() {
                return phoneDao;
        }

        public void setPhoneDao(PhoneDao phoneDao) {
                this.phoneDao = phoneDao;
        }

 }


 2010/5/28 nino martinez wael nino.martinez.w...@gmail.com:
 Hi Guys

 I wanted to try out the now working wicket injector holder for my
 webapp. But I keep getting:
 java.lang.IllegalStateException: EntityManager is closed
     at 
 org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:66)
     at 
 org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:93)

 I've traced it so far that it's not an issue with page creation or
 page reloads. But seems to be when my detachablemodels or
 datasources(inmethod) are being loaded. It's like the entity manager
 gets closed after a request and never opened again.

 I followed this guide:
 http://www.atomicgamer.com/dev/2009/10/wicket-guice-2-0-warp-persist-2-0/

 web.xml looks like this:

        filter
                filter-namewarpPersistFilter/filter-name
                
 filter-classcom.wideplay.warp.persist.PersistenceFilter/filter-class
        /filter

        filter-mapping
                filter-namewarpPersistFilter/filter-name
                url-pattern/*/url-pattern
        /filter-mapping

        filter-mapping
                filter-namewicket.WicketWarp/filter-name
                url-pattern/*/url-pattern
        /filter-mapping

 And my warpmodule like this:

                Module warpModule = PersistenceService.usingJpa().across(
                                UnitOfWork.REQUEST).forAll(
                                Matchers.annotatedWith(Transactional.class), 
 Matchers.any())
                                .buildModule();

 WicketApplication:
       �...@override
        protected void init() {
                super.init();
                addComponentInstantiationListener(new 
 GuiceComponentInjector(this,
                                getGuiceInjector()));
        }
        protected Injector getGuiceInjector() {
                return Guice.createInjector(new Module());
        }


 In advance thanks, and please ask if I forgot something. Otherwise I
 have to roll back and ask a singleton for the dao each time and that
 would be really undesirable.

 -Nino




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



Re: Page in Page

2010-05-31 Thread Christian Märzinger

Thank all for the help.

Am 28.05.2010 07:21, schrieb Jeremy Thomerson:

On Fri, May 28, 2010 at 12:08 AM, Chris Colmanchr...@stepaheadsoftware.com
   

wrote:
 
   

I think the concepts are very different. The opinion that they are
effectively the same was raised in the earlier discussion (probably more
than a year ago).

Your suggestion involved using child/extend for one of the overridable
sections and then doing the other section with

div wicket:id=body[body]/div

If it's just as good or just as easy to implement using the later option
then why not do both with the later suggestion? The reason they are
different is that the later is not true markup inheritance.

A child/extend section is indeed true markup inheritance, albeit, we're
currently constrained to a single inheritable/overridable section per
page but as was agreed a year ago limiting wicket to a single overidable
section  was an 'arbitrary constraint' and has nothing to do with
maintaining a single inheritance model. A single inheritance model only
imposes the constraint that each page directly extends only one other
page and that constraint is clearly not violated by having multiple
overridable sections.

 

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
Sent: Friday, 28 May 2010 8:40 AM
To: users@wicket.apache.org
Subject: Re: Page in Page

On Thu, May 27, 2010 at 5:33 PM, Chris Colman
chr...@stepaheadsoftware.comwrote:

   

Wicket (just like Java) does not support multiple inheritance.  If
   

you're
 

creating a base page that has two blocks that need to be filled in,
   

you
 

can:
   

I agree that wicket shouldn't support multiple inheritance but I'm
 

not
 

sure that what is required here is multiple inheritance.

In the wicket parallel universe multiple inheritance would be
represented by  one page extending from multiple base pages but
 

that's
 

not what is required here and that would indeed be a bad path to
 

trod.
 

What I have had the need for many times is for a base page to have
multiple overridable 'sections' - one base page but multiple sections
within that page that could be overridden (or not) by pages that
 

extend
 

that page. This does not represent multiple inheritance. It is the
equivalent of Java allowing multiple overridable methods in a single
base class. In Java classes that extend the base class can override
 

one
 

or more of the virtual (non final) methods in the base class but the
same rule applies - any class/page can only extend a single base
class/page.

The constraint that wicket has now is that only one section of a page
can be overridden by the 'limit of one' child/extend wicket tags. As
only one overridable section is currently allowed in wicket there is
 

no
 

need to identify it. If wicket were to allow multiple sections in a
 

base
 

page to be overridden in derived pages then a simple identification
scheme would be required - much like Java uses method signatures to
identify the methods that are being overridden.

Eg.,

BasePage.html:
body

  div id=container
wicket:section id=header
!-- markup will be used if no derived page overrides
 

it
 

--.
h1my website/h1.
/wicket:section

hr /

wicket:section id=body
!-- a derived page should override this --
/wicket;section

hr /

!-- footer same for every page - no overriding --
div class=footer
pcopyright 2010 acme corp/p
/div

  /div
/body

WelcomePage.html:
body
!-- happy to use base page's header so no header section
override --

wicket:section id=body
h1Welcome to my website!/h1

My website is the best because it uses wicket!
/wicket:section
/body

Note how I've used the same tag 'section' in both base and extended
pages to avoid the obvious issue that occurs should someone extend
 

the
 

WelcomePage.html above. Ie. When inheritance is chained over more
 

than
 

two levels. In that case it becomes very wrong to specify whether a
section is 'overriding' (extend) or can be overridden (child). Much
 

like
 

in Java inheritance you don't specify each method as being a 'child'
 

or
 

'extension'. Instead, the mere presence of a method with identical
signature as in a base class indicates that that method is overriding
the base class method. That would seem an obvious model for
 

overridable
 

markup sections in wicket also.

This idea/issue has been raised a few times before in this list and
 

once
 

a remarkably small patch was even developed that would enable this to
work.

-
To unsubscribe, e-mail: 

Re: BookmarkablePageLink in ModalWindow, a bug?

2010-05-31 Thread tschiffler

Have you found a solution for this problem?
I just got the same problem
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-in-ModalWindow-a-bug-tp1844382p2236938.html
Sent from the Wicket - User 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: NonCachingImage and xhtmlRenderer

2010-05-31 Thread Xavier López
Might this have something to do with the fact that I'm faking the
requestCycle in order to get the page's processed HTML ?
Like having the IResourceListener expired ?

I'm faking the request cycle like this :

/** Returns the processed HTML of the page as it would have been responded
by faking a requestcycle */
public static String renderPage(Page page) {

//get the servlet context
WebApplication application = (WebApplication) WebApplication.get();

ServletContext context = application.getServletContext();

//fake a request/response cycle
MockHttpSession servletSession = new MockHttpSession(context);
servletSession.setTemporary(true);

MockHttpServletRequest servletRequest = new MockHttpServletRequest(
application, servletSession, context);
MockHttpServletResponse servletResponse = new
MockHttpServletResponse(
servletRequest);

//initialize request and response
servletRequest.initialize();
servletResponse.initialize();

WebRequest webRequest = new ServletWebRequest(servletRequest);

BufferedWebResponse webResponse = new
BufferedWebResponse(servletResponse);
webResponse.setAjax(true);

WebRequestCycle requestCycle = new WebRequestCycle(
application, webRequest, webResponse);

//requestCycle.setRequestTarget(new
BookmarkablePageRequestTarget(pageClass, pageParameters));
requestCycle.setRequestTarget(new PageRequestTarget(page));

try {
requestCycle.getProcessor().respond(requestCycle);

if (requestCycle.wasHandled() == false) {
requestCycle.setRequestTarget(new
WebErrorCodeResponseTarget(
HttpServletResponse.SC_NOT_FOUND));
}
requestCycle.detach();

} finally {
requestCycle.getResponse().close();
}

return webResponse.toString();
}


Thank you,
Xavier



2010/5/27 Xavier López xavil...@gmail.com

 Finally, I've managed to dig through the XHtmlRenderer's code, and the
 IText dependencies inside, and have encountered the root of the issue :

 The problem is raised by the IText Image resource class, which tries to
 detect the format of the image by peeking at the first bytes of the stream.
 Getting into details, that piece of code receives an InputStream, obtained
 from a new URL(source), where 'source' is the value of the 'src' attribute
 in the img tag.

 I've tried constructing that URL by myself, and peeking at the first bytes,
 and have found that they do not match what it should be expected taking into
 account the image's format (jpg - 0xFF, 0xD8). Instead, the first bytes
 are: 0x3C, 0x21, 0x44, 0x4F.

 I'm creating the Wicket image resource with a DynamicImageResource, and
 I've checked that, when it's called, it returns the expected first bytes...

 DynamicImageResource resource = new DynamicImageResource(jpg) {
 @Override
 protected byte[] getImageData() {
 return generateBarCode();
 }
 };


 And again, when I try this on the link's onClick:

 link = new Link(printFullPagament){

 private static final long serialVersionUID = 1L;
 @Override
 public void onClick() {
 try{

 String srcImg = 
 http://myapp/?wicket:interface=:34:
 barcode::IResourceListener::wicket:antiCache=1274953227999;
 java.io.InputStream is = new
 URL(srcImg).openStream();
 int c1 = is.read();
 int c2 = is.read();
 int c3 = is.read();
 int c4 = is.read();
 ...
 }

 I don't seem to get DynamicImageResource#getImageData, nor any of the
 methods it defines (getResourceState()), and get those values on the first
 bytes ( 0x3C, 0x21, 0x44, 0x4F)

 Does anyone know what may be happening here ?

 Thanks a lot,
 Xavier Lopez



 2010/5/27 Xavier López xavil...@gmail.com

 Sorry for double-posting, I'm attaching some of the code I'm using:

 I havent't mentioned other static styling images are rendering correctly.


 byte[] imageByteArray = generateBarCodeImage(...)
 ByteArrayResource resource = new ByteArrayResource(image/jpeg,
 imageByteArray);
 Image barcodeImage= new Image(barcode, resource){
 protected void onComponentTag(ComponentTag tag)
 {
 super.onComponentTag(tag);
 String url = tag.getAttributes().getString(src);
 url = url + ((url.indexOf(?) = 0) ? amp; : ?);
 url = url + wicket:antiCache= +
 System.currentTimeMillis();
 tag.put(src, url);
 }
 };
 barcodeImage.setMarkupId(barcodeImageId);
 

Re: WebMarkupContainer as string for use in jqgrid cell

2010-05-31 Thread Ernesto Reinaldo Barreiro
Hi Sam,

 I took a look at AjaxRequestTarget and its inner classes to check how wicket
 renders components on ajax requests.
 These components always have parent pages and the rendering process looks
 something like this:
 page.startComponentRender(comp) - comp.renderComponenet() -
 page.endComponentRender(comp)
 then the response from request cycle is set to be the ajax response so the
 html is directed to it.


I just gave it a try during weekend and I have managed to render
arbitrary Wicket components as cells of the grid (so, you could use
a panel with link and so on as you needed). My current solution is
still a bit hacky and I would like clean it up before making it
public. I write arbitrary because there will be some limitations
on the cell contents, e.g. they will not work if they contribute
JavaScript code to page, but that could be considered as a minor
limitation. I used the idea I mentioned before...

Best,

Ernesto

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



SV: DropDownChoice behaviour

2010-05-31 Thread Wilhelmsen Tor Iver
 I would like to know what's the outcome of setting setNullValid(true) -
 -
 is it that the choices will start with an empty string choice?

The empty choice is there for null model objects whether nullValid is true or 
false, the difference is that if you call setNullValid(false), then the option 
will be removed for non-null model values, and if you try and submit the form 
using a null value it will fail validation.

- Tor Iver



From a grateful newbie

2010-05-31 Thread Ioannis Mavroukakis
...a word of thanks to the wealth of info that is 
http://wicketstuff.org/wicket14/ . As I'm stumbling through building a site 
with Wicket, I've consistently referred to this site
for the bulk of my queries. So thank you to the maintainers, and all the people 
on this list patiently answering questions.

Yiannis.

Re: default form processing when form submitted

2010-05-31 Thread dellik2004

Hi,

Thanks for reply, actually yes we are using,, the form data is retaining
only when it is completely valid, for example.. mobile number instead of 10
digits i have entered 8 and submitted the form then wicket validates the
form and throw the errors, this is good. but the mobile field is getting
cleared. the user has to re-enter again full number.

if this is not clear will post you some code soon.

Thanks again.

Regards,
Delli
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/default-form-processing-when-form-submitted-tp2234621p2237317.html
Sent from the Wicket - User 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



[announce] Wicket Security 1.4 released!

2010-05-31 Thread Martijn Dashorst
We are proud to release Wicket Security 1.4 final.

Wicket Security is an attempt to create an out of the box reusable
authenticating and authorization framework for Apache Wicket. It
contains several projects which can be used standalone or in
conjunction with each other.

After testing the codebase for a while we did not find any issues.

Differences between the 1.4-rc1 release:
 - upgraded dependencies to newest working versions (JUnit 4.x does
not work with Spring)
 - versioned maven plugins to appease the Maven 3 gods.

Many thanks go to Olger Warnier for the initial port of Wicket
Security to Wicket 1.4.

The release is available from the usual Wicket Stuff maven repository:


http://wicketstuff.org/maven/repository/org/apache/wicket/wicket-security

If you already depend on Wicket Security, all you need to do is modify
the version of your dependencies in your Maven poms:

repository
idwicketstuff/id
urlhttp://wicketstuff.org/maven/repository/url
snapshots
enabledtrue/enabled
/snapshots
releases
enabledtrue/enabled
/releases
/repository

dependency
groupIdorg.apache.wicket.wicket-security/groupId
artifactIdswarm/artifactId
version1.4/version
scopecompile/scope
/dependency

Note that with future releases we will move to a new groupId and
package name (since org.apache.wicket is reserved for Apache Wicket,
and not 3rd party projects).

The future of the Wicket Security project is to remain a standalone
project (it will not be adopted by Apache Wicket), and will continue
to be maintained by Topicus. If you wish to join please let us know!

Emond  Martijn

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



Re: Re: RE: Rich Text Editors and Wicket

2010-05-31 Thread nicolas melendez
Strange...
It is in google app engine, are you from china?

NM

2010/5/30 wicketyan wicket...@gmail.com

 sorry.can't see http://www.clasificad.com.ar/clasificadoNuevo . Even I
 used proxy,there is no rich text editors,just a publica file page.

 2010-05-30



 wicketyan



 发件人: nicolas melendez
 发送时间: 2010-05-30  02:56:14
 收件人: users
 抄送:
 主题: Re: RE: Rich Text Editors and Wicket

 I also use use YUI editor with wicket, see:
 http://www.clasificad.com.ar/clasificadoNuevo
 http://www.clasificad.com.ar/clasificadoNuevoNM
 On Sat, May 29, 2010 at 7:10 AM, wicketyan wicket...@gmail.com wrote:
  thanks Hammer,I'm learning.
 
 
  2010-05-29
 
 
 
  wicketyan
 
 
 
  发件人: M. Hammer
  发送时间: 2010-05-29  15:54:09
  收件人: users
  抄送:
  主题: RE: Rich Text Editors and Wicket
 
  Quoting Chris Colman chr...@stepaheadsoftware.com:
   Is your YUI/Wicket component/integration code publicly available or
   could it be?
  I've written a blog post on the integration:
  http://www.hammersoft.de/blog/?p=31
  Maybe a FckEditor integration can be done in a similar manner. Keep me
  posted if you do this, I am not entirely happy with YUI either.
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 --
 Nicolás Meléndez
 Java Software Developer
 1) Google App Engine works:
 1.a) http://www.clasificad.com.ar  (Local free classifieds for  housing,
 sale, services, local community, curses,jobs, and events - GAE/J + Wicket +
 YUI)
 1.b) http://www.chessk.com  (Massive multiplayer chess online  GAE/J +
 Applets + Wicket)
 2) Linkedin: http://ar.linkedin.com/in/nicolasmelendez




-- 
Nicolás Meléndez
Java Software Developer

1) Google App Engine works:

1.a) http://www.clasificad.com.ar  (Local free classifieds for  housing,
sale, services, local community, curses,jobs, and events - GAE/J + Wicket +
YUI)

1.b) http://www.chessk.com  (Massive multiplayer chess online  GAE/J +
Applets + Wicket)

2) Linkedin: http://ar.linkedin.com/in/nicolasmelendez


Right-Click on LinkTree

2010-05-31 Thread AleXeL

Hi everyone,

I am using a LinkTree in my application. Each node from my Tree is a link to
a page and the Tree is displayed on the left side of every page.
Actually, I'm facing a problem when I want to render a page by
right-clicking on a node:

   1. Initialy, I display one of the page by clicking on a node of the Tree.
   2. I expand one or many other nodes of the Tree
   3. Then, I right-click on a link (one of that nodes) to open it in a new
tab of the browser.

The new tab displays the current page instead of the target page. 
It seems to get the wrong URL.
Is there any way to fix that problem?


Here is the way I manage my LinkTree for a simple click:

tree = new LinkTree( tree, treeModel )
{
private static final long serialVersionUID = 1L;

protected void onNodeLinkClicked ( 
final TreeNode node, final BaseTree tree, final AjaxRequestTarget
target )
{
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node;

PageParameters params = new PageParameters(  );
params.put( 0, myFirstParam );
params.put( 1, mySecondParam );
setResponsePage( TargetPage.class, params );
};
add( tree );


Thanks in Advance,

Best Regards,
AleXeL
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Right-Click-on-LinkTree-tp2237440p2237440.html
Sent from the Wicket - User 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: Can I develop without recompiling/restarting after every change?

2010-05-31 Thread John Krasnay
This is how I work too. It uses the hot swap feature of the JVM. It
works if you only change method bodies, but if you make changes to the
class structure (fields, method signatures, etc.) you have to restart
the VM. Apparently jRebel can reload even these kinds of changes.

I'm happy with hot swap, but then again my app only takes ~14 seconds to
restart.

jk

On Sun, May 30, 2010 at 04:22:29PM -0500, Jeremy Thomerson wrote:
 On Sun, May 30, 2010 at 12:05 PM, Alex Objelean 
 alex.objel...@gmail.comwrote:
 
 
  jRebel allows you to change the java code without restarting the server.
 
 
 I've not used jRebel, but I commonly run my applications in debug mode in
 Eclipse and do not have to restart the server - even with code changes.  The
 exception is changing a method signature of classes that are already loaded
 - but adding methods, classes, or changing 90% of code does not require a
 restart.  So, what does jRebel add?  Does it eliminate restarts even in
 these cases where the normal debug mode requires one?
 
 -- 
 Jeremy Thomerson
 http://www.wickettraining.com

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



Re: Can I develop without recompiling/restarting after every change?

2010-05-31 Thread Thies Edeling
Indeed JRebel reloads class structure changes as well. A very 
time-saving in combination with jetty.


The sysdeo plugin that was recommended earlier is very outdated, hasn't 
been updated in 3 years.


On 05/31/2010 06:01 PM, John Krasnay wrote:

This is how I work too. It uses the hot swap feature of the JVM. It
works if you only change method bodies, but if you make changes to the
class structure (fields, method signatures, etc.) you have to restart
the VM. Apparently jRebel can reload even these kinds of changes.

I'm happy with hot swap, but then again my app only takes ~14 seconds to
restart.

jk

On Sun, May 30, 2010 at 04:22:29PM -0500, Jeremy Thomerson wrote:
   

On Sun, May 30, 2010 at 12:05 PM, Alex Objeleanalex.objel...@gmail.comwrote:

 

jRebel allows you to change the java code without restarting the server.

   

I've not used jRebel, but I commonly run my applications in debug mode in
Eclipse and do not have to restart the server - even with code changes.  The
exception is changing a method signature of classes that are already loaded
- but adding methods, classes, or changing 90% of code does not require a
restart.  So, what does jRebel add?  Does it eliminate restarts even in
these cases where the normal debug mode requires one?

--
Jeremy Thomerson
http://www.wickettraining.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: Can I develop without recompiling/restarting after every change?

2010-05-31 Thread James Carman
On Sun, May 30, 2010 at 5:22 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 I've not used jRebel, but I commonly run my applications in debug mode in
 Eclipse and do not have to restart the server - even with code changes.  The
 exception is changing a method signature of classes that are already loaded
 - but adding methods, classes, or changing 90% of code does not require a
 restart.  So, what does jRebel add?  Does it eliminate restarts even in
 these cases where the normal debug mode requires one?


JRebel allows more types of class changes before you need a restart.
You can add/remove methods with JRebel, no problem.  There are still
some situations where you can't reload, but it definitely cuts down on
restarts.

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



Re: [announce] Wicket Security 1.4 released!

2010-05-31 Thread Joe Fawzy
Hi
i heard a lot about this project but have no opportunity to play with it
i think a (detailed) tutorial or a getting start guide is required(for
someone like me) to begin using this

any pointers?

thanks
Joe

On Mon, May 31, 2010 at 5:07 PM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 We are proud to release Wicket Security 1.4 final.

 Wicket Security is an attempt to create an out of the box reusable
 authenticating and authorization framework for Apache Wicket. It
 contains several projects which can be used standalone or in
 conjunction with each other.

 After testing the codebase for a while we did not find any issues.

 Differences between the 1.4-rc1 release:
  - upgraded dependencies to newest working versions (JUnit 4.x does
 not work with Spring)
  - versioned maven plugins to appease the Maven 3 gods.

 Many thanks go to Olger Warnier for the initial port of Wicket
 Security to Wicket 1.4.

 The release is available from the usual Wicket Stuff maven repository:


 http://wicketstuff.org/maven/repository/org/apache/wicket/wicket-security

 If you already depend on Wicket Security, all you need to do is modify
 the version of your dependencies in your Maven poms:

repository
idwicketstuff/id
urlhttp://wicketstuff.org/maven/repository/url
snapshots
enabledtrue/enabled
/snapshots
releases
enabledtrue/enabled
/releases
/repository

dependency
groupIdorg.apache.wicket.wicket-security/groupId
artifactIdswarm/artifactId
version1.4/version
scopecompile/scope
/dependency

 Note that with future releases we will move to a new groupId and
 package name (since org.apache.wicket is reserved for Apache Wicket,
 and not 3rd party projects).

 The future of the Wicket Security project is to remain a standalone
 project (it will not be adopted by Apache Wicket), and will continue
 to be maintained by Topicus. If you wish to join please let us know!

 Emond  Martijn

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




Re: BookmarkablePageLink in ModalWindow, a bug?

2010-05-31 Thread Igor Vaynberg
the modal window javadoc states that the only links that will work
inside the modal are ajax links. if you want the bookmarkable page
link to work then you probably need to set its target to _top or some
other magical value so the browser knows to load it in the main page.

-igor

On Mon, May 31, 2010 at 12:40 AM, tschiffler t.schiff...@ing-diba.de wrote:

 Have you found a solution for this problem?
 I just got the same problem
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/BookmarkablePageLink-in-ModalWindow-a-bug-tp1844382p2236938.html
 Sent from the Wicket - User 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



How can I make wicket handle 3:rd party CMS URL's?

2010-05-31 Thread Jimi

Hi,

I'm currently investigating the possibility to use Wicket in front of a 3:rd
party CMS, and let the CMS generate the URL's. The CMS already has several
filters that can process the request and resolve the main objects (for
example the article). And I already successfully replaced the last part of
the CMS filter chain (that forwards to a jsp page) with the wicket filter,
and when I surf to the start page wicket can display it just fine (ie the
simple If you see this message wicket is properly configured and
running-message), and when I look in the HttpServletRequest object I can
see that all the objects representing the start/main page etc in the CMS is
available as request attributes just as I expected.

But how can I catch URL's generated by the CMS, apart from URL's to the
start page? I can't use regular bookmarkable page mounts since I have no
idea on what the structure will look like.

For example, lets say that we have the URL
www.my-site.com/news/asia/chinese-goat-travels-to-mars/13578. What is the
best way to make Wicket catch this url (as opposed to resulting in a 404)
and then decide what page class (stateless, most likely) to use depending on
the request attributes (note, *not* url parameters)? And that without having
to know about the news-section on before hand.

All I have read about Wicket and URL's is focused on Wicket being the one
generating the URL's in first place. But what I want is the exact opposite.

Is there an easy way to solve this? Should I implement
IRequestCodingStrategy? If so, is there some good class I can extend so I
don't have to implement all myself (the decode-method of
WebRequestCodingStrategy is final)? Is there maybe even some existing
example that I can take a look at?

Regards
/Jimi
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-can-I-make-wicket-handle-3-rd-party-CMS-URL-s-tp2237976p2237976.html
Sent from the Wicket - User 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: How can I make wicket handle 3:rd party CMS URL's?

2010-05-31 Thread Igor Vaynberg
yep, extend WebRequestCodingStrategy and resolve the a
pagerequesttarget all the urls you want to handle. in later versions
WebRequestCodingStrategy  is no longer final, and even if it is simply
use the decorator pattern.

-igor

On Mon, May 31, 2010 at 7:28 PM, Jimi jimi.hulleg...@mogul.com wrote:

 Hi,

 I'm currently investigating the possibility to use Wicket in front of a 3:rd
 party CMS, and let the CMS generate the URL's. The CMS already has several
 filters that can process the request and resolve the main objects (for
 example the article). And I already successfully replaced the last part of
 the CMS filter chain (that forwards to a jsp page) with the wicket filter,
 and when I surf to the start page wicket can display it just fine (ie the
 simple If you see this message wicket is properly configured and
 running-message), and when I look in the HttpServletRequest object I can
 see that all the objects representing the start/main page etc in the CMS is
 available as request attributes just as I expected.

 But how can I catch URL's generated by the CMS, apart from URL's to the
 start page? I can't use regular bookmarkable page mounts since I have no
 idea on what the structure will look like.

 For example, lets say that we have the URL
 www.my-site.com/news/asia/chinese-goat-travels-to-mars/13578. What is the
 best way to make Wicket catch this url (as opposed to resulting in a 404)
 and then decide what page class (stateless, most likely) to use depending on
 the request attributes (note, *not* url parameters)? And that without having
 to know about the news-section on before hand.

 All I have read about Wicket and URL's is focused on Wicket being the one
 generating the URL's in first place. But what I want is the exact opposite.

 Is there an easy way to solve this? Should I implement
 IRequestCodingStrategy? If so, is there some good class I can extend so I
 don't have to implement all myself (the decode-method of
 WebRequestCodingStrategy is final)? Is there maybe even some existing
 example that I can take a look at?

 Regards
 /Jimi
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-can-I-make-wicket-handle-3-rd-party-CMS-URL-s-tp2237976p2237976.html
 Sent from the Wicket - User 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