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

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

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



Re: PasswordTextField not showing the value

2010-01-27 Thread Marat Radchenko
You can't edit user password because you only store its hash. Don't you?

2010/1/27 Josh Kamau joshnet2...@gmail.com:
  I have would like to edit an existing user's properties including the
 password. However, all the other properties are appearing on their
 corresponding fields except the password field. How do i make it appear?.

   here is my component for editing users


   public class UserPanel extends Panel {

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

   �...@inject
    private UserDao userDao;

    private TextFieldString txtUsername;

    private PasswordTextField txtPassword;

    private PasswordTextField txtConfPassword;

    private User user;

    public UserPanel(String id, final User user) {
        super(id);

        this.user = user;

        FormUser frmCreateUser = new FormUser(frmCreateUser) {

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

           �...@override
            protected void onSubmit() {
                if (user.getId() == null) {
                    Long id = userDao.saveUser(this.getModelObject());
                    info(User # + id +  has been created);
                } else {
                    Long id = userDao.updateUser(this.getModelObject());
                    info(User # + id +  has been updated);
                }
            }

        };

        frmCreateUser.setModel(new ModelUser(user));
        add(frmCreateUser);

        txtUsername = new TextFieldString(txtUsername,
                new PropertyModelString(user, username));
        txtPassword = new PasswordTextField(txtPassword,
                new PropertyModelString(user, password));
        txtConfPassword = new PasswordTextField(txtConfPassword,
                new PropertyModelString(user, password));


        frmCreateUser.add(txtUsername);
        frmCreateUser.add(txtPassword);
        frmCreateUser.add(txtConfPassword);
    }

   the txtPassword and txtConfPassword fields display empty and so i have to
 provide a password every time i edit the user.

  Kindly help

 Regards

  Josh


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



Re: Serialization test

2010-01-27 Thread Marat Radchenko
Force your servlet container to serialize sessions after each request
and add non-serializable field to objects that you don't want to be
serialized.

2010/1/27 pieter claassen pie...@claassen.co.uk:
 I want to test the following:
 1. Whether I have any private members stored on my pages that are not
 a primitive java type, or IModel
 2. If they are IModels, that I do call onDetach() on them.

 Reflection helps me to answer the 1st question but the second one baffles
 me. Any tips on how to verify that I am calling onDetach() on all privately
 stored  IModels?

 I notice that Martijn has a presentation on the subject here, but there is
 just not enough code in there for me to get to solution myself.
 http://www.slideshare.net/dashorst/keep-your-wicket-application-in-production

 Thanks,
 Pieter


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



Re: final in MarkupContainer#add(Component...) method

2010-01-18 Thread Marat Radchenko
 About the ids with digits for repeater, override the onBeforeRender method
 and remove that validation if you need/want.
Impossible. I just filed https://issues.apache.org/jira/browse/WICKET-2684

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



Re: final in MarkupContainer#add(Component...) method

2010-01-18 Thread Marat Radchenko
2010/1/14 Ilya German ilja.germ...@parex.lv:
 Hello!

 We're struggling with working around the final modifier for the 
 MarkupContainer#add(Component ...) method.
 We have the following scenario:
 1. We'd like to use a repeater to add some components to the form.
 2. We'd like these components to work with CompoundPropertyModel, thus we 
 need these to have meaningful wicket ids
 3. We'd like not to find ourselves backstabbed by the non-numeric ids in the 
 RepeatingView's children.

 This brings us to a suggested wrapping of the children in 
 WebMarkupContainers, but we'd like to hide it to get rid of the

 webmarkupcontainer item=new webmarkupcontainer(rv.newchildid());

 part. To do this, it seems logical to extend the RepeatingView overriding the 
 add() method to be wrapping every component, however the add() method is 
 final :(

 Could anyone suggest some other way to resolve this situation? Or, perhaps, 
 it could be acceptable to officially remove the final modifier from the 
 add() method?

 Thanks in advance!

 Ilya German.

1. You can use PropertyModel and numeric ids isn't a problem
2. You can wait for resolution on
https://issues.apache.org/jira/browse/WICKET-2684 and (if it gets
fixed) use non-numeric child ids in RepeatingView.

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



Re: Disabled Navigation if Action.ENABLE is restricted for page

2010-01-15 Thread Marat Radchenko
Why you're disabling whole page in first place?

2010/1/15 Giambalvo, Christian christian.giamba...@excelsisnet.com:
 Hi all,

 i have a litte problem.

 I have implemented an own AuthorizationStrategy where I check I a user
 is allowed to render/enable a component/page.
 Each page has a navigation. If I restrict enable for a page, then the
 navigation gets also disabled.
 I tried overwriting isEnabled() for the whole navigation and its childs,
 but doesn't work.
 So the main question is how to have a component on a page always be
 enabled even if the page is disabled?

 Greets chris

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



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



Re: Wicket feedback

2009-12-23 Thread Marat Radchenko
Take a look at HibernateObjectModel from databinder project.

2009/12/22  sudhir543-...@yahoo.com:
 Thanks for clarifying the things,

 show me a framework that makes this easier...
 I think that when I when I was working with Webwork (Struts2 now) I dint need 
 to do any thing else other than specifying spring factory in one of config 
 file. Neither I was forced to use annotations.


 LDMA might have nothing to do with Integration, but from my lil experience, I 
 think that When I want to pass my entity as a model to some components (which 
 might be serialized as in most cases) It wouldnt work with normal models, I 
 will have to manage a separate LDM class for each of that if I don't want 
 lazyloading exceptions.





 Sudhir NimavatSenior software engineer.
 Quick start global PVT LTD.
 Baroda - 390007
 Gujarat, India

 Personally I'm always ready to learn, although I do not always like being 
 taught





 
 From: Igor Vaynberg igor.vaynb...@gmail.com
 To: users@wicket.apache.org
 Sent: Wed, 23 December, 2009 12:03:05 AM
 Subject: Re: Wicket feedback

 On Tue, Dec 22, 2009 at 10:20 AM,  sudhir543-...@yahoo.com wrote:
 Yes, from my little experience, I just started learning it [Because I feel 
 it has some thing different to offer]

orly? so what about integrations with hibernate, jdo, jpa, spring,
 guice, cdi, etc? i guess all those things are a figment of my
 imagination.

 As I said it takes comparatively(to some others) more efforts.
 If I talk about spring, using spring with wicket needs special care, one 
 will have to take care that he  does not serialize entire containers.

 that is taken care for you by the framework. all you have to do is
 install the component injector (1 line of code) and use @SpringBean
 annotations in your pages to inject your dependencies. show me a
 framework that makes this easier...

I haven't  tried to use hibernate yet (just playing with inmemories) but I 
think that I will have to  create LoadableDetachable model of most of my 
entities (plz correct me if I am wrong)

 LDMs have nothing to do with integration with other frameworks but how
 you want to manage state. in some cases it makes sense not to use LDMs
 for hibernate entities.

 -igor








 Sudhir NimavatSenior software engineer.
 Quick start global PVT LTD.
 Baroda - 390007
 Gujarat, India

 Personally I'm always ready to learn, although I do not always like being 
 taught





 
 From: Igor Vaynberg igor.vaynb...@gmail.com
 To: users@wicket.apache.org
 Sent: Tue, 22 December, 2009 9:46:45 PM
 Subject: Re: Wicket feedback

 On Tue, Dec 22, 2009 at 6:21 AM,  sudhir543-...@yahoo.com wrote:

 lol

 Ajax with wicket is easy.. if you do it the wicket way..  But integration 
 with other engines isnt going to be easy.


 maybe if you have little experience you should not be making such
 sweeping statements. there are projects in wicketstuff and the
 internets that integrate wicket with jquery, dojo, prototype, ricoh,
 mootools, etc. and they do so easily, because wicket makes it easy.

 Not only Ajax, from my little wicket experience, I would say wicket works 
 great in isolation, however integrating it to any other framework would 
 take (and it takes) comparatively more efforts.

 orly? so what about integrations with hibernate, jdo, jpa, spring,
 guice, cdi, etc? i guess all those things are a figment of my
 imagination.

 -igor





 Sudhir NimavatSenior software engineer.
 Quick start global PVT LTD.
 Baroda - 390007
 Gujarat, India

 Personally I'm always ready to learn, although I do not always like being 
 taught





 
 From: Ricardo Mayerhofer ricardo.ekm.lis...@gmail.com
 To: users@wicket.apache.org
 Sent: Tue, 22 December, 2009 6:49:02 PM
 Subject: Wicket feedback

 Hi all,
 We've just finished with success a wicket project for a large online 
 retailer. I think wicket is the best framework out there, but as any other 
 project there is room for improvement. I will talk about some topics 
 bellow, I hope it can help in some way.

 - Separation of corcerns
 I think we could get a better separation of concerns if page class were 
 focused more in behavior and html were more focused in display (or view).
 What I mean is, some times we have components that the main purpose is to 
 add behavior, and we have to add extra markup just to satisfy wicket 1:1 
 mapping. Take CheckGroup for exaple, it is a component focused on behavior, 
 even though we have to add a reference to it in HTML.

 When creating composite input fields (like date), the usual way is to 
 create a panel even if you are not interested in reusability. A interesting 
 aproach is to insert a hidden text field in HTML mapped to a component that 
 controls other components input. It makes easier to integrate with designer 
 and to preview in browser. If we didn't have this limitation the hidden 
 input would not be necessary and the development 

Re: Basic concept of Wicket

2009-12-17 Thread Marat Radchenko
 - Why is the WebPage created every time I reload the website, I though they
 are only created once?
Because it's stateless. Define 'once', btw.

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



Re: (seemingly) session-related performance issue

2009-12-16 Thread Marat Radchenko
https://issues.apache.org/jira/browse/WICKET-2613

2009/12/16 Kurt Heston khes...@hestonsystems.com:
 Tonight, I moved from v1.3.5 to v1.4.4.  I'm up and running after
 changing all of my getModel statements, but an old performance problem
 has shown up again.

 Back when I moved to 1.3.x, pages started loading really slowly,
 especially ones with lots of links.  However, in reading through the
 forums, the newSessionStore/HttpSessionStore trick was found and it
 worked like a charm.

 The trouble is, now that I'm on 1.4.4 the problem is back and no amount
 of fiddling with HttpSessionStore or DiskPageStore has made any
 difference.  My pages takes minutes to load (seriously) and none of my
 Ajax works.

 Anyone have a hint or two to give me as to how I can resolve this?

 -
 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



Fwd: DELIVERY FAILURE: Invalid/unknown recipient [MAPI Reason Code: 1, MAPI Diagnostic Code 1]

2009-12-16 Thread Marat Radchenko
Please, unsubscribe him.

-- Forwarded message --
From:  postmas...@td.com
Date: 2009/12/16
Subject: DELIVERY FAILURE: Invalid/unknown recipient [MAPI Reason
Code: 1, MAPI Diagnostic Code 1]
To: slonopotamusor...@gmail.com


Your message

 Subject: Re: (seemingly) session-related performance issue

was not delivered to:

 john.mattu...@td.com

because:

 Invalid/unknown recipient [MAPI Reason Code: 1, MAPI Diagnostic Code 1]



NOTICE OF CONFIDENTIALITY
This communication including any information transmitted with it is
intended only for the use of the addressees and is confidential.
If you are not an intended recipient or responsible for delivering
the message to an intended recipient, any review, disclosure,
conversion to hard copy, dissemination, reproduction or other use
of any part of this communication is strictly prohibited, as is the
taking or omitting of any action in reliance upon this communication.
If you receive this communication in error or without authorization
please notify us immediately by return e-mail or otherwise and
permanently delete the entire communication from any computer,
disk drive, or other storage medium.

If the above disclaimer is not properly readable, it can be found at
www.td.com/legal

AVERTISSEMENT DE CONFIDENTIALITE
Ce courriel, ainsi que tout renseignement ci-inclus, destiné uniquement
aux destinataires susmentionnés,  est confidentiel.  Si vous
n'êtes pas le destinataire prévu ou un agent responsable de la
livraison de ce courriel, tout examen, divulgation, copie, impression,
reproduction, distribution, ou autre utilisation d'une partie de ce
courriel est strictement interdit de même que toute intervention ou
abstraction à cet égard.  Si vous avez reçu ce message par erreur ou
sans autorisation, veuillez en aviser immédiatement l'expéditeur par
retour de courriel ou par un autre moyen et supprimer immédiatement
cette communication entière de tout système électronique.

Si l'avis de non-responsabilité ci-dessus n'est pas lisible, vous
pouvez le consulter à www.td.com/francais/legale

Final-Recipient: rfc822;john.mattu...@td.com
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Notes;Invalid/unknown recipient [MAPI Reason Code:
1, MAPI Diagnostic Code 1]


-- Пересылаемое сообщение --
From: slonopotamusor...@gmail.com
To: users@wicket.apache.org, khes...@hestonsystems.com
Date: Wed, 16 Dec 2009 05:11:44 -0500
Subject: Re: (seemingly) session-related performance issue

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

2009/12/16 Kurt Heston khes...@hestonsystems.com:
 Tonight, I moved from v1.3.5 to v1.4.4.  I'm up and running after
 changing all of my getModel statements, but an old performance problem
 has shown up again.

 Back when I moved to 1.3.x, pages started loading really slowly,
 especially ones with lots of links.  However, in reading through the
 forums, the newSessionStore/HttpSessionStore trick was found and it
 worked like a charm.

 The trouble is, now that I'm on 1.4.4 the problem is back and no amount
 of fiddling with HttpSessionStore or DiskPageStore has made any
 difference.  My pages takes minutes to load (seriously) and none of my
 Ajax works.

 Anyone have a hint or two to give me as to how I can resolve this?

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



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

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



Re: Domain Object Serialization

2009-12-16 Thread Marat Radchenko
2009/12/16 Janning Vygen vy...@kicktipp.de:
 Hi all,

 i am using wicket for a few days. It is great!
Yeah, it is :)

 User is a persistableEntity managed by Hibernate. User is NOT Serializable.
Do you mean it doesn't implement Serializable?

 But if i run it, i do not get any SerializableExceptions.
 But the session gets serialized at the end of the requestcycle?
Session _may_ get serialized under certain circumstances. Nobody
promised you it _will_ do that always.

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



What is the proper way to output arbitrary (non-html) response from wicket pages?

2009-12-16 Thread Marat Radchenko
Suppose i have a stateless page with a form and when user submits it,
i want to respond with a dynamically-generated pdf file.

What is the proper way to write him pdf without interfering (and,
better, with integrating) with wicket response generation machinery?

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



Re: What is the proper way to output arbitrary (non-html) response from wicket pages?

2009-12-16 Thread Marat Radchenko
Huh :) Found: http://old.nabble.com/Re:-Dynamic-PDF-Creation-p21379301.html

2009/12/16 MattyDE ufer.mar...@gmail.com:

 Sorry i cant help you directly, but have you ever searched for pdf in the
 mailing-list?
 http://old.nabble.com/forum/Search.jtp?forum=25133local=yquery=pdf
 P-(

 Marat Radchenko-2 wrote:

 Suppose i have a stateless page with a form and when user submits it,
 i want to respond with a dynamically-generated pdf file.

 What is the proper way to write him pdf without interfering (and,
 better, with integrating) with wicket response generation machinery?

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




 --
 View this message in context: 
 http://old.nabble.com/What-is-the-proper-way-to-output-arbitrary-%28non-html%29-response-from--wicket-pages--tp26810943p26811264.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Wicket 1.4.4: ModalWindow on IE veeeeeeeeeery slow

2009-12-16 Thread Marat Radchenko
https://issues.apache.org/jira/browse/WICKET-2613

2009/12/16 Stefan Lindner lind...@visionet.de:
 I just moved to 1.4.4 in production and noticed that opening a modal
 window is sooo veeery slow. It's unbelievable.
 I installed the Wicket 1.4.4's wicket-examples-1.4.4.war locally in my
 JBoss (Version 4.2.3) and it's the same. The builtin ajax example takes
 about 10 seconds to open the modal window.
 Once the modal window was opened and closed, the next open operaiotn is
 very fast. Every time starting a new session the modal window takes a
 lng time.

 Even klicking Modal window: javascript modal window example takes
 veery long to show the example page with the links for opening
 ModalWindows.

 Deploying to JBoss 5.1.0 blows away the problem. Superfast opening of
 ModalWindow.

 Maybe the problems With ModalWindow discussed a few days ago depend upon
 the Server version (JBoss 4.2 and 5.1 use different Tomcat Versions

 Stefan

 -
 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: Domain Object Serialization

2009-12-16 Thread Marat Radchenko
2009/12/16 Igor Vaynberg igor.vaynb...@gmail.com:
 only wicket pages get serialized at the end of each request
Not always.

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



Re: Questions about Serialization...

2009-12-09 Thread Marat Radchenko
2009/12/9 Yves-Marie LAINÉ ymla...@gmail.com:
 (But put Serializable in Session doesn't mean to put Serialized in Session)
Uh?

 And it seems that wicket Serialize each Page one by one. This way if you
 have a single object instance that you share between pages as object
 property, after pages serialization, if you have ten page referencing your
 object you will have ten copies of your object, while you think you have
 only one.
I guess, it just means you use default serialization strategy (you're
using org.apache.wicket.model.Model, aren't you?) but expect it to do
something custom.

 It's a known serialization drawback. And it's what I want to get
 arround, when Serialization is not needed.
Use proper models. For example, HibernateObjectModel from databinder
doesn't serialize whole persistent entity but just its primary key +
class. So on subsequent requests object state is loaded again from db.

Also, I think you skipped one of my points - wicket will _only_
serialize page if there's stateful component on it. It is absolutely
possible to use wicket without any serialization at all (although you
must not use stateful components then). @StatelessComponent from
wicket-devutils is an invaluable tool to enforce such practice.

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



Fwd: DELIVERY FAILURE: Invalid/unknown recipient [MAPI Reason Code: 1, MAPI Diagnostic Code 1]

2009-12-09 Thread Marat Radchenko
Please, unsubscribe him, I'm getting such reply for each email i send
to this maillist.

-- Forwarded message --
From:  postmas...@td.com
Date: 2009/12/8
Subject: DELIVERY FAILURE: Invalid/unknown recipient [MAPI Reason
Code: 1, MAPI Diagnostic Code 1]
To: slonopotamusor...@gmail.com


Your message

 Subject: Re: Questions about Serialization...

was not delivered to:

 john.mattu...@td.com

because:

 Invalid/unknown recipient [MAPI Reason Code: 1, MAPI Diagnostic Code 1]



NOTICE OF CONFIDENTIALITY
This communication including any information transmitted with it is
intended only for the use of the addressees and is confidential.
If you are not an intended recipient or responsible for delivering
the message to an intended recipient, any review, disclosure,
conversion to hard copy, dissemination, reproduction or other use
of any part of this communication is strictly prohibited, as is the
taking or omitting of any action in reliance upon this communication.
If you receive this communication in error or without authorization
please notify us immediately by return e-mail or otherwise and
permanently delete the entire communication from any computer,
disk drive, or other storage medium.

If the above disclaimer is not properly readable, it can be found at
www.td.com/legal

AVERTISSEMENT DE CONFIDENTIALITE
Ce courriel, ainsi que tout renseignement ci-inclus, destiné uniquement
aux destinataires susmentionnés,  est confidentiel.  Si vous
n'êtes pas le destinataire prévu ou un agent responsable de la
livraison de ce courriel, tout examen, divulgation, copie, impression,
reproduction, distribution, ou autre utilisation d'une partie de ce
courriel est strictement interdit de même que toute intervention ou
abstraction à cet égard.  Si vous avez reçu ce message par erreur ou
sans autorisation, veuillez en aviser immédiatement l'expéditeur par
retour de courriel ou par un autre moyen et supprimer immédiatement
cette communication entière de tout système électronique.

Si l'avis de non-responsabilité ci-dessus n'est pas lisible, vous
pouvez le consulter à www.td.com/francais/legale

Final-Recipient: rfc822;john.mattu...@td.com
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Notes;Invalid/unknown recipient [MAPI Reason Code:
1, MAPI Diagnostic Code 1]


-- Пересылаемое сообщение --
From: slonopotamusor...@gmail.com
To: users@wicket.apache.org
Date: Tue, 8 Dec 2009 14:39:24 -0500
Subject: Re: Questions about Serialization...

2009/12/8 Yves-Marie LAINÉ ymla...@gmail.com:
 Hi,

 I'm new on the list, sorry if my question has already been asked. I didn't
 find the right answer on google.

 Is it possible tu use wicket without Page serialization ?
It is. Use only stateless components.

 Technically, is it possible to imagine a SimpleHttpSessionPageStore that
 don't serialize objects and keep them as they are in session, like it's done
 in others frameworks ?
Logic flaw: session contents CAN get serialized. Read Servlet spec,
you shouldn't put non-serializable stuff in session.

 But... I'm working on an app that consist of few pages, not versioned (no
 need of the back button support), because I need to keep page state through
 navigation, I keep pages references created, avoiding creation of a new page
 instance when back on a visited page.. I don't need to write anything on
 disk, the session space is enough.
Same flaw.

 This way, i wanted to share a data object instance between pages (as class
 member), for modification. But due to the Page Serialization the object
 identity is broken.
That just means your data object serialization is broken.

Sidenote: you can use HttpSessionStore (instead of
SecondLevelCacheSessionStore) to make wicket store everything in
session (but not in it's custom wicket on-disk store)

-
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: wicketstuff.org Confluence error

2009-12-09 Thread Marat Radchenko
That's controlled with uniqueVersion

2009/12/9 nino martinez wael nino.martinez.w...@gmail.com:
 Yeah it seems strange, some project seems not to have the issue:

 http://www.wicketstuff.org/maven/repository/org/wicketstuff/iolite/wicketstuff-iolite/0.3-SNAPSHOT/

 While a core project does..
 http://www.wicketstuff.org/maven/repository/org/wicketstuff/openlayers/1.4-SNAPSHOT/

 Heres something on the topic..

 http://jlorenzen.blogspot.com/2007/09/how-to-effectively-use-snapshot.html

 I might be able to look at it tomorrow..


 2009/12/9 Johan Compagner jcompag...@gmail.com

 somehow the disks where full again
 i deleted as much logging as i can and some old stuff
 so we should be able to go on

 Biggest problem is as always but nobody seems to be able to fix that shitty
 maven:


 http://www.wicketstuff.org/maven/repository/org/apache/wicket/wicket/1.5-SNAPSHOT/

 It still generates unique snapshots.. Why cant nobody fix that stupid maven
 build behavior..

 johan


 On Wed, Dec 9, 2009 at 10:31, Stefan Blanke stefbla...@googlemail.com
 wrote:

  Hi,
 
  does somebody know what happened to wicketstuff.org?
 
 
 
  I get the following error message:
 
 
 
  You cannot access Confluence at present. Look at the table below to
  identify
  the reasons
 
  Database is being updated by an instance which is not part of the current
  cluster. You should check network connections between cluster nodes,
  especially multicast traffic.
 
 
 
  Best regards,
 
  Stefan
 
 
 
 
 
 



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



Re: Questions about Serialization...

2009-12-09 Thread Marat Radchenko
  I wasn't using Model in this precise case. I thought using Model was a best
  practice, to save memory.
Choosing proper model isn't (almost always) about performance, it's
about logic. You _have_ to use plain serializing model for data that
isn't stored anywhere else. You _have_ to use LDM in cases when it is
a logical error to operate on outdated data backed by db storage.

 Indeed I understand that using Mdel is mandatory,
  if you want avoid strange behaviour. IMHO using LoadableDetachableModel is
  an extra cost, (cpu, time, design) not necessary for simpler cases.
On the other side, LDM usually reduces page size - allows faster
serilization. But anyway, you decide what model to use based on
application logic requirements. The only choice that is _mostly_
driven by performance conciderations is AbstractReadonlyModel vs. LDM.
But still, sometimes application logic makes it inappropriate to use
LDM since its value has to change during request.

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



Re: Questions about Serialization...

2009-12-08 Thread Marat Radchenko
2009/12/8 Yves-Marie LAINÉ ymla...@gmail.com:
 Hi,

 I'm new on the list, sorry if my question has already been asked. I didn't
 find the right answer on google.

 Is it possible tu use wicket without Page serialization ?
It is. Use only stateless components.

 Technically, is it possible to imagine a SimpleHttpSessionPageStore that
 don't serialize objects and keep them as they are in session, like it's done
 in others frameworks ?
Logic flaw: session contents CAN get serialized. Read Servlet spec,
you shouldn't put non-serializable stuff in session.

 But... I'm working on an app that consist of few pages, not versioned (no
 need of the back button support), because I need to keep page state through
 navigation, I keep pages references created, avoiding creation of a new page
 instance when back on a visited page.. I don't need to write anything on
 disk, the session space is enough.
Same flaw.

 This way, i wanted to share a data object instance between pages (as class
 member), for modification. But due to the Page Serialization the object
 identity is broken.
That just means your data object serialization is broken.

Sidenote: you can use HttpSessionStore (instead of
SecondLevelCacheSessionStore) to make wicket store everything in
session (but not in it's custom wicket on-disk store)

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



Re: Location of html files

2009-12-05 Thread Marat Radchenko
With custom IResourceFinder, you can put them wherever you want. But
why? You should have a strong reason to not follow defaults.

2009/12/6, Johan den Boer johanj.denb...@gmail.com:
 Hi,

  I place my html files in the same package where my java classes resides. Is
  it possible to change this. I want to place my html files in the
  WEB-INF/page directory

  --
  thanks a lot,


  Johan den Boer


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



Re: DropDownChoiceWithStylingOptionsT

2009-12-04 Thread Marat Radchenko
Definitely, lol :)

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



InvalidUrlException considered evil?

2009-12-02 Thread Marat Radchenko
There some places in Wicket sources where it throws
InvalidUrlException that causes exception logging and
InternalErrorPage is shown.

However, I don't agree that badly constructed URL is and _internal_
error. It is external error (for example, user was playing with urls,
modifying them by hand).

So, my proposal: stop treating invalid urls and internal errors, don't
log traces for them, don't show InternalErrorPage. Instead, either
redirect user to home page, or show him 404, or show him 400 (bad
request), or whatever else.

The main point: do _not_ log errors just because user passed us an url
that we couldn't resolve to a page/component.

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



Re: InvalidUrlException considered evil?

2009-12-02 Thread Marat Radchenko
Same applies to org.apache.wicket.WicketRuntimeException: unable to
find component with path ... on stateless page ... that can also be
triggered by badly constructed url.

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



Re: InvalidUrlException considered evil?

2009-12-02 Thread Marat Radchenko
2009/12/2 Ilja Pavkovic ilja.pavko...@binaere-bauten.de:
 Am Mittwoch, 2. Dezember 2009 12:18:55 schrieb Marat Radchenko:
 There some places in Wicket sources where it throws
 InvalidUrlException that causes exception logging and
 InternalErrorPage is shown.

 However, I don't agree that badly constructed URL is and _internal_
 error. It is external error (for example, user was playing with urls,
 modifying them by hand).

 So, my proposal: stop treating invalid urls and internal errors, don't
 log traces for them, don't show InternalErrorPage. Instead, either
 redirect user to home page, or show him 404, or show him 400 (bad
 request), or whatever else.

 The main point: do _not_ log errors just because user passed us an url
 that we couldn't resolve to a page/component.
 Hi, I have a slightly different proposal:
 - log errors for invalid urls in development mode only
 - log warnings for invalid urls in deployment mode
I'd be even more remissive: warning in development mode, silence in
deployment mode.

You don't log errors/warnings when user hits nonexisting url, do you?
That's similar - he passed us an url that couldn't be resolved to a
page. I don't see how it is different from url that resolved to a
page, but couldn't be resolved to component on it.

 Best Regards,
        Ilja

 --
 binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
 Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker


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



Re: Session stealing with wicket-auth-roles

2009-12-02 Thread Marat Radchenko
2009/12/2 Andrew Turner grim_toas...@hotmail.com:


 Good morning all,

 I'm hoping I've misconfigured something in my application, but we seem to be 
 prone to session stealing in our wicket application.  We're using 
 wicket-auth-roles to provide the security, and if you are able to access the 
 jsessionid you can get another machine to log straight into the application 
 as the intercepted user.  We're using HTTPS for the communication, so 
 hopefully the likelihood of this occurring is quite small, but we are still 
 being forced to contemplate rewriting the security layer (which I want to 
 avoid if possible).

 So, my question, have I misconfigured something, or is it just not possible 
 to prevent this sort of attack when using wicket-auth-roles?

 I've managed to create a completely stripped-down app that still has the 
 problem, below is the AuthenticatedWhenSession implementation.

 public class HelloWorldWebSession extends AuthenticatedWebSession {
    public HelloWorldWebSession(Request request) { super(request); }
    public boolean authenticate(String username, String password) { return 
 helloUser.equals(username)  password.equals(password); }
    public Roles getRoles() { return isSignedIn() ? new Roles(Roles.USER) : 
 null; }
 }

 And the simple page:

 @AuthorizeInstantiation(USER)
 public class HelloWorldHomePage extends WebPage { }

 And the application:

 public class HelloWorldApplication extends AuthenticatedWebApplication {
    protected void init() {
        super.init();
        mountBookmarkablePage(home, HelloWorldHomePage.class);
        mountBookmarkablePage(signin, SignInPage.class);
    }

    protected Class? extends WebPage getSignInPageClass() { return 
 SignInPage.class; }
    protected Class? extends AuthenticatedWebSession getWebSessionClass() { 
 return HelloWorldWebSession.class; }
    public Class? extends Page getHomePage() { return 
 HelloWorldHomePage.class; }
 }

 The URL below, once logged in on one machine, could then be used on multiple 
 machines to bypass the security layer.

 http://localhost:9090/HelloWorld/home;jsessionid=SESSION_ID_TAKEN_FROM_URL/COOKIE

 Many Thanks
 Andy


 _
 Add your Gmail and Yahoo! Mail email accounts into Hotmail - it's easy
 http://clk.atdmt.com/UKM/go/186394592/direct/01/

Man, just configure you webserver properly so it doesn't append
jsessionid to urls. Wicket has nothing to do with session management.

Jetty (web.xml):
context-param
param-nameorg.mortbay.jetty.servlet.SessionURL/param-name
param-valuenone/param-value
/context-param

Resin (resin-web.xml):
web-app id='...'
  session-config enable-cookies='true' enable-url-rewriting='false' /
/web-app

Other:
use your webserver docs.

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



Re: Form too large ?

2009-12-01 Thread Marat Radchenko
Jetty has limitation on max POST size. It can be controlled via
org.mortbay.jetty.Request.maxFormContentSize system property (20
bytes by default)

2009/12/1 Martin Makundi martin.maku...@koodaripalvelut.com

 Hi!

 What is this error? We got this from our production site...


 2009-12-01 11:16:19,634 1488650 [btpool0-17] ERROR RequestCycle  - H
 java.lang.IllegalStateException: Form too large
        at org.mortbay.jetty.Request.extractParameters(Request.java:1269)
        at org.mortbay.jetty.Request.getParameter(Request.java:640)
        at 
 org.apache.wicket.protocol.http.servlet.ServletWebRequest.getParameter(ServletWebRequest.java:128)
        at 
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:205)
        at org.apache.wicket.Request.getRequestParameters(Request.java:172)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
        at 
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at wicket.quickstart.TakpServlet.service(TakpServlet.java:45)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at 
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
        at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
        at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
        at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
        at 
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
        at 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
        at 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at 
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:285)
        at 
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
        at 
 org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
        at 
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
        at 
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

 -
 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



cleanup unresolved issues with fix for set to already released versions?

2009-11-30 Thread Marat Radchenko
There's a small number of issues that is set to be fixed in already released
versions [1].

Maybe they should be updated to properly reflect versions they'll be fixed
in? Having fix for set to past release doesn't make sense.

[1]
https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12314250fixfor=12314163fixfor=12314113fixfor=12314093fixfor=12314060fixfor=12314020fixfor=12313927fixfor=12313911fixfor=12313604fixfor=12313495fixfor=12313295fixfor=12312912fixfor=12312911fixfor=12312523fixfor=12313924fixfor=12313176fixfor=12313175fixfor=12313089fixfor=12313047fixfor=12312942fixfor=12312500fixfor=12312515fixfor=12312513fixfor=12312818fixfor=12312680fixfor=12312533fixfor=12312502fixfor=12312501fixfor=12312468fixfor=12312305fixfor=12312236fixfor=12312138fixfor=12312112fixfor=12312111resolution=-1sorter/field=issuekeysorter/order=DESC


Re: Localize a string using custom locale

2009-11-27 Thread Marat Radchenko
Just override getLocale in your component and use one of non-deprecated
Localizer methods.

2009/11/27 Gatos ega...@gmail.com

 Hello,

 For example I need to localize a string to defferent languages.

 How is it possible to localize using a custom locale?

 I found that a method in Localizer class, but it's deprecated:
 public String getString(final String key, final Component component, final
 IModel model, final Locale locale, final String style, final String
 defaultValue)


 Thank you.



MockHttpServletResponse, status vs code

2009-11-23 Thread Marat Radchenko
MockHttpServletResponse has two fields, status and code, which is ambigious.

sendError method changes code, while setStatus changes status field.

I think these two should be merged to mimic servlet api (if one calls
sendError, then error status is available via getStatus).

If no objections, I'll file a JIRA issue.


Re: Forms and detached JPA ( Hibernate) Objects

2009-11-21 Thread Marat Radchenko
Use HibernateObjectModel from databinder.


Re: Can Wicket automatically remove beginning and trailing spaces in a text field?

2009-10-02 Thread Marat Radchenko
It already does that.
FormComponent:

protected T convertValue(String[] value) throws ConversionException
{
return (T)(value != null  value.length  0  value[0] != null ?
trim(value[0]) : null);
}

2009/10/2 David Chang david_q_zh...@yahoo.com

 How to set it up in a Wicket application? I would like to set it up in the
 application level.

 Thanks!




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




Re: better way to strip wicket markup / tags per page?

2009-09-29 Thread Marat Radchenko

 In some situations during development...

With that in mind, this solution is absolutely ok.

2009/9/29 Antoine van Wel antoine.van@gmail.com

 Hi,

 on the wiki[1] it is described how to get rid of wicket markup such as
 wicket:id attributes on a page basis.
 The solution looks like a dirty hack to me which may go wrong when for
 instance exceptions occur. Does anybody know of a better way?

 For completeness sake, here is the code duplicated from the wiki:

 private boolean stripTags;

 public TestPage() {
stripTags =
  Application.get().getMarkupSettings().getStripWicketTags();
 }
 @Override
 protected void onBeforeRender() {
Application.get().getMarkupSettings().setStripWicketTags(true);
 }
 @Override
 protected void onAfterRender() {
Application.get().getMarkupSettings().setStripWicketTags(stripTags);
 }



 Thanks in advance,

 Antoine.


 References:
 [1]
 http://cwiki.apache.org/WICKET/how-to-remove-wicket-markup-from-output.html



Re: will there be a performance gain to use singleton to remove references to the service object in models?

2009-07-28 Thread Marat Radchenko
Don't guess, profile it.

2009/7/28 Jason Wang jason.w...@bulletin.net:
 Hi all,

 Although I am using spring-wicket to prevent the whole spring being
 serialized, It still brothers me to  see the  references in the model
 object, for example:

 Instead of using this:

 public class MyViewObjectProvider extends SortableDataProvider{
   �...@springbean(daoService)
    private  DAOServices daoService;

    private String objectID;

    public Iterator iterator(final int first, final int count){
         .
      return daoService.load(objectId).subList(first,
 first+count).iterator();
   }

 }



 I always write a singleton helper class for the service to be used, so I can
 have the model this way:

 public class MyViewObjectProvider extends SortableDataProvider{
    //so no reference to the dao service object

    private String objectID;
     public Iterator iterator(final int first, final int count){
         .
   //here the DAOServiceHelper.get() returns a instance that managed by
 spring(with the actual service object injected.)
      return DAOServiceHelper.get().load(objectId).subList(first,
 first+count).iterator();
   }

  }

 So my question is, will there be a noticeable  performance gain to do it the
 2nd way?
 The reason to ask is that the static kind of singleton usage is indeed
 anti-spring, and makes
 my eyes bleed

 If no one has done a performance comparison, I might have to do one myself.
 Just being lazy...


 Thanks,

 Jason Wang




 -
 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: 1.4 is ready for production?

2009-07-21 Thread Marat Radchenko
We're using it since 1.4-m2 in production.

2009/7/20 Alessandro Vincelli a.vince...@gmail.com:
 I know that 1.4 is RC, and RC means that is not ready for production ;-)
 But I'm using the 1.4 since January in some small projects without
 blocking problems?
 The issue opened in Jira are not blocking for me.
 Any suggestions? Is anybody already using 1.4 in production?
 Thanks in advance,
 Alessandro

 --
 Alessandro Vincelli
 ---
 http://www.alessandro.vincelli.name
 http://devel.alessandro.vincelli.name

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

2009-07-16 Thread Marat Radchenko
DatePicker is in wicket-datetime artifact.

2009/7/16 Martin Letendre letendre.mar...@gmail.com:
 In the latest wicket javadoc I see that there is a DatePicker componenent
 based on yui.

 http://wicket.apache.org/docs/1.4/org/apache/wicket/extensions/yui/calendar/DatePicker.html

 Great !

 I have these dependencies in my project

        dependency
            groupIdorg.apache.wicket/groupId
            artifactIdwicket/artifactId
            version1.4-rc7/version
        /dependency
        dependency
            groupIdorg.apache.wicket/groupId
            artifactIdwicket-extensions/artifactId
            version1.4-rc7/version
        /dependency

 But I still don't see this class in my classpath. Some special dependency I
 should add ?

 Thanks for you help.


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



Re: Using Converter with DropDownChoice

2009-07-07 Thread Marat Radchenko
What model type to you have? Did you call setType on component?
2009/7/7, Christoph Drießen c...@neopoly.de:
 Hi all,

  I'm trying to use a Converter with a DropDownChoice overriding the
 getConverter(Class type) method. Unfortunately this method never gets
 called.
  Any ideas?

  Christoph



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



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



Re: wicket on java server

2009-06-10 Thread Marat Radchenko
Projects can't require anything. It's people :)

Wicket runs on anything that supports Servlet specification.

2009/6/10 Dorothée Giernoth dorothee.giern...@kds-kg.de

 Hey guys,

 I got a (weird) question: a project requires us to write our own server.
 But I am eager to use wicket. Now what I dun know is, how to make wicket
 work on our self written server. What needs to be done, that it works? Yeah,
 maybe I dunno enough about servers, but some hints would be highly
 appreciated!

 Thnx in advance.
 - dg

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




Re: How to get ride of page's state?

2009-05-18 Thread Marat Radchenko
Make it stateless :)

2009/5/18 HHB hubaghd...@yahoo.ca:
 Hey,
 How to get ride of the page's state after the request is done?
 Thanks.


 -
 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: Bug in RequestUtils.toAbsolutePath?

2009-05-18 Thread Marat Radchenko
http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpServletRequest.html#getContextPath()

2009/5/18 Martin Makundi martin.maku...@koodaripalvelut.com:
 Just use getServletContextPath on ServletRequest.

 I do not want the installation path, I want the request path. The
 installation path is localhost:xxx and the request path is
 mydomain.com

 **
 Martin


 2009/5/17, Martin Makundi martin.maku...@koodaripalvelut.com:
 That is my question.. whether I am stupid or someone baptized
  toAbsoluteUrl wrong ;)

  I had to devise this:

   public static String getRootURL() {
     StringBuffer requestURL = ((Request) ((WebRequest)
  RequestCycle.get().getRequest()).getHttpServletRequest()).getRequestURL();
     int cutIndex = requestURL.indexOf(/, requestURL.indexOf(//)+2);
     if (0  cutIndex) {
       return requestURL.substring(0, cutIndex);
     }
     return requestURL.toString();

   }

  **
  Martin

  2009/5/17 Marat Radchenko slonopotamusor...@gmail.com:
   Hmm... are you sure you want to use that method at all? It uses given
   path as relative to _current reqest path_.
   2009/5/17, Martin Makundi martin.maku...@koodaripalvelut.com:
   No, there is no code in RequestUtils that would care about a leading
    slash ... it will just result in
  
    
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2//images/Image.png;
  
    Note a typo in my previous email, normally it returns:
  
    
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/images/Image.png;
    without the double-slash.
  
    **
    Martin
  
    2009/5/17 Marat Radchenko slonopotamusor...@gmail.com:
  
    Maybe RequestUtils.toAbsolutePath(/images/Image.png) (note leading 
 slash)?
    
     2009/5/17 Martin Makundi martin.maku...@koodaripalvelut.com:
     Hi!
    
     I have a dynamic image which resides in
     http://www.mydomain.com/images/Image.png; (the filename itself 
 might
     vary). In order for the image to be visible in downloaded documents,
     the path must be absolute.
    
     RequestUtils.toAbsolutePath(images/Imange.png); works most of the
     time, except in situations where the user is on a bookmarkable page
     that has parameters:
    
     
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Value2
    
     In such situations the
     RequestUtils.toAbsolutePath(images/Imange.png) returns:
     
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Image.png;
    
     So it assumes the last parameter value was a page... is this a 
 stupid
     user bug or a real bug?
    
     **
     Martin
    
     
 -
     To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
     For additional commands, e-mail: users-h...@wicket.apache.org
    
    
    
     -
     To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
     For additional commands, e-mail: users-h...@wicket.apache.org
    
    
  
    -
    To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  

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



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



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



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



Re: Bug in RequestUtils.toAbsolutePath?

2009-05-17 Thread Marat Radchenko
Maybe RequestUtils.toAbsolutePath(/images/Image.png) (note leading slash)?

2009/5/17 Martin Makundi martin.maku...@koodaripalvelut.com:
 Hi!

 I have a dynamic image which resides in
 http://www.mydomain.com/images/Image.png; (the filename itself might
 vary). In order for the image to be visible in downloaded documents,
 the path must be absolute.

 RequestUtils.toAbsolutePath(images/Imange.png); works most of the
 time, except in situations where the user is on a bookmarkable page
 that has parameters:

 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Value2

 In such situations the
 RequestUtils.toAbsolutePath(images/Imange.png) returns:
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Image.png;

 So it assumes the last parameter value was a page... is this a stupid
 user bug or a real bug?

 **
 Martin

 -
 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: Bug in RequestUtils.toAbsolutePath?

2009-05-17 Thread Marat Radchenko
Hmm... are you sure you want to use that method at all? It uses given
path as relative to _current reqest path_.
2009/5/17, Martin Makundi martin.maku...@koodaripalvelut.com:
 No, there is no code in RequestUtils that would care about a leading
  slash ... it will just result in

  
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2//images/Image.png;

  Note a typo in my previous email, normally it returns:

  
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/images/Image.png;
  without the double-slash.

  **
  Martin

  2009/5/17 Marat Radchenko slonopotamusor...@gmail.com:

  Maybe RequestUtils.toAbsolutePath(/images/Image.png) (note leading slash)?
  
   2009/5/17 Martin Makundi martin.maku...@koodaripalvelut.com:
   Hi!
  
   I have a dynamic image which resides in
   http://www.mydomain.com/images/Image.png; (the filename itself might
   vary). In order for the image to be visible in downloaded documents,
   the path must be absolute.
  
   RequestUtils.toAbsolutePath(images/Imange.png); works most of the
   time, except in situations where the user is on a bookmarkable page
   that has parameters:
  
   
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Value2
  
   In such situations the
   RequestUtils.toAbsolutePath(images/Imange.png) returns:
   
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Image.png;
  
   So it assumes the last parameter value was a page... is this a stupid
   user bug or a real bug?
  
   **
   Martin
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  

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



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



Re: Bug in RequestUtils.toAbsolutePath?

2009-05-17 Thread Marat Radchenko
Just use getServletContextPath on ServletRequest.

2009/5/17, Martin Makundi martin.maku...@koodaripalvelut.com:
 That is my question.. whether I am stupid or someone baptized
  toAbsoluteUrl wrong ;)

  I had to devise this:

   public static String getRootURL() {
 StringBuffer requestURL = ((Request) ((WebRequest)
  RequestCycle.get().getRequest()).getHttpServletRequest()).getRequestURL();
 int cutIndex = requestURL.indexOf(/, requestURL.indexOf(//)+2);
 if (0  cutIndex) {
   return requestURL.substring(0, cutIndex);
 }
 return requestURL.toString();

   }

  **
  Martin

  2009/5/17 Marat Radchenko slonopotamusor...@gmail.com:
   Hmm... are you sure you want to use that method at all? It uses given
   path as relative to _current reqest path_.
   2009/5/17, Martin Makundi martin.maku...@koodaripalvelut.com:
   No, there is no code in RequestUtils that would care about a leading
slash ... it will just result in
  

 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2//images/Image.png;
  
Note a typo in my previous email, normally it returns:
  

 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/images/Image.png;
without the double-slash.
  
**
Martin
  
2009/5/17 Marat Radchenko slonopotamusor...@gmail.com:
  
Maybe RequestUtils.toAbsolutePath(/images/Image.png) (note leading 
 slash)?

 2009/5/17 Martin Makundi martin.maku...@koodaripalvelut.com:
 Hi!

 I have a dynamic image which resides in
 http://www.mydomain.com/images/Image.png; (the filename itself might
 vary). In order for the image to be visible in downloaded documents,
 the path must be absolute.

 RequestUtils.toAbsolutePath(images/Imange.png); works most of the
 time, except in situations where the user is on a bookmarkable page
 that has parameters:

 
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Value2

 In such situations the
 RequestUtils.toAbsolutePath(images/Imange.png) returns:
 
 http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Image.png;

 So it assumes the last parameter value was a page... is this a stupid
 user bug or a real bug?

 **
 Martin

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



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


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

  -
  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: non-existent Springbean lazy beans only work when name specified

2009-05-07 Thread Marat Radchenko
Your setup seems to be broken. That's the whole point of nameless
@SpringBean/@Resource/@Autowire - to find beans by _type_, not name.
Relying on successful injection of beans of wrong type is a bad idea
IMO. It'll break as soon as smth in your code tries to invoke that
bean. I'd even say that allowing injection of bean of wrong type (when
name-based injection is used) is a bug.

I see to valid setups for tests:
1. Completely avoid SpringBeanInjector and inject mock objects manually.
2. Setup Spring context with mock object and allow SpringBeanInjector
to inject them wherever is needed (that's what we use for our
project).

2009/5/7 Antony Stubbs antony.stu...@gmail.com:
 I think I've found a potential bug/ area for improvement.

 We are setting up pure unit tests for a component, and in this test case,
 although the component declares several @SpringBean's, only 1 is used. Our
 tests all work fine when we run them against our test spring context, but
 I wanted to do something more isolated...

 So, in our custom injector, we only inject the, let's call it, TemplatesDao
 object. The other 'dao's or whatever, remain un-attended to.

 This runs fine, in one case, where we specify the names of the beans - i.e.
 @SpringBean(name=templateDao), @SpringBean(name=peopleDao), etc, where
 we ignore the peopleDao bean for example. The fields are all set to lazy
 proxy's, and the actual resolution of the bean only happens on first access
 - so, our peopleDao is never looked up (which wouldn't work, because it's
 not there), and our templateDao get's looked up successfully.

 However, if we do not specify the name of the bean - i.e. with have another
 bean @SpringBean of type RoomsDao. When the wicket code goes to setup this
 field's lazy initialiser, it fails. It turns down the wrong road at:
 SpringBeanLocator:
 singletonCache =
 Boolean.valueOf(getSpringContext().isSingleton(getBeanName()));
 which leads to the:
 String[] names = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(ctx,
 clazz);
 This of course calls the getBeanName(). And because we didn't specify a
 name, the injector tries to ask Spring for it - which of course doesn't
 work, because no bean of that type actually exists in the conext.

 IMO the treatment of named vs unnamed @SringBeans is thus sort of
 inconsistent, and would be useful for us to be able to not worry about
 unnamed bean types not existing. Is there a way to avoid this call into the
 Spring context?

 One of the work arounds we can use for this, is to add a mock implementation
 of that class into the test application context, so spring is able to find a
 bean of that type. But I'd prefer not to have to :)

 The other work around, is to not use the SpringComponentInjector, and
 instead setup our own ComponentInjector which only cares about the one panel
 we're testing:
   �...@override
    public void onInstantiation(Component component) {
        if (component instanceof ProfileDetailPanel) {
            ProfileDetailPanel p = (ProfileDetailPanel) component;
            p.setProfileManager( mockProfileManager );
        }
    }


 I wanted to get some thoughts, before I posted a Jira.

 Regards,
 Antony Stubbs,
 NZ
 http://friendfeed.com/astubbs



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



Re: How to test AjaxFormChoiceComponentUpdatingBehavior for Radio Button

2009-05-04 Thread Marat Radchenko
That's what we are using here:

public static void selectAjaxRadio(final WicketTester tester, final
String radioPath) {
final Radio radio = (Radio)
tester.getComponentFromLastRenderedPage(radioPath);
final RadioGroup radioGroup = radio.findParent(RadioGroup.class);
AjaxFormChoiceComponentUpdatingBehavior behavior = null;
for (final IBehavior b : radioGroup.getBehaviors()) {
  if (b instanceof AjaxFormChoiceComponentUpdatingBehavior) {
behavior = (AjaxFormChoiceComponentUpdatingBehavior) b;
break;
  }
}
assert behavior != null;
final CharSequence url = behavior.getCallbackUrl(false);
final WebRequestCycle cycle = tester.setupRequestAndResponse(true);
tester.getServletRequest().setRequestToRedirectString(url.toString());
tester.getServletRequest().setParameter(
radioGroup.getInputName(),
radio.getValue()
);
tester.processRequestCycle(cycle);
  }

Yep, it looks weird. But works. If you have less hacky solutions,
please, tell us.

2009/4/30 Jeffrey S. Schwartz jschwa...@citytechinc.com:
 I have the same question as the reader from this email:
 http://www.nabble.com/How-to-test-AjaxFormChoiceComponentUpdatingBehavior-for-Radio-Button-p21833782.html

 I scoured the mailing lists, wiki and the javadoc for a possible
 solution.  I have attached a quick-start application that shows the
 problem.  When I run the application the
 AjaxFormChoiceComponentUpdatingBehavior works as expected!  However,
 when I run the unit test and use the tester.executeBehavior method to
 call the AjaxFormChoiceComponentUpdatingBehavior, the model is always
 null.  A snippet of my unit test is below:

        FormTester form = tester.newFormTester(form);
        System.out.println(form.modelObject= +
 form.getForm().getModelObject());
        form.select(radioButtons, 1);
        form.submit();
        System.out.println(form.modelObject= +
 form.getForm().getModelObject());

        Component comp = form.getForm().get(radioButtons);

        ListIBehavior behaviors = comp.getBehaviors();
        for (IBehavior i: behaviors) {
            if (i instanceof AjaxFormChoiceComponentUpdatingBehavior) {
                AjaxFormChoiceComponentUpdatingBehavior a =
 (AjaxFormChoiceComponentUpdatingBehavior)i;
                //executes the behavior, but clears the object's model
                tester.executeBehavior(a);
            }
        }


 Any suggestions would be very helpful.

 I am using wicket 1.4-rc2.

 Thanks in advance.

 -Jeff


 -
 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: FOR LIST OWNER: your antispam is awful it doesn't apply normal letters

2009-03-29 Thread Marat Radchenko
It's not antispam fault, HTML emails are awful.

29 марта 2009 г. 10:25 пользователь Khlystov Alexandr
allex.khlys...@gmail.com написал:

 FOR LIST OWNER: your antispam is awful it doesn't apply normal letters

 below is the sample

 Mail Delivery Subsystem пишет:

 This is an automatically generated Delivery Status Notification

 Delivery to the following recipient failed permanently:

     users@wicket.apache.org

 Technical details of permanent failure: Google tried to deliver your
 message, but it was rejected by the recipient domain. We recommend
 contacting the other email provider for further information about the cause
 of this error. The error that the other server returned was: 552 552 spam
 score (7.7) exceeded threshold (state 18).

   - Original message -

 Received: by 10.86.3.4 with SMTP id 4mr3003656fgc.41.1238267188823;
        Sat, 28 Mar 2009 12:06:28 -0700 (PDT)
 Return-Path: allex.khlys...@gmail.com
 Received: from ?10.58.2.71? ([78.40.81.26])
        by mx.google.com with ESMTPS id
 l19sm1817612fgb.6.2009.03.28.12.06.26
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Sat, 28 Mar 2009 12:06:27 -0700 (PDT)
 Message-ID: 49ce7532.6030...@gmail.com
 Date: Sun, 29 Mar 2009 01:06:26 +0600
 From: Khlystov Alexandr allex.khlys...@gmail.com
 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
 MIME-Version: 1.0
 To: users@wicket.apache.org
 Subject: simple Link
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: 8bit

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 html
 head
 /head
 body bgcolor=#ff text=#00
 Hello all! br
 br
 Question for Wicket 1.3.5.br
 br
 I want to create java code for simple button, and to override caption

   - Message truncated -





 -
 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: Have a feature, want to contribute

2009-03-16 Thread Marat Radchenko
Sorry, was busy at work last week.

Please find attached sources and jar with compiled classes.

Usage is extremely simple: add ru.pronto.wicketextras.StatelessChecker
to postComponentOnBeforeRenderListener list and add
@StatelessComponent to any components you want to guarantee be
stateless. If any of them will become statefull (either directly or
because of any child) then exception will be thrown with explanation
what component is to blame.

2009/3/13 Alex Objelean alexandru.objel...@isdc.ro:

 Marat, as you can see people are interested and waiting for this feature
 to be published somewhere

 Alex


 Marat Radchenko-2 wrote:

 Wicket pages/components can be either stateful or stateless. Wicket
 manages hem transparently and it is very easy to write any complex
 page you want. Stateful pages are much more powerful than stateless.
 However that comes at  a cost of using page store for their state. On
 highload sites it is usually desired to minimize session-scope data,
 and move it to request-scope. That's when Wicket users approach a task
 of making stateful pages stateless. However stateless state (sic!) is
 very fragile, if you add a single stateful component to a page, it
 instantly becomes stateful (and you even might not notice that if your
 other page content can work in both modes. And here comes my lovely
 feature - @StatelessComponent. It is an annotation that you should put
 on components which you want to be stateless. It doesn't do any magic,
 it simply uses postComponentOnBeforeRender to assert that annotated
 component (and all its children) are stateless. If it doesn't, an
 exception is thrown, indicating what component tries to be stateful.

 This feature isn't large enough to be put in a separate project (just
 one annotation and one listener) but wee find it extremely useful on
 our project.

 I'd be happy to give it to Wicket project (or wicketstuff?) at
 absolutely no cost (tests included) under same license as wicket
 itself, if Wicket developers are interested in it.

 I'll file a feature request with a patch, if Wicket team finds this
 useful in Wicket core.

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




 --
 View this message in context: 
 http://www.nabble.com/Have-a-feature%2C-want-to-contribute-tp21079751p22498471.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




wicketextras.tar.gz
Description: GNU Zip compressed data


wicketextras-1.5-SNAPSHOT.jar
Description: application/java-archive
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Re: Have a feature, want to contribute

2009-03-08 Thread Marat Radchenko
If community was interested, it would say something in 3 months, uh?
:) I'll post it on tuesday.

2009/3/8, Alex Objelean alexandru.objel...@isdc.ro:

  I think community would be interested in this feature. Could you post the
  code?



  Marat Radchenko-2 wrote:
  
   Wicket pages/components can be either stateful or stateless. Wicket
   manages hem transparently and it is very easy to write any complex
   page you want. Stateful pages are much more powerful than stateless.
   However that comes at  a cost of using page store for their state. On
   highload sites it is usually desired to minimize session-scope data,
   and move it to request-scope. That's when Wicket users approach a task
   of making stateful pages stateless. However stateless state (sic!) is
   very fragile, if you add a single stateful component to a page, it
   instantly becomes stateful (and you even might not notice that if your
   other page content can work in both modes. And here comes my lovely
   feature - @StatelessComponent. It is an annotation that you should put
   on components which you want to be stateless. It doesn't do any magic,
   it simply uses postComponentOnBeforeRender to assert that annotated
   component (and all its children) are stateless. If it doesn't, an
   exception is thrown, indicating what component tries to be stateful.
  
   This feature isn't large enough to be put in a separate project (just
   one annotation and one listener) but wee find it extremely useful on
   our project.
  
   I'd be happy to give it to Wicket project (or wicketstuff?) at
   absolutely no cost (tests included) under same license as wicket
   itself, if Wicket developers are interested in it.
  
   I'll file a feature request with a patch, if Wicket team finds this
   useful in Wicket core.
  

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


 --
  View this message in context: 
 http://www.nabble.com/Have-a-feature%2C-want-to-contribute-tp21079751p22400634.html
  Sent from the Wicket - User mailing list archive at Nabble.com.



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



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



Re: [vote] In Wicket 1.4 and onwards, remove widening from the list of choices model in DropDownChoice, changing it from IModelList? extends Foo to IModelListFoo

2009-03-02 Thread Marat Radchenko
[X] No, keep DropDownChoice as it is in Wicket 1.4-rc2

2009/3/2 Timo Rantalaiho timo.rantala...@ri.fi:
 Background:

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

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

  http://www.nabble.com/LDM-with-Generics-for-DropDownChoice-td22155211.html


 This works:
 = clips 
     public static void main(String[] args) {
         Foo foo = new Foo();
         foo.bar().add(new String(quux));
     }

     @SuppressWarnings(unchecked)
     public ListString bar() {
       List? extends String list = new 
 ArrayListString(Arrays.asList(foo, bar));
       return (ListString) list;
     }
 = /clips ===


 This doesn't work:
 = claps 
     public static void main(String[] args) {
         Foo foo = new Foo();
         foo.bar().add(new String(quux));
     }

     public List? extends String bar() {
       List? extends String list = new 
 ArrayListString(Arrays.asList(foo, bar));
       return list;
     }
 = /claps ===



 [ ] Yes, change the DropDownChoice constructor to take the
    choices list as IModelListT or ListT without the
    wildcard

 [ ] No, keep DropDownChoice as it is in Wicket 1.4-rc2



 Best wishes,
 Timo

 --
 Timo Rantalaiho
 Reaktor Innovations Oy    URL: http://www.ri.fi/ 

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




Re: [wicket-1.4] Why has ModelT parameter to extend Serializable?

2009-01-20 Thread Marat Radchenko
2009/1/20 James Carman jcar...@carmanconsulting.com:
 A Model is serialized, therefore the object contained within it must
 be serializable.
Uh? What about stateless pages?

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



Re: WicketTester OnChangeAjaxBehavior ?

2008-12-29 Thread Marat Radchenko
tester.executeAjaxEvent(full:path:to:component, onchange);

2008/12/29 Martin Makundi martin.maku...@koodaripalvelut.com:
 Hi!

 I have some select boxes on the screen which trigger screen refresh in
 live mode.

 However, I have not yet figured out how to trigger
 OnChangeAjaxBehavior using WicketTester in a non-intrusive manner. I
 have found some intrusive workarounds that tweak the server-side
 models, but what is the right way to do it?

 **
 Martin

 -
 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



Have a feature, want to contribute

2008-12-18 Thread Marat Radchenko
Wicket pages/components can be either stateful or stateless. Wicket
manages hem transparently and it is very easy to write any complex
page you want. Stateful pages are much more powerful than stateless.
However that comes at  a cost of using page store for their state. On
highload sites it is usually desired to minimize session-scope data,
and move it to request-scope. That's when Wicket users approach a task
of making stateful pages stateless. However stateless state (sic!) is
very fragile, if you add a single stateful component to a page, it
instantly becomes stateful (and you even might not notice that if your
other page content can work in both modes. And here comes my lovely
feature - @StatelessComponent. It is an annotation that you should put
on components which you want to be stateless. It doesn't do any magic,
it simply uses postComponentOnBeforeRender to assert that annotated
component (and all its children) are stateless. If it doesn't, an
exception is thrown, indicating what component tries to be stateful.

This feature isn't large enough to be put in a separate project (just
one annotation and one listener) but wee find it extremely useful on
our project.

I'd be happy to give it to Wicket project (or wicketstuff?) at
absolutely no cost (tests included) under same license as wicket
itself, if Wicket developers are interested in it.

I'll file a feature request with a patch, if Wicket team finds this
useful in Wicket core.

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



Re: No WebApplicationContext found: no ContextLoaderListener registered?

2008-12-15 Thread Marat Radchenko
Sorry, copied wrong anchor :( should be
http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#context-create

2008/12/14, Marat Radchenko slonopotamusor...@gmail.com:
 You didn't init spring in your web.xml
  See 
 http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-factory-scopes-other-web-configuration

  2008/12/13 wicketworker siva.mad...@gmail.com:

 
   I am getting the following exception while starting my jetty server :
  
   java.lang.IllegalStateException: No WebApplicationContext found: no
   ContextLoaderListener registered?
  at
   
 org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:70)
  at
   
 org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:83)
  at 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:543)
  at 
 org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
  at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
  at
   
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:620)
  at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
  
   Basically i was able to get @SpringBean annotation working, now i am trying
   to append scope=session to one of my bean in the spring config.. 
 Following
   is what i have done:
  
   In Web.xml
   -
   filter
filter-namewicket.uti-webapp/filter-name
filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name
  
   
 param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
init-param
  param-nameapplicationBean/param-name
  param-valuewicketApplication/param-value
/init-param
   /filter
  
   listener
  
   
 listener-classorg.springframework.web.context.request.RequestContextListener/listener-class
   /listener
  
   In Spring-Config
   
bean id=wicketApplication
   class=com.uprr.app.uti.webapp.UtiWebApplication
/bean
  
  
   Can someone please tell me whats wrong?
  
  
  
  
  
  
  
  
  
  
  
  
   --
   View this message in context: 
 http://www.nabble.com/No-WebApplicationContext-found%3A-no-ContextLoaderListener-registered--tp20984524p20984524.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  


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



Re: [VOTE] Organizing Wicket Stuff / Regular Release Schedule?

2008-11-24 Thread Marat Radchenko
[X] YES

2008/11/24 Jeremy Thomerson [EMAIL PROTECTED]:
 Hello everyone,
  I would like to get your opinion on an idea regarding the Wicket Stuff
 project(s).  As you are familiar with, Wicket Stuff is where anyone can
 create anything related to Wicket, small or large.  One problem that new
 users of Wicket (and us old users) come across is that there is a lot of
 stuff in there, and not all of it is well maintained, and there aren't
 specific releases of many of the projects.  So, you have to build it
 yourself and figure out which version matches which Wicket version, etc...

  What I would like to know is if everyone thinks it would be good to have a
 subset of WS projects that are structured in a way that they are always in
 sync with the Wicket versions.  IOW, there would be two branches - 1.3.X and
 1.4 (trunk), just like Wicket has.  There would be a parent module and all
 of the modules that wanted to participate would be structured under it.
 They would all release in sync with Wicket.  For instance, when Wicket
 releases 1.4-RC2, we would cut a release of this wicket-stuff-structured
 (bad name) and all of the projects under it at 1.4-RC2.  I haven't yet
 figured out how interim releases would work (new features are added to a WS
 project and it wants to cut a release between wicket releases) or if that
 matters.

  This would not have to effect all WS projects - someone could continue to
 add projects to WS just like they do today.  This would simply create a
 sub-tree of projects that are in the structured / scheduled release area.
 For those that don't want to be part of that structure, they could continue
 operating as they do today.

 So, here's the vote:

 [ ] - NO!  We should leave Wicket Stuff like it is - a free-for-all with no
 structure
 [ ] - YES - I would like to see at least the most used Wicket Stuff projects
 structured so that they mirror Wicket, and a release is produced for each
 Wicket release.
 [ ] - Maybe - I have a better idea (perfect!)

 Also - please add the following:
 1 - Would you be interested in helping to maintain such a thing. (If we had
 two or three of the owners of the larger projects on board, I don't think it
 would be too hard to keep the codebase of this in sync with Wicket core.)
 2 - What projects do you own (and by your vote we'll see if you want those
 projects to be included in this restructuring).

 --
 Jeremy Thomerson
 http://www.wickettraining.com


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



Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Marat Radchenko
So. Is there any recommended (and hopefully not error-prone) way of
handling conditional visibility?

2008/11/20 Matej Knopp [EMAIL PROTECTED]:
 That's first confusing point. Javadocs on
 callOnBeforeRenderIfNotVisible promise us that onBeforeRender will be
 called even if component is not visible, but it is a lie.

 Bad, bad javadoc!

 -Matej

 -
 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: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Marat Radchenko
That's bad because isVisible is invoked many times (50+ sometimes) per
request so no complex logic can be put there.

2008/11/20 Jeremy Thomerson [EMAIL PROTECTED]:
 Like this?

 new YourComponent(id) {
@Override
public boolean isVisible() {
return yourCondition;
}
 }

 On Thu, Nov 20, 2008 at 9:33 AM, Marat Radchenko 
 [EMAIL PROTECTED] wrote:

 So. Is there any recommended (and hopefully not error-prone) way of
 handling conditional visibility?

 2008/11/20 Matej Knopp [EMAIL PROTECTED]:
   That's first confusing point. Javadocs on
  callOnBeforeRenderIfNotVisible promise us that onBeforeRender will be
  called even if component is not visible, but it is a lie.
 
  Bad, bad javadoc!
 
  -Matej
 
  -
  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]




 --
 Jeremy Thomerson
 http://www.wickettraining.com


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



Re: Extremely confisung onBeforeRender/callOnBeforeRenderIfNotVisible behavior

2008-11-20 Thread Marat Radchenko
I'm trying to choose strategy for handling conditional component
visibility (and we have complex tree where many components are
conditionally visible). Overriding isVisible is bad, because many
calls. overriding onBeforeRender and callOnBeforeRender is bad,
because children visibility is calculated even when there is no need.
I'd prefer overriding onBeforeRender and skipping child traversion if
isVisible = false, but that cannot be done with current
Component#onBeforeRender implementation.

2008/11/20 Igor Vaynberg [EMAIL PROTECTED]:
 you havent actually described your usecase yet...

 -igor

 On Thu, Nov 20, 2008 at 7:33 AM, Marat Radchenko
 [EMAIL PROTECTED] wrote:
 So. Is there any recommended (and hopefully not error-prone) way of
 handling conditional visibility?

 2008/11/20 Matej Knopp [EMAIL PROTECTED]:
 That's first confusing point. Javadocs on
 callOnBeforeRenderIfNotVisible promise us that onBeforeRender will be
 called even if component is not visible, but it is a lie.

 Bad, bad javadoc!

 -Matej

 -
 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: WicketTester.assertErrorMessages - encoding problem

2008-11-01 Thread Marat Radchenko
Cbuttic bug in locale-specifics handling. I think it is a candidate for a
bugreport.

2008/11/1 Artur W. [EMAIL PROTECTED]


 The problem is in tester.assertErrorMessages at:
 msgs.add(iterator.next().toString());

 The .toString() returns string with iso-8859-1 encoding.


 The workaround is to create your own assertErrorMessages like this:

ListSerializable actualMessages =
 tester.getMessages(FeedbackMessage.ERROR);
ListSerializable msgs = new ArrayListSerializable();
for (IteratorSerializable iterator =
 actualMessages.iterator();
 iterator.hasNext();) {
msgs.add( new
 String(iterator.next().toString().getBytes(ISO-8859-1),
 UTF-8) );
}

  WicketTesterHelper.assertEquals(Arrays.asList(expectedErrorMessages),
 msgs);

 What do you think about fixing the tester code as above? Maybe this is a
 good idea because AFAIK Wicket works in UTF-8 but default.

 Thanks,
 Artur


 --
 View this message in context:
 http://www.nabble.com/WicketTester.assertErrorMessages---encoding-problem-tp20280074p20280466.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: Mounting pages with trailing slash

2008-10-07 Thread Marat Radchenko
Anybody?

2008/8/29 Marat Radchenko [EMAIL PROTECTED]:
 Hi everyone!

 Is it supposed to be legal to use mount path with trailing slash?

 If yes, then I'll file a bugreport because it doesn't work [yup, I
 have a testcase]. If not, then that will be another story.


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



Re: Wicket 1.4 with QWicket

2008-09-07 Thread Marat Radchenko
1.4-m3 is the latest release.

2008/9/8 Vernon [EMAIL PROTECTED]:

 I am very new to Wicket after heard so many good things about it. I am 
 starting a project with QWicket since I want to use something I already know 
 Spring and Hibernate. None of Wicket packages can be located with the 1.4 
 version. I can see the wicket-1.4-m3.jar on the Java build path in my Eclipse.

 What is missing?





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



Mounting pages with trailing slash

2008-08-29 Thread Marat Radchenko
Hi everyone!

Is it supposed to be legal to use mount path with trailing slash?

If yes, then I'll file a bugreport because it doesn't work [yup, I
have a testcase]. If not, then that will be another story.

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