java heap space IAuthorizationStrategy

2010-01-28 Thread Martin Asenov
Hello guys! Very strange exception occurred yesterday when trying to set 
IAuthorizationStrategy to my webapp. Here's the exception:

SEVERE: An exception or error occurred in the container during the request 
processing
java.lang.OutOfMemoryError: Java heap space at 
java.util.Arrays.copyOfRange(Arrays.java:3209)

these are the first 2 lines of the exception. Here's my MyAythStrategy class:

public class MyAuthStrategy implements IAuthorizationStrategy {

private UserContext context = ((AppSession)Session.get()).getContext();

public MyAuthStrategy() {}

public boolean isActionAuthorized(Component arg0, Action arg1)
{
return true;
}

public  boolean isInstantiationAuthorized(Class 
componentClass)
{

if (BaseFrame.class.isAssignableFrom(componentClass)) {

if 
(AdministrationPage.class.isAssignableFrom(componentClass)) {
if (context.getRole().equals(Role.ROOT) || 
context.getRole().equals(Role.ADMIN))
return true;
else
throw new 
RestartResponseAtInterceptPageException(AccessDeniedPage.class);
} else if 
(DomainRequiredPage.class.isAssignableFrom(componentClass)) {
if (context.getDomain() == null)
throw new 
RestartResponseAtInterceptPageException(AccessDeniedPage.class);
else 
return true;
}   
}
return true;

}

}

AdministrationPage and DomainRequiredPage are my tagging interfaces.

When I set that strategy to my webapp I get the above mentioned exception.

Hope someone helps! 

Thanks,
Martin

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



Howto load StringResources from Database for Iternationalization?

2010-01-28 Thread Martin U
Hello Folks,


i don't know if this question was ever done, but i didn't find anything
suitable for me.

In a huge webapplication which is being in the first steps of
implementation, we want to use a Database (table) to store there
any "String Resources" by locale for translation.

I have been jumping through the class-hierarchy for many hours but i haven't
found the right point to "plug-in" a ResourceLoader
from Database.

There are some different "Interface" of them i could imagine "This is the
right place" but I am not sure at all.

Have i to Implement my own *IResourceSettings*? I hope not, cause the
Implementation "Settings" looks very complicated to me.
or is it enough to implement *IStringResourceLoader*? But then, where can i
add my own loader to the "Chain" of processing?

Thanks a lot for any hints. Its very urgently to know and to understand if
wicket is useful for our "wishes" before we really
decide which framework we "want" to use.

Please apologise for my English, its not my mothers tongue.

- Matty


Re: Opening Wicketpages from external link?

2010-01-28 Thread Ashika Umanga Umagiliya

Greetings all,

Just to make sure , I create another skeleton Wicket application and 
integrated a module which I used before with GWT (use only 
Spring+Hibernate) .And whenever I configure Spring , non of the mounted 
pages work?

So is this something with Spring integration?

Josh Kamau wrote:

I suggest you start with something very simple that works. You can use maven
archetype to generate a project then mount the page there. If it works. Try
adding adding your spring and hibernate stuff . If it works see where you
went wrong in your main application

Josh

On Fri, Jan 29, 2010 at 6:57 AM, Ashika Umanga Umagiliya <
auma...@biggjapan.com> wrote:

  

Nop,I only use Wicket filter!  I use markup inheritance for my pages,so I
create new plain test WebPages and mounted,and they wont mount either.
I use Spring,Hibernate and Compass search engine in my app.
You said to debug the code, you mean with Wicket source?
I dont have good understand of Wicket internals,could you point me where I
found be looking at?

Thanks
umanga


Igor Vaynberg wrote:



i doubt spring has anything to do with it. do you have any other filters?

-igor

On Thu, Jan 28, 2010 at 7:36 PM, Ashika Umanga Umagiliya
 wrote:


  

None of my mounted pages work!
Do you think this has some thing to do with the way I have integrated
Spring
?
I have used ApplicationObjectApproach ,mentioned below :


http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach

Igor Vaynberg wrote:




strange, i guess you will have to debug with breakpoints to see where
it goes wrong.

-igor

On Thu, Jan 28, 2010 at 7:11 PM, Ashika Umanga Umagiliya
 wrote:



  

Igor Vaynberg wrote:





do other mounted pages work?




  

I mounted a test webpage and it wont work either.





do you use the /* mapping with your wicket filter?




  

Yes,and I use Spring integration as follows:


wicket.nihonbare-web


org.apache.wicket.protocol.http.WicketFilter

applicationFactoryClassName

 org.apache.wicket.spring.SpringWebApplicationFactory
 



 

 
wicket.nihonbare-web
/*
 

 
wicket



org.apache.wicket.protocol.http.WicketServlet

applicationFactoryClassName



org.apache.wicket.spring.SpringWebApplicationFactory

1

 

 



org.springframework.web.context.ContextLoaderListener
 

-
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: Opening Wicketpages from external link?

2010-01-28 Thread Ashika Umanga Umagiliya

Greetings,

I create a test wicket project using maven archetype,and kept on 
configuring stuff  gradually.
I noticed that,after I configure Spring as shown in (1)  below, the 
mounting wont work.

It works fine for (2) which doesn't have Spring integration!


   
   
   
   
 

applicationClassName
com.mycompany.WicketApplication

Any tips?


Josh Kamau wrote:

I suggest you start with something very simple that works. You can use maven
archetype to generate a project then mount the page there. If it works. Try
adding adding your spring and hibernate stuff . If it works see where you
went wrong in your main application

Josh

On Fri, Jan 29, 2010 at 6:57 AM, Ashika Umanga Umagiliya <
auma...@biggjapan.com> wrote:

  

Nop,I only use Wicket filter!  I use markup inheritance for my pages,so I
create new plain test WebPages and mounted,and they wont mount either.
I use Spring,Hibernate and Compass search engine in my app.
You said to debug the code, you mean with Wicket source?
I dont have good understand of Wicket internals,could you point me where I
found be looking at?

Thanks
umanga


Igor Vaynberg wrote:



i doubt spring has anything to do with it. do you have any other filters?

-igor

On Thu, Jan 28, 2010 at 7:36 PM, Ashika Umanga Umagiliya
 wrote:


  

None of my mounted pages work!
Do you think this has some thing to do with the way I have integrated
Spring
?
I have used ApplicationObjectApproach ,mentioned below :


http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach

Igor Vaynberg wrote:




strange, i guess you will have to debug with breakpoints to see where
it goes wrong.

-igor

On Thu, Jan 28, 2010 at 7:11 PM, Ashika Umanga Umagiliya
 wrote:



  

Igor Vaynberg wrote:





do other mounted pages work?




  

I mounted a test webpage and it wont work either.





do you use the /* mapping with your wicket filter?




  

Yes,and I use Spring integration as follows:


wicket.nihonbare-web


org.apache.wicket.protocol.http.WicketFilter

applicationFactoryClassName

 org.apache.wicket.spring.SpringWebApplicationFactory
 



 

 
wicket.nihonbare-web
/*
 

 
wicket



org.apache.wicket.protocol.http.WicketServlet

applicationFactoryClassName



org.apache.wicket.spring.SpringWebApplicationFactory

1

 

 



org.springframework.web.context.ContextLoaderListener
 

-
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: images not under the context root directory

2010-01-28 Thread Ernesto Reinaldo Barreiro
Hi Riyad,

I didn't get offended by your message... which otherwise raised a very valid
issue.

Cheers,

Ernesto

On Thu, Jan 28, 2010 at 5:26 PM, Riyad Kalla  wrote:

> Ernesto,
>
> Sorry about that -- I didn't mean to imply your impl was back, that was
> more
> directed at Francois along the lines of "that's a lot of overhead, are you
> sure you need to do that?" -- but now that I understand what his use-case
> is
> (saw his last reply about /usr/ext/img/) I get it. I was
> thinking they were under /webapp/images.
>
> I'll go back to sitting in my corner ;)
>
> -R
>
> On Wed, Jan 27, 2010 at 9:54 PM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
> > Sure it is overhead but he wanted to serve images from a folder not
> > under application
> > context root directory... Then, you have to serve them somehow? The
> options
> > I see are
> >
> > 1-A dedicated servlet?
> > 2-With Wicket... and thats what the code shows... and for sure it can be
> > done in a simpler way...
> >
> > A would try to use 1. As then Wicket would not have to serve the images.
> >
> > Regards,
> >
> > Ernesto
> >
> > On Wed, Jan 27, 2010 at 9:43 PM, Riyad Kalla  wrote:
> >
> > > This seems like adding a large amount of overhead to an image-heavy
> site
> > > (e.g. image blog or something), I thought I read in Wicket in Action
> that
> > > WicketFilter ignored HTTP requests for non-wicket resources now and
> > passed
> > > them through to the underlying server to handle avoiding the need to
> > remap
> > > your wicket URLs to something like /app/* so you could have /images and
> > > other resources under root and not have them go through the filter.
> > >
> > > Is this not the case?
> > >
> > > On Wed, Jan 27, 2010 at 1:38 PM, Ernesto Reinaldo Barreiro <
> > > reier...@gmail.com> wrote:
> > >
> > > > Hi Francois,
> > > >
> > > > Following example works.
> > > >
> > > > 1-Create this class anywhere you want need.
> > > >
> > > > package com.antilia.demo.manager.img;
> > > >
> > > > import java.io.ByteArrayOutputStream;
> > > > import java.io.File;
> > > > import java.io.FileInputStream;
> > > > import java.io.IOException;
> > > > import java.io.InputStream;
> > > > import java.io.OutputStream;
> > > >
> > > > import org.apache.wicket.AttributeModifier;
> > > > import org.apache.wicket.markup.html.image.Image;
> > > > import
> > org.apache.wicket.markup.html.image.resource.DynamicImageResource;
> > > > import org.apache.wicket.model.Model;
> > > > import org.apache.wicket.protocol.http.WebApplication;
> > > > import org.apache.wicket.protocol.http.WebRequestCycle;
> > > > import org.apache.wicket.util.file.Folder;
> > > >
> > > > /**
> > > >  *
> > > >  * @author  Ernesto Reinaldo Barreiro (reier...@gmail.com)
> > > >  *
> > > >  */
> > > > public abstract class MountedImageFactory {
> > > >
> > > >
> > > > static int BUFFER_SIZE = 10*1024;
> > > >  /**
> > > > * Copies one stream into the other..
> > > >  * @param is source Stream
> > > >  * @param os destination Stream
> > > >  * */
> > > > static public void copy(InputStream is, OutputStream os) throws
> > > IOException
> > > > {
> > > > byte[] buf = new byte[BUFFER_SIZE];
> > > > while (true) {
> > > > int tam = is.read(buf);
> > > > if (tam == -1) {
> > > > return;
> > > > }
> > > > os.write(buf, 0, tam);
> > > > }
> > > > }
> > > >  public static  byte[] bytes(InputStream is) throws IOException {
> > > > ByteArrayOutputStream out = new ByteArrayOutputStream();
> > > > copy(is, out);
> > > > return out.toByteArray();
> > > > }
> > > >  private static ImageFromFolderWebResource dynamicResource;
> > > >  private static class ImageFromFolderWebResource extends
> > > > DynamicImageResource {
> > > >  private static final long serialVersionUID = 1L;
> > > >
> > > >  private File folder;
> > > >  public ImageFromFolderWebResource(File folder, String mountPoint) {
> > > > this.folder = folder;
> > > > WebApplication.get().getSharedResources().add(mountPoint, this);
> > > > WebApplication.get().mountSharedResource(mountPoint,
> > > > "org.apache.wicket.Application/"+mountPoint);
> > > > }
> > > >  @Override
> > > > protected byte[] getImageData() {
> > > > try {
> > > > String name =
> WebRequestCycle.get().getRequest().getParameter("name");
> > > > return bytes(new FileInputStream(new
> File(getFolder().getAbsolutePath()
> > +
> > > > System.getProperty("file.separator")+(name;
> > > > } catch (Exception e) {
> > > > //TODO: do this properly
> > > > return null;
> > > > }
> > > > }
> > > >
> > > > public File getFolder() {
> > > > return folder;
> > > > }
> > > > }
> > > >  /**
> > > >  * @return Folder from where images will be retrieved.
> > > >  */
> > > > protected abstract Folder getFolder();
> > > >  /**
> > > >  * @return the URL to mount the dynamic WEB resource.e.g.
> > > >  */
> > > > protected abstract String getMountPoint();
> > > >  public Image createImage(String id, final String imageName) {
> > > > if(dynamicResource == null)
> > > > dynamicResource 

Re: Opening Wicketpages from external link?

2010-01-28 Thread Josh Kamau
I suggest you start with something very simple that works. You can use maven
archetype to generate a project then mount the page there. If it works. Try
adding adding your spring and hibernate stuff . If it works see where you
went wrong in your main application

Josh

On Fri, Jan 29, 2010 at 6:57 AM, Ashika Umanga Umagiliya <
auma...@biggjapan.com> wrote:

> Nop,I only use Wicket filter!  I use markup inheritance for my pages,so I
> create new plain test WebPages and mounted,and they wont mount either.
> I use Spring,Hibernate and Compass search engine in my app.
> You said to debug the code, you mean with Wicket source?
> I dont have good understand of Wicket internals,could you point me where I
> found be looking at?
>
> Thanks
> umanga
>
>
> Igor Vaynberg wrote:
>
>> i doubt spring has anything to do with it. do you have any other filters?
>>
>> -igor
>>
>> On Thu, Jan 28, 2010 at 7:36 PM, Ashika Umanga Umagiliya
>>  wrote:
>>
>>
>>> None of my mounted pages work!
>>> Do you think this has some thing to do with the way I have integrated
>>> Spring
>>> ?
>>> I have used ApplicationObjectApproach ,mentioned below :
>>>
>>>
>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>
>>> Igor Vaynberg wrote:
>>>
>>>
 strange, i guess you will have to debug with breakpoints to see where
 it goes wrong.

 -igor

 On Thu, Jan 28, 2010 at 7:11 PM, Ashika Umanga Umagiliya
  wrote:



> Igor Vaynberg wrote:
>
>
>
>> do other mounted pages work?
>>
>>
>>
>>
> I mounted a test webpage and it wont work either.
>
>
>
>> do you use the /* mapping with your wicket filter?
>>
>>
>>
>>
> Yes,and I use Spring integration as follows:
>
> 
> wicket.nihonbare-web
>
>
> org.apache.wicket.protocol.http.WicketFilter
> 
> applicationFactoryClassName
> 
>  org.apache.wicket.spring.SpringWebApplicationFactory
>  
> 
>
>
>  
>
>  
> wicket.nihonbare-web
> /*
>  
>
>  
> wicket
>
>
>
> org.apache.wicket.protocol.http.WicketServlet
> 
> applicationFactoryClassName
>
>
>
> org.apache.wicket.spring.SpringWebApplicationFactory
> 
> 1
>
>  
>
>  
>
>
>
> org.springframework.web.context.ContextLoaderListener
>  
>
> -
> 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: Opening Wicketpages from external link?

2010-01-28 Thread Ashika Umanga Umagiliya
Nop,I only use Wicket filter!  I use markup inheritance for my pages,so 
I create new plain test WebPages and mounted,and they wont mount either.

I use Spring,Hibernate and Compass search engine in my app.
You said to debug the code, you mean with Wicket source?
I dont have good understand of Wicket internals,could you point me where 
I found be looking at?


Thanks
umanga

Igor Vaynberg wrote:

i doubt spring has anything to do with it. do you have any other filters?

-igor

On Thu, Jan 28, 2010 at 7:36 PM, Ashika Umanga Umagiliya
 wrote:
  

None of my mounted pages work!
Do you think this has some thing to do with the way I have integrated Spring
?
I have used ApplicationObjectApproach ,mentioned below :

http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach

Igor Vaynberg wrote:


strange, i guess you will have to debug with breakpoints to see where
it goes wrong.

-igor

On Thu, Jan 28, 2010 at 7:11 PM, Ashika Umanga Umagiliya
 wrote:

  

Igor Vaynberg wrote:



do other mounted pages work?


  

I mounted a test webpage and it wont work either.



do you use the /* mapping with your wicket filter?


  

Yes,and I use Spring integration as follows:


 wicket.nihonbare-web

org.apache.wicket.protocol.http.WicketFilter
 
 applicationFactoryClassName
 
 org.apache.wicket.spring.SpringWebApplicationFactory
 
 


 

 
 wicket.nihonbare-web
 /*
 

 
 wicket


org.apache.wicket.protocol.http.WicketServlet
 
 applicationFactoryClassName


org.apache.wicket.spring.SpringWebApplicationFactory
 
 1

 

 


org.springframework.web.context.ContextLoaderListener
 

-
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: Opening Wicketpages from external link?

2010-01-28 Thread Igor Vaynberg
i doubt spring has anything to do with it. do you have any other filters?

-igor

On Thu, Jan 28, 2010 at 7:36 PM, Ashika Umanga Umagiliya
 wrote:
> None of my mounted pages work!
> Do you think this has some thing to do with the way I have integrated Spring
> ?
> I have used ApplicationObjectApproach ,mentioned below :
>
> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>
> Igor Vaynberg wrote:
>>
>> strange, i guess you will have to debug with breakpoints to see where
>> it goes wrong.
>>
>> -igor
>>
>> On Thu, Jan 28, 2010 at 7:11 PM, Ashika Umanga Umagiliya
>>  wrote:
>>
>>>
>>> Igor Vaynberg wrote:
>>>

 do other mounted pages work?


>>>
>>> I mounted a test webpage and it wont work either.
>>>

 do you use the /* mapping with your wicket filter?


>>>
>>> Yes,and I use Spring integration as follows:
>>>
>>> 
>>>      wicket.nihonbare-web
>>>
>>> org.apache.wicket.protocol.http.WicketFilter
>>>      
>>>          applicationFactoryClassName
>>>          
>>>  org.apache.wicket.spring.SpringWebApplicationFactory
>>>  
>>>      
>>>
>>>
>>>  
>>>
>>>  
>>>      wicket.nihonbare-web
>>>      /*
>>>  
>>>
>>>  
>>>      wicket
>>>
>>>
>>> org.apache.wicket.protocol.http.WicketServlet
>>>      
>>>          applicationFactoryClassName
>>>
>>>
>>> org.apache.wicket.spring.SpringWebApplicationFactory
>>>      
>>>      1
>>>
>>>  
>>>
>>>  
>>>
>>>
>>> org.springframework.web.context.ContextLoaderListener
>>>  
>>>
>>> -
>>> 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: Opening Wicketpages from external link?

2010-01-28 Thread Ashika Umanga Umagiliya

None of my mounted pages work!
Do you think this has some thing to do with the way I have integrated 
Spring ?

I have used ApplicationObjectApproach ,mentioned below :

http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach

Igor Vaynberg wrote:

strange, i guess you will have to debug with breakpoints to see where
it goes wrong.

-igor

On Thu, Jan 28, 2010 at 7:11 PM, Ashika Umanga Umagiliya
 wrote:
  

Igor Vaynberg wrote:


do other mounted pages work?

  

I mounted a test webpage and it wont work either.


do you use the /* mapping with your wicket filter?

  

Yes,and I use Spring integration as follows:


  wicket.nihonbare-web

org.apache.wicket.protocol.http.WicketFilter
  
  applicationFactoryClassName
  
  org.apache.wicket.spring.SpringWebApplicationFactory
 
  


  

  
  wicket.nihonbare-web
  /*
  

  
  wicket

org.apache.wicket.protocol.http.WicketServlet
  
  applicationFactoryClassName

org.apache.wicket.spring.SpringWebApplicationFactory
  
  1

  

  

org.springframework.web.context.ContextLoaderListener
  

-
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: @RequireHttps with reverse proxy

2010-01-28 Thread Igor Vaynberg
add an rfe to our jira

-igor

On Thu, Jan 28, 2010 at 7:43 AM, Boydens Joeri (OZ)  wrote:
> Hi,
>
>
>
> We have a wicket application running at the following address
> http://myserver.domain.be:8082/myapplication.  When I do add the
> @RequiredHttps annotation to my pages, wicket does a great job
> redirecting my pages to https connection.  I get something like:
>
> https://myserver.domain.be:8443/myapplication/somepage .
>
>
>
> So far so good, but now I have to serve this application behind a
> reverse proxy.  I have apache httpd2 set up with ProxyPass, and I added
> a VirtualHost for my application, something like
> http://myapplication.domain.be (this way port 8082 isn't visible and
> /myapplication context path isn't visible either).
>
>
>
> This is working perfectly for non https pages, but when I go to a https
> pages, I get redirected to the server application address
> (https://myserver.domain.be:8843/myapplication).  This is because the
> SwitchProtocolRequestTarget is building the redirect url based on the
> httpservletrequest.getServerName()...
>
>
>
> Is it possible to extend/override this behavior ?
>
>
>
> Regards
>
> Joeri
>
>
>
>
>
>
>
>
>
>

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



Re: Opening Wicketpages from external link?

2010-01-28 Thread Igor Vaynberg
strange, i guess you will have to debug with breakpoints to see where
it goes wrong.

-igor

On Thu, Jan 28, 2010 at 7:11 PM, Ashika Umanga Umagiliya
 wrote:
> Igor Vaynberg wrote:
>>
>> do other mounted pages work?
>>
>
> I mounted a test webpage and it wont work either.
>>
>> do you use the /* mapping with your wicket filter?
>>
>
> Yes,and I use Spring integration as follows:
>
> 
>       wicket.nihonbare-web
>
> org.apache.wicket.protocol.http.WicketFilter
>       
>           applicationFactoryClassName
>           
>   org.apache.wicket.spring.SpringWebApplicationFactory
>  
>       
>
>
>   
>
>   
>       wicket.nihonbare-web
>       /*
>   
>
>   
>       wicket
>
> org.apache.wicket.protocol.http.WicketServlet
>       
>           applicationFactoryClassName
>
> org.apache.wicket.spring.SpringWebApplicationFactory
>       
>       1
>
>   
>
>   
>
> org.springframework.web.context.ContextLoaderListener
>   
>
> -
> 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: Opening Wicketpages from external link?

2010-01-28 Thread Ashika Umanga Umagiliya

Igor Vaynberg wrote:

do other mounted pages work?
  

I mounted a test webpage and it wont work either.

do you use the /* mapping with your wicket filter?
  

Yes,and I use Spring integration as follows:


   wicket.nihonbare-web
   
org.apache.wicket.protocol.http.WicketFilter

   
   applicationFactoryClassName
   
   org.apache.wicket.spring.SpringWebApplicationFactory
 
   


   

   
   wicket.nihonbare-web
   /*
   

   
   wicket
   
org.apache.wicket.protocol.http.WicketServlet

   
   applicationFactoryClassName
   
org.apache.wicket.spring.SpringWebApplicationFactory

   
   1

   

   
   
org.springframework.web.context.ContextLoaderListener

   

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



Re: Opening Wicketpages from external link?

2010-01-28 Thread Igor Vaynberg
hard to tell without seeing your setup.

do other mounted pages work?

do you use the /* mapping with your wicket filter?

-igor

On Thu, Jan 28, 2010 at 6:49 PM, Ashika Umanga Umagiliya
 wrote:
> Thank igor,
>
> I mounted my SeachPage in my Application class as follows:
>
> public NihonBareApplication()
>   {
>       mount(new
> QueryStringUrlCodingStrategy("/search",edu.jst.nihonbare.web.pages.SearchResultsPage.class));
>   }
>
> and put a constructor in 'SearchResultPage' as you told.
>
> But now when I access the page like
> "http://localhost:8080/nihonbare-web/search?query=Rice";
> It direct to the Home page and without any CSS styles, not to SearchPage?
>
> What I am doing wrong?
>
> Thanks in advance.
>
>
> Igor Vaynberg wrote:
>>
>> mount your page using QueryStringUrlCodingStrategy. create a
>> constructor that takes PageParameters instance - this is where the
>> query string will be.
>>
>> since you know the mount, et "/mysearch" use that to construct the url
>> in the external app.
>>
>> -igor
>>
>> On Thu, Jan 28, 2010 at 5:38 PM, Ashika Umanga Umagiliya
>>  wrote:
>>
>>>
>>> Greetings,
>>>
>>> In application I am developing,client want to open the wicket 'SeachPage'
>>> from external page.
>>>
>>> My search page is like:
>>>
>>> public SearchPage extends WebPage{
>>>  private String queryString;
>>>  public SearchPage(String queryString){
>>>  this.queryString=queryString;
>>>  .
>>>  .
>>> }
>>>
>>> }
>>>
>>> and from other Pages I open it as:
>>>
>>>
>>>      protected void onSubmit() {                       SearchResultsPage
>>> p=new SearchResultsPage(""+queryText.getModel().getObject());
>>>          setResponsePage(p);
>>>                }
>>>
>>>
>>> How can I pass this 'queryString' from an external app ? How to resolve
>>> the
>>> wicket URL pattern
>>> (http://localhost:8080/nihonbare-web/?wicket:interface=:11) for
>>> parameter passing ?
>>>
>>>
>>> Thanks in advance
>>>
>>>
>>> -
>>> 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: Opening Wicketpages from external link?

2010-01-28 Thread Ashika Umanga Umagiliya

Thank igor,

I mounted my SeachPage in my Application class as follows:

public NihonBareApplication()
   {
   mount(new 
QueryStringUrlCodingStrategy("/search",edu.jst.nihonbare.web.pages.SearchResultsPage.class));

   }

and put a constructor in 'SearchResultPage' as you told.

But now when I access the page like 
"http://localhost:8080/nihonbare-web/search?query=Rice";

It direct to the Home page and without any CSS styles, not to SearchPage?

What I am doing wrong?

Thanks in advance.
  



Igor Vaynberg wrote:

mount your page using QueryStringUrlCodingStrategy. create a
constructor that takes PageParameters instance - this is where the
query string will be.

since you know the mount, et "/mysearch" use that to construct the url
in the external app.

-igor

On Thu, Jan 28, 2010 at 5:38 PM, Ashika Umanga Umagiliya
 wrote:
  

Greetings,

In application I am developing,client want to open the wicket 'SeachPage'
from external page.

My search page is like:

public SearchPage extends WebPage{
 private String queryString;
 public SearchPage(String queryString){
 this.queryString=queryString;
 .
 .
}

}

and from other Pages I open it as:


  protected void onSubmit() {   SearchResultsPage
p=new SearchResultsPage(""+queryText.getModel().getObject());
  setResponsePage(p);
}


How can I pass this 'queryString' from an external app ? How to resolve the
wicket URL pattern
(http://localhost:8080/nihonbare-web/?wicket:interface=:11) for
parameter passing ?


Thanks in advance


-
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: Opening Wicketpages from external link?

2010-01-28 Thread Igor Vaynberg
mount your page using QueryStringUrlCodingStrategy. create a
constructor that takes PageParameters instance - this is where the
query string will be.

since you know the mount, et "/mysearch" use that to construct the url
in the external app.

-igor

On Thu, Jan 28, 2010 at 5:38 PM, Ashika Umanga Umagiliya
 wrote:
> Greetings,
>
> In application I am developing,client want to open the wicket 'SeachPage'
> from external page.
>
> My search page is like:
>
> public SearchPage extends WebPage{
>  private String queryString;
>  public SearchPage(String queryString){
>  this.queryString=queryString;
>  .
>  .
> }
>
> }
>
> and from other Pages I open it as:
>
>
>       protected void onSubmit() {                       SearchResultsPage
> p=new SearchResultsPage(""+queryText.getModel().getObject());
>           setResponsePage(p);
>                 }
>
>
> How can I pass this 'queryString' from an external app ? How to resolve the
> wicket URL pattern
> (http://localhost:8080/nihonbare-web/?wicket:interface=:11) for
> parameter passing ?
>
>
> Thanks in advance
>
>
> -
> 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 VoiceXML framework?

2010-01-28 Thread Igor Vaynberg
we will be happy to help once you have specific questions and if you
are willing to make your work open

-igor

On Thu, Jan 28, 2010 at 10:56 AM, shetc  wrote:
>
> Hi Nino,
>
> I currently support an IVR system that uses an IBM proprietary technology
> rather than standard VXML.
> I have been tasked with determining the effort of refactoring our system to
> use VXML.
> I would love to use Wicket for this purpose. Ideally, there need to be
> components that do standard
> IVR behaviors like producing dates, times, currencies, etc. I am happy to
> take the lead on this
> but any support from the Wicket gurus would be very handy.
>
> Steve
> --
> View this message in context: 
> http://old.nabble.com/Wicket-VoiceXML-framework--tp22058044p27358769.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



Opening Wicketpages from external link?

2010-01-28 Thread Ashika Umanga Umagiliya

Greetings,

In application I am developing,client want to open the wicket 
'SeachPage' from external page.


My search page is like:

public SearchPage extends WebPage{
 private String queryString;
 public SearchPage(String queryString){
  this.queryString=queryString;
  .
 .
}

}

and from other Pages I open it as:


   protected void onSubmit() {
   SearchResultsPage p=new 
SearchResultsPage(""+queryText.getModel().getObject());

   setResponsePage(p);
   
   }



How can I pass this 'queryString' from an external app ? How to resolve 
the wicket URL pattern 
(http://localhost:8080/nihonbare-web/?wicket:interface=:11) for 
parameter passing ?



Thanks in advance


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



Worldwide address form

2010-01-28 Thread Chris Colman
I'm just wondering if anyone knows of a sample 'world address' entry
form built using wicket.

Ideally the data entry fields for the top level attributes:

- world region
- country
- state/zone 

Would be drop down list boxes. The contents of any drop down (except the
world region) would be dictated by the option(s) chosen in the drop down
lists above it. Eg., if you change the country from Australia to USA
then the state/zone drop down is populated with the US states.

I was thinking of creating an interface for the data so that a generic
world wide address form could be written to the interface but the
implementation of the interface could be tailored to the way an
individual app stores it's world data.


> -Original Message-
> From: Per Lundholm [mailto:per.lundh...@gmail.com]
> Sent: Friday, 29 January 2010 8:26 AM
> To: users@wicket.apache.org
> Subject: Re: functional testing
> 
> We write tests first and use Wicket's built-in testing.
> 
> It has some quirks so you may have to spend time with figuring out how
to
> click an AjaxCheckBox, for instance.
> 
> The tests target the logic of the view, such as "when clicking here,
that
> other thing should be disabled".
> 
> Good test coverage really pays off when you have 20 different webapps
and
> need to work some here and some there.
> 
> /Per
> 
> On Mon, Jan 25, 2010 at 3:52 AM, Kent Tong  wrote:
> 
> >
> > For functional testing, I'd suggest Selenium.
> >
> > For unit testing of Wicket pages, I'd suggest "Wicket Page Test"
> > (http://wicketpagetest.sourceforge.net).
> >
> > -
> > --
> > Kent Tong
> > Better way to unit test Wicket pages (
> > http://wicketpagetest.sourceforge.net)
> > Books on CXF, Axis2, Wicket, JSF (http://http://agileskills2.org)
> > --
> > View this message in context:
> > http://old.nabble.com/functional-testing-tp27278781p27301553.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



Re: functional testing

2010-01-28 Thread Per Lundholm
We write tests first and use Wicket's built-in testing.

It has some quirks so you may have to spend time with figuring out how to
click an AjaxCheckBox, for instance.

The tests target the logic of the view, such as "when clicking here, that
other thing should be disabled".

Good test coverage really pays off when you have 20 different webapps and
need to work some here and some there.

/Per

On Mon, Jan 25, 2010 at 3:52 AM, Kent Tong  wrote:

>
> For functional testing, I'd suggest Selenium.
>
> For unit testing of Wicket pages, I'd suggest "Wicket Page Test"
> (http://wicketpagetest.sourceforge.net).
>
> -
> --
> Kent Tong
> Better way to unit test Wicket pages (
> http://wicketpagetest.sourceforge.net)
> Books on CXF, Axis2, Wicket, JSF (http://http://agileskills2.org)
> --
> View this message in context:
> http://old.nabble.com/functional-testing-tp27278781p27301553.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: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread Jochen Mader
Oh man, you are right.
My eyes got a little selective on that line :)


Re: wicket osgi (not Pax)

2010-01-28 Thread Jan Juno
Thank you very much

On Thu, Jan 28, 2010 at 12:08 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> I did not know about it being included on the standard...
>
> Thanks for the update.
>
> Ernesto
>
> On Thu, Jan 28, 2010 at 11:18 AM, Jochen Mader  >wrote:
>
> > Buddy-class loading is real OSGi since 4.1 ;)
> > The new MANIFEST.MF entry is named "Bundle- *BuddyPolicy".*
> >
> > Cheers,
> >
> > Jochen
> >
> >
> > On Thu, Jan 28, 2010 at 9:55 AM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Yes I mean buddy class-loading. It might not be real OSGi but it
> works:-)
> > >  as far as you only use equinox.
> > >
> > > I also do like a lot OSGi. But I know from experience that it might
> take
> > > some time for newbies to get the full grasp of it
> > >
> > > Cheers,
> > >
> > > Ernesto
> > >
> > > On Thu, Jan 28, 2010 at 9:47 AM, David Leangen 
> > wrote:
> > >
> > > >
> > > > Hi Ernesto,
> > > >
> > > > > Antilia simply use equinox extensions for class-loading that way
> you
> > > can
> > > > use
> > > > > "normal" Wicket components... No need to modify Wicket or your
> > > > components.
> > > >
> > > > Ok, do you mean buddy classloading?
> > > >
> > > > If so, that's not "real" OSGi. :-)
> > > >
> > > >
> > > > > What I wanted to says is that you not always have to face the
> > problems
> > > > you
> > > > > mentioned: it might depend on how you build your application. But I
> > do
> > > > agree
> > > > > the OSGi road is not for the faint hearted and people should
> > carefully
> > > > > consider their requirements before jumping into it: moreover if you
> > can
> > > > > achieve extensibility and modularity with other means.
> > > >
> > > > Personally, I'm addicted to OSGi. I wish that somebody would come up
> > with
> > > a
> > > > good solution for this that doesn't rely on buddy classloading...
> > > >
> > > > Anyway, thanks for the discussion.
> > > >
> > > >
> > > > Cheers,
> > > > =David
> > > >
> > > >
> > > >
> > > > -
> > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > >
> > > >
> > >
> >
>


Re: Wicket Google Translation Localizer

2010-01-28 Thread John Armstrong
Well, I'd just say 'Buyer beware'. We've had management push to fire
developers for doing this. Our Japanese customers were extremely
sensitive. Germans as well now that I think about it..

John-

On Thu, Jan 28, 2010 at 11:24 AM, Martin Makundi
 wrote:
> I forgot to mention that it would be half as fun as much as it is
> useful ;) Maybe it would be funny for the users too ;)
>
> BTW: Google itself uses its translation engine to provide localized
> UI:s for different languages, and yes, they are funny sometimes.
>
> **
> Martin
>
> 2010/1/28 John Armstrong :
>> A default English locale is probably better then gibberish and
>> automated calls to Google Translate will get you gibberish.
>>
>> 1) Online translation engines are terrible. Just yesterday I used
>> google translate to tell me how to translate the word 'Bond', it told
>> me '007' (true, try it, uppercase B is important). My UI lead is Dutch
>> and she says that, while she appreciates the effort, googles
>> translations are not making a lot of sense.
>>
>> 2) Its near impossible to do variable interpolation in any automated way.
>>
>> We only roll out actually translated languages and getting
>> translations is cheap enough these days. We only automate via Google
>> Translate for initial QA smoke testing and then pass those files to
>> Human Beings who tend to be pretty good at this sort of thing.
>>
>> I recommend GetText if your looking to 'back localize' an app. We just
>> localized a few thousand lines of code using its macro replacement
>> method, ran the bundled perl script and generated 10 localization
>> files in seconds that are ready for translation.
>>
>> There is a lib for that : 
>> http://xnap-commons.sourceforge.net/gettext-commons/
>>
>> J
>>
>> On Thu, Jan 28, 2010 at 10:11 AM, Edward Zarecor
>>  wrote:
>>> I think Martin's idea is that in the absence of a localized properties
>>> file localization via a call to google translate would be attempted.
>>>
>>> I think there are likely to be more problems the benefits with this
>>> design.  To wit, http://tinyurl.com/y8nvx2x.
>>>
>>> Perhaps a shell script to localize your base properties files followed
>>> by manual intervention, correction.
>>>
>>> Ed.
>>>
>>> On Thu, Jan 28, 2010 at 11:28 AM, Victor Dolirio Ferreira Barbosa
>>>  wrote:
 There the default properties file for this purpose. Just make a properties
 file without locale info in this name, like this example:

 +
  |- Application_en_US.properties
  |- Application_pt_BR.properties
  |- Application.properties

 The last file is used if no other is found for the current locale.

 On Thu, Jan 28, 2010 at 2:15 PM, Martin Makundi <
 martin.maku...@koodaripalvelut.com> wrote:

> Hi!
>
> I wonder, has anybody implemented a wicket stringresource localizer
> that if localized property is not found for the selected language, it
> would attempt to translate it using the default language?
>
> **
> Martin
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


 --
 []s,
 Victor Dolirio

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

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



Re: Wicket Google Translation Localizer

2010-01-28 Thread Martin Makundi
I forgot to mention that it would be half as fun as much as it is
useful ;) Maybe it would be funny for the users too ;)

BTW: Google itself uses its translation engine to provide localized
UI:s for different languages, and yes, they are funny sometimes.

**
Martin

2010/1/28 John Armstrong :
> A default English locale is probably better then gibberish and
> automated calls to Google Translate will get you gibberish.
>
> 1) Online translation engines are terrible. Just yesterday I used
> google translate to tell me how to translate the word 'Bond', it told
> me '007' (true, try it, uppercase B is important). My UI lead is Dutch
> and she says that, while she appreciates the effort, googles
> translations are not making a lot of sense.
>
> 2) Its near impossible to do variable interpolation in any automated way.
>
> We only roll out actually translated languages and getting
> translations is cheap enough these days. We only automate via Google
> Translate for initial QA smoke testing and then pass those files to
> Human Beings who tend to be pretty good at this sort of thing.
>
> I recommend GetText if your looking to 'back localize' an app. We just
> localized a few thousand lines of code using its macro replacement
> method, ran the bundled perl script and generated 10 localization
> files in seconds that are ready for translation.
>
> There is a lib for that : http://xnap-commons.sourceforge.net/gettext-commons/
>
> J
>
> On Thu, Jan 28, 2010 at 10:11 AM, Edward Zarecor
>  wrote:
>> I think Martin's idea is that in the absence of a localized properties
>> file localization via a call to google translate would be attempted.
>>
>> I think there are likely to be more problems the benefits with this
>> design.  To wit, http://tinyurl.com/y8nvx2x.
>>
>> Perhaps a shell script to localize your base properties files followed
>> by manual intervention, correction.
>>
>> Ed.
>>
>> On Thu, Jan 28, 2010 at 11:28 AM, Victor Dolirio Ferreira Barbosa
>>  wrote:
>>> There the default properties file for this purpose. Just make a properties
>>> file without locale info in this name, like this example:
>>>
>>> +
>>>  |- Application_en_US.properties
>>>  |- Application_pt_BR.properties
>>>  |- Application.properties
>>>
>>> The last file is used if no other is found for the current locale.
>>>
>>> On Thu, Jan 28, 2010 at 2:15 PM, Martin Makundi <
>>> martin.maku...@koodaripalvelut.com> wrote:
>>>
 Hi!

 I wonder, has anybody implemented a wicket stringresource localizer
 that if localized property is not found for the selected language, it
 would attempt to translate it using the default language?

 **
 Martin

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


>>>
>>>
>>> --
>>> []s,
>>> Victor Dolirio
>>>
>>
>> -
>> 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: Confirmation dialog

2010-01-28 Thread Andrew Lombardi
use an IAjaxCallDecorator

dataContainer.add(new AjaxButton("removeSelectedValues") {

@Override
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new 
AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) {
private static final long serialVersionUID = 1L;

@Override
public CharSequence preDecorateScript(CharSequence script) {
return "if(!confirm('Are you sure you want to delete 
the selected values? \\n\\nNOTE: This localized identifier will be deleted in 
ALL application bundles and there is NO UNDO')) return false;" + script;
}
};
}


On Jan 28, 2010, at 11:00 AM, Josh Kamau wrote:

> Hi Team
> 
> lnkDelete.add(new SimpleAttributeModifier("onClick","return confirm('Are you
> sure you want to Delete?')" ));
> 
>  The above code produces a confirmation message if its a Link and
> doesnt work if its an AjaxFallbackLink. How do i make it work on ajax link
> 
> regards.
> 
> Josh


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.




Re: Confirmation dialog

2010-01-28 Thread Pedro Santos
Similar:
http://old.nabble.com/javascript-confirm---seems-to-work-fine-with-link-markup-but-not-with-button-markup-td27242553.html

On Thu, Jan 28, 2010 at 5:00 PM, Josh Kamau  wrote:

> Hi Team
>
> lnkDelete.add(new SimpleAttributeModifier("onClick","return confirm('Are
> you
> sure you want to Delete?')" ));
>
>  The above code produces a confirmation message if its a Link and
> doesnt work if its an AjaxFallbackLink. How do i make it work on ajax link
>
>  regards.
>
> Josh
>



-- 
Pedro Henrique Oliveira dos Santos


Confirmation dialog

2010-01-28 Thread Josh Kamau
Hi Team

lnkDelete.add(new SimpleAttributeModifier("onClick","return confirm('Are you
sure you want to Delete?')" ));

  The above code produces a confirmation message if its a Link and
doesnt work if its an AjaxFallbackLink. How do i make it work on ajax link

 regards.

Josh


Re: Wicket VoiceXML framework?

2010-01-28 Thread shetc

Hi Nino,

I currently support an IVR system that uses an IBM proprietary technology
rather than standard VXML.
I have been tasked with determining the effort of refactoring our system to
use VXML.
I would love to use Wicket for this purpose. Ideally, there need to be
components that do standard
IVR behaviors like producing dates, times, currencies, etc. I am happy to
take the lead on this
but any support from the Wicket gurus would be very handy.

Steve 
-- 
View this message in context: 
http://old.nabble.com/Wicket-VoiceXML-framework--tp22058044p27358769.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: Wicket Google Translation Localizer

2010-01-28 Thread John Armstrong
A default English locale is probably better then gibberish and
automated calls to Google Translate will get you gibberish.

1) Online translation engines are terrible. Just yesterday I used
google translate to tell me how to translate the word 'Bond', it told
me '007' (true, try it, uppercase B is important). My UI lead is Dutch
and she says that, while she appreciates the effort, googles
translations are not making a lot of sense.

2) Its near impossible to do variable interpolation in any automated way.

We only roll out actually translated languages and getting
translations is cheap enough these days. We only automate via Google
Translate for initial QA smoke testing and then pass those files to
Human Beings who tend to be pretty good at this sort of thing.

I recommend GetText if your looking to 'back localize' an app. We just
localized a few thousand lines of code using its macro replacement
method, ran the bundled perl script and generated 10 localization
files in seconds that are ready for translation.

There is a lib for that : http://xnap-commons.sourceforge.net/gettext-commons/

J

On Thu, Jan 28, 2010 at 10:11 AM, Edward Zarecor
 wrote:
> I think Martin's idea is that in the absence of a localized properties
> file localization via a call to google translate would be attempted.
>
> I think there are likely to be more problems the benefits with this
> design.  To wit, http://tinyurl.com/y8nvx2x.
>
> Perhaps a shell script to localize your base properties files followed
> by manual intervention, correction.
>
> Ed.
>
> On Thu, Jan 28, 2010 at 11:28 AM, Victor Dolirio Ferreira Barbosa
>  wrote:
>> There the default properties file for this purpose. Just make a properties
>> file without locale info in this name, like this example:
>>
>> +
>>  |- Application_en_US.properties
>>  |- Application_pt_BR.properties
>>  |- Application.properties
>>
>> The last file is used if no other is found for the current locale.
>>
>> On Thu, Jan 28, 2010 at 2:15 PM, Martin Makundi <
>> martin.maku...@koodaripalvelut.com> wrote:
>>
>>> Hi!
>>>
>>> I wonder, has anybody implemented a wicket stringresource localizer
>>> that if localized property is not found for the selected language, it
>>> would attempt to translate it using the default language?
>>>
>>> **
>>> Martin
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>> --
>> []s,
>> Victor Dolirio
>>
>
> -
> 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 Google Translation Localizer

2010-01-28 Thread Edward Zarecor
I think Martin's idea is that in the absence of a localized properties
file localization via a call to google translate would be attempted.

I think there are likely to be more problems the benefits with this
design.  To wit, http://tinyurl.com/y8nvx2x.

Perhaps a shell script to localize your base properties files followed
by manual intervention, correction.

Ed.

On Thu, Jan 28, 2010 at 11:28 AM, Victor Dolirio Ferreira Barbosa
 wrote:
> There the default properties file for this purpose. Just make a properties
> file without locale info in this name, like this example:
>
> +
>  |- Application_en_US.properties
>  |- Application_pt_BR.properties
>  |- Application.properties
>
> The last file is used if no other is found for the current locale.
>
> On Thu, Jan 28, 2010 at 2:15 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> Hi!
>>
>> I wonder, has anybody implemented a wicket stringresource localizer
>> that if localized property is not found for the selected language, it
>> would attempt to translate it using the default language?
>>
>> **
>> Martin
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> []s,
> Victor Dolirio
>

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



[wicket] Load Testing Wicket Applications

2010-01-28 Thread James Perry
Today I looked for a programmatic way to load test a Wicket
application and there doesn't appear to be any tools at present to do
so. I was thinking of writing one that load tests Wicket
applications in a programmatic manner, which IMHO will be cleaner than
using regular expressions with JMeter. I was thinking of an API that
specifies the a test suite contain individual load tests, which
contain the amount of threads to create and the target components to
test. I do not have a deep knowledge of the internals of Wicket so it
would be good to receive advice on the best way to program this tool.

Best,
James.

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



Re: Repeating View Horizontally

2010-01-28 Thread Josh Kamau
Thanks. I managed  with a span for horizontal flow and div for vertical
flow. With a nested Repeating view, i am able to generate any my interfaces
dynamically.

Regards.

On Thu, Jan 28, 2010 at 7:06 PM, Riyad Kalla  wrote:

> Josh,
>
> Just what Tor said -- repeaters will just repeat whatever markup you feed
> it
> over and over again doing substitution on each one according to the backing
> components. So just make sure you are repeating an element that flows right
> to left -- a  or  -- probably a  is what you want (or heck,
> even LI's that are styled like a menu to flow left to right would work,
> just
> takes more CSS). Don't use  because they are block level elements and
> won't flow the way (l > r) you want them to.
>
> Best,
> Riyad
>
> On Thu, Jan 28, 2010 at 3:06 AM, Wilhelmsen Tor Iver  >wrote:
>
> > > How do you make repeating view to repeat the items horizontally? The
> > > number
> > > of items is not known at the time of creating the markup.
> >
> > Repeaters do not care about horizontal vs. vertical; it all comes down to
> > the markup.
> >
> > E.g. you can have a ListView which generates a sequence of table cells:
> >
> > Subelement
> > here
> >
> > where you have a new ListView("myList", ...)
> >
> > - Tor Iver
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: Wicket Pattern to reduce session size

2010-01-28 Thread Riyad Kalla
Gaetan,

You can mark whatever instance that is causing the session to be so large as
'transient' to avoid it being serialized -- you'd have to recreate it each
time it was needed though. So if it's in your model:

=
private String chartName;
private String chartArguments; // maybe from a page param or something?
private transient DynamicImageResource chartImage; // won't get serialized
=

-R

On Thu, Jan 28, 2010 at 3:28 AM, Gaetan Zoritchak <
g.zoritc...@virtual-soft.com> wrote:

> Hi all,
>
> I was debugging my sessions size in order to reduce it and I saw that one
> of
> my page spend 20ko because of an dynamic image generated with JFreeChart.
> JFreeChart was serialized with my DynamicImageRessource.
>
> My first optimisation is to make JFreeChart a static field initialized in a
> static bloc.
>
> Is it an valid way of handling that problem?
>
> Gaetan Zoritchak,
>


Re: Wicket Google Translation Localizer

2010-01-28 Thread Victor Dolirio Ferreira Barbosa
There the default properties file for this purpose. Just make a properties
file without locale info in this name, like this example:

+
 |- Application_en_US.properties
 |- Application_pt_BR.properties
 |- Application.properties

The last file is used if no other is found for the current locale.

On Thu, Jan 28, 2010 at 2:15 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Hi!
>
> I wonder, has anybody implemented a wicket stringresource localizer
> that if localized property is not found for the selected language, it
> would attempt to translate it using the default language?
>
> **
> Martin
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
[]s,
Victor Dolirio


Re: Dynamically Generated Wicket UI

2010-01-28 Thread dtoffe

The last release supports Wicket 1.3, but trunk supports 1.4 for a long
time and a new release should happen soon.

Regards,

Daniel


Josh Kamau wrote:
> 
> Hi;
> 
> I have looked at wicketwebbeans and it looks impressive. Does it support
> wicket 1.4.5 ? the currently available download at googlecode is dated
> April
> 2009 .
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Dynamically-Generated-Wicket-UI-tp27351082p27358527.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: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread mbrictson

The API is bit confusing: registerSingleton() on StaticWebApplicationContext
takes a class, but registerSingleton() on ConfigurableListableBeanFactory
takes a bean. That is why I first call getBeanFactory() in my example.

ctx.getBeanFactory().registerSingleton(...)

I use StaticWebApplicationContext for my unit testing, so I am pretty sure
it works. :)

Here is the registerSingleton signature:

http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/beans/factory/config/SingletonBeanRegistry.html#registerSingleton%28java.lang.String,%20java.lang.Object%29




Jochen Mader-2 wrote:
> 
> Sorry for my late answer.
> StaticWebApplicationContext doesn't cut it for  me.
> Your example contains a small mistake:
> Inserting the mock-object won't work as registerSingleton expects to get a
> Class.
> As I want to create mock objects with EasyMock there are two approaches
> (as
> far as I know).
> The one I have shown before, involving the creation of the custom
> ApplicationContextMock or using easy mock inside a testing-spring.xml.
> 
> CU
> 
> Jochen
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Wicket%2C-Spring-3-and-UnitTesting-tp27320784p27358526.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: images not under the context root directory

2010-01-28 Thread Riyad Kalla
Ernesto,

Sorry about that -- I didn't mean to imply your impl was back, that was more
directed at Francois along the lines of "that's a lot of overhead, are you
sure you need to do that?" -- but now that I understand what his use-case is
(saw his last reply about /usr/ext/img/) I get it. I was
thinking they were under /webapp/images.

I'll go back to sitting in my corner ;)

-R

On Wed, Jan 27, 2010 at 9:54 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Sure it is overhead but he wanted to serve images from a folder not
> under application
> context root directory... Then, you have to serve them somehow? The options
> I see are
>
> 1-A dedicated servlet?
> 2-With Wicket... and thats what the code shows... and for sure it can be
> done in a simpler way...
>
> A would try to use 1. As then Wicket would not have to serve the images.
>
> Regards,
>
> Ernesto
>
> On Wed, Jan 27, 2010 at 9:43 PM, Riyad Kalla  wrote:
>
> > This seems like adding a large amount of overhead to an image-heavy site
> > (e.g. image blog or something), I thought I read in Wicket in Action that
> > WicketFilter ignored HTTP requests for non-wicket resources now and
> passed
> > them through to the underlying server to handle avoiding the need to
> remap
> > your wicket URLs to something like /app/* so you could have /images and
> > other resources under root and not have them go through the filter.
> >
> > Is this not the case?
> >
> > On Wed, Jan 27, 2010 at 1:38 PM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Hi Francois,
> > >
> > > Following example works.
> > >
> > > 1-Create this class anywhere you want need.
> > >
> > > package com.antilia.demo.manager.img;
> > >
> > > import java.io.ByteArrayOutputStream;
> > > import java.io.File;
> > > import java.io.FileInputStream;
> > > import java.io.IOException;
> > > import java.io.InputStream;
> > > import java.io.OutputStream;
> > >
> > > import org.apache.wicket.AttributeModifier;
> > > import org.apache.wicket.markup.html.image.Image;
> > > import
> org.apache.wicket.markup.html.image.resource.DynamicImageResource;
> > > import org.apache.wicket.model.Model;
> > > import org.apache.wicket.protocol.http.WebApplication;
> > > import org.apache.wicket.protocol.http.WebRequestCycle;
> > > import org.apache.wicket.util.file.Folder;
> > >
> > > /**
> > >  *
> > >  * @author  Ernesto Reinaldo Barreiro (reier...@gmail.com)
> > >  *
> > >  */
> > > public abstract class MountedImageFactory {
> > >
> > >
> > > static int BUFFER_SIZE = 10*1024;
> > >  /**
> > > * Copies one stream into the other..
> > >  * @param is source Stream
> > >  * @param os destination Stream
> > >  * */
> > > static public void copy(InputStream is, OutputStream os) throws
> > IOException
> > > {
> > > byte[] buf = new byte[BUFFER_SIZE];
> > > while (true) {
> > > int tam = is.read(buf);
> > > if (tam == -1) {
> > > return;
> > > }
> > > os.write(buf, 0, tam);
> > > }
> > > }
> > >  public static  byte[] bytes(InputStream is) throws IOException {
> > > ByteArrayOutputStream out = new ByteArrayOutputStream();
> > > copy(is, out);
> > > return out.toByteArray();
> > > }
> > >  private static ImageFromFolderWebResource dynamicResource;
> > >  private static class ImageFromFolderWebResource extends
> > > DynamicImageResource {
> > >  private static final long serialVersionUID = 1L;
> > >
> > >  private File folder;
> > >  public ImageFromFolderWebResource(File folder, String mountPoint) {
> > > this.folder = folder;
> > > WebApplication.get().getSharedResources().add(mountPoint, this);
> > > WebApplication.get().mountSharedResource(mountPoint,
> > > "org.apache.wicket.Application/"+mountPoint);
> > > }
> > >  @Override
> > > protected byte[] getImageData() {
> > > try {
> > > String name = WebRequestCycle.get().getRequest().getParameter("name");
> > > return bytes(new FileInputStream(new File(getFolder().getAbsolutePath()
> +
> > > System.getProperty("file.separator")+(name;
> > > } catch (Exception e) {
> > > //TODO: do this properly
> > > return null;
> > > }
> > > }
> > >
> > > public File getFolder() {
> > > return folder;
> > > }
> > > }
> > >  /**
> > >  * @return Folder from where images will be retrieved.
> > >  */
> > > protected abstract Folder getFolder();
> > >  /**
> > >  * @return the URL to mount the dynamic WEB resource.e.g.
> > >  */
> > > protected abstract String getMountPoint();
> > >  public Image createImage(String id, final String imageName) {
> > > if(dynamicResource == null)
> > > dynamicResource = new ImageFromFolderWebResource(getFolder(),
> > > getMountPoint());
> > > return new Image(id) {
> > >  private static final long serialVersionUID = 1L;
> > >
> > > @Override
> > > protected void onBeforeRender() {
> > > String path = WebRequestCycle.get().getRequest().getURL();
> > > path = path.substring(0, path.indexOf('/'));
> > > add(new AttributeModifier("src",true, new
> > > Model("/"+path+"/"+getMountPoint()+"?name="+imageName)));
> > > super.on

Re: know the last page user comes from

2010-01-28 Thread Riyad Kalla
Martin,

It looks like you are trying to implement the flow for authorization
manually (User tries to go from PageA to PageB, but they require
authorization, so you temporarily send them to PageC -- if they fail, send
them back to PageA, if they succeed, send them to PageB).

The good news is that Wicket has nice support for denoting pages as
requiring authorization and then automatically walking users through an
auth-page and handling moving them forward or back for you if necessary.

Also you can checkout the wicket signin example:
http://wicketstuff.org/wicket14/signin/;jsessionid=1FF7784E87DBECFF9CF8624411BA0FA8?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignIn


-R

On Thu, Jan 28, 2010 at 3:08 AM, Martin Asenov  wrote:

> Thank you, Thomas, for your time!
>
> Most likely this will help me solve the problem.
>
> Have a nice day!
>
> -Original Message-
> From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch]
> Sent: Thursday, January 28, 2010 11:16 AM
> To: users@wicket.apache.org
> Subject: Re: know the last page user comes from
>
> On 01/28/10 10:01, Martin Asenov wrote:
> > Yes I know about it, but never used it, is it suitable in the case I
> mentioned above? Would you give me some hints on how to implement it?
>
> Sure, here's some code from a small internal app I wrote recently. I got
> most of it from either the wiki or the list archive, but I can't find it
> right now.
>
>
> If a page needs authentication and the user is not signed in, I throw a
> RestartResponseAtInterceptPageException. This IAuthorizationStrategy is
> set in WebApplication.init(), via
> getSecuritySettings().setAuthorizationStrategy(...). Code:
>
>
> public class SimpleAuthorizationStrategy implements IAuthorizationStrategy
> {
>
>public boolean isActionAuthorized(Component arg0, Action arg1)
>{
>return true;
>}
>
>@SuppressWarnings("unchecked")
>public boolean isInstantiationAuthorized(Class componentClass)
>{
>// Does this page need authentication?
>if
> (AuthenticatedBasePage.class.isAssignableFrom(componentClass))
>{
>if (NewtSession.get().isSignedIn())
>return true;
>else
>throw new
> RestartResponseAtInterceptPageException(SignInPage.class);
>}
>return true;
>}
> }
>
> Then in my sign-in page, I can just say
>
> if (NewtSession.get().authenticate(username.value(), password.value()))
> {
> if (!continueToOriginalDestination())
> setResponsePage(getApplication().getHomePage());
> ...
>
> The continueToOriginalDestination() gets the user to where the
> RestartResponseAtInterceptPageException was thrown.
>
> HTH,
> Thomas
>
>
> >
> > -Original Message-
> > From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch]
> > Sent: Thursday, January 28, 2010 10:47 AM
> > To: users@wicket.apache.org
> > Subject: Re: know the last page user comes from
> >
> > On 01/28/10 09:36, Martin Asenov wrote:
> >> Hello, everyone, I was just wondering how could I know what's the page
> the user comes from, when he comes into a new page. In need that in order to
> redirect to previous page in my access denied page.
> >
> > Do you know about Component.continueToOriginalDestination() ?
> >
> > -- Thomas
>
>
> --
> ---
>   Thomas Kapplerthomas.kapp...@isb-sib.ch
>   Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
>   CMU, rue Michel Servet 1
>   1211 Geneve 4
>   Switzerland  http://www.uniprot.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
>
>


Wicket Google Translation Localizer

2010-01-28 Thread Martin Makundi
Hi!

I wonder, has anybody implemented a wicket stringresource localizer
that if localized property is not found for the selected language, it
would attempt to translate it using the default language?

**
Martin

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



Re: Repeating View Horizontally

2010-01-28 Thread Riyad Kalla
Josh,

Just what Tor said -- repeaters will just repeat whatever markup you feed it
over and over again doing substitution on each one according to the backing
components. So just make sure you are repeating an element that flows right
to left -- a  or  -- probably a  is what you want (or heck,
even LI's that are styled like a menu to flow left to right would work, just
takes more CSS). Don't use  because they are block level elements and
won't flow the way (l > r) you want them to.

Best,
Riyad

On Thu, Jan 28, 2010 at 3:06 AM, Wilhelmsen Tor Iver wrote:

> > How do you make repeating view to repeat the items horizontally? The
> > number
> > of items is not known at the time of creating the markup.
>
> Repeaters do not care about horizontal vs. vertical; it all comes down to
> the markup.
>
> E.g. you can have a ListView which generates a sequence of table cells:
>
> Subelement
> here
>
> where you have a new ListView("myList", ...)
>
> - Tor Iver
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


@RequireHttps with reverse proxy

2010-01-28 Thread Boydens Joeri (OZ)
Hi,

 

We have a wicket application running at the following address
http://myserver.domain.be:8082/myapplication.  When I do add the
@RequiredHttps annotation to my pages, wicket does a great job
redirecting my pages to https connection.  I get something like:

https://myserver.domain.be:8443/myapplication/somepage .

 

So far so good, but now I have to serve this application behind a
reverse proxy.  I have apache httpd2 set up with ProxyPass, and I added
a VirtualHost for my application, something like
http://myapplication.domain.be (this way port 8082 isn't visible and
/myapplication context path isn't visible either).

 

This is working perfectly for non https pages, but when I go to a https
pages, I get redirected to the server application address
(https://myserver.domain.be:8843/myapplication).  This is because the
SwitchProtocolRequestTarget is building the redirect url based on the
httpservletrequest.getServerName()...

 

Is it possible to extend/override this behavior ?

 

Regards

Joeri

 

 

 

 



HTML Validator 1.3.1 released

2010-01-28 Thread Martijn Dashorst
Just today I (with the help of Emond Papegaaij) released Wicket Stuff
HTML Validator version 1.3.1

The WicketStuff HTML Validator filter is based upon the work of the
Tuckey developers. The WicketStuff validator only validates XHTML
based on the XHTML DTDs. This package is licensed under the Gnu Public
License.

This release fixes an issue we discovered where a Wicket entity escape
prevented the HTML validator from discovering additional markup
problems. The problem was that a && sequence triggered a fatal parse
exception, stopping all further validation. We fixed this by replacing
all && with && and &wicket:ignoreIfNotActive with
&lwicket:ignoreIfNotActive in the markup that is being checked
(this doesn't affect your rendered markup).

If you have the wicketstuff repository added to your repository
manager, then all you have to do is update your version number of the
wicketstuff validator:


org.wicketstuff
htmlvalidator
1.3.1
test


For more information about its use and to find the source code see:
http://github.com/dashorst/wicket-stuff-markup-validator

-- Happy validating!

Martijn

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



Re: Wicket, Spring 3 and UnitTesting

2010-01-28 Thread Jochen Mader
Sorry for my late answer.
StaticWebApplicationContext doesn't cut it for  me.
Your example contains a small mistake:
Inserting the mock-object won't work as registerSingleton expects to get a
Class.
As I want to create mock objects with EasyMock there are two approaches (as
far as I know).
The one I have shown before, involving the creation of the custom
ApplicationContextMock or using easy mock inside a testing-spring.xml.

CU

Jochen


Re: Wicket Pattern to reduce session size

2010-01-28 Thread Gaetan Zoritchak
In fact, I just put the reference to JFreeChart as static. All the commons
values are initialized in the static bloc (ie, Font, definition on the axis,
...).

I keep the image generation done in the getImageData using the
pageParameters. So every session or even page request can have its own
version on the graph.

2010/1/28 Pedro Santos 

> Then this image will to be the same for all sessions. If you don't want
> that
> object on your session, make sure at getImageData method implementation
> that
> you are always creating your chart object, and  not keeping it in any
> instance variable.
>
>
> On Thu, Jan 28, 2010 at 8:28 AM, Gaetan Zoritchak <
> g.zoritc...@virtual-soft.com> wrote:
>
> > Hi all,
> >
> > I was debugging my sessions size in order to reduce it and I saw that one
> > of
> > my page spend 20ko because of an dynamic image generated with JFreeChart.
> > JFreeChart was serialized with my DynamicImageRessource.
> >
> > My first optimisation is to make JFreeChart a static field initialized in
> a
> > static bloc.
> >
> > Is it an valid way of handling that problem?
> >
> > Gaetan Zoritchak,
> >
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>


Re: Wicket Pattern to reduce session size

2010-01-28 Thread Pedro Santos
Then this image will to be the same for all sessions. If you don't want that
object on your session, make sure at getImageData method implementation that
you are always creating your chart object, and  not keeping it in any
instance variable.


On Thu, Jan 28, 2010 at 8:28 AM, Gaetan Zoritchak <
g.zoritc...@virtual-soft.com> wrote:

> Hi all,
>
> I was debugging my sessions size in order to reduce it and I saw that one
> of
> my page spend 20ko because of an dynamic image generated with JFreeChart.
> JFreeChart was serialized with my DynamicImageRessource.
>
> My first optimisation is to make JFreeChart a static field initialized in a
> static bloc.
>
> Is it an valid way of handling that problem?
>
> Gaetan Zoritchak,
>



-- 
Pedro Henrique Oliveira dos Santos


Re: wicket osgi (not Pax)

2010-01-28 Thread Ernesto Reinaldo Barreiro
I did not know about it being included on the standard...

Thanks for the update.

Ernesto

On Thu, Jan 28, 2010 at 11:18 AM, Jochen Mader wrote:

> Buddy-class loading is real OSGi since 4.1 ;)
> The new MANIFEST.MF entry is named "Bundle- *BuddyPolicy".*
>
> Cheers,
>
> Jochen
>
>
> On Thu, Jan 28, 2010 at 9:55 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
> > Yes I mean buddy class-loading. It might not be real OSGi but it works:-)
> >  as far as you only use equinox.
> >
> > I also do like a lot OSGi. But I know from experience that it might take
> > some time for newbies to get the full grasp of it
> >
> > Cheers,
> >
> > Ernesto
> >
> > On Thu, Jan 28, 2010 at 9:47 AM, David Leangen 
> wrote:
> >
> > >
> > > Hi Ernesto,
> > >
> > > > Antilia simply use equinox extensions for class-loading that way you
> > can
> > > use
> > > > "normal" Wicket components... No need to modify Wicket or your
> > > components.
> > >
> > > Ok, do you mean buddy classloading?
> > >
> > > If so, that's not "real" OSGi. :-)
> > >
> > >
> > > > What I wanted to says is that you not always have to face the
> problems
> > > you
> > > > mentioned: it might depend on how you build your application. But I
> do
> > > agree
> > > > the OSGi road is not for the faint hearted and people should
> carefully
> > > > consider their requirements before jumping into it: moreover if you
> can
> > > > achieve extensibility and modularity with other means.
> > >
> > > Personally, I'm addicted to OSGi. I wish that somebody would come up
> with
> > a
> > > good solution for this that doesn't rely on buddy classloading...
> > >
> > > Anyway, thanks for the discussion.
> > >
> > >
> > > Cheers,
> > > =David
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
>


Re: wicket osgi (not Pax)

2010-01-28 Thread Jochen Mader
I ran into a lot of use-cases for it.
Just take a look at esper and drools. They are packaged as OSGi and need to
be able to work with classes provided by people using them.
But yes, we are getting a little off topic here :D


Re: images not under the context root directory

2010-01-28 Thread François Meillet
Thanks Ernesto, Jonas, Riyad, Don and Thomas.

I implemented all of your solutions.
I ended up with this one :

1) In the application init method I call this method, which add a directory to 
the WebApplicationPath
private void initPath() {

WebApplicationPath resourceFinder = (WebApplicationPath) 
getResourceSettings().getResourceFinder();

 String dir = "/usr/ext/img";  // the images are under this dir

resourceFinder.add( imp );

getResourceSettings().setResourceFinder( resourceFinder );
}


2) in the panel I add
add(new Image("imageid", "/test/test.gif"));

3) the image url is 
resources/xxx.yyy.zzz.TestPage3//test/test.gif


François

Le 28 janv. 2010 à 05:54, Ernesto Reinaldo Barreiro a écrit :

> Sure it is overhead but he wanted to serve images from a folder not
> under application
> context root directory... Then, you have to serve them somehow? The options
> I see are
> 
> 1-A dedicated servlet?
> 2-With Wicket... and thats what the code shows... and for sure it can be
> done in a simpler way...
> 
> A would try to use 1. As then Wicket would not have to serve the images.
> 
> Regards,
> 
> Ernesto
> 
> On Wed, Jan 27, 2010 at 9:43 PM, Riyad Kalla  wrote:
> 
>> This seems like adding a large amount of overhead to an image-heavy site
>> (e.g. image blog or something), I thought I read in Wicket in Action that
>> WicketFilter ignored HTTP requests for non-wicket resources now and passed
>> them through to the underlying server to handle avoiding the need to remap
>> your wicket URLs to something like /app/* so you could have /images and
>> other resources under root and not have them go through the filter.
>> 
>> Is this not the case?
>> 
>> On Wed, Jan 27, 2010 at 1:38 PM, Ernesto Reinaldo Barreiro <
>> reier...@gmail.com> wrote:
>> 
>>> Hi Francois,
>>> 
>>> Following example works.
>>> 
>>> 1-Create this class anywhere you want need.
>>> 
>>> package com.antilia.demo.manager.img;
>>> 
>>> import java.io.ByteArrayOutputStream;
>>> import java.io.File;
>>> import java.io.FileInputStream;
>>> import java.io.IOException;
>>> import java.io.InputStream;
>>> import java.io.OutputStream;
>>> 
>>> import org.apache.wicket.AttributeModifier;
>>> import org.apache.wicket.markup.html.image.Image;
>>> import org.apache.wicket.markup.html.image.resource.DynamicImageResource;
>>> import org.apache.wicket.model.Model;
>>> import org.apache.wicket.protocol.http.WebApplication;
>>> import org.apache.wicket.protocol.http.WebRequestCycle;
>>> import org.apache.wicket.util.file.Folder;
>>> 
>>> /**
>>> *
>>> * @author  Ernesto Reinaldo Barreiro (reier...@gmail.com)
>>> *
>>> */
>>> public abstract class MountedImageFactory {
>>> 
>>> 
>>> static int BUFFER_SIZE = 10*1024;
>>> /**
>>>* Copies one stream into the other..
>>> * @param is source Stream
>>> * @param os destination Stream
>>> * */
>>> static public void copy(InputStream is, OutputStream os) throws
>> IOException
>>> {
>>> byte[] buf = new byte[BUFFER_SIZE];
>>> while (true) {
>>> int tam = is.read(buf);
>>> if (tam == -1) {
>>> return;
>>> }
>>> os.write(buf, 0, tam);
>>> }
>>> }
>>> public static  byte[] bytes(InputStream is) throws IOException {
>>> ByteArrayOutputStream out = new ByteArrayOutputStream();
>>> copy(is, out);
>>> return out.toByteArray();
>>> }
>>> private static ImageFromFolderWebResource dynamicResource;
>>> private static class ImageFromFolderWebResource extends
>>> DynamicImageResource {
>>> private static final long serialVersionUID = 1L;
>>> 
>>> private File folder;
>>> public ImageFromFolderWebResource(File folder, String mountPoint) {
>>> this.folder = folder;
>>> WebApplication.get().getSharedResources().add(mountPoint, this);
>>> WebApplication.get().mountSharedResource(mountPoint,
>>> "org.apache.wicket.Application/"+mountPoint);
>>> }
>>> @Override
>>> protected byte[] getImageData() {
>>> try {
>>> String name = WebRequestCycle.get().getRequest().getParameter("name");
>>> return bytes(new FileInputStream(new File(getFolder().getAbsolutePath() +
>>> System.getProperty("file.separator")+(name;
>>> } catch (Exception e) {
>>> //TODO: do this properly
>>> return null;
>>> }
>>> }
>>> 
>>> public File getFolder() {
>>> return folder;
>>> }
>>> }
>>> /**
>>> * @return Folder from where images will be retrieved.
>>> */
>>> protected abstract Folder getFolder();
>>> /**
>>> * @return the URL to mount the dynamic WEB resource.e.g.
>>> */
>>> protected abstract String getMountPoint();
>>> public Image createImage(String id, final String imageName) {
>>> if(dynamicResource == null)
>>> dynamicResource = new ImageFromFolderWebResource(getFolder(),
>>> getMountPoint());
>>> return new Image(id) {
>>> private static final long serialVersionUID = 1L;
>>> 
>>> @Override
>>> protected void onBeforeRender() {
>>> String path = WebRequestCycle.get().getRequest().getURL();
>>> path = path.substring(0, path.indexOf('/'));
>>> add(new AttributeModifier("src",true

Wicket Pattern to reduce session size

2010-01-28 Thread Gaetan Zoritchak
Hi all,

I was debugging my sessions size in order to reduce it and I saw that one of
my page spend 20ko because of an dynamic image generated with JFreeChart.
JFreeChart was serialized with my DynamicImageRessource.

My first optimisation is to make JFreeChart a static field initialized in a
static bloc.

Is it an valid way of handling that problem?

Gaetan Zoritchak,


Re: wicket osgi (not Pax)

2010-01-28 Thread David Leangen

> Buddy-class loading is real OSGi since 4.1 ;)
> The new MANIFEST.MF entry is named "Bundle- *BuddyPolicy".*

Ok, thanks for letting me know. I haven't looked at 4.1 at all.

I'll have to look into the buddy thing. I'm wondering if it was some kind of 
compromise for the Equinox people, or if there was some other real use-case.

In any case, this is getting REALLY off topic... ;-)


Cheers,
=David



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



Re: wicket osgi (not Pax)

2010-01-28 Thread Jochen Mader
Buddy-class loading is real OSGi since 4.1 ;)
The new MANIFEST.MF entry is named "Bundle- *BuddyPolicy".*

Cheers,

Jochen


On Thu, Jan 28, 2010 at 9:55 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Yes I mean buddy class-loading. It might not be real OSGi but it works:-)
>  as far as you only use equinox.
>
> I also do like a lot OSGi. But I know from experience that it might take
> some time for newbies to get the full grasp of it
>
> Cheers,
>
> Ernesto
>
> On Thu, Jan 28, 2010 at 9:47 AM, David Leangen  wrote:
>
> >
> > Hi Ernesto,
> >
> > > Antilia simply use equinox extensions for class-loading that way you
> can
> > use
> > > "normal" Wicket components... No need to modify Wicket or your
> > components.
> >
> > Ok, do you mean buddy classloading?
> >
> > If so, that's not "real" OSGi. :-)
> >
> >
> > > What I wanted to says is that you not always have to face the problems
> > you
> > > mentioned: it might depend on how you build your application. But I do
> > agree
> > > the OSGi road is not for the faint hearted and people should carefully
> > > consider their requirements before jumping into it: moreover if you can
> > > achieve extensibility and modularity with other means.
> >
> > Personally, I'm addicted to OSGi. I wish that somebody would come up with
> a
> > good solution for this that doesn't rely on buddy classloading...
> >
> > Anyway, thanks for the discussion.
> >
> >
> > Cheers,
> > =David
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


RE: know the last page user comes from

2010-01-28 Thread Martin Asenov
Thank you, Thomas, for your time!

Most likely this will help me solve the problem.

Have a nice day!

-Original Message-
From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch] 
Sent: Thursday, January 28, 2010 11:16 AM
To: users@wicket.apache.org
Subject: Re: know the last page user comes from

On 01/28/10 10:01, Martin Asenov wrote:
> Yes I know about it, but never used it, is it suitable in the case I 
> mentioned above? Would you give me some hints on how to implement it?

Sure, here's some code from a small internal app I wrote recently. I got 
most of it from either the wiki or the list archive, but I can't find it 
right now.


If a page needs authentication and the user is not signed in, I throw a 
RestartResponseAtInterceptPageException. This IAuthorizationStrategy is 
set in WebApplication.init(), via 
getSecuritySettings().setAuthorizationStrategy(...). Code:


public class SimpleAuthorizationStrategy implements IAuthorizationStrategy
{

public boolean isActionAuthorized(Component arg0, Action arg1)
{
return true;
}

@SuppressWarnings("unchecked")
public boolean isInstantiationAuthorized(Class componentClass)
{
// Does this page need authentication?
if 
(AuthenticatedBasePage.class.isAssignableFrom(componentClass))
{
if (NewtSession.get().isSignedIn())
return true;
else
throw new 
RestartResponseAtInterceptPageException(SignInPage.class);
}
return true;
}
}

Then in my sign-in page, I can just say

if (NewtSession.get().authenticate(username.value(), password.value()))
{
 if (!continueToOriginalDestination())
 setResponsePage(getApplication().getHomePage());
...

The continueToOriginalDestination() gets the user to where the 
RestartResponseAtInterceptPageException was thrown.

HTH,
Thomas


>
> -Original Message-
> From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch]
> Sent: Thursday, January 28, 2010 10:47 AM
> To: users@wicket.apache.org
> Subject: Re: know the last page user comes from
>
> On 01/28/10 09:36, Martin Asenov wrote:
>> Hello, everyone, I was just wondering how could I know what's the page the 
>> user comes from, when he comes into a new page. In need that in order to 
>> redirect to previous page in my access denied page.
>
> Do you know about Component.continueToOriginalDestination() ?
>
> -- Thomas


-- 
---
   Thomas Kapplerthomas.kapp...@isb-sib.ch
   Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
   CMU, rue Michel Servet 1
   1211 Geneve 4
   Switzerland  http://www.uniprot.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



SV: Repeating View Horizontally

2010-01-28 Thread Wilhelmsen Tor Iver
> How do you make repeating view to repeat the items horizontally? The
> number
> of items is not known at the time of creating the markup.

Repeaters do not care about horizontal vs. vertical; it all comes down to the 
markup.

E.g. you can have a ListView which generates a sequence of table cells:

Subelement 
here

where you have a new ListView("myList", ...)

- Tor Iver

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



Repeating View Horizontally

2010-01-28 Thread Josh Kamau
Hi;

How do you make repeating view to repeat the items horizontally? The number
of items is not known at the time of creating the markup.


Am a bit new to wicket

Regards

Josh


Catching arrays in page parameters

2010-01-28 Thread Stéphane Jeanjean

Hi,

Do you know how to catch this kind of URL parameters ?
linksOrder?listItem[]=1&listItem[]=2&listItem[]=3

When I try :
   String[] linkIds = parameters.getStringArray("listItem");
No value in my array

When I try :
   String[] linkIds = parameters.getStringArray("listItem[]");
Only the first value is available :(

For your information, this kind of URL is used by JQuery (sortable 
serialization)


Thanks,

Stéphane



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



Re: know the last page user comes from

2010-01-28 Thread Thomas Kappler

On 01/28/10 10:01, Martin Asenov wrote:

Yes I know about it, but never used it, is it suitable in the case I mentioned 
above? Would you give me some hints on how to implement it?


Sure, here's some code from a small internal app I wrote recently. I got 
most of it from either the wiki or the list archive, but I can't find it 
right now.



If a page needs authentication and the user is not signed in, I throw a 
RestartResponseAtInterceptPageException. This IAuthorizationStrategy is 
set in WebApplication.init(), via 
getSecuritySettings().setAuthorizationStrategy(...). Code:



public class SimpleAuthorizationStrategy implements IAuthorizationStrategy
{

public boolean isActionAuthorized(Component arg0, Action arg1)
{
return true;
}

@SuppressWarnings("unchecked")
public boolean isInstantiationAuthorized(Class componentClass)
{
// Does this page need authentication?
if 
(AuthenticatedBasePage.class.isAssignableFrom(componentClass))
{
if (NewtSession.get().isSignedIn())
return true;
else
throw new 
RestartResponseAtInterceptPageException(SignInPage.class);
}
return true;
}
}

Then in my sign-in page, I can just say

if (NewtSession.get().authenticate(username.value(), password.value()))
{
if (!continueToOriginalDestination())
setResponsePage(getApplication().getHomePage());
...

The continueToOriginalDestination() gets the user to where the 
RestartResponseAtInterceptPageException was thrown.


HTH,
Thomas




-Original Message-
From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch]
Sent: Thursday, January 28, 2010 10:47 AM
To: users@wicket.apache.org
Subject: Re: know the last page user comes from

On 01/28/10 09:36, Martin Asenov wrote:

Hello, everyone, I was just wondering how could I know what's the page the user 
comes from, when he comes into a new page. In need that in order to redirect to 
previous page in my access denied page.


Do you know about Component.continueToOriginalDestination() ?

-- Thomas



--
---
  Thomas Kapplerthomas.kapp...@isb-sib.ch
  Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
  CMU, rue Michel Servet 1
  1211 Geneve 4
  Switzerland  http://www.uniprot.org
---

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



Re: wicket osgi (not Pax)

2010-01-28 Thread Ernesto Reinaldo Barreiro
Yes I mean buddy class-loading. It might not be real OSGi but it works:-)
 as far as you only use equinox.

I also do like a lot OSGi. But I know from experience that it might take
some time for newbies to get the full grasp of it

Cheers,

Ernesto

On Thu, Jan 28, 2010 at 9:47 AM, David Leangen  wrote:

>
> Hi Ernesto,
>
> > Antilia simply use equinox extensions for class-loading that way you can
> use
> > "normal" Wicket components... No need to modify Wicket or your
> components.
>
> Ok, do you mean buddy classloading?
>
> If so, that's not "real" OSGi. :-)
>
>
> > What I wanted to says is that you not always have to face the problems
> you
> > mentioned: it might depend on how you build your application. But I do
> agree
> > the OSGi road is not for the faint hearted and people should carefully
> > consider their requirements before jumping into it: moreover if you can
> > achieve extensibility and modularity with other means.
>
> Personally, I'm addicted to OSGi. I wish that somebody would come up with a
> good solution for this that doesn't rely on buddy classloading...
>
> Anyway, thanks for the discussion.
>
>
> Cheers,
> =David
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


RE: know the last page user comes from

2010-01-28 Thread Martin Asenov
Yes I know about it, but never used it, is it suitable in the case I mentioned 
above? Would you give me some hints on how to implement it?

Thanks Thomas!

BR, 
Martin

-Original Message-
From: Thomas Kappler [mailto:thomas.kapp...@isb-sib.ch] 
Sent: Thursday, January 28, 2010 10:47 AM
To: users@wicket.apache.org
Subject: Re: know the last page user comes from

On 01/28/10 09:36, Martin Asenov wrote:
> Hello, everyone, I was just wondering how could I know what's the page the 
> user comes from, when he comes into a new page. In need that in order to 
> redirect to previous page in my access denied page.

Do you know about Component.continueToOriginalDestination() ?

-- Thomas
-- 
---
   Thomas Kapplerthomas.kapp...@isb-sib.ch
   Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
   CMU, rue Michel Servet 1
   1211 Geneve 4
   Switzerland  http://www.uniprot.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 osgi (not Pax)

2010-01-28 Thread David Leangen

Hi Ernesto,

> Antilia simply use equinox extensions for class-loading that way you can use
> "normal" Wicket components... No need to modify Wicket or your components.

Ok, do you mean buddy classloading?

If so, that's not "real" OSGi. :-)


> What I wanted to says is that you not always have to face the problems you
> mentioned: it might depend on how you build your application. But I do agree
> the OSGi road is not for the faint hearted and people should carefully
> consider their requirements before jumping into it: moreover if you can
> achieve extensibility and modularity with other means.

Personally, I'm addicted to OSGi. I wish that somebody would come up with a 
good solution for this that doesn't rely on buddy classloading...

Anyway, thanks for the discussion.


Cheers,
=David



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



Re: know the last page user comes from

2010-01-28 Thread Thomas Kappler

On 01/28/10 09:36, Martin Asenov wrote:

Hello, everyone, I was just wondering how could I know what's the page the user 
comes from, when he comes into a new page. In need that in order to redirect to 
previous page in my access denied page.


Do you know about Component.continueToOriginalDestination() ?

-- Thomas
--
---
  Thomas Kapplerthomas.kapp...@isb-sib.ch
  Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
  CMU, rue Michel Servet 1
  1211 Geneve 4
  Switzerland  http://www.uniprot.org
---

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



RE: know the last page user comes from

2010-01-28 Thread Martin Asenov
Hi, Andrew!

I was saying that if I set up access denied page that way:

getApplicationSettings().setAccessDeniedPage(MyAccessDeniedPage.class);

there is no possibility to pass prev page in the constructor.

Regards,
Martin

-Original Message-
From: Andrew Lombardi [mailto:and...@mysticcoders.com] 
Sent: Thursday, January 28, 2010 10:39 AM
To: users@wicket.apache.org
Subject: Re: know the last page user comes from

Pass the previous Page in the constructor.

On Jan 28, 2010, at 12:36 AM, Martin Asenov wrote:

> Hello, everyone, I was just wondering how could I know what's the page the 
> user comes from, when he comes into a new page. In need that in order to 
> redirect to previous page in my access denied page.
> 
> Thank you !
> 
> Best regards,
> Martin
> 


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.



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



Re: Nasty problem with "component not found" and images [solved]

2010-01-28 Thread Marat Radchenko
You could file enhancement request to make
EmptySrcAttributeCheckFilter also report images whose src starts with
#.

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



Re: know the last page user comes from

2010-01-28 Thread Andrew Lombardi
Pass the previous Page in the constructor.

On Jan 28, 2010, at 12:36 AM, Martin Asenov wrote:

> Hello, everyone, I was just wondering how could I know what's the page the 
> user comes from, when he comes into a new page. In need that in order to 
> redirect to previous page in my access denied page.
> 
> Thank you !
> 
> Best regards,
> Martin
> 


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | and...@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.


This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.




Re: wicket osgi (not Pax)

2010-01-28 Thread Ernesto Reinaldo Barreiro
Hi David,

Antilia simply use equinox extensions for class-loading that way you can use
"normal" Wicket components... No need to modify Wicket or your components.
There I just create the extensions points I need to allow extending
components at some places (e.g. toolbars). The projects I mentioned are not
a framework: just the skeleton showing how to encapsulate Wicket into a
bundle and how to create an application depending on that bundle.

What I wanted to says is that you not always have to face the problems you
mentioned: it might depend on how you build your application. But I do agree
the OSGi road is not for the faint hearted and people should carefully
consider their requirements before jumping into it: moreover if you can
achieve extensibility and modularity with other means.

Best regards,

Ernesto

On Thu, Jan 28, 2010 at 8:06 AM, David Leangen  wrote:

>
>
> > I have seen OSGi successfully used with Wicket on production
> environments...
> > With no problems with the serialization  issues you mentioned.
>
> Yes, I am using pax-wicket for this.
>
> What I meant was--as I understood from the original post--the person wanted
> to use wicket in OSGi without using a framework. If that is the case, it is
> a huge headache.
>
>
> How does Antilla solve the problem? Do they have an elegant solution?
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


know the last page user comes from

2010-01-28 Thread Martin Asenov
Hello, everyone, I was just wondering how could I know what's the page the user 
comes from, when he comes into a new page. In need that in order to redirect to 
previous page in my access denied page.

Thank you !

Best regards,
Martin



Re: Nasty problem with "component not found" and images [solved]

2010-01-28 Thread Thomas Kappler

On 01/27/10 21:51, Steve Swinsburg wrote:

Thomas,

Thanks for this. I may also have run into the multiple page load you
say this might cause. Can you confirm if this is the case for any

I can confirm it happens for any , with Firefox 3.5.

An  without source is not valid HTML, so I'd try to avoid it. I 
didn't try what happens in that case. I worked around the problem by 
extracting the  into a separate Panel. I add() this panel whenever 
I have an image to display, and a dummy WebMarkupContainer when I don't.


-- Thomas



On 28/01/2010, at 2:54 AM, Riyad Kalla wrote:


Thomas, as someone who frequently likes trying "really dumb things"
-- I appreciate you giving a heads up on this issue. I was likely
going to run into this at some point anyway ;)

On Wed, Jan 27, 2010 at 3:46 AM, Thomas Kappler
wrote:


Earlier this month, there was a thread [1] about the "component
not found" problem. I can't reply as I wasn't subscribed yet.

[1]
http://old.nabble.com/component-xxx:yyy:zzz-not-found-on-page-td27080437.html




I had the same problem recently, and after banging my head against the wall

for a while, I figured it out.

I had a RepeatingView on the page that consisted of markup
containers that had some text, and some had an external image
(hosted outside the wicket app), while others did not. I tought
I'd keep it simple and wrote  in the markup. In
the Java code, I'd check each item whether it had a URL to an
image, and if so, would insert that into the src attribute with
an AttributeModifier. For the other items it just stayed at the
"#" value.

Now "#" means "the current page", so for each page load, the
browser would actually load the page several times, once for each
empty. When using ajax, this completely breaks things, of
course (besides making the page really slow).

Note that an empty value of src="" can also cause this at least
with older versions of Firefox.

Making it so that the  markup is only inserted for actual
images solved it.

Maybe that was really dumb, but I thought I'd share it for the
mailing list archive.

-- Thomas

--
---



Thomas Kapplerthomas.kapp...@isb-sib.ch

Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
CMU, rue Michel Servet 1 1211 Geneve 4 Switzerland
http://www.uniprot.org
---




-

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







--
---
  Thomas Kapplerthomas.kapp...@isb-sib.ch
  Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
  CMU, rue Michel Servet 1
  1211 Geneve 4
  Switzerland  http://www.uniprot.org
---

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



Re: Dynamically Generated Wicket UI

2010-01-28 Thread Ernesto Reinaldo Barreiro
I really don´t know: I do not use that project myself. Maybe the developers
can ask that question.

Best,

Ernesto

On Thu, Jan 28, 2010 at 8:36 AM, Josh Kamau  wrote:

> Hi;
>
> I have looked at wicketwebbeans and it looks impressive. Does it support
> wicket 1.4.5 ? the currently available download at googlecode is dated
> April
> 2009 .
>
> On Thu, Jan 28, 2010 at 9:32 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
> > There are several projects out there that use those techniques to
> > dynamically build UIs. Here
> >
> >
> >
> http://code.google.com/p/antilia/source/browse/#svn/trunk/com.antilia.web/src/com/antilia/web/crud
> >
> > <
> >
> http://code.google.com/p/antilia/source/browse/#svn/trunk/com.antilia.web/src/com/antilia/web/crud
> > >I
> > just built a CRUD component that generates everything out of an Entity.
> > There is also
> >
> > http://wicketwebbeans.sourceforge.net/
> >
> > and somewhere on wicket-stuff a
> > similar project.
> >
> > Best,
> >
> > Ernesto
> >
> > On Thu, Jan 28, 2010 at 7:03 AM, Josh Kamau 
> wrote:
> >
> > > Ernesto
> > >
> > > two dimensional repeaters? Let me check that out. never thought of it.
> > > sounds like a good idea.
> > >
> > > Josh
> > >
> > > On Thu, Jan 28, 2010 at 8:56 AM, Ernesto Reinaldo Barreiro <
> > > reier...@gmail.com> wrote:
> > >
> > > > Hi Josh,
> > > >
> > > >
> > > > > How do i layout components dynamically in panel? i.e, there is not
> > > markup
> > > > > like a table to determine the position?
> > > > >
> > > > > Using repeaters?
> > > >
> > > >
> > > > > if i write myPanel.add(field1)  and myPanel.add(field2) and i want
> > the
> > > > > fields to be laid out a) side by side b) one below the other, how
> do
> > i
> > > do
> > > > > it
> > > > > ?
> > > > >
> > > > >
> > > > Using a two dimensional repeater?
> > > >
> > > > Best,
> > > >
> > > > Ernesto
> > > >
> > >
> >
>