Re: Set width of auto complete text field?

2009-01-21 Thread Daniel Peters
Jeremy Thomerson wrote:
> Any one?
> 
> Thank you,
> 
You can use the CSS keyword "!important" to override the wicket definition.

Here is what I use in my app to format the autocomplete-fields:

div.wicket-aa-container {width:auto !important;}
div.wicket-aa {background-color: white;border:1px solid #ccc;padding: 
1px;margin-top:1px;text-align:left;}
div.wicket-aa ul {list-style:none; padding:0; margin:0;}
div.wicket-aa ul li {padding:1px 5px 1px 5px;}
div.wicket-aa ul li.selected {background-color:#ff6600}


-Daniel

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



WicketRuntimeException

2009-01-19 Thread Daniel Ferreira Castro
   at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:175)
   at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:263)
   at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:584)
   at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
447)
   at java.lang.Thread.run(Thread.java:619)

==
Application
==
/**
 *
 */
package com.jasp.ecommfwk;

import org.apache.wicket.Application;
import org.apache.wicket.Page;
import org.apache.wicket.Request;
import org.apache.wicket.Response;
import org.apache.wicket.Session;
import org.apache.wicket.guice.GuiceComponentInjector;
import org.apache.wicket.protocol.http.WebApplication;

import com.jasp.ecommfwk.auth.WiaAuthorizationStrategy;
import com.jasp.ecommfwk.categoria.PageCategoria;
import com.jasp.ecommfwk.login.PageLogin;
import com.jasp.ecommfwk.session.ECommBackOfficeSession;

/**
 * @author Daniel
 *
 */
public class eCommBackOffice extends WebApplication {

   /**
*
*/
   public eCommBackOffice() {
   // TODO Auto-generated constructor stub
   }
   @Override
   protected void init() {
   super.init();
   //IOC do Guice para Páginas e Componentes
   addComponentInstantiationListener(new
GuiceComponentInjector(this));
   getSecuritySettings().setAuthorizationStrategy(new
WiaAuthorizationStrategy());
   mountBookmarkablePage("login", PageLogin.class);
   }
   /*
* (non-Javadoc)
*
* @see org.apache.wicket.Application#getHomePage()
*/
   @Override
   public Class getHomePage() {
   // TODO Auto-generated method stub
   return PageCategoria.class;
   }
   @Override
   public Session newSession(Request request, Response response) {
   return new ECommBackOfficeSession(request);
   }
   //Covariance
   public static eCommBackOffice get() {
   return (eCommBackOffice) Application.get();
   }
}
==
Application XML
==

http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://
www.w3.org/TR/xmlschema-1/"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
   version="2.4">
   eCommBackOffice
   
   WicketFilter

 org.apache.wicket.protocol.http.WicketFilter
   
   applicationClassName

 com.jasp.ecommfwk.eCommBackOffice
   
   
   
   WicketFilter
   /app/*
   

==
Class Page
==
import java.util.Arrays;
import java.util.List;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.StringResourceModel;

import com.jasp.ecommfwk.util.DropDownOption;
import com.jasp.persistence.util.HibernateUtil;

public class PageCategoria extends WebPage {

   public PageCategoria() {
   super();

   //RESOURCES TO BE LOADED FIRST
   StringResourceModel labelCategoria = new StringResourceModel
("categoria.label", this, null, new Object[] { getLocale() });
   StringResourceModel labelPai = new StringResourceModel
("categoria.labelPai", this, null, new Object[] { getLocale() });
   List categorias = Arrays.asList
(CategoriaDecoratorOption.getKeyValuePairs
(HibernateUtil.getSessionFactory().openSession()));
   //END OF RESOURCE LOADING

   Form categoriaForm = new Form("categoriaForm"){

   @Override
   protecte

Re: Wicket error in GlassFish

2008-12-16 Thread Daniel
Changed follow your advice, but the error is the same. It may not the code's
problem but some special configuration of the Web Container.
Error Page from browser:

*type* Exception report

*message*

*description*The server encountered an internal error () that prevented it
from fulfilling this request.

*exception*

javax.servlet.ServletException: PWC1391: Servlet.init() for servlet
HelloWorldApplication threw exception

*root cause*

org.apache.wicket.WicketRuntimeException: Unable to create application
of class com.example.helloworld.HelloWorldApplication

*root cause*

java.lang.ClassNotFoundException: com.example.helloworld.HelloWorldApplication

*note* *The full stack traces of the exception and its root causes are
available in the GlassFish/v3 logs.*

2008/12/16 Ajayi Yinka 

> From the error log, it seems glass fish could not load the webApplication
> class.
>
> Make sure your webApplication class is in the correct class path
> (com.example.helloworld.HelloWorldApplication)
>
> And the webApplcation class is in the correct format.
>
> or
>
> and may change your web.xml file to be in this format:
>
> 
>HelloWorldApplication
>
> org.apache.wicket.protocol.http.WicketFilter
> 
>applicationClassName
>
> com.example.helloworld.HelloWorldApplication
>
>     
>debug
>2
>
>
> 2008/12/16 Daniel 
>
> > Hi,
> > I'm an newbie in Wicket. When I create my first hello world wicket
> program,
> > strange error encounted.
> >
> > The hello world program is just to show 'Hello World' through Label.
> >
> > The web.xml is as below,
> >
> >  
> >   HelloWorldApplication
> >
> >
> >
> org.apache.wicket.protocol.http.WicketServlet
> >   
> >   applicationClassName
> >   com.example.helloworld.HelloWorldApplication
> >   
> >  
> >  
> >   HelloWorldApplication
> >   /helloWorld/*
> >  
> >
> > In Tomcat env, when I call the URL :
> > http://localhost:8080/WicketExamples/helloWorld/.
> > <http://localhost:8080/WicketExamples/helloWorld/>Everything
> > goes well.
> > When I use the URL: http://localhost:8080/WicketExamples/, show 404
> error.
> >
> > But the same program runs in GlassFish env. when I call the same URL,
> error
> > comes as below
> >
> > 2008-12-16 17:32:00 org.apache.catalina.core.ApplicationContext log
> > 严重: WebModule[/WicketExamples]StandardWrapper.Throwable
> > org.apache.wicket.WicketRuntimeException: Unable to create application of
> > class com.example.helloworld.HelloWorldApplication
> > at
> >
> >
> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:82)
> > at
> >
> >
> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:49)
> > at
> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:666)
> > at
> >
> org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:209)
> > at javax.servlet.GenericServlet.init(GenericServlet.java:270)
> > at
> >
> >
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1198)
> > at
> >
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:863)
> > at
> >
> >
> org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:369)
> > at
> >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
> > at
> >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
> > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
> > at
> >
> >
> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
> > at
> >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
> > at org.apache.catalina.core.ContainerBase.invo

Re: Wicket error in GlassFish

2008-12-16 Thread Daniel
The welcome file list tag has been remove yet. But the result is the same.

2008/12/16 Ajayi Yinka 

> I think you are having something in your web.xml file like
>  
>index.jsp
>
> if you have it, you may remove it.
>
>
>
>
>
> 2008/12/16 Daniel 
>
> > Hi,
> > I'm an newbie in Wicket. When I create my first hello world wicket
> program,
> > strange error encounted.
> >
> > The hello world program is just to show 'Hello World' through Label.
> >
> > The web.xml is as below,
> >
> >  
> >   HelloWorldApplication
> >
> >
> >
> org.apache.wicket.protocol.http.WicketServlet
> >   
> >   applicationClassName
> >   com.example.helloworld.HelloWorldApplication
> >   
> >  
> >  
> >   HelloWorldApplication
> >   /helloWorld/*
> >  
> >
> > In Tomcat env, when I call the URL :
> > http://localhost:8080/WicketExamples/helloWorld/.
> > <http://localhost:8080/WicketExamples/helloWorld/>Everything
> > goes well.
> > When I use the URL: http://localhost:8080/WicketExamples/, show 404
> error.
> >
> > But the same program runs in GlassFish env. when I call the same URL,
> error
> > comes as below
> >
> > 2008-12-16 17:32:00 org.apache.catalina.core.ApplicationContext log
> > 严重: WebModule[/WicketExamples]StandardWrapper.Throwable
> > org.apache.wicket.WicketRuntimeException: Unable to create application of
> > class com.example.helloworld.HelloWorldApplication
> > at
> >
> >
> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:82)
> > at
> >
> >
> org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:49)
> > at
> org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:666)
> > at
> >
> org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:209)
> > at javax.servlet.GenericServlet.init(GenericServlet.java:270)
> > at
> >
> >
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1198)
> > at
> >
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:863)
> > at
> >
> >
> org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:369)
> > at
> >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
> > at
> >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
> > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
> > at
> >
> >
> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
> > at
> >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
> > at
> >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
> > at
> >
> >
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
> > at
> >
> >
> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
> > at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
> > at
> >
> >
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
> > at
> >
> >
> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
> > at
> >
> >
> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570

Wicket error in GlassFish

2008-12-16 Thread Daniel
ory.createApplication(ContextParamWebApplicationFactory.java:82)
at
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:49)
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:666)
at
org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:209)
at javax.servlet.GenericServlet.init(GenericServlet.java:270)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1198)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:863)
at
org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:369)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at
com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at
com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at
com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at
com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at
com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
Caused by: java.lang.ClassNotFoundException:
com.example.helloworld.HelloWorldApplication
at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
at
org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:68)
... 38 more

When I use the URL http://localhost:8080/WicketExamples/, the result is
correct.

My env is
JDK 1.5.0_16
Wicket 1.4rc1
Tomcat 6.0
GlassFish v3

Can anybody help me?

Thank you in advance.
-- 
Best regards,
Daniel


Re: Newbie question

2008-12-09 Thread Mark Daniel
By original source, I meant I just tried it on the book source code
download.

On Wed, Dec 10, 2008 at 1:20 AM, Mark Daniel <[EMAIL PROTECTED]> wrote:

> Hi Igor,
>
> I just changed one line the original source (in my original post), and
> built a war and deployed on tomcat, and got the behavior I mentioning. I
> think they both point to the same list.
>
>
> On Wed, Dec 10, 2008 at 1:12 AM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
>
>> you gave listview a list instance, but its probably not the same
>> instance of list you are adding items to. that is why the original
>> code uses a model to give listview the list. read the models
>> chapter...
>>
>> -igor
>>
>> On Tue, Dec 9, 2008 at 12:23 PM, Mark Daniel <[EMAIL PROTECTED]> wrote:
>> > Hello all,
>> >
>> > I'm following the wicket in action book. I'm trying the cheese store in
>> > chapter 3. I was following along the code by reading a bit and coding a
>> bit
>> > on my own. The code defining the ListView for the cheese cart is
>> originally:
>> >
>> > add(new ListView("cart", new PropertyModel(this, "cart.cheeses")) { ...
>> }
>> >
>> > The way I ended up coding it was:
>> >
>> > add(new ListView("cart", getCart().getCheeses())) { ... }
>> >
>> > Which seems to be working fine, but If I click repeatedly fast on the
>> 'add
>> > to cart' link, the ArrayList in session gets its size changed correctly
>> when
>> > adding elements, but the ListView element size doesnt change
>> accordingly.
>> > Basically, the list size keeps growing on each click,  but the number of
>> > items in the ListView doesnt grow anymore.
>> >
>> > Any ideas whats wrong?
>> >
>> > Thanks.
>> >
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


Re: Newbie question

2008-12-09 Thread Mark Daniel
Hi Igor,

I just changed one line the original source (in my original post), and built
a war and deployed on tomcat, and got the behavior I mentioning. I think
they both point to the same list.

On Wed, Dec 10, 2008 at 1:12 AM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:

> you gave listview a list instance, but its probably not the same
> instance of list you are adding items to. that is why the original
> code uses a model to give listview the list. read the models
> chapter...
>
> -igor
>
> On Tue, Dec 9, 2008 at 12:23 PM, Mark Daniel <[EMAIL PROTECTED]> wrote:
> > Hello all,
> >
> > I'm following the wicket in action book. I'm trying the cheese store in
> > chapter 3. I was following along the code by reading a bit and coding a
> bit
> > on my own. The code defining the ListView for the cheese cart is
> originally:
> >
> > add(new ListView("cart", new PropertyModel(this, "cart.cheeses")) { ... }
> >
> > The way I ended up coding it was:
> >
> > add(new ListView("cart", getCart().getCheeses())) { ... }
> >
> > Which seems to be working fine, but If I click repeatedly fast on the
> 'add
> > to cart' link, the ArrayList in session gets its size changed correctly
> when
> > adding elements, but the ListView element size doesnt change accordingly.
> > Basically, the list size keeps growing on each click,  but the number of
> > items in the ListView doesnt grow anymore.
> >
> > Any ideas whats wrong?
> >
> > Thanks.
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Newbie question

2008-12-09 Thread Mark Daniel
Hi,

Basically,  getCart().getCheeses().size() != cartListView.size()


On Wed, Dec 10, 2008 at 12:31 AM, Bruno Cesar Borges <
[EMAIL PROTECTED]> wrote:

> I think you are talking about the 'viewSize' property of ListView.
>
> This indicates how many "viewable" items will be displayed within a
> ListView.
>
>
>
> -Original Message-
> From: Mark Daniel [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2008 6:23 PM
> To: users@wicket.apache.org
> Subject: Newbie question
>
>
> Hello all,
>
> I'm following the wicket in action book. I'm trying the cheese store in
> chapter 3. I was following along the code by reading a bit and coding a bit
> on my own. The code defining the ListView for the cheese cart is
> originally:
>
> add(new ListView("cart", new PropertyModel(this, "cart.cheeses")) { ... }
>
> The way I ended up coding it was:
>
> add(new ListView("cart", getCart().getCheeses())) { ... }
>
> Which seems to be working fine, but If I click repeatedly fast on the 'add
> to cart' link, the ArrayList in session gets its size changed correctly
> when
> adding elements, but the ListView element size doesnt change accordingly.
> Basically, the list size keeps growing on each click,  but the number of
> items in the ListView doesnt grow anymore.
>
> Any ideas whats wrong?
>
> Thanks.
>
> ***
> "Atenção: Esta mensagem foi enviada para uso exclusivo do(s)
> destinatários(s) acima identificado(s),
> podendo conter informações e/ou documentos confidencias/privilegiados e seu
> sigilo é protegido por
> lei. Caso você tenha recebido por engano, por favor, informe o remetente e
> apague-a de seu sistema.
> Notificamos que é proibido por lei a sua retenção, disseminação,
> distribuição, cópia ou uso sem
> expressa autorização do remetente. Opiniões pessoais do remetente não
> refletem, necessariamente,
> o ponto de vista da CETIP, o qual é divulgado somente por pessoas
> autorizadas."
>
>
> "Warning: This message was sent for exclusive use of the addressees above
> identified, possibly
> containing information and or privileged/confidential documents whose
> content is protected by law.
> In case you have mistakenly received it, please notify the sender and
> delete it from your system.
> Be noticed that the law forbids the retention, dissemination, distribution,
> copy or use without
> express authorization from the sender. Personal opinions of the sender do
> not necessarily reflect
> CETIP's point of view, which is only divulged by authorized personnel."
>
> ***
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Newbie question

2008-12-09 Thread Mark Daniel
Hello all,

I'm following the wicket in action book. I'm trying the cheese store in
chapter 3. I was following along the code by reading a bit and coding a bit
on my own. The code defining the ListView for the cheese cart is originally:

add(new ListView("cart", new PropertyModel(this, "cart.cheeses")) { ... }

The way I ended up coding it was:

add(new ListView("cart", getCart().getCheeses())) { ... }

Which seems to be working fine, but If I click repeatedly fast on the 'add
to cart' link, the ArrayList in session gets its size changed correctly when
adding elements, but the ListView element size doesnt change accordingly.
Basically, the list size keeps growing on each click,  but the number of
items in the ListView doesnt grow anymore.

Any ideas whats wrong?

Thanks.


Re: Adding jquery effects to paging navigator

2008-12-05 Thread Daniel Peters
Serkan Camurcuoglu wrote:

> just noticed I forgot to add the behavior to the link, but still the
> javascript does not show up..
I know your mail was some time ago, but I just had the same problem and found a 
solution. Maybe it helps somebody else
in future... The problem is that the fadeOut() method doesnt "block". It 
executes and immediately afterwards the wicket
ajax-code is called. Which means you never see your wanted effects. Solution: 
use the jQuery callback-parameter.

let newValue return for example:
String.format("$('#%s').fadeOut('normal', function(){ %s });", 
topContainer.getMarkupId(), current);


regards,
Daniel

> Serkan Camurcuoglu wrote:
>> How can I modify the onclick attribute of the links in the
>> AjaxPagingNavigator? I override newPagingNavigationLink in my ajax
>> paging navigator as shown below, but my javascript is not prepended. I
>> want to add JQuery fadeout code before wicketAjaxGet:
>>
>> @Override
>>protected Link newPagingNavigationLink(String arg0, IPageable arg1,
>> int arg2) {
>>AjaxPagingNavigationLink l = (AjaxPagingNavigationLink)
>> super.newPagingNavigationLink(arg0, arg1, arg2);
>>String onClickJavascript =
>> "jQuery('#"+topContainer.getMarkupId()+"').fadeOut('slow');";
>>AttributeModifier am = new AttributeModifier("onclick", new
>> Model(onClickJavascript)) {
>>@Override
>>protected String newValue(String current, String
>> replacement) {
>>// prepend javascript before ajax call..
>>return replacement + current;
>>}
>>};
>>return l;
>>}
>>
>>
>> Serkan Camurcuoglu wrote:
>>> Hi all,
>>> I want to add some decoration to AjaxPagingNavigator. I want the
>>> current page to fade out and the new page to fade in when the user
>>> clicks next. I'm thinking of using JQuery for effects. Can anybody
>>> show me some pointers to achieve this?
>>>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Modify navigation menu based on user role

2008-11-23 Thread Yazbek, Daniel (Daniel)
Hi all,

 

Does anyone have a good reference on how to use wicket to modify
navigation menu items based on the role of the user?

 

I am thinking that once logged in, the role of the user is obtained,
then the navigation menu is dynamically build and attached to the main
page according to the role of the logged in user. Is this the
pattern/trend commonly used to achieve this?

 

Any resources/links would be helpful!

 

Thanks

-Daniel.

 

 

 

 

 



Graphs, Charts and Wicket

2008-11-16 Thread Yazbek, Daniel (Daniel)
Hi all,

 

I'd like to put some simple bar graphs, pie graphs and possible line
graphs into my wicket pages.

 

Have any of you used a good framework that you can recommend, that also
plays nicely with Wicket?

 

Thanks!

 

-Daniel.

 

 



Re: testing borders with WicketTester

2008-11-03 Thread Daniel Lipski

I still dont get it, maybe I miss something but I think that borders also
have everything they need to render them selves. 
When you provide empty body to border it will render itself and you will be
able to test it (the same way you test panel). 
I know that sometimes it will be nesessery to provide some expected body to
border to test it(and then probably you are forced to write some panel/page)
but there are cases when you could test it with some stub, static, hardcoded
body.
I know that now it is possible to test such borders so its not limitation of
WicketTester but it would be conveniently if WicketTester could support
testing borders with some predefined body easiler.
Its not about limitation of WicketTester ,its about providing functionality
to easier test such borders.
What do you think about it ?

I know that it is possible to create a generic panel/page to test borders
but it is also easy to create generic page to work with panels, but despite
this WicketTester provides method to test panels but doesnt provide similar
method to test borders(borders which you could test with some stub body). 


igor.vaynberg wrote:
> 
> self contained in that the page and panel has everything they need to
> render themselves. a border is meant to be embedded in a page or
> panel, not work independently. anyways, its really easy to create a
> generic panel to facilitate the testing of borders.
> 
> -igor
> 
> On Sun, Nov 2, 2008 at 2:57 AM, Daniel Lipski
> <[EMAIL PROTECTED]> wrote:
>>
>> Sorry, but I dont get your point...
>> What do you mean self contained (in terms of Wicket API) ?
>>
>> Im sure there is a lot of user created border components which contain a
>> lot
>> of surrounding markup and components and it is very desireble(at least
>> for
>> me :)) to be able to 'unit' test such components with Wicket tester,
>> regardles (i.e with empty) to border body.
>> Does method Im looking for was not provided because of technical problems
>> ?
>> If so what is the simplest way to test border components (surrounding
>> markup
>> and components) with i.e empty body ?
>>
>> Regards
>> Daniel Lipski
>>
>>
>> igor.vaynberg wrote:
>>>
>>> borders are not meant to be self-contained like panels. they are meant
>>> to be used within something that contains markup, eg page or panel.
>>>
>>> -igor
>>>
>>> On Fri, Oct 31, 2008 at 8:14 AM, dlipski <[EMAIL PROTECTED]>
>>> wrote:
>>>>
>>>> Hi
>>>>
>>>> Is it possible (if not why?) to test Border components in a way similar
>>>> to
>>>> testing Panels ?  -WicketTester.startPanel(TestPanelSource) ? Its
>>>> strange
>>>> but I cant find corresponding method for Borders.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Daniel Lipski
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/testing-borders-with-WicketTester-tp20268028p20268028.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/testing-borders-with-WicketTester-tp20268028p20288374.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/testing-borders-with-WicketTester-tp20268028p20298543.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: testing borders with WicketTester

2008-11-02 Thread Daniel Lipski

No, I think you misunderstood me, when I wrote about empty body I was
thinking about testing, I know that border without its body works like panel
and shouldnt be used in such case. 
I was writing about borders which have bodies, but during testing I was
interested in testing such borders with some 'stub' (ie empty) body.


jwcarman wrote:
> 
> Are you sure you don't want to use markup inheritance rather than borders?
> 
> On Sun, Nov 2, 2008 at 5:57 AM, Daniel Lipski
> <[EMAIL PROTECTED]> wrote:
>>
>> Sorry, but I dont get your point...
>> What do you mean self contained (in terms of Wicket API) ?
>>
>> Im sure there is a lot of user created border components which contain a
>> lot
>> of surrounding markup and components and it is very desireble(at least
>> for
>> me :)) to be able to 'unit' test such components with Wicket tester,
>> regardles (i.e with empty) to border body.
>> Does method Im looking for was not provided because of technical problems
>> ?
>> If so what is the simplest way to test border components (surrounding
>> markup
>> and components) with i.e empty body ?
>>
>> Regards
>> Daniel Lipski
>>
>>
>> igor.vaynberg wrote:
>>>
>>> borders are not meant to be self-contained like panels. they are meant
>>> to be used within something that contains markup, eg page or panel.
>>>
>>> -igor
>>>
>>> On Fri, Oct 31, 2008 at 8:14 AM, dlipski <[EMAIL PROTECTED]>
>>> wrote:
>>>>
>>>> Hi
>>>>
>>>> Is it possible (if not why?) to test Border components in a way similar
>>>> to
>>>> testing Panels ?  -WicketTester.startPanel(TestPanelSource) ? Its
>>>> strange
>>>> but I cant find corresponding method for Borders.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Daniel Lipski
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/testing-borders-with-WicketTester-tp20268028p20268028.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/testing-borders-with-WicketTester-tp20268028p20288374.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/testing-borders-with-WicketTester-tp20268028p20298317.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: testing borders with WicketTester

2008-11-02 Thread Daniel Lipski

Sorry, but I dont get your point...
What do you mean self contained (in terms of Wicket API) ?

Im sure there is a lot of user created border components which contain a lot
of surrounding markup and components and it is very desireble(at least for
me :)) to be able to 'unit' test such components with Wicket tester,
regardles (i.e with empty) to border body. 
Does method Im looking for was not provided because of technical problems ?
If so what is the simplest way to test border components (surrounding markup
and components) with i.e empty body ?

Regards
Daniel Lipski


igor.vaynberg wrote:
> 
> borders are not meant to be self-contained like panels. they are meant
> to be used within something that contains markup, eg page or panel.
> 
> -igor
> 
> On Fri, Oct 31, 2008 at 8:14 AM, dlipski <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi
>>
>> Is it possible (if not why?) to test Border components in a way similar
>> to
>> testing Panels ?  -WicketTester.startPanel(TestPanelSource) ? Its strange
>> but I cant find corresponding method for Borders.
>>
>> Thanks in advance.
>>
>> Daniel Lipski
>> --
>> View this message in context:
>> http://www.nabble.com/testing-borders-with-WicketTester-tp20268028p20268028.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/testing-borders-with-WicketTester-tp20268028p20288374.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Moving from Tapestry to Wicket?

2008-10-30 Thread Daniel Frisk
I actually read your mail but I didn't quite get it, what is your main  
concern?

It seems to me like Wicket would be a perfect fit to your four criteria.

// Daniel
jalbum.net


On 2008-10-30, at 21:05, GK1971 wrote:



Hi. I hope this email is appropriate for the forum - its my first time
posting.

My partner and I are in the process of working on a site that  
currently uses
Tapestry 4 and must be reasonably scalable vertically (we have  
horizontally
covered in a road map). I am looking around at technologies that we  
can
pursue in the future that will provide us with a way of creating a  
wonderful
experience for a user based on dynamic content with Java as a base  
language.


I have used Tapestry 3 and 4 in prior lives in prior companies and as
Tapestry 5 was still early a year ago when we started the project I  
decided
to work with Tapestry 4 an understand that once the site was up and  
running
we may look at rewriting the web layer in an updated framework,  
using the

lessons we had learned along the way about our specific application.

I have grown unhappy with Tapestry generally - for example, its clumsy
handling of AJAX. Even a seasoned developer can write a Tapestry  
application

which is incredibly complex and inefficient, also. I'm not certain its
declarative approach in Tapestry 5 is a wise thing from a  
productivity point
of view (maintenance). Debugging a Tapestry application can be  
difficult.


I found myself looking at JSF, but we'd like to actually deliver a
functioning site quickly and not have our hands tied by bureaucracy.  
I also
looked into other frameworks, and short of writing something myself  
I have

found the best for our needs to be Tapestry 5 (scares me - what will
Tapestry 6 bring in terms of backward compatibility etc?) and Wicket.

I'm liking the look of Wicket but I wondered if it would fill a few  
ideas I

have.

I have had significant issues with DOJO/Tapestry bugs that I cannot  
fix
myself and that has limited productivity. I would like to write an  
AJAX
library for myself and hook it into Wicket somehow. Would this be  
possible.
I feel it may be a pain in Tapestry because there 'appears' to be  
such a
high coupling with DOJO now. Would it be conceptually easy for me to  
write
Javascript/AJAX and hook them into Wicket in a simple way? I  
understand
Wicket has a good framework for AJAX but if I require to implement  
code of
my own, is it easy to slip under the hood (with Tapestry this is  
very hard).


Many forums have mentioned scalability is an issue, but I believe  
that this
is down to an applications individual handling of state rather than  
the
framework. Am I correct? I am not so worried about this vertical  
scaling as
long as I can horizontally scale my application on many servers  
(which I can

if I control state).

What's the road map for Wicket? I understand it is now one of the main
Apache projects (which is one reason I am looking at it), so I  
assume it
won't disappear sometime next year after I have invested time and  
effort

into developing with it.

Please tell me you are not going to pull a 'Tapestry' on me and  
other users
by making future versions so ridiculously incompatible I have to  
rewrite my

project again?

Honestly, I'm looking for a framework that will allow me to:

1) Utilize HTML templates (which you do, I understand).
2) Utilize CSS (which you do) files externally for my artist.
3) Utilize Javascript (which I assume you do).
4) Utilize a Java, component based web framework for creating a fast
lightweight but rich user experience for my users (which I guess you  
do).


I have just purchased Wicket in Action so as I can do some research,  
but I

do appreciate your time if possible.

Many thanks for your help, and your help.

Regards, Graeme.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Domain Model as interfaces

2008-10-16 Thread Daniel Frisk

Hi,

I'm not sure I understand exactly what is your problem but wouldn't  
something like this:


Db4oImpl / JpaImpl / WhateverImpl ---extends--->  
AbstractBaseClassWithYourBusinessLogic ---implements---> YourInterface


Where needed you would delegate to the base class (just adding the  
impl specific annotation). Just out of interest: do you really need to  
be able to easily switch between different persistence providers?


// Daniel
jalbum.net


On 2008-10-16, at 03:00, Edgar Merino wrote:


Hello,

  I couldn't find any other place to post this, so I'm doing it  
here, (it's related to java web development anyway). I've been  
working on a project where wicket has access to the domain layer  
through interfaces because I didn't want my project to depend on any  
dbms, however I've been thinking and the main problem here lies with  
db4o, since it cannot make use of JPA annotations on entities  
(domain models). I would like to get rid of those interfaces and use  
concrete implementations to handle business code inside the  
entities, but then the above problem arises. So what recommendations  
can you give to have a fully implemented domain model (using jpa  
annotations) but still be able to use any dbms (or orm/dmbs) without  
having to map those the domain model at the service layer? I hope I  
can get some feedback on this, as it has been the main problem I've  
been facing when coding scalable web applications.


Regards,
Edgar Merino

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is it a wrong idea to implement injection on Models?

2008-10-15 Thread Daniel Jomphe

Hi, I read a few other threads related to this issue, but saw only technical
means of freeing ourselves of the injection-is-only-for-Components
limitation.

Context
After refactoring my code to make it so that the Guice injection no more
happens on our Components but on our Models instead, I was surprised to find
out that Injection is only supported on Components. I thought it would make
more sense to inject the models, but I may be misunderstanding some Wicket
principle.

Questions
Was my approach of having injection on Models instead of Components sound?
And are there foreseeable issues with this approach?
Or would it be better that I only use injection on Components?
-- 
View this message in context: 
http://www.nabble.com/Is-it-a-wrong-idea-to-implement-injection-on-Models--tp19998823p19998823.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Open Modal Dialog at specific position on screen (not center)

2008-10-15 Thread Daniel Frisk

Hi!

You have to set the parameter wmode="opaque" in your flash-object tag.  
That will make it a part of normal z-ordering.


http://www.communitymx.com/content/source/E5141/wmodeopaque.htm

// Daniel
jalbum.net


On 2008-10-14, at 22:42, groffhibbitz wrote:



Hi, I'm running into a problem where my modal dialog is popping up,  
but being
covered by a flash component that is on the page.  The z-index seems  
to have
nothing to do with this, as I can set the z-index of my flash  
component to
- and z-index of the modal to 20001. All I want to do to solve  
this is
not pop up the modal dialog in the center of the page (which is  
where the
flash component is) but instead pop it up right above where the  
button I

click is that opens it.

Can I call a javascript function to move the modal once it has been  
shown?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Individual session timeout

2008-09-26 Thread Daniel Frisk

Code example:

private static void setSessionTimeout(int seconds) {
HttpSession session = getHttpSession();
if (session != null) {
session.setMaxInactiveInterval(seconds);
}
}

private static HttpSession getHttpSession() {
WebRequest request = (WebRequest)  
WebRequestCycle.get().getRequest();

return request.getHttpServletRequest().getSession();
}


// Daniel
jalbum.net


On 2008-09-26, at 14:34, Nino Saturnino Martinez Vazquez Wael wrote:


I mean the method on the ordinary java session

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html

You can get that from the wicket session... Or request cycle... I  
cant remember..


Stefan Lindner wrote:
I forgut to tell you that I use Wicket 1.4 M3. I can't see any  
settimeout-Method in Session.


Stefan

-Ursprüngliche Nachricht-
Von: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] 
] Gesendet: Freitag, 26. September 2008 12:59

An: users@wicket.apache.org
Betreff: Re: Individual session timeout

session.settimeout() ?

Stefan Lindner wrote:

The global session timeout for all sessions can be set in the  
web.xml

file. Is it possible to set an individual session timeout for each
session? E.g. depending on the user's role?

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to execute something on the very beginning of the request cycle

2008-09-17 Thread Daniel Freitas
I wouldn't classify filters as hacks. I like to think about them as
primitive forms of AOP. Unless you think about AOPs as hacks :P...

2008/9/17 mmocnik <[EMAIL PROTECTED]>

>
> Thanks a lot, thats exactly what I was looking for.
> I overwrote newRequestCycle() in my Application to return my own
> WebRequestCycle subclass.
>
> I was allready wondering if that really wasn't possible to do without some
> hack with a filter.
>
> Thanks again,
> Marko
>
>
> igor.vaynberg wrote:
> >
> > subclass webrequestcycle and put your stuff into onbeginrequest.
> >
> > -igor
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-execute-something-on-the-very-beginning-of-the-request-cycle-tp19527780p19535006.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: session "jumping"?

2008-09-09 Thread Daniel Freitas
Could you enlighten us on what the problem was so we know what to avoid in
our own implementations? Is that what Igor suggested? Your isVisible()
method cheeking a "static" value?

2008/9/9 m_salman <[EMAIL PROTECTED]>

>
> My appologies.  The problem was bad design and code on my part.
>
> --
> View this message in context:
> http://www.nabble.com/session-%22jumping%22--tp18999615p19395226.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Localization issue

2008-08-26 Thread Daniel Stoch
Hi,

But what exactly not work?

I'm using a Link with onClick() code:
getSession().setLocale(locale);
to swicth current locale and everything works ok. All page components
are localized correctly.

I think this  setResponsePage(this.getPage()); call in your code is
not necessary:
@Override
public final void onClick() {
Locale locale = new Locale("en");
this.getSession().setLocale(locale);
setResponsePage(this.getPage());
    }

-- 
Daniel

On Tue, Aug 26, 2008 at 9:56 PM, btakacs <[EMAIL PROTECTED]> wrote:
>
> Hi, All
>
> The question is:
> after
> getSession().setLocale(locale);
> running and successfully changing the locale (I checked in debug mode)
>
> when running
> setResponsePage(this.getPage());
> why the locale changes does not apply to the components?
>
> They apply only after I click on a bookmarkable link.
>
> Now it does not seem to be a Localization issue: it's some kind of reload
> issue...
>
> Any tips?
>
> Thanks:
>   Bence

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PageParameter question

2008-08-15 Thread Daniel Freitas
Are you a 100% sure that ordering the parameters is the only way to go? And
if yes are you sure you want to rely on the order the browser gives you? I
think you should rethink your strategy.

2008/8/15 Mathias P.W Nilsson <[EMAIL PROTECTED]>

>
> I don't quite know what you mean. I must still pass PageParameters to the
> contructor of a page? How could this help me?
> --
> View this message in context:
> http://www.nabble.com/PageParameter-question-tp1829p19001494.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [announce] Wicket in Action e-book has been published!

2008-08-13 Thread Daniel Freitas
Congrats. The book has been very helpful so far.

2008/8/13 David Leangen <[EMAIL PROTECTED]>

>
> Congratulations, guys!
>
> Thank you for all your hard work and sacrifice!
>
>
>
> > -Original Message-
> > From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> > Sent: 14 August 2008 06:32
> > To: Wicket Users
> > Subject: [announce] Wicket in Action e-book has been published!
> >
> >
> > Almost 3 years of hard work, loosing friends, moving abroad, marrying
> > lovely wives, late nights, early mornings, frustrated family, and all
> > other bad (and good) things that cross one's life is now rewarded with
> > the availability of the e-book edition of Wicket in Action. The print
> > edition (also know as dead-tree edition) will be available in just
> > over 2 weeks (estimated at Aug 29th).
> >
> > Eelco and I are *really*, *really* glad that the journey is finally
> > over. We think it was worth it. Now we leave the book in your capable
> > hands to make beautiful applications that make your boss and customers
> > happy and we are sure you'll enjoy creating them.
> >
> > Eelco Hillenius & Martijn Dashorst
> >
> > About Wicket in Action
> >
> > Wicket in Action is a comprehensive guide for Java developers building
> > Wicket-based web applications. It introduces Wicket's structure and
> > components, and moves quickly into examples of Wicket at work. Written
> > by core committers, this book shows you the "how-to" and the "why" of
> > Wicket. You'll learn to use and customize Wicket components, to
> > interact with Spring and Hibernate, and to implement rich Ajax-driven
> > features.
> >
> > Some quotes of early access reviewers:
> >
> > "Finally, the Web Framework of web framework, Apache Wicket, now has a
> > bible of its own." - Per Ejeklint
> >
> > "Without question, Wicket in Action... is the be-all and end-all when
> > it comes to Wicket." - Geertjan Wielenga
> >
> > "Wicket In Action glues the areas of web development with Apache
> > Wicket together and gives a great overview of Apache Wicket...it will
> > make a great compendium." - Nino Martinez Wael
> >
> > You can read full reviews here:
> >  - Nick Heudecker: Wicket In Action Book Review
> >http://www.theserverside.com/news/thread.tss?thread_id=50326
> >
> >  - Geertjan Wielenga: Wicket in Action: Undoubtedly The Wicket Bible
> >http://blogs.sun.com/geertjan/entry/wicket_in_action_undoubtedly_the
> >
> > Free content
> >
> > If you don't think these reviewers are qualified to tell you to buy
> > Wicket in Action, let these free samples convince you:
> >
> >  * Chapter 1: http://www.manning.com/dashorst/ch01_dashorst.pdf
> >  * Chapter 8: http://www.manning.com/dashorst/ch08_dashorst.pdf
> >  * Excerpt: Creating Secure Web Applications with Apache Wicket
> > (http://www.manning.com/free/excerpt_Wicket.html)
> >
> > MEAP readers
> >
> > If you bought the MEAP edition you'll receive a personal download link
> > for the final e-book in your inbox today (or possibly tomorrow). We'd
> > like to extend our gratitude to the MEAP readers - without you and
> > your encouragements we would've given up.
> >
> > Limited summer discount
> >
> > There is a 35% discount when you buy Wicket in Action at the manning
> > website before the end of August. For more details look here:
> > http://manning.com/dashorst
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Handling runtime exceptions in ajax request

2008-08-11 Thread Daniel Stoch
Hi,

In Wicket by default IRequestCycleProcessor.respond(RuntimeException,
RequestCycle) method is called to handle runtime exceptions. In
AbstractRequestCycleProcessor this method throws
RestartResponseException (or RestartResponseAtInterceptPageException)
and then the other page is shown (eg. ExceptionErrorPage or other page
specified in RequestCycle.onRuntimeException()).

In ajax requests I want to avoid loading another page when runtime
exception is thrown. I want to show a proper exception message within
the current page.
I have prepared a small draft solution how to do this (by extending
AjaxRequestTarget and WebRequestCycleProcessor classes), but firstly I
want to ask you is it any "standard" way to handle runtime exception
within ajax request, without rendering another page?

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: help me please

2008-08-05 Thread Daniel Freitas
Damn that was the worst english email I have ever written. Sry.

2008/8/5 Daniel Freitas <[EMAIL PROTECTED]>

> I'm sure there are plenty of free materiel on the internet. But my personal
> experience is that to get a hold on a new framework (which you absolutely
> nothing a about) a good book is the best way to go, as all the information
> is all there concisely in one place only. The internet I reserve for more
> advanced and/or specific points since the information tends to be spread.
>
> That being said, Wicket in Action (book) is doing good for me. You can have
> access to it through manning early access program. Just type in Wicket in
> Action in google.
>
> Cheers,
> Daniel
>
> 2008/8/5 oriana <[EMAIL PROTECTED]>
>
>
>> I am beginning to program with Apache wicket and I need a tutorial the
>> most
>> complete possible thing in order to guide me in this new world. If
>> somebody
>> could help me. Thank you ahead of time.:confused:
>> --
>> View this message in context:
>> http://www.nabble.com/help-me-please-tp18838183p18838183.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


Re: help me please

2008-08-05 Thread Daniel Freitas
I'm sure there are plenty of free materiel on the internet. But my personal
experience is that to get a hold on a new framework (which you absolutely
nothing a about) a good book is the best way to go, as all the information
is all there concisely in one place only. The internet I reserve for more
advanced and/or specific points since the information tends to be spread.

That being said, Wicket in Action (book) is doing good for me. You can have
access to it through manning early access program. Just type in Wicket in
Action in google.

Cheers,
Daniel

2008/8/5 oriana <[EMAIL PROTECTED]>

>
> I am beginning to program with Apache wicket and I need a tutorial the most
> complete possible thing in order to guide me in this new world. If somebody
> could help me. Thank you ahead of time.:confused:
> --
> View this message in context:
> http://www.nabble.com/help-me-please-tp18838183p18838183.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: AjaxButton does not work

2008-08-05 Thread Daniel Freitas
Do you have any form validation going on? If yes implement the onError
method on the ajax button. Example:

form.add(new AjaxButton("order") {
@Override
protected void onError(AjaxRequestTarget target, Form form) {
//Ops we got some errors, show them in a feedback panel
target.addComponent(feedbackPanel);
}

@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
//Do whatever you need here :)
setResponsePage(Index.class);
}
}.setOutputMarkupId(true));


Hope that helps.
2008/8/5 Bertrand DATAS <[EMAIL PROTECTED]>

> Hello All,
>
> I encounter a problem while I am using an AjaxButton.
>
> In my form page i create an Ajaxbutton that I attach to a markupContainer
> and in my HTML I add the folowwing HTML code :
> 
>
> The button is set default form processing to false.
>
> The problem is that when i click on this button nothing happens !!
> I have the same problem with ana AjaxSubmitLink.
>
> I use the Wicket framework 1.3.4.
>
>
> Can someone help me to see what is wrong with that button ??
>
> Thanks
>
> Bertrand
>


Re: How to make PagingNavigator work in Modal window?

2008-08-02 Thread Daniel Stoch
Use AjaxPagingNavigator. You cannot use normal (non-ajax) links inside
a ModalWindow (like standard PagingNavigator does) because then the
whole page is refreshed.

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Stack overflow when extending from page

2008-08-01 Thread Daniel Freitas
An issue has been created:

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

Regards

2008/7/31 Igor Vaynberg <[EMAIL PROTECTED]>

> yeah, we should fix it. please file a jira issue.
>
> -igor
>
> On Thu, Jul 31, 2008 at 4:22 PM, Daniel Freitas
> <[EMAIL PROTECTED]> wrote:
> > I typo got me to a stack overflow. Instead of extending WebPage, I
> extended
> > Page directly and when wicket tried to render the page it threw a
> > StackOverflowError caused by the following code:
> >
> > public class ClockPage extends Page{ //Typo, should be *extends WebPage*
> >
> > }
> >
> > Page extends MarkupContainer
> >
> > public class MarkupContainer ...
> >
> > public String getMarkupType()
> >{
> >return getPage().getMarkupType();
> >}
> > ...
> > }
> >
> > Get page is inherited from Component:
> >
> > public abstract class Component ...
> > ...
> > public final Page getPage()
> >{
> >// Search for nearest Page
> >final Page page = findPage();
> >
> >// If no Page was found
> >if (page == null)
> >{
> >// Give up with a nice exception
> >throw new IllegalStateException("No Page found for component "
> +
> > this);
> >}
> >
> >return page;
> >}
> > ...
> > }
> >
> > The problem is that getPage() returns an instance to ClockPage, which
> then
> > calls getMarkupType() on itself which in turn does a getPage(), returning
> > the ClockPage instance again, and then it calls getMarkupType() which
> > call.. stack overflow.
> >
> > Is this an unforseen, minor bug? Could it be changed to avoid such a
> > situation and throw a more user friendly exception so we know we
> shouldn't
> > extend Page directly?
> >
> > Just asking out of curiosity.
> >
> > Regards,
> > Daniel Freitas
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Component#modelChanging and Component#modelChanged when IModel#setObject

2008-07-31 Thread Daniel Freitas
Well, I've though aabout proxies, but didn't depicted it in my previous
message, but since you touched the subject... It's more more complex to do
but maybe that's the best approach. You can do this at a project level,
without interfering with the framework directly. You can even componentize
your solution to be shared by other projects. One could write a java dynamic
proxy handler that binds the components and model together and notify the
components when the model is about to be updated. The nice thing about his
approach is that it does not affect the involved classes (IModel and
Component). Of course, you would have to create your models through some
kind of factory to have the proxies returned instead (and be carefull not to
call modelChanged() twice when the model is changed from the componnent
itself). If you really need this functionality it might be worth
implementing it.

That sounds like fun...

Regards,
Daniel


2008/7/31 Hoover, William <[EMAIL PROTECTED]>

> That is true... it would require a proxy service in order to intercept
> the IModel#setObject calls.
>
> -----Original Message-
> From: Daniel Freitas [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 31, 2008 7:02 PM
> To: users@wicket.apache.org
> Subject: Re: Component#modelChanging and Component#modelChanged when
> IModel#setObject
>
> What would happen if more than one component uses the same model? Would
> we keep a list of components to notify? If that's the case why not just
> implement listeners instead, so then any class could listen to model
> changes. It's a nice idea except that IModel would have to be turned in
> to a class instead of an interface and that seems more restrictive than
> not having those methods being called :(.
>
> I'm new to Wicket and never needed to use those methods but I guess that
> making IModel a class and increasing the coupling between model and
> component is a price too high to pay for it.
>
> 2008/7/31 Hoover, William <[EMAIL PROTECTED]>
>
> > Yes, it does seem to be a difficult task to accomplish unless the
> > model itself is component aware. Nonetheless, it seems relatively
> > useless to have the onchanging/onchanged methods if they cannot do
> > what they claim they can do- don't you agree?
> >
> > If models were component aware it would simply be a matter of setting
> > the component on the model when Compopnent#setModel is called. Then
> > when IModel#setObject is called it could in turn call
> > Component#modelChanging/modelChanged. This obviously requires a tight
> > coupling relationship between the component and the model, but at
> > least notifications of model object changes can be guaranteed.
> >
> > -Original Message-
> > From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, July 31, 2008 6:16 PM
> > To: users@wicket.apache.org
> > Subject: Re: Component#modelChanging and Component#modelChanged when
> > IModel#setObject
> >
> > well, it notifies if the model is changed through the component.
> >
> > there is no way for us to really intercept a setobject call on an
> > arbitrary model instance, figure out which components it is currently
> > attached to, and call modelchanging methods on them.
> >
> > -igor
> >
> > On Thu, Jul 31, 2008 at 3:08 PM, Hoover, William <[EMAIL PROTECTED]>
> > wrote:
> > > Well, I am still trying to hash that one out- any ideas?
> > >
> > > I just think that if there is a method that indicates that it will
> > > be called anytime that a model is changing that it should follow
> > > through with that contract.
> > >
> > > -Original Message-
> > > From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, July 31, 2008 6:01 PM
> > > To: users@wicket.apache.org
> > > Subject: Re: Component#modelChanging and Component#modelChanged when
>
> > > IModel#setObject
> > >
> > > how should we handle that?
> > >
> > > -igor
> > >
> > > On Thu, Jul 31, 2008 at 2:43 PM, Hoover, William
> > > <[EMAIL PROTECTED]>
> > > wrote:
> > >> Seems strange that Component#modelChanging and
> > >> Component#modelChanged
> >
> > >> are never called when IModel#setObject is called...
> > >>
> > >> https://issues.apache.org/jira/browse/WICKET-1764
> > >>
> > >>
> > >> ---
> > >> -- To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e

Stack overflow when extending from page

2008-07-31 Thread Daniel Freitas
I typo got me to a stack overflow. Instead of extending WebPage, I extended
Page directly and when wicket tried to render the page it threw a
StackOverflowError caused by the following code:

public class ClockPage extends Page{ //Typo, should be *extends WebPage*

}

Page extends MarkupContainer

public class MarkupContainer ...

public String getMarkupType()
{
return getPage().getMarkupType();
}
...
}

Get page is inherited from Component:

public abstract class Component ...
...
public final Page getPage()
{
// Search for nearest Page
final Page page = findPage();

// If no Page was found
if (page == null)
{
// Give up with a nice exception
throw new IllegalStateException("No Page found for component " +
this);
}

return page;
}
...
}

The problem is that getPage() returns an instance to ClockPage, which then
calls getMarkupType() on itself which in turn does a getPage(), returning
the ClockPage instance again, and then it calls getMarkupType() which
call.. stack overflow.

Is this an unforseen, minor bug? Could it be changed to avoid such a
situation and throw a more user friendly exception so we know we shouldn't
extend Page directly?

Just asking out of curiosity.

Regards,
Daniel Freitas


Re: Component#modelChanging and Component#modelChanged when IModel#setObject

2008-07-31 Thread Daniel Freitas
What would happen if more than one component uses the same model? Would we
keep a list of components to notify? If that's the case why not just
implement listeners instead, so then any class could listen to model
changes. It's a nice idea except that IModel would have to be turned in to a
class instead of an interface and that seems more restrictive than not
having those methods being called :(.

I'm new to Wicket and never needed to use those methods but I guess that
making IModel a class and increasing the coupling between model and
component is a price too high to pay for it.

2008/7/31 Hoover, William <[EMAIL PROTECTED]>

> Yes, it does seem to be a difficult task to accomplish unless the model
> itself is component aware. Nonetheless, it seems relatively useless to
> have the onchanging/onchanged methods if they cannot do what they claim
> they can do- don't you agree?
>
> If models were component aware it would simply be a matter of setting
> the component on the model when Compopnent#setModel is called. Then when
> IModel#setObject is called it could in turn call
> Component#modelChanging/modelChanged. This obviously requires a tight
> coupling relationship between the component and the model, but at least
> notifications of model object changes can be guaranteed.
>
> -Original Message-
> From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 31, 2008 6:16 PM
> To: users@wicket.apache.org
> Subject: Re: Component#modelChanging and Component#modelChanged when
> IModel#setObject
>
> well, it notifies if the model is changed through the component.
>
> there is no way for us to really intercept a setobject call on an
> arbitrary model instance, figure out which components it is currently
> attached to, and call modelchanging methods on them.
>
> -igor
>
> On Thu, Jul 31, 2008 at 3:08 PM, Hoover, William <[EMAIL PROTECTED]>
> wrote:
> > Well, I am still trying to hash that one out- any ideas?
> >
> > I just think that if there is a method that indicates that it will be
> > called anytime that a model is changing that it should follow through
> > with that contract.
> >
> > -Original Message-
> > From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, July 31, 2008 6:01 PM
> > To: users@wicket.apache.org
> > Subject: Re: Component#modelChanging and Component#modelChanged when
> > IModel#setObject
> >
> > how should we handle that?
> >
> > -igor
> >
> > On Thu, Jul 31, 2008 at 2:43 PM, Hoover, William <[EMAIL PROTECTED]>
> > wrote:
> >> Seems strange that Component#modelChanging and Component#modelChanged
>
> >> are never called when IModel#setObject is called...
> >>
> >> https://issues.apache.org/jira/browse/WICKET-1764
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Where has DateLabel gone to

2008-07-31 Thread Daniel Freitas
I got it though maven thanks.

2008/7/31 Kai Mütz <[EMAIL PROTECTED]>

> Daniel Freitas <mailto:[EMAIL PROTECTED]> wrote:
> > I'm reading Wicket in Action and I'm using Wicket 1.3.4. On the
> > chapter about models, the author uses a DateLabel which he says can be
> > found in the
> > extensions project. Well, I have tried 1.3.0, 1.3.3 and 1.3.4 for both
> > wicket and wicket extensions and I just can't find this component.
>
> You can found it in wicket datetime package.
>
>
> http://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-
> datetime/<http://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-datetime/>
>
> Cheers, Kai
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Where has DateLabel gone to

2008-07-31 Thread Daniel Freitas
I'm reading Wicket in Action and I'm using Wicket 1.3.4. On the chapter
about models, the author uses a DateLabel which he says can be found in the
extensions project. Well, I have tried 1.3.0, 1.3.3 and 1.3.4 for both
wicket and wicket extensions and I just can't find this component.

Is it an old feature that got removed or is it a new one present only in
.1.4+?

Regards,
Daniel Freitas


Re: Direclty using parent's compoundpropertymodel not possible ?

2008-07-31 Thread Daniel Freitas
I think I might be missing something here. I assume you don't create your
components in the parent's constructor right? Or you call a different super
constructor perhaps? Because java executes the parent constructor before
calling a subclass constructor and for what I've seen so far in the
examples, the components are usually created and added in the constructor,
so you would have created your components and models before getting to the
subclass initialization.



2008/7/31 ZedroS <[EMAIL PROTECTED]>

>
> hi
>
> Sorry for the delay, holidays went in the way ;)
>
>
>
> Alex Jacoby-2 wrote:
> >
> > More than once I've tried accessing my inherited model from within a
> > constructor, forgetting that since the component hasn't been added yet
> > it can't access its inherited model there.
> >
> > That's not your problem, right?
> >
> > Alex
> >
> >
>
> hum, Alex, thanks a lot !! It's something I hadn't figured out by myself
> and
> most probably stuck my head against more than once without even realizing
> it
> ! Thanks a lot (and shame on me) ! It would be nice for it to be included
> in
> the Working with Wicket models wiki page for people like me...
>
> I'll definitely makes more tries of it, since I'm not sure I properly get
> how compound property models are shared among inheritors. And the day I'm
> sure of it, I'll update the wiki page if noone has done it before me.
>
> ++
> zedros
> --
> View this message in context:
> http://www.nabble.com/Direclty-using-parent%27s-compoundpropertymodel-not-possible---tp18356056p18763687.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Using same navigator on top and bottom of page.

2008-07-28 Thread Daniel Freitas
I will add the patch there if I ever come up with a good implementation. The
problem is that there are so many things that can be customizable that it
might be hard to come with a good, elegant solution. For example, the user
might want to use images only, or text only, or image before a text (for
example ' link and set one of them as invisible:

<<

but then I can't switch them around (not that I needed to but just an
example). I'm new to Wicket. I'm still reading Wicket in Action. As my
understanding grows I might be able to help more. Maybe there's a way to
output my own markup (as I've seen with some javascript) to display the
image before or after.

Anyways, this is a great framework and I'm enjoying it so far. Long time
since I had fun writing web applications.

Regards,
Daniel Freitas

2008/7/28 Igor Vaynberg <[EMAIL PROTECTED]>

> create a patch and attach it to a jira issue is usually the best way.
>
> btw there is already an issue for something like this:
>
> https://issues.apache.org/jira/browse/WICKET-1735
>
> -igor
>
> On Mon, Jul 28, 2008 at 3:01 PM, Daniel Freitas
> <[EMAIL PROTECTED]> wrote:
> > BTW. I'm trying to customize the PagingNavigator. If I come up with a
> good
> > way to do it, how can I contribute to the project? Basically, I will try
> to
> > let the user choose images or text for the first, previous, next and last
> > links.
> >
> > Regards,
> >
> > 2008/7/28 Daniel Freitas <[EMAIL PROTECTED]>
> >
> >> I meant the wicket:id (which is not an html id right?). Anyways, I will
> >> just keep that in mind. Two components work as expected.
> >>
> >> 2008/7/28 Igor Vaynberg <[EMAIL PROTECTED]>
> >>
> >> two html elements cannot have the same id within the same html
> document...
> >>>
> >>> -igor
> >>>
> >>> On Mon, Jul 28, 2008 at 1:55 PM, Daniel Freitas
> >>> <[EMAIL PROTECTED]> wrote:
> >>> > I don't. I expected it to be rendered twice with the same id ;).
> Which
> >>> is
> >>> > not possible, thus I had to create two components with two ids to
> make
> >>> the
> >>> > navigator appear twice.
> >>> >
> >>> > Regards
> >>> >
> >>> > 2008/7/28 <[EMAIL PROTECTED]>
> >>> >
> >>> >> how would you expec the same component to render twice with
> different
> >>> HTML
> >>> >> ids?
> >>> >>
> >>> >> -Igor
> >>> >>
> >>> >> On 7/28/08, Daniel Freitas <[EMAIL PROTECTED]> wrote:
> >>> >> > With the following markup:
> >>> >> >
> >>> >> >   
> >>> >> > 
> >>> >> > 
> >>> >> > 
> >>> >> > 
> >>> >> > 
> >>> >> > 
> >>> >> >
> >>> >> >
> >>> >> > It works ok with regular PaginNavigator or with this Ajax code:
> >>> >> >
> >>> >> > topPagingNavigator = new AjaxPagingNavigator("topNavigator",
> books) {
> >>> >> >
> >>> >> > @Override
> >>> >> > protected void onAjaxEvent(AjaxRequestTarget target) {
> >>> >> > if (target != null) {
> >>> >> > //Syncs bottom paging navigator
> >>> >> > target.addComponent(bottomPagingNavigator);
> >>> >> > }
> >>> >> >
> >>> >> > super.onAjaxEvent(target);
> >>> >> > }
> >>> >> > };
> >>> >> > bottomPagingNavigator = new
> >>> >> AjaxPagingNavigator("bottomNavigator",
> >>> >> > books) {
> >>> >> > @Override
> >>> >> > protected void onAjaxEvent(AjaxRequestTarget target) {
> >>> >> > if (target != null) {
> >>> >> > //Syncs top paging navigator
> >>> >> > target.addComponent(topPagingNavigator);
> >>> >> > }
> >>> >> >
> >>> >> > super.onAjaxEvent(target);
> >>> >> > }
> >>> >> > };
> >>> >> > add(topPagingNavigator);
> >>> >> > add(bottomPagingNavigator);
> >>> >> >
> >>> >> > I just wanted to avoid creating two components that do the same
> thing
> >>> in
> >>> >> the
> >>> >> > same set of data (I just want to display it twice). I wonder if I
> >>> might
> >>> >> run
> >>> >> > in the same problem whenever I want to display the same component
> in
> >>> two
> >>> >> > different places...
> >>> >> >
> >>> >>
> >>> >>
> -
> >>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>> >>
> >>> >>
> >>> >
> >>>
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Using same navigator on top and bottom of page.

2008-07-28 Thread Daniel Freitas
BTW. I'm trying to customize the PagingNavigator. If I come up with a good
way to do it, how can I contribute to the project? Basically, I will try to
let the user choose images or text for the first, previous, next and last
links.

Regards,

2008/7/28 Daniel Freitas <[EMAIL PROTECTED]>

> I meant the wicket:id (which is not an html id right?). Anyways, I will
> just keep that in mind. Two components work as expected.
>
> 2008/7/28 Igor Vaynberg <[EMAIL PROTECTED]>
>
> two html elements cannot have the same id within the same html document...
>>
>> -igor
>>
>> On Mon, Jul 28, 2008 at 1:55 PM, Daniel Freitas
>> <[EMAIL PROTECTED]> wrote:
>> > I don't. I expected it to be rendered twice with the same id ;). Which
>> is
>> > not possible, thus I had to create two components with two ids to make
>> the
>> > navigator appear twice.
>> >
>> > Regards
>> >
>> > 2008/7/28 <[EMAIL PROTECTED]>
>> >
>> >> how would you expec the same component to render twice with different
>> HTML
>> >> ids?
>> >>
>> >> -Igor
>> >>
>> >> On 7/28/08, Daniel Freitas <[EMAIL PROTECTED]> wrote:
>> >> > With the following markup:
>> >> >
>> >> >   
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> > 
>> >> >
>> >> >
>> >> > It works ok with regular PaginNavigator or with this Ajax code:
>> >> >
>> >> > topPagingNavigator = new AjaxPagingNavigator("topNavigator", books) {
>> >> >
>> >> > @Override
>> >> > protected void onAjaxEvent(AjaxRequestTarget target) {
>> >> > if (target != null) {
>> >> > //Syncs bottom paging navigator
>> >> > target.addComponent(bottomPagingNavigator);
>> >> > }
>> >> >
>> >> > super.onAjaxEvent(target);
>> >> > }
>> >> > };
>> >> > bottomPagingNavigator = new
>> >> AjaxPagingNavigator("bottomNavigator",
>> >> > books) {
>> >> > @Override
>> >> > protected void onAjaxEvent(AjaxRequestTarget target) {
>> >> > if (target != null) {
>> >> > //Syncs top paging navigator
>> >> > target.addComponent(topPagingNavigator);
>> >> > }
>> >> >
>> >> > super.onAjaxEvent(target);
>> >> > }
>> >> > };
>> >> > add(topPagingNavigator);
>> >> > add(bottomPagingNavigator);
>> >> >
>> >> > I just wanted to avoid creating two components that do the same thing
>> in
>> >> the
>> >> > same set of data (I just want to display it twice). I wonder if I
>> might
>> >> run
>> >> > in the same problem whenever I want to display the same component in
>> two
>> >> > different places...
>> >> >
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


Re: Using same navigator on top and bottom of page.

2008-07-28 Thread Daniel Freitas
I meant the wicket:id (which is not an html id right?). Anyways, I will just
keep that in mind. Two components work as expected.

2008/7/28 Igor Vaynberg <[EMAIL PROTECTED]>

> two html elements cannot have the same id within the same html document...
>
> -igor
>
> On Mon, Jul 28, 2008 at 1:55 PM, Daniel Freitas
> <[EMAIL PROTECTED]> wrote:
> > I don't. I expected it to be rendered twice with the same id ;). Which is
> > not possible, thus I had to create two components with two ids to make
> the
> > navigator appear twice.
> >
> > Regards
> >
> > 2008/7/28 <[EMAIL PROTECTED]>
> >
> >> how would you expec the same component to render twice with different
> HTML
> >> ids?
> >>
> >> -Igor
> >>
> >> On 7/28/08, Daniel Freitas <[EMAIL PROTECTED]> wrote:
> >> > With the following markup:
> >> >
> >> >   
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> >
> >> >
> >> > It works ok with regular PaginNavigator or with this Ajax code:
> >> >
> >> > topPagingNavigator = new AjaxPagingNavigator("topNavigator", books) {
> >> >
> >> > @Override
> >> > protected void onAjaxEvent(AjaxRequestTarget target) {
> >> > if (target != null) {
> >> > //Syncs bottom paging navigator
> >> > target.addComponent(bottomPagingNavigator);
> >> > }
> >> >
> >> > super.onAjaxEvent(target);
> >> > }
> >> > };
> >> > bottomPagingNavigator = new
> >> AjaxPagingNavigator("bottomNavigator",
> >> > books) {
> >> > @Override
> >> > protected void onAjaxEvent(AjaxRequestTarget target) {
> >> > if (target != null) {
> >> > //Syncs top paging navigator
> >> > target.addComponent(topPagingNavigator);
> >> > }
> >> >
> >> > super.onAjaxEvent(target);
> >> > }
> >> > };
> >> > add(topPagingNavigator);
> >> > add(bottomPagingNavigator);
> >> >
> >> > I just wanted to avoid creating two components that do the same thing
> in
> >> the
> >> > same set of data (I just want to display it twice). I wonder if I
> might
> >> run
> >> > in the same problem whenever I want to display the same component in
> two
> >> > different places...
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Using same navigator on top and bottom of page.

2008-07-28 Thread Daniel Freitas
I don't. I expected it to be rendered twice with the same id ;). Which is
not possible, thus I had to create two components with two ids to make the
navigator appear twice.

Regards

2008/7/28 <[EMAIL PROTECTED]>

> how would you expec the same component to render twice with different HTML
> ids?
>
> -Igor
>
> On 7/28/08, Daniel Freitas <[EMAIL PROTECTED]> wrote:
> > With the following markup:
> >
> >   
> > 
> > 
> > 
> > 
> > 
> > 
> >
> >
> > It works ok with regular PaginNavigator or with this Ajax code:
> >
> > topPagingNavigator = new AjaxPagingNavigator("topNavigator", books) {
> >
> > @Override
> > protected void onAjaxEvent(AjaxRequestTarget target) {
> > if (target != null) {
> > //Syncs bottom paging navigator
> > target.addComponent(bottomPagingNavigator);
> > }
> >
> > super.onAjaxEvent(target);
> > }
> > };
> > bottomPagingNavigator = new
> AjaxPagingNavigator("bottomNavigator",
> > books) {
> > @Override
> > protected void onAjaxEvent(AjaxRequestTarget target) {
> > if (target != null) {
> > //Syncs top paging navigator
> > target.addComponent(topPagingNavigator);
> > }
> >
> > super.onAjaxEvent(target);
> > }
> > };
> > add(topPagingNavigator);
> > add(bottomPagingNavigator);
> >
> > I just wanted to avoid creating two components that do the same thing in
> the
> > same set of data (I just want to display it twice). I wonder if I might
> run
> > in the same problem whenever I want to display the same component in two
> > different places...
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Using same navigator on top and bottom of page.

2008-07-28 Thread Daniel Freitas
With the following markup:

  








It works ok with regular PaginNavigator or with this Ajax code:

topPagingNavigator = new AjaxPagingNavigator("topNavigator", books) {

@Override
protected void onAjaxEvent(AjaxRequestTarget target) {
if (target != null) {
//Syncs bottom paging navigator
target.addComponent(bottomPagingNavigator);
}

super.onAjaxEvent(target);
}
};
bottomPagingNavigator = new AjaxPagingNavigator("bottomNavigator",
books) {
@Override
protected void onAjaxEvent(AjaxRequestTarget target) {
if (target != null) {
//Syncs top paging navigator
target.addComponent(topPagingNavigator);
}

super.onAjaxEvent(target);
}
};
add(topPagingNavigator);
add(bottomPagingNavigator);

I just wanted to avoid creating two components that do the same thing in the
same set of data (I just want to display it twice). I wonder if I might run
in the same problem whenever I want to display the same component in two
different places...


Using same navigator on top and bottom of page.

2008-07-28 Thread Daniel Freitas
Hello guys. I searched the list for answers on this but couldn't find any.
Is there a way to show a PagingNavigator (actually an AjaxPagingNavigator)
on the top and bottom of a page? The navigator will page the same data, it's
added on top and bottom just for convenience. I tried to do:

   


  




At which wicket complains with:

WicketMessage: The component  has the same wicket:id as another
component already added at the same level


If I add a new component paging the same data, they do not sync
correctly(clicking the 3rd page on the top navigator does not update
the bottom
navigator, which istill displays page 3 as clickable).

Regards,
Daniel Freitas


Component.setOutputMarkupPlaceholderTag()

2008-07-24 Thread Daniel Freitas
Hello guys,

I'm very new to Wicket and I was trying out some examples and Ajax stuff. I
created a small ajax editable label for fun and I had to set the
setOutputMarkupPlaceholderTag() flag to true. As my understanding, when you
set a component to be invisible, it does not render at all in the page, so
the Ajax code can't find the object by it's id to update it. When setting
the markup placeholder, wicket do output the component to the page, but with
a CSS style that makes it invisible to the user. Good. It worked, I was
happy.

I then got the AjaxEditableLabel from wicket-extensions and went to check
the code to see how they implemented it. I was puzzled as I couldn't find
any calls to setOutputMarkupPlaceholderTag() method on the label and text
field. If I check the source code in the browser, the text field is not in
the html. So how can the java code set the field to be visible and the ajax
code runing on the browser find it?

See example:

My output code with setOutputMarkupPlaceholderTag(true)





Click here to update this
message...
  


This is the output using AjaxEditableLabel



This is an



ajax
editable label


from wicket-extensions



Whats interesting is that html in the source code of AjaxEditableLabel do
include the input field:

[[label]]

Any hints as to why they don't need to call setOutputMarkupPlaceholderTag(true)
would be appreciated.


ModalWindow submit from nested form after close

2008-07-09 Thread Daniel Stoch
I have a page with a simple form:



...
select objects...

...
Submit


When "selector" link is clicked a ModalWindow (attached to "popup" id
in markup) is shown with a content panel containing another form
("secondForm"). In the real example this "selector" link and
modalwindow "popup" are wrapped into one component, that's why this
"popup" is defined inside a firstForm.
So this secondForm is nested inside the firstForm. On secondForm there
is an AjaxButton component:



Search


That secondForm works fine. But after I close ModalWindow and I am
trying to submit firstForm (by pressing ENTER key in "textField"
input), the secondForm's AjaxButton onSubmit() method is called. I
think this is because the modal window content still exists inside a
DOM, so the browser tries to submit firstForm using the first found
submit button (which is a button from the secondForm). I hope this is
clear enough ;).

How to prevent from submiting the firstForm by AjaxButton from the
nested secondForm? Maybe modal window content markup should be removed
from DOM after close?

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OSGi and class loading issues solution proposal

2008-07-03 Thread Daniel Stoch
On Thu, Jul 3, 2008 at 4:28 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> why dont you guys hash all this out. since no one uses osgi from the
> core team we are mostly unaware of these issues but do want to support
> the platform. once you settle down on the changes you want to see
> create jira issues and we will take it from there.

Ok, we'll do :).

Before I'll create any JIRA issue, first I want to ask other
"osgi-guys" what are they thinking about proposed changes. Maybe
someone will have a better/other concepts (or vote for these, like
Edward did).

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OSGi and class loading issues solution proposal

2008-07-03 Thread Daniel Stoch
On Thu, Jul 3, 2008 at 3:35 PM, Edward Yakop <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 3, 2008 at 9:27 PM, Daniel Stoch <[EMAIL PROTECTED]> wrote:
>> On Thu, Jul 3, 2008 at 2:53 PM, Edward Yakop <[EMAIL PROTECTED]> wrote:
>>> On Thu, Jul 3, 2008 at 8:24 PM, Daniel Stoch <[EMAIL PROTECTED]> wrote:
>>>> But there is a one assumption, that bundle with Wicket classes (you
>>>> probably have a Wicket bundled somehow in your app, don't you? :)),
>>>> should have a dynamic import for all classes which can be located in
>>>> many different bundles:
>>>> DynamicImport-Package: *"
>>>
>>> I don't think you should use DynamicImport-Package.
>>
>> I know it is not a very good practise, but Wicket jars/bundles already
>> have "DynamicImport-Package: *" ;). And sometimes is hard to avoid
>> this.
>
> Isn't this in general depends on the IClassResolver of wicket application?
> If IClassResolver is set and the rest of wicket bundles uses
> Application class resolver, it would be irrelevant whether the other
> wicket jars/bundles has DynamicImport-Package declaration.

Ok, but what about other (non-wicket) mechanisms, which do not use
IClassResolver (eg. creating proxy by Proxy.newProxyInstance(...) - it
uses classloader directly)?

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OSGi and class loading issues solution proposal

2008-07-03 Thread Daniel Stoch
On Thu, Jul 3, 2008 at 2:53 PM, Edward Yakop <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 3, 2008 at 8:24 PM, Daniel Stoch <[EMAIL PROTECTED]> wrote:
>> But there is a one assumption, that bundle with Wicket classes (you
>> probably have a Wicket bundled somehow in your app, don't you? :)),
>> should have a dynamic import for all classes which can be located in
>> many different bundles:
>> DynamicImport-Package: *"
>
> I don't think you should use DynamicImport-Package.

I know it is not a very good practise, but Wicket jars/bundles already
have "DynamicImport-Package: *" ;). And sometimes is hard to avoid
this.

> In pax wicket, we creates a delegating class resolver that tracks
> IClassResolver services.

So each bundle must export its IClassResolver service? What about
bundles independent from Wicket?

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OSGi and class loading issues solution proposal

2008-07-03 Thread Daniel Stoch
IWriteReplace.class }, 
handler);
}

Here again is our "friend":
Thread.currentThread().getContextClassLoader() call, which cause all
these problems in OSGi ;).

We want to inject InterfaceA declared as a spring bean in bundle1.
InterfaceA class is visible by our bundle1 (we must specify its
package in MANIFEST using Import-Package), so it is also visible by
current thread when creating this proxy. But the implementation of
InterfaceA (ClassA implements InterfaceA) which will be injected by
this proxy can be declared in other package than InterfaceA and in
another bundle. So ClassA may be not visible by class loader of
bundle1 (eg. this implementation can be provided by OSGI service).
Then invoking some method from InterfaceA on proxy to ClassA can cause
NoClassDefFoundError because some classes which are used by ClassA are
not visible by this proxy. In bundle1 we do not know which classes
they are so we cannot import their packages.

Proposal 1 (change actual method behavior):
The one solution is to always use
"LazyInitProxyFactory.class.getClassLoader()" with the assumption that
bundle with Wicket has in MANIFEST:
DynamicImport-Package: *
so all classes are visible by its class loader (this
"DynamicImport-Package: *" already exists in Wicket manifest files).
So it is this second call above (from patch for BEA), but I don't know
is it a good solution outside OSGi (?).

Proposal 2 (do not change actual method behavior):
Make LazyInitProxyFactory customizable to allows using a different
method to create proxy inside OSGi.


What do you think about such changes or maybe you have a better
solution for these problems?

--
Best regards,
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Output streams from external servlet

2008-06-25 Thread Daniel Frisk
I think this can be achived most easily with two requests. Create a  
class called ExternalPanel that displays a page that redirects to the  
servlet. Like this:


public class ExternalPanel extends Panel {
public ExternalPanel(String id, String url) {
super(id);
add(new InlineFrame("include", new RedirectPage(url)));
}
}

Hope this works for you.

// Daniel Frisk
jalbum.net


On 2008-06-25, at 01:28, krisNog wrote:



Hello everyone!

I have a question regarding external servlets. I have a panel that I  
would

like to stream content into from an external servlet. The overridden
onRender method I'm using for the Panel is shown below where "/ 
whatever" is

the servlet that is outputting some arbitrary HTML that I would like
rendered in my wicket panel. I know this isn't the "proper" way of  
doing

things but I have no control over the external servlet and need to
incorporate its output into my wicket panel...

My problem the code below dispatches to the servlet and the  
servlet
begins streaming out of sequence from the wicket panel. So the html  
from the

servlet starts streaming then the wicket page starts streaming and the
servlet html isn't within my wicket panel and then I start getting  
errors

(shown after the onRender method)...

Please let me know if I'm not being clear enough I'd be happy to  
elaborate!


protected void onRender(MarkupStream markupStream) {

	ServletWebRequest servletWebRequest = (ServletWebRequest)  
getRequest();
	HttpServletRequest request =  
servletWebRequest.getHttpServletRequest();


WebResponse webResponse = (WebResponse) getResponse();
	HttpServletResponse response =  
webResponse.getHttpServletResponse();


RequestDispatcher dispatcher =
request.getRequestDispatcher("/whatever");
try {
dispatcher.include(request, response);
response.flushBuffer();

} catch (ServletException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}


Error stack trace:

ERROR - WicketFilter   - closing the buffer error
java.lang.IllegalStateException: getWriter can't be used after
getOutputStream was invoked
at
org 
.apache 
.jetspeed 
.aggregator 
.impl.HttpBufferedResponse.getWriter(HttpBufferedResponse.java:68)

at
javax 
.servlet 
.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
	at  
org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java: 
355)

at
org 
.apache 
.wicket 
.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:73)

at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 
391)

at
org 
.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java: 
199)

at
org 
.apache 
.catalina 
.core 
.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
215)

at
org 
.apache 
.catalina 
.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

at
org 
.apache 
.catalina 
.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)

at
org 
.apache 
.catalina 
.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:594)

at
org 
.apache 
.catalina 
.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)

at
org 
.apache 
.jetspeed 
.dispatcher 
.JetspeedRequestDispatcher.include(JetspeedRequestDispatcher.java:73)

at
org 
.apache 
.wicket 
.protocol 
.http.portlet.WicketPortlet.processRequest(WicketPortlet.java:519)

at
org 
.apache 
.wicket 
.protocol.http.portlet.WicketPortlet.doView(WicketPortlet.java:416)

at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
at
org 
.apache 
.jetspeed 
.factory.JetspeedPortletInstance.render(JetspeedPortletInstance.java: 
103)

at
org 
.apache 
.jetspeed 
.container 
.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:277)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org 
.apache 
.catalina 
.core 
.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
269)

at
org 
.apache 
.catalina 
.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)

at
org 
.apache 
.catalina 
.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)

at
org 
.apache 
.catalina 
.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:594)

 

Re: Antwort: Re: Including wicket in JSPs?

2008-06-24 Thread Daniel Frisk
Perhaps you can use object as a drop in replacement of iframe? I  
haven't tested it in different web browsers so no guarantees from me :-)


http://java.net"; type="text/html">

// Daniel Frisk
jalbum.net


On 2008-06-24, at 08:37, [EMAIL PROTECTED] wrote:


Hi Jim,

thank you for your suggestion, but we use XHTML 1.0 Strict, so we  
can't

use IFrames.

Jan

jnorris <[EMAIL PROTECTED]> schrieb am 23.06.2008 18:26:27:



Hi Jan,

I have a legacy home-grown jsp application where I'm showing wicket

pages in
the content area using an inframe tag.  Initially I had a problem  
that

turned out to be caused by not using the closing tag for the iframe.

Here's

an example that works in IE6/7:


  
 iframe{ float:left; height:500px; width:100%; display:block;
frameborder:0;}
  



  
  
  http://someserver/WicketDemoPage?someparm=somevalue";
frameborder="0">
  
  


This technique works for me with bookmarkable pages, so in the above

case

the following would be put in the init() method of the Application

class:

mountBookmarkablePage( "/WicketDemoPage", WicketDemoPage.class );

HTH,
Jim


Jan.Koops wrote:


Hello !

We are using a JSP-based content management system for navigation,

page

layout etc.
Now we're evaluating Wicket as our "application" framework: A Wicket
application should appear in the center of the JSP based layout and
navigation.
Has somebody already included a wicket page via jsp:include or other

ways?
It seems to me a Page would be the wrong Wicket component to  
include,

since no body or header should be rendered.

Best regards
Jan



--
View this message in context: http://www.nabble.com/Including-
wicket-in-JSPs--tp18071635p18072855.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Page Expired with ModalWindow

2008-06-19 Thread Daniel Wu

I'm trying to open a new modal dialog, which is called from the
modalWindow.setWindowClosedCallback() of the first dialog. The first dialog
is being closed but the new one is not being opened. Does anyone know how to
open a second modal dialog when you click a AjaxLink of the first dialog,
which must be closed before the second one is opened?


Daniel Wu wrote:
> 
> Hi,
> the application I've been developing have to open modal dialogs in
> sequence. I have a dialog A, which is a panel with an AjaxLink, and when
> this AjaxLink is pressed, the dialog A should close and dialog B, which
> content is a WebPage, should be opened.
> 
> In order to close dialog A before opening dialog B, the only way I found
> to do that is simulating the click of an AjaxSubmitLink of the page that
> contains all these modal dialogs, appending some javascript on the
> AjaxRequestTarget, which calls the onClick() of the AjaxSubmitLink. This
> is done when I click the AjaxLink of the panel of dialog A.
> 
> After that, dialog B is being correctly opened. This dialog B also has an
> AjaxLink, which should close dialog B. This AjaxLink just call
> ModalWindow.closeCurrent(target); The problem is that when I click this
> AjaxLink, I'm getting a PageExpired error.
> 
> Am I doing something wrong? Does anyone have any idea of why I'm getting
> this PageExpired? Is there an easier way to open modal dialogs in
> sequence, opening a new one only the previous one is closed?
> 
> Daniel
> 

-- 
View this message in context: 
http://www.nabble.com/Page-Expired-with-ModalWindow-tp17993206p18010940.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: idea: automatic component repo

2008-06-19 Thread Daniel Frisk
A friend of mine has a motto "Appearence is everything". If this  
component marketplace also get a reasonably sexy frontend it could be  
a real winner. We have developed a kind of "Theme marketplace" for our  
photo album software but since we are tech guys we suitably named it  
"Skin repository" http://jalbum.net/skins


It has been a HUGE success and it's dead easy to install new skins for  
the end users. We as developers are of course more advanced users and  
could just as easy do a cvs/svn checkout. But it's not as easy and  
available, and even developers are as lazy (and not to mention busy)  
as everyone else. I for one would love to browse this component  
marketplace and checkout demos of fancy stuff!


// Daniel Frisk
jalbum.net


On 2008-06-19, at 10:17, Jonathan Locke wrote:




this sort of "marketplace" might give JSF's claim to have lots of  
prefab
components a real run for the money... i think with some effort, we  
could do

this in a few weeks...


Jonathan Locke wrote:



was thinking the same thing and would be the icing on the cake.   
website
never shuts down... crawler adds components and the demos just  
appear on

the site automagically via OSGi.
mebbe we need cheeser's transparent OSGi first though?




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Page Expired with ModalWindow

2008-06-18 Thread Daniel Wu

Hi,
the application I've been developing have to open modal dialogs in sequence.
I have a dialog A, which is a panel with an AjaxLink, and when this AjaxLink
is pressed, the dialog A should close and dialog B, which content is a
WebPage, should be opened.

In order to close dialog A before opening dialog B, the only way I found to
do that is simulating the click of an AjaxSubmitLink of the page that
contains all these modal dialogs, appending some javascript on the
AjaxRequestTarget, which calls the onClick() of the AjaxSubmitLink. This is
done when I click the AjaxLink of the panel of dialog A.

After that, dialog B is being correctly opened. This dialog B also has an
AjaxLink, which should close dialog B. This AjaxLink just call
ModalWindow.closeCurrent(target); The problem is that when I click this
AjaxLink, I'm getting a PageExpired error.

Am I doing something wrong? Does anyone have any idea of why I'm getting
this PageExpired? Is there an easier way to open modal dialogs in sequence,
opening a new one only the previous one is closed?

Daniel
-- 
View this message in context: 
http://www.nabble.com/Page-Expired-with-ModalWindow-tp17993206p17993206.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WUG (wicket user group) @ Øredev

2008-06-18 Thread Daniel Frisk
We might show up with a small team from the north :-) But nothing  
decided yet, november is after the summer and ages away.
I don't think you have to worry. when we have had the WUG meetings in  
Stockholm people have always been very late with registering.


// Daniel
jalbum.net


On 2008-06-18, at 13:36, Martijn Dashorst wrote:


I'll turn up :). And even try to do a presentation myself (not sure
about what, but something about integrating with some google goodness)

Martijn

On Wed, Jun 18, 2008 at 1:25 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:


Guys, I think this thread are taking a wrong turn, could you   
please keep it

a bit serious, i'd like to hear if anybody has intent to show up?

It'll be really bad publicity for wicket if it are arranged and  
then nobody

shows up. This is why I'd like an indicator on it.

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Localizer cache with 150.000+ entries causing OutOfMemory

2008-06-10 Thread Daniel Frisk

So the patch did help?

I too have observed this problem but it was at the moment less of a  
problem than other heap eaters, now this is next in line. We have  
added a script which automatically restarts the server when repeated  
OOME occurs and are down to a couple of times per week without the  
patch. But still, who wouldn't want to see months of uptime...


// Daniel
jalbum.net


On 2008-06-10, at 11:29, Stefan Fußenegger wrote:



Hi Igor,

Thanks for your quick reply and the patch, sorry for not searching the
mailinglist only but not JIRA.

Your patch was for 1.4, I applied it to 1.3.3, created a quickstart
including JUnit test and attached it to the JIRA issue. Hope this  
fix gets
into the next maintenance release. I am to lazy to create a properly  
patched

jar and a MVN repo for my team right now ;)

Regards, Stefan



igor.vaynberg wrote:


try applying this patch and see if it helps

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

-igor

On Mon, Jun 9, 2008 at 8:11 AM, Stefan Fußenegger
<[EMAIL PROTECTED]> wrote:


I am just analysing a heap dump (god bless the
-XX:+HeapDumpOnOutOfMemoryError flag) of a recent application  
cache due

to
an OutOfMemoryError ("GC overhead limit exceeded" to be precise).  
Using

jhat, the "175456 instances of class
org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry"  
immediately

got
my attention. While looking through the 107 instance of
ConcurrentHashMap, I
found one *really* big one: Localizer.cache has a hash table  
length of
262144, each of its 32 segments with about 5300 entries, where a  
hash key

is
a string, sometimes longer than 500 charactes, similar to (see
Localizer.getCacheKey(String,Component)):

fooTitle.bar- 
org.apache.wicket.markup.html.link.BookmarkablePageLink:fooLink- 
org.apache.wicket.markup.html.panel.Fragment:track- 
org.apache.wicket.markup.html.list.ListItem:14- 
my.company.FooListPanel$1:fooList-my.company.FooListPanel:foos- 
org.apache.wicket.markup.html.list.ListItem:0- 
my.company.BarListPanel$1:bars-my.company.FooListPanel:panel- 
my.company.boxes.BodyBox:2- 
org.apache.wicket.markup.repeater.RepeatingView:body- 
my.company.layout.Border:border-my.company.pages.music.FoobarPage: 
43-de-null


Those numbers pretty much convinced me: The localizer cache has  
blown

away
my application.

Looking at this hash keys, I suspect the following problem: those  
strings

are constructed from the "position" of a localized String on a page,
which
is quite a bad thing if you use nested list views or repeating  
views to
construct your page. For instance, I have a panel with a long  
(pageable)
list of entries, might be > 5000 entries which might appear on  
various
positions in a repeating view I use as a container for most of my  
pages.
Let's say there are 5 possible positions, this would cause 2500  
thousand

cached entries, each with a key of 300+ characters plus some more
characters
for the cached message - feel free to do the maths. From a quick  
estimate

I'd say: No wonder, this has blown away my app.

As a quick fix, I'd suggest to regularly clear the localizer  
cache, use a
more sophisticated cache (that expires old entries once in a  
while!!) or

to
disable the cache completely. However, don't try to overwrite
Localizer.newCache() and clear the cache regularly: clearCache()  
will

replace your cache with a ConcurrentHashMap (not using
Localizer.newCache()). However, quite unlikely, that this will  
happen as
newCache() is private anyway ;) I am going to add some code to  
clear the

cache regularly.

Best regards, Stefan

PS: I'll also create a JIRA issue, but I am really short on time  
right

now.

-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
--
View this message in context:
http://www.nabble.com/Localizer-cache-with-150.000%2B-entries-causing-OutOfMemory-tp17734931p17734931.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
---
Stefan Fußenegger
http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
--
View this message in context: 
http://www.nabble.com/Localizer-cache-with-150.000%2B-entries-causing-OutOfMemory-tp17734931p17751273.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-09 Thread Daniel Walmsley

1) Generifying* Wicket
  [X] Can best be done like currently in the 1.4 branch, where models
and components are both generified. I care most about the improved
static type checking generified models and components give Wicket.



2) How strongly do you feel about your choice above?
  [X] Whatever choice ultimately made, I'll happily convert/ start
using 1.4 and up.


**reason**

Strong typing is my friend. Refactoring is my friend. The stronger and  
clearer we make typing throughout Wicket the happier I'll be.


Code is written once and maintained a hundred thousand times. I'd  
always trade verbosity for maintainability.


D


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AutoCompleteTextField - autocomplete multiple fields

2008-06-06 Thread Daniel Stoch
Here it is a quickstart app with MultiAutoCompleteTextField component prototype:
http://interwicket.googlecode.com/files/multiautocomplete.zip

It is a draft solution, I have no time to polish it yet, so it is not
a super elegant ;). MultiAutoCompleteTextField works very similar like
a standard AutoCompleteTextField but there is a one new method:

protected Collection getRelatedComponents();

By default this method returns null and then this component works like
a AutoCompleteTextField (autocomplete only one field). If you want to
complete other components, you should return collection of those
components in this method (in the final solution specifying these
components should be a bit more comfortable). The next change is that
you should use AbstractMultiAutoCompleteRenderer, which has a new
method:

protected abstract Map getRelatedTextValues(Object object);

where you should return a map of entries containing
.

Maybe more elegant would be to define a
AbstractComponentMultiAutoCompleteRenderer with method:
protected abstract String getRelatedComponentTextValue(Object object,
Component component);

The main change is done in AbstractMultiAutoCompleteBehavior and
multi-autocomplete.js. The JS class Wicket.MultiAutoComplete now
accepts one more argument: a table of related components' markup ids.
Text values for these components are passed from renderer as arguments
of  tag in the following format: textvalue_markupId.

The rest you can see in the sources ;).

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-04 Thread Daniel Frisk
I implemented this by hooking in to serialization, just checking  
each object
in ObjectOutputStream.replaceObject and  
ObjectInputStream.resolveObject.
Also had to use my own PageMapEntries to get a suitable hook. Might  
work as

an idea for your implementation perhaps?


That's a cool idea for individual projects. For Wicket in general
however, the problem would be that it wouldn't work for every session
store (it wouldn't for instance for HttpSessionStore which doesn't
serialize on each request). Also, 1.3's default session store
serializes on each request, but does not reuse that serialized
instance until the back button is used (or if you're doing session
replication and come in through another node I guess). Are you sure
your detachment works like you think it does?


Well... I haven't actually hooked into the SessionStore but instead  
have implemented a special PageMapEntry that stores a serialized page  
with my "special serialization" (hooked in by overridden  
getPageMapEntry(...) in my BasePage). The special serialization takes  
place when the page is put into the pagemap. If the pagemap entry  
should be stored to disk later it is an object with serialized data  
that gets serialized again. I'm pretty sure it works as I intended and  
it might be generalized. The programming model sure is very nifty.


// Daniel
jalbum.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-04 Thread Daniel Frisk
I have to admit I haven't read thru all of this thread, so my answer  
might be to something else... But here we go:


I think we actually do something very similar to this in our system,  
we automatically detach any instances of jpa-enitities (replacing them  
with a surrogate with only the class and id) and then get them again  
from the db-cache if the page is reconstructed again. So far it works  
like a charm and the programming model is very convinient. Just dump  
whatever entity you like as member of a component and it is  
automatically detached and then loaded back when needed.


I implemented this by hooking in to serialization, just checking each  
object in ObjectOutputStream.replaceObject and  
ObjectInputStream.resolveObject. Also had to use my own PageMapEntries  
to get a suitable hook. Might work as an idea for your implementation  
perhaps?


// Daniel
jalbum.net


On 2008-06-04, at 19:03, Eelco Hillenius wrote:

On Wed, Jun 4, 2008 at 9:43 AM, Igor Vaynberg  
<[EMAIL PROTECTED]> wrote:

you still have ondetach()...but for convinience we can automatically
detach any imodel fields, i actually wanted to do this for a while...


I tried to write this two days ago, but wasn't able to pull it off...
I wrote an instantiation listener that introspected on the fields of
components and replaced IModel members with a proxy. These proxies
would register themselves with the request cycle for cleaning up
whenever the getObject was called, and the request cycle then would go
through the list of registered models and detach them at the end of
the request. The problem I ran into however is that these members can
be final, assigned at a later stage (typically are actually) and such.

But if there is some way to automatically detach model members, we
could get rid of the model member in component and instead just let
components have models by default where it actually always makes
sense, such as form components.

Anyway, that's something for 1.5. If it is fixable, I think that would
be the way out of the generics controversy :-)

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AutoCompleteTextField - autocomplete multiple fields

2008-05-30 Thread Daniel Stoch
Thank for your post. initHead() will be very helpful here. I have
voted for this issue.

--
Daniel

On Fri, May 30, 2008 at 9:23 AM, Roland Huss <[EMAIL PROTECTED]> wrote:
>
> Hi Daniel,
>
>
> Daniel Stoch-2 wrote:
>>
>> The main
>> problem is that the AutoCompleteTextField and related classes
>> (behavior, renderer) are not easily to extend (eg. it is necessary to
>> make a few modifications in wicket-autocomplete.js but in
>> AbstractAutoCompleteBehavior the standard js is added in renderHead
>> method, so there is no way to replace it, etc.). So I must made a copy
>> of these standard classes and then made modifications in them.
>>
>
> I had the same problem with extending AbstractAutoCompleteBehavior while
> working on wicketstuff-objectautocomplete and I already
> opened a Jira issue for that. You might want to vote for
> https://issues.apache.org/jira/browse/WICKET-1651 which provides a patch for
> putting AACB's renderHead() logic into a protected initHead() method, which
> then
> can be overwritten by a subclass and AACB.super.renderHead() is still
> called.
>
> ...roland
> --
> View this message in context: 
> http://www.nabble.com/AutoCompleteTextField---autocomplete-multiple-fields-tp17500271p17553097.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PagingNavigator WICKET-1548 - customization question

2008-05-29 Thread Daniel Stoch
In your solution I have to have a "first" link in my navigator markup
(HTML). But I don't want to have such link at all (even is pageNumber
is > 0).

And what about this condition in PagingNavigator.onBeforeRender(), why
not "!hasBeenRendered()"?

--
Daniel

On Thu, May 29, 2008 at 6:59 PM, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> class mypager extends pagingnavigator {
>  newPagingNavigationLink(String id, IPageable pageable, int pageNumber) {
> Link l=super.newPagingNavigationLink(...);
> if (pageNumber<1) {
>  l.setvisible(false);
> }
> return l;
>   }
> }
>
> -igor
>
> On Thu, May 29, 2008 at 5:49 AM, Daniel Stoch <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I've just made an upgrade to 1.3-SNAPSHOT. And now I have a problem
>> with customizing PagingNavigator component, because of moving creation
>> of components to onBeforeRender() method.
>> In out navigator we want to hide (remove) some links (eg. first and
>> last). So I have a constructor like this:
>>
>>  public FooterPagingNavigator(String id, IPageable pageable) {
>>super(id, pageable);
>>remove("first");
>>remove("last");
>>  }
>>
>> Now the exception is thrown because these links are added in
>> onBeforeRender(). So I can change our component and move code from
>> constructor to  onBeforeRender(), but now in this method in
>> PagingNavigator there is a condition:
>>
>>  if (get("first") == null)
>>  {
>>...
>>  }
>>
>> So each time I remove "first" component the code inside condition will
>> be called - so exception will be thrown then.
>> The question is why this condition is in such form:
>>
>>  if (get("first") == null)
>>
>> and no like this:
>>
>>  if (!hasBeenRendered())
>>
>> ?
>> Then I will be able to remove components using the same condition.
>>
>> --
>> Daniel
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PagingNavigator WICKET-1548 - customization question

2008-05-29 Thread Daniel Stoch
Hi,

I've just made an upgrade to 1.3-SNAPSHOT. And now I have a problem
with customizing PagingNavigator component, because of moving creation
of components to onBeforeRender() method.
In out navigator we want to hide (remove) some links (eg. first and
last). So I have a constructor like this:

  public FooterPagingNavigator(String id, IPageable pageable) {
super(id, pageable);
remove("first");
remove("last");
  }

Now the exception is thrown because these links are added in
onBeforeRender(). So I can change our component and move code from
constructor to  onBeforeRender(), but now in this method in
PagingNavigator there is a condition:

  if (get("first") == null)
  {
...
  }

So each time I remove "first" component the code inside condition will
be called - so exception will be thrown then.
The question is why this condition is in such form:

  if (get("first") == null)

and no like this:

  if (!hasBeenRendered())

?
Then I will be able to remove components using the same condition.

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AutoCompleteTextField - autocomplete multiple fields

2008-05-28 Thread Daniel Stoch
Hi,

On Wed, May 28, 2008 at 12:31 AM, francisco treacy
<[EMAIL PROTECTED]> wrote:
> something i was exactly looking for is this:
> http://digitarald.de/project/autocompleter/1-1/showcase/delicious-tags/
> , i.e. the ability to autocomplete multiple fields. and i also wanted
> to integrate it with wicket. if i understand correctly, what you've
> done is analogous.

Probably yes, it has the ability to autocomplete multiple fields :)

>
> so, haven't myself implemented it yet, i'm interested in your work.
> i'll also be waiting for someone else's advice on how to integrate
> that code. let me know if i can help.
>

I haven't integrated other javascript libraries in my solution, but I
have changed the default Wicket component (from wicket-extensions).
I'll try to prepare quickstart demo with this modified component to
show how it works.

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AutoCompleteTextField - autocomplete multiple fields

2008-05-27 Thread Daniel Stoch
Hi,

I have just written a sample form which contains fields for address
editing (post code, city, street, etc...). What I want to achieve is
to autocomplete fields like city, street when user enters a proper
post code. The standard AutoCompleteTextField component allows to
autocomplete the field which it is attached to (in my example it is a
post code field). I have realized that it is not so hard to extend
this standard component to support autocompletion of other - related
fields (components).

I have made a prototype of such component and it works ok. The main
problem is that the AutoCompleteTextField and related classes
(behavior, renderer) are not easily to extend (eg. it is necessary to
make a few modifications in wicket-autocomplete.js but in
AbstractAutoCompleteBehavior the standard js is added in renderHead
method, so there is no way to replace it, etc.). So I must made a copy
of these standard classes and then made modifications in them.

My proposition is to extend the functionality of AutoCompleteTextField
to support autocompletion of multiple fields (with backward
compatibilty, I can share my prototype) or at least to make a small
modification in actual classes (I can point these places which need
modifications), to allow easily to extend this component.

What do you think?

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Class>) casting troubles

2008-05-23 Thread Daniel Walmsley
Just to quickly weigh in on the verbosity argument:As someone who has coded Java (and Perl, C++, etc) in every environment from individual projects to multinational finance systems, I will say that verbosity of code runs a far, far, distant third (or twentieth) to:1. Readability/Understandability, and2. MaintainabilityBy illustrating succinctly what type of model (if any) a component will contain, generics in Wicket neatly accomplish point 1.By allowing your IDE to tell you when you're setting the wrong type of model object in a component it neatly accomplishes point 2.You write your code once. You maintain it thousands of times. The trade-off to me is perfectly clear, and this will be vindicated when Wicket-based enterprise projects start conspicuously succeeding where others have failed.Also, don't mistake "verbosity" for "DRY-ness". COBOL was verbose because it forced you to repeat yourself over and over. Java supports very elegant reuse, so each piece of functionality is written just once. Thanks to Annotations we've cut down (significantly) on boilerplate, and the whole appeal of Wicket is its ability to enable reuse at the web tier. Between generics, annotations and component reuse, this makes Wicket a very DRY-friendly framework, and has vastly reduced the amount of code I've had to cut for my clients.I've used every framework under the sun (no pun intended) and Wicket rules over them all.Cheers,DanOn 22/05/2008, at 07:20AM, Jonathan Locke wrote:I'm jumping into this conversation very late and I simply can't catch up onthis entire thread, but isn't it possible to have a non-generic build of thegeneric framework for people that don't want to use generics?Skimming this discussion, in general, I tend to agree with Eelco. A goodgeneral approach would be to fully generify the framework and then vote toback out the things which are really not helpful (for example, although pageis technically a component, pages often have no models, so it might be agood thing to a un-generify). Once we have found a practical/optimal levelof generification should we vote on it. Let's not throw the baby out withthe bathwater.Also, for myself, I disagree that type safety is not a primary goal ofgenerics. Even if the API were completely clear already, I'd still prefermore type safety.Martijn Dashorst wrote:On Wed, May 21, 2008 at 5:05 PM, Johan Compagner <[EMAIL PROTECTED]>wrote:Generics is type safetyI didn't say generics isn't type safety. But APPLYING generics for theWicket framework API *ISN'T* its primary goal. API clarity *IS*. Lessquestions on the mailing list regarding DDC, ListView, etc. is themain goal for applying generics in Wicket.I am against this abuse big time -1000 from meI'm -1000^1 for abusing my eyes and brain inthe way it currently is implemented in Wicket. It is completely andutterly unusable for beginners. There is no way this is going to makethe number of questions on the mailinglist less (other than by scaringaway anyone that wants to actually use the framework)Martijn-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]-- View this message in context: http://www.nabble.com/%28Class%3C--extends-Page%3C-%3E%3E%29--casting-troubles-tp17355847p17375350.htmlSent from the Wicket - User mailing list archive at Nabble.com.-----To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] Daniel WalmsleyDirector, Firesydee: [EMAIL PROTECTED]m: +61404864141 

AutoCompleteTextField in 1.4-SNAPSHOT

2008-05-21 Thread Daniel Peters

Hi,

i'm trying to implement an AutoCompleteTextField that selects from a List of POJOs. In my example i want to select an 
Artist from a Database. (see code at end of the mail)


I ran into two problems there...

1.) generic implementation
all classes are generic and of type "Artist", but AutoCompleteTextField's getModelObject() returns String althought it 
should return Artist. (see comment in code below with "ClassCastException".
Maybe it is wanted that the autocompletetextfield only returns String as Object, but then the generic implementation has 
bugs.

I really would like it to get a POJO back, so i wont have to retrieve it 
manually by the selected string again.

2.) the default selection is not put through the given IAutoCompleteRenderer.
When i load my form, the return value of my POJO's .toString() method is value 
of the textfield. (which can be alot of text)
It should use the renderer for the deault selection too.

best regards,
Daniel


code:
==
final IAutoCompleteRenderer cr = new 
AbstractAutoCompleteTextRenderer() {
@Override
protected String getTextValue(Artist object) {
return object.getName().getName();
}
};

final AutoCompleteTextField field =
new AutoCompleteTextField("ac", new 
Model(new SingleArtistBean()), cr) {
@Override
protected Iterator 
getChoices(String input) {
final List artists = new 
ArrayList();
// stripped in this mail... 
getting artists in here from DAO
return artists.iterator();
}
};

field.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
log.debug("selection model: " + 
field.getModel());

// java.lang.ClassCastException:
// java.lang.String cannot be cast to 
de.idealo.mdb.model.Artist
Artist a = field.getModelObject();  

}

});
add(field);





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Meetup in Stockholm/Sweden - 22/5

2008-05-15 Thread Daniel Frisk
On Thursday @ 4PM it's time for our next meetup in Stockholm. This  
time we have four Wicket related presentations and on top of that free  
beer and a poker tournament! :-)


More information at http://wicket.jalbum.net and don't forget to drop  
me an e-mail to tell that you are coming.


// Daniel
jalbum.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is the best way to create layouts in Wicket?

2008-05-05 Thread Daniel Stoch
On Mon, Apr 28, 2008 at 10:48 PM, Martijn Dashorst
<[EMAIL PROTECTED]> wrote:
> On 4/28/08, James Carman <[EMAIL PROTECTED]> wrote:
>  > So, how do you know that everything is good to go in the subclass
>  >  then?  You really shouldn't be calling a method implemented by the
>  >  subclass in the superclass' constructor.  In your case, it may work,
>  >  but in general, it's bad practice.
>
>  In general programming with your brain shut down is bad practice. I
>  see a lot of fear, uncertainty and doubt about calling overridable
>  methods from a constructor. There is no need to if you engage your
>  brain.
>
>  The biggest problem is that components may not have their final
>  position in the page yet, so you can't call some methods. Guess what?
>  That isn't any different from calling those methods in the constructor
>  in the first place. And it is easily solved by moving that logic to a
>  delayed execution such as a Model's getObject() method. Which really
>  provides a better solution in the first place.
>
>  Martijn
>

Hi,

Could you give a small example of such solution (like: "moving that
logic to a delayed execution such as a Model's getObject() method")?
Scott's use case would be a good starting point (pasted below). I
still don't know how to specify the component to pass to the add
method in the BasePage constructor. How would you change this to avoid
these "createXXXPanel()" calls (I hope you are not thinking about
calling add(...) methods in the RedPage constructor of course :))?

public BasePage(...) {
 add(createFooPanel("fooId"));
 add(createBarPanel("barId"));
}

protected abstract Panel createFooPanel(String id);
protected abstract Panel createFooPanel(String id);

-

public RedPage(...) extends BasePage {
 super(...);
}

@Override
protected Panel createFooPanel(String id) {
 // do not reference anything that is instantiation dependent
 return new RedFooPanel(id);
}

@Override
protected Panel createBarPanel(String id) {
 // do not reference anything that is instantiation dependent
 return new RedBarPanel(id);
}

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Spring 2.5 and Wicket, our vision about integration

2008-04-28 Thread Daniel Fernández Garrido
Hello Lars,


What do you mean by transient and magic? The attributes are not transient. A
> proxy is generated that is serialized. At runtime the real dependency is
> retrieved from the spring container.




The problem with that "magic", as I already expressed in this list some time
ago, is a formal issue. When you use the @SpringBean annotation you end with
something like this:

@SpringBean
MyService myService;

The problem here is that, in a Serializable class (the page), you are
declaring a non-serializable attribute (the service). Service interfaces are
not serializable (normally), and thus they should be declared as "transient"
here, and provide a way to recover the object after page serialization.

Of course, the SpringBean annotation does this for you... because it injects
a Serializable proxy in between the page and the service. Here comes the
magic. So, it works perfectly... but it is formally incorrect. A
non-serializable attribute of a serializable class, made serializable
under-the-scenes by a proxy... my IDE would not like that ;)




>
> I wouldn't use the approach you suggest for the following reasons:
>
> - Scatters your Application class all over your code. Any Component
> (Pages,
> Components) that need a Spring dependency need to the make the verbose
> method call ((MyApplication)Application).get().getService().



I don't really see a problem in that, but Sergio and I have discussed about
the possibility of having getXXXService() methods in a base page from which
the rest of your pages inherit, if that is more convenient for you.

And anyway, we include a static get() method in our application beans which
does the cast from Application.get(), so in fact it is:

"MyApplication.get().getService()"

much more elegant (IMHO, of course).



>
> - All your dependencies need to be in the Application class which can lead
> to a gigantic Application class if you use a lot of spring beans in your
> application.



As I see it, 90% or even 99% of the "spring beans" you should need to use
from your wicket pages (at least with our architecture) are only services...
and we don't usually have more than 10 or 15 services. Maybe 30 in a really
really big application... and these methods are only setters. Many
persistent beans are far bigger than that.



> - Risk of serializing your spring beans: Since the Annotaion Based
> approach
> generates proxies for your spring beans they can be safely serialized. The
> approach you suggest just returns the spring beans. This increases the
> change of accidentally serializing a spring bean if you do for instance:
>
> public class MyPage {
>  private Service service;
>  public MyPage() {
>this.service = Application.get().getService();
>  }
> }



Well... yes, this can happen. But this can happen with any of your
non-serializable objects. It's just a matter of being careful ;)



Regards,
Daniel.




>
>
> On Mon, Apr 28, 2008 at 10:39 AM, Sergio García <[EMAIL PROTECTED]>
> wrote:
>
> >
> > This posts is about the vision that my colleague Daniel Fernández and me
> > have
> > about how should be the integration between Wicket and Spring, using the
> > new
> > annotation functionalities provided by Spring 2.5. The @SpringBean
> > approach
> > is very useful, but its magic about a transient attribute that is not
> > transient make us fell uncomfortable.
> >
> > Four main steps are needed in this approach:
> >
> > 1) Change applicationClassname web.xml parameter to:
> >
> > 
> >applicationFactoryClassName
> >
> >org.apache.wicket.spring.SpringWebApplicationFactory
> >
> > 
> >
> > 2) Declare the application class as a Spring bean (Spring 2.5 way)
> >
> > @Component
> > public class MyApplication extends WebApplication
> >
> > 3) Declare into the application class the services with the correct
> Spring
> > 2.5 annotations
> >
> > @Autowired
> > private AaaService aaaService;
> >
> > 4) Add getters for the services
> > public AaaService getAaaService(){
> >return this.aaaService;
> > }
> >
> > For convenience, you can add a static get() method to retrieve the
> casted
> > application class
> >
> > public static MyApplication get() {
> >return (MyApplication) Application.get();
> > }
> >
> > So you can retrieve the service from any page with a simple
> > MyApplication.get().getAaaService()
> >
> >
> >
> >
> > As the applications class is not serializable, there are no need to make
> > transient magic.
> >
> > What do you think about this approach?
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/Spring-2.5-and-Wicket%2C-our-vision-about-integration-tp16930960p16930960.html
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


Re: WicketTester in spring, question about springinjection

2008-04-25 Thread Daniel Stoch
Hi,

You can do it in this way: in your application class you can define a method:

protected IComponentInstantiationListener newComponentInjectionListener() {
  return new SpringComponentInjector(this);
}

and then change init method to:

protected void init() {
  super.init();
  mount("/pages", PackageName.forPackage(Login.class.getPackage()));
  addComponentInstantiationListener(newComponentInjectionListener());
}

And in your test case:

  ...
  WebApplication app = new HelloApplication() {

@Override
protected IComponentInstantiationListener newComponentInjectionListener() {
  return new SpringComponentInjector(app, appctx));
}

  };

Maybe not a super elegant solution, but it should works.

--
Daniel

On Fri, Apr 25, 2008 at 3:21 PM, Sarkast <[EMAIL PROTECTED]> wrote:
>
>  Hello there,
>
>  I have a question which came up when trying to test my wicket pages.
>
>  Currently a working implementation is the following in my test class:
>
>  Creating an ApplicationContextMock, populating it with the beans, creating
>  the WebApplication, injecting the context and initializing the WicketTester.
>
>ApplicationContextMock appctx = new ApplicationContextMock();
> appctx.putBean("userDao", new InMemoryUserDoaMock());
> WebApplication app = new HelloApplication();
> app.addComponentInstantiationListener(new
>  SpringComponentInjector(app, appctx));
> wicketTester = new WicketTester(app);
> wicketTester.startPage(new Login());
>
>
>  The problem is, this test only runs when the
>  addComponentInstantiatenListener line is commented out in the
>  WebApplication's init method needed to test . Just like here:
>
> protected void init() {
> super.init();
> mount("/pages", PackageName.forPackage(Login.class.getPackage()));
> //  commented out for testing addComponentInstantiationListener(new
>  SpringComponentInjector(this));
> }
>
>  However, this line is important for the real system, obviously.
>
>  Is it possible to run the test without commenting out the mentioned line? We
>  would really like to not edit the real code, as it seems strange to modify
>  it so the test can run.
>
>  Hope that someone could understand what the problem is and help me :-(
>
>  Thanks in advance,
>
>  Tom
>
>  --
>  View this message in context: 
> http://www.nabble.com/WicketTester-in-spring%2C-question-about-springinjection-tp16895558p16895558.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Performance question

2008-04-15 Thread Daniel Frisk

Maybe the profiler that is bundled with NetBeans can be sufficent?
http://profiler.netbeans.org/

// Daniel
jalbum.net


On 2008-04-15, at 09:41, Johan Compagner wrote:


you can use this one for a while
http://yourkit.com/eap/index.jsp

not everything has to be opensource or free

johan


On Tue, Apr 15, 2008 at 12:39 AM, Ritz123 <[EMAIL PROTECTED]>  
wrote:




Havent used a profiler in a while - is there any opensource one  
which can

work with tomcat?


igor.vaynberg wrote:


profile it and see where the time goes, or paste some code from  
those

pages

-igor


On Mon, Apr 14, 2008 at 2:57 PM, Ritz123 <[EMAIL PROTECTED]>

wrote:


Hi,

I have created first couple of pages of my wicket application but  
have

some
performance concerns.

The pages (even the refresh alone takes 6-7 secs on Dual Core  
2.2GHz

Pentium
with 4GB of RAM). DB is located on the remote host, but has  
caching at

the
application server - so thats not adding to the latency for the

refresh.
Here is the requestlogger information for the home page refresh  
couple

of
times

Can someone point me to the direction on going about finding out  
what

is

taking this long other than (and may be simpler than) running a

profiler

on
the application - atleast initially.

My application is running in deployment mode and is running in  
tomcat.


=

! before getting top nav menuitems 1208209856242
! after getting top nav menuitems 1208209860972  
time

taken
4730
2008-04-14 14:51:07,677 (http-0.0.0.0-8080-Processor12) [
RequestLogger.jav
a:320:INFO ]
time=11567,event=BookmarkablePage[com.neobits.web.pages.Index],resp


onse 
= 
BookmarkablePage 
[com.neobits.web.pages.Index],sessionid=729B1C0D58665D15518
044E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14  
14:38:51

PDT

2008,re


quests 
=4,totaltime=28472,activerequests=3,maxmem=532M,total=266M,used=56M


! before getting top nav menuitems 1208209878458
! after getting top nav menuitems 1208209878696  
time

taken
238
2008-04-14 14:51:25,266 (http-0.0.0.0-8080-Processor4) [
RequestLogger.java
:320:INFO ]
time 
=6888,event=BookmarkablePage[com.neobits.web.pages.Index],respon



se 
= 
BookmarkablePage 
[com.neobits.web.pages.Index],sessionid=729B1C0D58665D1551804
4E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14  
14:38:51 PDT

2008,requ

ests 
=5,totaltime=35360,activerequests=3,maxmem=532M,total=266M,used=55M


! before getting top nav menuitems 1208209893292
! after getting top nav menuitems 1208209893526  
time

taken
234
2008-04-14 14:51:40,514 (http-0.0.0.0-8080-Processor6) [
RequestLogger.java
:320:INFO ]
time 
=7309,event=BookmarkablePage[com.neobits.web.pages.Index],respon



se 
= 
BookmarkablePage 
[com.neobits.web.pages.Index],sessionid=729B1C0D58665D1551804
4E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14  
14:38:51 PDT

2008,requ

ests 
=6,totaltime=42669,activerequests=4,maxmem=532M,total=266M,used=46M


--
View this message in context:
http://www.nabble.com/Performance-question-tp16690935p16690935.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
View this message in context:
http://www.nabble.com/Performance-question-tp16690935p16691538.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-08 Thread Daniel Stoch
I've created JIRA issue for this (with quickstart-app):
WICKET-1500: https://issues.apache.org/jira/browse/WICKET-1500

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: @SpringBean in init

2008-04-08 Thread Daniel Stoch
Hi,

I think he can :).
SpringWebApplication is not a Component so this:
addComponentInstantiationListener(new SpringComponentInjector(this));
doesn't matter here.

Before you want to use this @SpringBean in your init() method you should call:
InjectorHolder.getInjector().inject(this);

But then you should use AnnotSpringWebApplication or "manually" setup
injector in InjectorHolder:
InjectorHolder.setInjector(new AnnotSpringInjector(getSpringContextLocator()));

--
Daniel

On Tue, Apr 8, 2008 at 10:19 AM, Korbinian Bachl - privat
<[EMAIL PROTECTED]> wrote:
> Hi Mathias,
>
>  in short: you cant;
>
>  the @SpringBean injection is usually done before the class is really
> created so at a time wicket and spring aren't registered yet;
>
>  What you could do (not 100% sure) would be to call a simple proxy-pojo that
> gets you the data (even maybe a LoadableDetachable one?) during startup - so
> the firs request to @SpringBean is done after the creation and initalisation
> of the application class (and the line with the SpringComponentInjector).
>
>  Maybe it could also try to use your needed bean without the spring call but
> instantiate it directly?
>
>  Best,
>
>  Korbinian
>
>  Mathias P.W Nilsson schrieb:
>
>
> > Hi!
> >
> > I have extended the SpringWebApplication and the init method looks like
> >
> > addComponentInstantiationListener(new SpringComponentInjector(this));
> >
> >
> > I want to access my @SpringBean in the init method but it fails. How can I
> > do this? I need to cache
> > all users from a webservice in application startup.
> >
> >
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.io.StreamCorruptedException: invalid type code: 29

2008-04-07 Thread Daniel Wu
I've updated to the released Wicket 1.3.3, but I'm having the stackoverflow
there, but it wasn't happening on the snapshot of april 06. Was this fix
incorporated on the official Wicket 1.3.3 release?

On Sun, Apr 6, 2008 at 6:10 PM, Johan Compagner <[EMAIL PROTECTED]>
wrote:

> Dont know if the stream corrupt has the same root problem as the
> stackoverflow
> But that is just fixed.
>
> johan
>
>
> On Sat, Mar 29, 2008 at 11:22 PM, Daniel Wu <[EMAIL PROTECTED]> wrote:
>
> >
> > I've updated my wicket application to Wicket 1.3.2, but now, when I try
> to
> > switch between my application tabs (my tabs extend
> > org.apache.wicket.extensions.markup.html.tabs.AbstractTab) I'm getting
> > this
> > error:
> >
> > ERROR RequestCycle () - Could not deserialize object using
> >
> >
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> > object factory
> > java.lang.RuntimeException: Could not deserialize object using
> >
> >
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> > object factory
> >at
> > org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
> >at
> >
> >
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228)
> >at
> >
> >
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:706)
> >at
> >
> >
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311)
> >at org.apache.wicket.Session.getPage(Session.java:751)
> > ...
> > Caused by: java.io.StreamCorruptedException: invalid type code: 29
> >at java.io.ObjectInputStream.readObject0(Unknown Source)
> >at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
> >at java.io.ObjectInputStream.readSerialData(Unknown Source)
> >at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> >at java.io.ObjectInputStream.readObject0(Unknown Source)
> >at java.io.ObjectInputStream.readObject(Unknown Source)
> >at
> > org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:393)
> >
> > I've already downloaded and used the latest wicket 1.3 snapshot, which
> was
> > suggested to me here: https://issues.apache.org/jira/browse/WICKET-1445,
> > but I'm still having this error.
> >
> > I'm still using an old release of wicket-extensions. Since I updated to
> > wicket 1.3, I'm also having this warning:
> >
> > WARN  AbstractTextComponent () - Couldn't resolve model type of
> > Model:classname=[...], please set the type yourself.
> >
> > Could any of these be related to the Serialization error? Does anyone
> have
> > any idea of what is causing it?
> >
> > Daniel
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/java.io.StreamCorruptedException%3A-invalid-type-code%3A-29-tp16374745p16374745.html
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


Re: WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-07 Thread Daniel Stoch
Wicket version: 1.3.3

Daniel

On Mon, Apr 7, 2008 at 3:36 PM, Matej Knopp <[EMAIL PROTECTED]> wrote:
> What wicket version are you using?
>
>  -Matej
>
>
>
>  On Mon, Apr 7, 2008 at 2:38 PM, Daniel Stoch <[EMAIL PROTECTED]> wrote:
>  > Hi,
>  >
>  >  There is a strange behaviour when I'm trying refresh
>  >  WebMarkupContainer component using AjaxLink. I have a simple page:
>  >
>  >  public HomePage(final PageParameters parameters) {
>  > final WebMarkupContainer container = new 
> WebMarkupContainer("container");
>  > add(container);
>  > container.setOutputMarkupId(true);
>  > add(new AjaxLink("ajaxLink") {
>  >
>  >   public void onClick(AjaxRequestTarget target) {
>  > target.addComponent(container);
>  >   }
>  >
>  > });
>  >   }
>  >
>  >
>  >  
>  > 
>  > AjaxLink test
>  > 
>  > 
>  > 
>  > Header A
>  > 
>  > 
>  > Ajax request
>  > 
>  > 
>  >  
>  >
>  >  For the first time page is rendered as follows:
>  >  Header A
>  >  Ajax request
>  >
>  >  When I click "Ajax request" link the onClick metod is called to
>  >  refresh container component (which is WebMarkupContainer).
>  >  But instead of refreshing (repainting) of "container" markup (  >  wicket:id="container">... markup), it is dupliacted below the
>  >  original paragraph. Each click on this ajax link causes this paragraph
>  >  multiplication and after eg. 4 clicks the page looks like:
>  >  Header A
>  >  Header A
>  >  Header A
>  >  Header A
>  >  Header A
>  >  Ajax request
>  >
>  >  Is it a bug or I should not use WebMarkupContainer to refresh its
>  >  contents in ajax calls?
>  >
>  >  --
>  >  Daniel
>  >
>  >  -
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>
>
>  --
>  Resizable and reorderable grid components.
>  http://www.inmethod.com
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WebMarkupContainer multiplicated markup when using AjaxLink

2008-04-07 Thread Daniel Stoch
Hi,

There is a strange behaviour when I'm trying refresh
WebMarkupContainer component using AjaxLink. I have a simple page:

public HomePage(final PageParameters parameters) {
final WebMarkupContainer container = new WebMarkupContainer("container");
add(container);
container.setOutputMarkupId(true);
add(new AjaxLink("ajaxLink") {

  public void onClick(AjaxRequestTarget target) {
target.addComponent(container);
  }

});
  }




AjaxLink test



Header A


Ajax request




For the first time page is rendered as follows:
Header A
Ajax request

When I click "Ajax request" link the onClick metod is called to
refresh container component (which is WebMarkupContainer).
But instead of refreshing (repainting) of "container" markup (... markup), it is dupliacted below the
original paragraph. Each click on this ajax link causes this paragraph
multiplication and after eg. 4 clicks the page looks like:
Header A
Header A
Header A
Header A
Header A
Ajax request

Is it a bug or I should not use WebMarkupContainer to refresh its
contents in ajax calls?

--
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cannot add wicket component to

2008-04-05 Thread Daniel Walmsley

Hi there,

I'm writing a wicket template that produces a KML document, and it  
won't let me add labels or resolve component wicket:id within the KML  
 tag. D'oh!

I'm assuming this is a hangover from the HTML world.

My KML snippet: