RE: log4j.properties

2012-03-29 Thread Wilhelmsen Tor Iver
 Additionally you can put log4j.properties in its own jar and put it in 
 $tomcat/lib.

That's the default for Tomcat 6+, but formally the location for shared 
classpath entries is defined in the property common.loader in 
$tomcat/conf/catalina.properties. So e.g. to re-establish the older structure 
with common/classes etc. you would edit this entry accordingly.

- Tor Iver



Re: Canonical link

2012-03-29 Thread Francois Meillet
Hi Chris,

It may help you :  

Url url = RequestCycle.get().mapUrlFor(page.getClass(), getPageParameters());
String canonicalLink = RequestCycle.get().getUrlRenderer().renderFullUrl(url);


François


Le 27 mars 2012 à 00:49, Chris Colman a écrit :

 I'm implementing canonical in our wicket app and so I need to add a
 canonical link to any page whose request has the ;jessionid=SESSIONID
 parameter but NOT for those pages that don't have the jsessionid
 parameter
 
 Eg.,
 
 If the page request was:
 
 http://www.mydomain.com/page/aboutus;jsessionid=SESSIONID
 
 then I need to output a canonical link with
 
 http://www.mydomain.com/page/aboutus
 
 as the reference but if the page request was for
 
 http://www.mydomain.com/page/aboutus
 
 then no canonical link should be provided because the request was for
 the canonical page.
 
 
 Is there a way in wicket to tell if the jsession parameter was provided
 in the URL?
 
 I've tried all the usual J2EE methods but it seems like it 'pre-strips'
 the jsessionid and so I can't tell if it was present or not in the
 original request.
 
 I tried using isRequestedSessionIdFromURL
 http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/H
 ttpServletRequest.html#isRequestedSessionIdFromURL%28%29  but that
 always seems to return false - probably because a cookie has already
 been made available. I guess when the request is from a search engine no
 cookies are enabled so isRequestedSessionIdFromURL would return true.
 Possibly meaning that I've just answered my own question ;) but I
 wouldn't mind confirming with others that the logic is correct.
 
 Chris
 
 
 __
 This email has been scanned by Netintelligence
 http://www.netintelligence.com/email


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



When I am open title page of my application, the next error occurs...

2012-03-29 Thread Ivan V. Kokhan
Dear All,

Please help me to fix next error.

Which part of the documentation I may use for the solution of this problem?

 

When I am open title page of my application, the next error occurs.


--

Last cause: $Proxy155 cannot be cast to org.omg.CORBA.Object

WicketMessage: Can't instantiate page using constructor 'public
de.connectodent.HomePage(org.apache.wicket.request.mapper.parameter.PagePara
meters)' and argument 'code=[a134ca9b-8ff0-44f9-b0c8-6be47531366d]'. Might
be it doesn't exist, may be it is not visible (public).

.

(full stacktrace in attached png file)


--

 

Thank you very much

Ivan

 


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

Re: When I am open title page of my application, the next error occurs...

2012-03-29 Thread Martin Grigorov
Hi,

Do you use Corba in your app ?
grep for CORBA and remove it if it's there

On Thu, Mar 29, 2012 at 11:16 AM, Ivan V. Kokhan i...@rql.kiev.ua wrote:
 Dear All,

 Please help me to fix next error.

 Which part of the documentation I may use for the solution of this problem?



 When I am open title page of my application, the next error occurs…

 --

 Last cause: $Proxy155 cannot be cast to org.omg.CORBA.Object

 WicketMessage: Can't instantiate page using constructor 'public
 de.connectodent.HomePage(org.apache.wicket.request.mapper.parameter.PageParameters)'
 and argument 'code=[a134ca9b-8ff0-44f9-b0c8-6be47531366d]'. Might be it
 doesn't exist, may be it is not visible (public).

 …

 (full stacktrace in attached png file)

 --



 Thank you very much

 Ivan





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



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

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



Re: Repalcement of servlets in wicket.

2012-03-29 Thread SudeepShakya
I am using version 1.4.10

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Repalcement-of-servlets-in-wicket-tp4514480p4514980.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: When I am open title page of my application, the next error occurs...

2012-03-29 Thread Ivan V. Kokhan
Martin, thank you very much!

We don't use CORBA in our app.
We use JBoss-4.2.2 and EJB 3.0 + Hibernate technologies.
Our Wicket application runs as web-application on our JBoss server.

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Thursday, March 29, 2012 1:00 PM
To: users@wicket.apache.org
Subject: Re: When I am open title page of my application, the next error
occurs...

Hi,

Do you use Corba in your app ?
grep for CORBA and remove it if it's there

On Thu, Mar 29, 2012 at 11:16 AM, Ivan V. Kokhan i...@rql.kiev.ua wrote:
 Dear All,

 Please help me to fix next error.

 Which part of the documentation I may use for the solution of this
problem?



 When I am open title page of my application, the next error occurs.



--

 Last cause: $Proxy155 cannot be cast to org.omg.CORBA.Object

 WicketMessage: Can't instantiate page using constructor 'public

de.connectodent.HomePage(org.apache.wicket.request.mapper.parameter.PagePara
meters)'
 and argument 'code=[a134ca9b-8ff0-44f9-b0c8-6be47531366d]'. Might be it
 doesn't exist, may be it is not visible (public).

 .

 (full stacktrace in attached png file)



--



 Thank you very much

 Ivan





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



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

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




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



RE: Repalcement of servlets in wicket.

2012-03-29 Thread Jeffrey Schneller
I would stop using 1.4.10 as it is very old at this point.  If you are just 
starting out I would use 1.5.x where x is the latest revision.  If you need to 
stay in the 1.4.x world then I would go with 1.4.20 which I think is the most 
current version.

-Original Message-
From: SudeepShakya [mailto:shakyasud...@live.com] 
Sent: Thursday, March 29, 2012 6:08 AM
To: users@wicket.apache.org
Subject: Re: Repalcement of servlets in wicket.

I am using version 1.4.10

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Repalcement-of-servlets-in-wicket-tp4514480p4514980.html
Sent from the Users forum mailing list archive at Nabble.com.

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


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



Re: StackOverflowError in session creation

2012-03-29 Thread vineet semwal
On Thu, Mar 29, 2012 at 10:49 PM, kshitiz k.agarw...@gmail.com wrote:
 Hi,

 I am trying to save an object in a session like this:


 public class Login extends BasePage {

        private static final long serialVersionUID = 1L;
        UserDomain userDomain = new UserDomain();

    public Login()
    {


        // form
        *StatelessForm  loginForm = new StatelessForm (loginForm, new
 CompoundPropertyModel(userDomain));*
        add(loginForm);

        // emailId field
        Label emailIdLabel = new Label(emailIdLabel, EmailId);
        loginForm.add(emailIdLabel);
        final RequiredTextField emailId = new RequiredTextField(emailId);
        loginForm.add(emailId);
        emailId.add(EmailAddressValidator.getInstance());

        // password field
        Label passwordLabel = new Label(passwordLabel, Password);
        loginForm.add(passwordLabel);
        final PasswordTextField password = new
 PasswordTextField(password);
        loginForm.add(password);

        Button submitButton = new Button(submitButton) {
            /**
                         *
                         */
                        private static final long serialVersionUID = 1L;

                        @Override
            public void onSubmit() {

                                userDomain.setBlocked(true);
                                userDomain.setEmaild(emailId.getValue());
                                userDomain.setPassword(password.getValue());

                                UserService userService = new UserService();
                                userDomain = userService.login(userDomain);

 *                               MySession.get().setMyObject(userDomain);*
                                setResponsePage(Home.class);

            }
        };

        loginForm.add(submitButton);


    }



 }

 My session class is:

 public class MySession extends WebSession{

        /**
         *
         */
        private static final long serialVersionUID = 1L;



        public MySession(Request request) {
                super(request);
                // TODO Auto-generated constructor stub
        }

        private Object myObject;



        public final Object getMyObject() {
                return myObject;
        }

        public final void setMyObject(Object myObject) {
                this.myObject = myObject;
        }



        // if you use java = 1.5 you can make use of covariant return types
 *       public static MySession get() {
           //     return (MySession)MySession.get();   --infinite recursion
   return  (MySession)Session.get();
 *       }

 }

 But whenver I try to login into the app, I get the following error:

 WicketMessage: Method onFormSubmitted of interface
 org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component
 [MarkupContainer [Component id = loginForm]] threw an exception

 Root cause:

 java.lang.StackOverflowError
     *at WalknShine.MySession.get(MySession.java:34)*
     at WalknShine.MySession.get(MySession.java:34)
     at WalknShine.MySession.get(MySession.java:34)
     ...
 Complete stack:

 org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of
 interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at
 component [MarkupContainer [Component id = loginForm]] threw an exception
     at
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:193)
     at
 org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:161)
     at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
     at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1252)
     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331)
     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438)
     at org.apache.wicket.RequestCycle.request(RequestCycle.java:546)
     at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)

 java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at java.lang.reflect.Method.invoke(Method.java:601)
     at
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
     at
 org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:161)
     at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
     at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1252)
     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1331)
     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1438)
     at 

Re: Atmosphere multi-request

2012-03-29 Thread Pierre Goupil
Good evening,

Sorry for the lag, I missed this thread!

The multi-request functionality of Atmosphere allows Comet channels and
subscribing / pushing only in the right channel.

There an example of Atmosphere / Wicket here:

https://github.com/martin-g/wicket-atmosphere-tests

Atmosphere is a Comet framework and what I miss is its multi-request
functionality. For the moment, whatever the number of channels I have is,
every callback of every channel is called when getting a Comet response.
That's overkill in terms of client-side CPU usage. So I'd like to have the
said functionality integrated to Wicket but I was unable to have it work.

Any help will be appreciated.

Regards,

Pierre Goupil





On Tue, Mar 13, 2012 at 5:20 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 Hi Pierre,

 Can you give us a url that describes what multi-request is and what
 issues do you face with it ?

 On Tue, Mar 13, 2012 at 5:40 PM, Pierre Goupil goupilpie...@gmail.com
 wrote:
  Good afternoon,
 
  I'm currently trying to integrate Atmosphere Comet framework and Wicket.
 I
  used to have them working, but since the introduction of multi-request
  functionality, I have been unable to integrate both of them.
 
  So my question is simple: did anyone managed to have a working app with
  Atmosphere multi-request and Wicket (any version)?
 
  Regards,
 
  Pierre Goupil



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

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




-- 
Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
assez fort.


Re: AjaxPagingNavigator does not scroll to top

2012-03-29 Thread Andre Schütz
Thank you for the answer. Works perfectly.

On Fri, 23 Mar 2012 15:18:22 +0200
Martin Grigorov mgrigo...@apache.org wrote:

 Hi,
 
 Yes, it is normal. This is left to the application to decide whether
 it wants to scroll or not.
 You can use ajaxRequestTarget.appendJavaScript(scrollTo(0. 0)) to
 accomplish that.
 
 On Fri, Mar 23, 2012 at 3:13 PM,  wic...@faustas.de wrote:
  Hello,
 
  I use an AjaxPagingNavigator for clicking through my results. I have a list 
  and the AjaxPagingNavigator below it. When I click on the 
  AjaxPagingNavigator, the next results are displayed but the scrollbar of 
  the browser stays at the bottom of the page.
 
  Is that a normal behavior? Can I do anything to start at top of the list 
  when I click on the AjaxPagingNavigator?
 
  Thanks,
  Andre
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


-- 
Andre Schütz wic...@faustas.de

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



Re: Atmosphere multi-request

2012-03-29 Thread Pierre Goupil
On Thu, Mar 29, 2012 at 11:04 PM, Pierre Goupil goupilpie...@gmail.comwrote:


 https://github.com/martin-g/wicket-atmosphere-tests


lol

I've just realized it is a project of yours!


RE: log4j.properties

2012-03-29 Thread JASON HOLT

Thanks for your help. I included the properties file in a separate jar.
  From: toriv...@arrive.no
 To: users@wicket.apache.org
 Date: Thu, 29 Mar 2012 08:38:57 +0200
 Subject: RE: log4j.properties
 
  Additionally you can put log4j.properties in its own jar and put it in 
  $tomcat/lib.
 
 That's the default for Tomcat 6+, but formally the location for shared 
 classpath entries is defined in the property common.loader in 
 $tomcat/conf/catalina.properties. So e.g. to re-establish the older 
 structure with common/classes etc. you would edit this entry accordingly.
 
 - Tor Iver
 
 B�CB��[��X��ܚX�KK[XZ[�\�\��][��X��ܚX�P�X��]�\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[�\�\��Z[�X��]�\X�K�ܙ�B�
  

AjaxRequestTarget.add(component) not replacing component, but duplicating it

2012-03-29 Thread Andrew Geery
I have a ListMultipleChoice component (Wicket 1.5.4) with a Behavior added
to it to enable the use of the Chosen ( http://harvesthq.github.com/chosen/ )
JS library.  Everything works fine until I attempt to add() the component
to a page in an AjaxRequestTarget.  Rather than replacing the component in
the DOM, the add call creates a duplicate component.  Looking in the DOM, I
end up with multiple divs with the same id.

I'm guessing there is some weird interaction between the Chosen JS library
and the Wicket AJAX library.  Has anyone seen anything like this before?

Thanks
Andrew