Re: [Wicket-user] Compare JSP Vs Wicket

2007-08-09 Thread Eelco Hillenius
> I am a Java, JSP Programmer. Now I am studying wicket. That's why I am asking
> Your all Suggestions.

Best way is to create a test application with both. Start simple and
gradually improve the complexity of your examples. You'll find out
what you like better soon enough.

Also, you can take a look at
http://www.virtuas.com/articles/webframework-sweetspots.html

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Custom ISessionStore

2007-08-09 Thread Eelco Hillenius
On 8/9/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> DiskPageStore , SecondLevelCacheSessionStore in core

In 1.3

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket PDF Page Project?

2007-08-04 Thread Eelco Hillenius
On 8/2/07, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
> hi everyone,
> Isnt it possible to capture the produced markup stream from wicket webpage
> or component so that one can use the strategy demostrated here
> http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html
>
> to make a Wicketstuff PDF project just to make it easy to produce a PDF from
> wicket without learning iText
>
> I would love to work on this but i simply dont know if it is possible to
> capture the HTML output from the standard Wicket API
>
> Having this in mind, where do i begin or is there anyone working on any
> stuff like this

Hi,

Yeah, this should be possible for sure. There are several threads on
how to capture HTML output directly with Wicket. It's not perfect yet
as I understand it, but possible. See this thread:
http://www.nabble.com/How-to-get-HTML-source-code-from-a-wicket-page-p11265339.html

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Midway between border and listview

2007-08-02 Thread Eelco Hillenius
On 7/24/07, Carlos Pita <[EMAIL PROTECTED]> wrote:
> Hi all,
> how can I write a container with associated markup that takes some
> markup (as a border) and repeats it (as a repeater). If I use a
> ListView I lose the associated markup. If I use a Border I don't know
> how to get its body repeated (a Border body inside a ListView doesn't
> seem to work). For now I'm passing a fragment factory to the
> container, so it can add a new fragment to every item of an internal
> ListView, that's fine but it's just a bit cumbersome.
> Thank you in advance.
> Cheers,
> Carlos

Sounds difficult. :) I would start making a clone of border and
building in that it renders itself X times, probably as part of
onComponentTagBody.

Just curious... what is your use case?

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Logging session contents

2007-08-01 Thread Eelco Hillenius
> Hi all,
> how can I debug what is being stored into the session?
> Sometimes there are classes that are Serializable by other reasons than
> wicket session keeping and are silently serialized into the session.
> For non-serializable classes I get an exception when logging is at DEBUG
> level, but I would like to know about every instance that is being stored
> into the session for a given page.
> Thank you in advace.
> Cheers,
> Carlos

If you're using Wicket 1.3, start by looking at a custom session store
implementation (ISessionStore).

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] menu or Drop Down w/ arbitrary HTML content?

2007-08-01 Thread Eelco Hillenius
> (Trying not to let my preconceived notions about old school
> HttpRequest/Response style apps and/or hand coded DHTML javascript
> cloud my thinking, but it's not easy...)
>
> Sometimes I find myself longing for a more comprehensive wicket
> "cookbook"; wicket-examples starts to go down that road, but isn't as
> comprehensive as I hoped.
>
> There might be a CSS aspect to this question as well:
>
> I'm trying to make a kind of menu panel that is usually hidden, but
> contains arbitrary HTML (at least captions and checkboxes) and that
> shows updirectly underneath a label. The panel would appear over any
> HTML content beneath it, positioned under the label that the user
> clicked on.
>
> I've been browsing the usual suspects of wicket examples, I might not
> be looking for the right keywords; "Popups" are usually the moral
> equivalent of , "Dropdowns" usually refer to
> HTML select-boxish things, and ModalWindow is close, but I actually
> want clicking elsewhere to dismiss the dialog.

I think the best thing you can do is first find a good example and/ or
Javascript & CSS library that does this, and then see how you can wrap
that as a Wicket example.

> Also, what happened to http://www.wicket-library.com/ ?

http://wicketstuff.org/wicket13/

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question about multiple AjaxSubmitLinks in one form

2007-08-01 Thread Eelco Hillenius
> Suppose that I have one form which has two parts: each part has an
> AjaxSubmitLink and some other input components(such as TextField,
> CheckBox,...):
> [code]
> public class MyPage extends WebPage {
> public MyPage()
> {
> Form form = new Form(...);
> add(form);
>
> //Part1
> AjaxSubmitLink link1 = new AjaxSubmitLink(...)
> TextField comp11 = new TextField(...)
> CheckBox comp12 = new CheckBox(...)
> ListChoice comp1n = new ListChoice(...)
> form.add(link1);
> form.add(comp11);
> form.add(comp12);
> form.add(comp1n);
>
>
> //Part2
> AjaxSubmitLink link2 = new AjaxSubmitLink(...)
> TextField comp21 = new TextField(...)
> CheckBox comp22 = new CheckBox(...)
> ListChoice comp2n = new ListChoice(...)
> form.add(link2);
> form.add(comp21);
> form.add(comp22);
> form.add(comp2n);
> }
> }
> [/code]
>
> MyQuestion: when I click (AjaxSubmitLink link1) of Part1, I want to prevent
> Part2 to submit their data( and their backend Model object). What can I do ?

I can imagine multiple ways to do this, but the most robust way is
probably to just accept submissions but make your model(s) smart
enough to make the distinction.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption - integrating Jasypt

2007-08-01 Thread Eelco Hillenius
> About this topic, I am the founder of a project called Jasypt (Java
> Simplified Encryption) [http://www.jasypt.org], which is aimed at easily
> adding robust encryption capabilities to java applications, be it password
> digesting or two-way text, binary, or number encryption (based on any JCE
> provider).
>
> I am still relatively new to wicket (although I really, really like what I
> am learning :-)), and I am interested in developing some kind of wicket -
> jasypt integration so that wicket applications can easily benefit from
> jasypt-based password encryption with little effort.
>
> This could be easily done by creating a wrapper for jasypt's
> PasswordEncryptor or StringDigester implementations, and make the wrapper
> itself implement wicket's ICrypt interface. Jasypt already performs Base64
> encoding "out of the box" as required by Wicket 1.2.
>
> I would be happy to develop this integration for the next version of jasypt,
> unless you prefer to integrate jasypt directly into the ICrypt
> infrastructure of wicket (by providing something like a "StrongCrypt"
> implementation based on a digest algorithm stronger than PBEWithMD5AndDES),
> which would also be alright for me. What do you think?

Either way could work. It's good we have compatible licenses to start
with. For the rest... having it as an add-on for jasypt is cool, but
you can also start a wicket-stuff project for this. Whatever works
best for you. And don't forget to advertise on the WIKI :)

> Did you already have
> any plans for improving this encryption infrastructure for Wicket 2.0?

Not really atm, but suggestions are always welcome.

Cheers,

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Handling exceptions

2007-08-01 Thread Eelco Hillenius
On 7/26/07, Federico Fanton <[EMAIL PROTECTED]> wrote:
> Hi everyone!
> I was wondering if there's a "best practice" for handling exceptions in a 
> Wicket application.. I'm implementing an IDataProvider for a DataView, and I 
> see that this interface doesn't throw any exception, so I'd guess that if 
> something happens inside - say - iterator() that throws an exception, it 
> should be wrapped inside a RuntimeWicketException... Am I right?
> I tried the wiki, Google and "Pro Wicket" but couldn't find an answer.. ^^;;
> Many thanks in advance

For maximum flexibility, provide a custom request cycle and override
onRuntimeException. Wicket 1.3 only though. For Wicket 1.2 you either
have to do with setting an error page that is useful for you, or
provide a custom request processor implementation (which is quite an
ugly thing to do in 1.2, but possible).

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DropDown within ModalWindow does not work in Camino

2007-08-01 Thread Eelco Hillenius
Works fine for me. Btw, the modal windows example in
wicket-examples/ajax has a dropdown in it (the AM/PM field of the
first modal window).

Eelco


On 7/31/07, Michael Day <[EMAIL PROTECTED]> wrote:
> DropDown within ModalWindow does not work in Camino.  It displays,
> but nothing happens when I click it to expand.  Has anybody else
> experienced this?
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> ___
> IMPORTANT NOTICE:
>
> This mailing list is shutting down. Please subscribe to the Apache Wicket 
> user list. Send a message to: "users-subscribe at wicket.apache.org" and 
> follow the instructions.
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Form clearInput

2007-08-01 Thread Eelco Hillenius
On 7/31/07, 桂林 <[EMAIL PROTECTED]> wrote:
>  when i submit a form with data,it ok,then i want to clear the form data 
> from the form with the form
> method clearInput() .but it does not work, why?

Try setting a new (clear) model instead.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Map & items design issue

2007-07-30 Thread Eelco Hillenius
> Is there a common pattern to avoid such issue ? Would you have any suggestion 
> ?

Use a hashmap?

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ERROR - Internal error cloning object

2007-07-30 Thread Eelco Hillenius
> 2007-07-30 12:25:45:437 ERROR wicket.markup.html.WebPage
> [http-8080-Processor25] - Page [Page class =
> com.xmltravel.fab1.wicket.flights.FlightSearchResultPage , id = 1] couldn't
> be cloned to move to another pagemap
> wicket.WicketRuntimeException: Internal error cloning object
> at wicket.util.lang.Objects.cloneObject(Objects.java:466)
> at wicket.markup.html.WebPage.onNewBrowserWindow (WebPage.java:344)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke (
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java
> :187)
> at
> wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(
> ListenerInterfaceRequestTarget.java:74)
> at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(
> DefaultEventProcessorStrategy.java:65)
> at

It tries to clone the current page for use in another window. It looks
like that spider makes Wicket think the requests are for new windows
all the time. You could try
getPageSettings().setAutomaticMultiWindowSupport(false) in your
application (false by default in 1.3 btw).

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page Expired after logout and re-login

2007-07-28 Thread Eelco Hillenius
> Thanks guys for all the help, you are amazingly responsive. Now I feel bad
> and have to be more responsive with open source project I manage 8-). You
> are setting the example!

Heh, cool. Which one is that?

> BTW, I came with solution after reading the first chapter of Wicket In
> Action.

And that's only the *first* chapter! :)

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page Expired after logout and re-login

2007-07-28 Thread Eelco Hillenius
> After re-login when I get Page Expired, the url is:
> http://localhost:8080/MyApp/app/?wicket:interface=:0::

Yeah, that's a reference to an already rendered page. Try to find why
it tries to render that. You could try setting a break point in the
Wicket filter and go from there for instance, and/ or check out what
your authorization strategy does (I assume you have a custom one
installed).

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page Expired after logout and re-login

2007-07-28 Thread Eelco Hillenius
Btw this user list is about to shut down. Please subscribe to
[EMAIL PROTECTED] (by sending an email to
[EMAIL PROTECTED]) and have future discussions there.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page Expired after logout and re-login

2007-07-28 Thread Eelco Hillenius
> so you do not think that session.invalidate() can cause the page to expire?

Only if you try to render a page that is part of that old - now
invalidated - session. Make sure Wicket doesn't try to do that (e.g.
check whether the authorization strategy doesn't try to do another
redirect).

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to get HTML source code from a wicket page

2007-07-26 Thread Eelco Hillenius
> I'm not familiar with JIRA, where should I go to sign up or post a bug?

http://issues.apache.org/jira/browse/WICKET

then look for a way to register.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3, use of getElementById and Wicket.$() and the preservation of ids

2007-07-26 Thread Eelco Hillenius
> I'm a little surprised this isn't more of a high priority item...

It is scheduled as major, with fix version beta 3. That's a pretty
high priority. The fact is though that until I stumbled upon this, we
had no complaints of users to deal with in this matter.

> I know Repeaters et al might need some special casing, but could the
> "usual" cases do what the coder probably expects, i.e. if you specify
> in html markup, that id is preserved (and therefore usable in
> javascript's getElementById ??)

Yes, of course. It's one of the things that is very difficult to solve
for us, sorry. Software can be like that. Solving this properly was
one of the main reasons for the constructor change (which introduced
other problems which in the end we deemed more serious than what the
constructor change fixed). This cost us months of work we had to throw
away in the end. So please don't tell us we haven't been trying.

The main problem here is that we need the markup loaded, and at this
time at least, we need to get back to the page for that to resolve
things like markup inheritence, borders, etc. But without forcing
passing in parents like we did with the constructor change, we can't
be sure when the whole hierachy is built, and we thus can't support
getMarkupAttributes in the constructor/ before rendering.

So.. at this time we could only support a half-baked solution, which
simple won't do. We need to find a good solution, which is what the
issue is open for.

As always, patches are welcome.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wizard question

2007-07-26 Thread Eelco Hillenius
On 7/25/07, Will Jaynes <[EMAIL PROTECTED]> wrote:
> Using 1.3beta2.
> I'm new, so maybe I shouldn't be trying to work with the Wizard stuff
> from wicket-extentions this early, but...
>
> I just don't see how to get at my model in between steps, or rather, at
> the end of a step. My wizard constructor looks like:
> public class RequestWizard extends Wizard
> {
> public RequestWizard(String id)
> {
> super(id);
> ConsultRequestBackingBean backingBean = new
> ConsultRequestBackingBean();
> setModel(new CompoundPropertyModel(backingBean));
> WizardModel model = new WizardModel();
> model.add(new RegNumberStep());
> model.add(new RequestTypeStep());
> init(model);
>  }
> ...
>
> In my RegNumberStep class, when the "Next" button is pressed, I
> understand that the applyState() method is called. In that method I
> would like to get a hold of my ConsultRequestBackingBean. But if I call
> getModelObject() I get an exception
>
> No get method defined for class: class 
> edu.umich.med.wcp.wicket.model.ConsultRequestBackingBean expression: view
>
> I'm afraid I don't understand why Wicket is attempting to call getView()
> on my ConsultRequestBackingBean.

That is because on the wizard component you define a
CompoundPropertyModel, and you ask the model of a wizardstep
(RegNumberStep), which is a *child* of that wizard (a direct child,
with id 'view'). As RegNumberStep does not have an explicit model set
itself, it will use the parent's CompoundPropertyModel to get the
model value, but with it's own id as a property expression.
In the same fashion:
  setModel(new CompoundPropertyModel(person));
  add(new TextField("name"));
will have the effect that the textfield works on property name of person.

A solution is to do this instead: findParent(Wizard.class).getModelObject()
Or... you could expliciltly pass in references to the model object.
The NewUserWizard for example does this (see the user var/ getUser
method). If you don't want to use nested classes like that, you'd have
to explicitly pass the person object or expose it in another way.

Hope that helped,

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3, use of getElementById and Wicket.$() and the preservation of ids

2007-07-26 Thread Eelco Hillenius
> http://issues.apache.org/jira/browse/WICKET-694
> i guess there were problems when implementing this, maybe eelco can
> ellaborate more on the "unforeseen side effects"

Yeah, they were listed in the thread that is mentioned in the issue:
http://www.nabble.com/Re%3A-getMarkupId-doesn%27t-return-the-id-from-the-markup-p11294903.html

I don't really know what to do with it tbh. I hope someone else has
some suggestions.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3 and Velocity

2007-07-26 Thread Eelco Hillenius
On 7/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
> I am working with wicket 1.3 and use Velocity for generating emails by
> templates.
> With wicket it works good, but now (with wicket 1.3) Velocity cannot
> load templates
>
> Properties props = new Properties();
> props.setProperty("resource.loader", "file");
> props.setProperty("class.resource.loader.class","org.apache.velocity.runtime.resource.loader.FileResourceLoader");
>
> /* установка пути к папке с шаблонами */
> props.setProperty("file.resource.loader.path",
> ResourceLocator.getInstance().getResourcePath(ResourcesTypes.MAIL_TEMPLATES_FOLDER));
> props.setProperty("file.resource.loader.cache ", "true");
> props.setProperty("file.resource.loader.modificationCheckInterval", "2");
> props.setProperty("runtime.log.logsystem.class",
> "org.apache.velocity.runtime.log.NullLogSystem");
>
> Velocity.init(props);
> VelocityContext vc = new VelocityContext();
> Template t =
> Velocity.getTemplate("restore_password.vm");//tmpMessage.getTemplate());

Do you include the wicket-velocity project (and if you do, do you
really need it)? The problem with velocity is that once initialized,
it will ignore other calls to initialized (see
org.apache.velocity.runtime.RuntimeInstance#init). A fine example of
the dangers of using static.

Now, if you do include wicket-velocity (make sure you really need it),
you need to configure that using some context parameters it seems.
Look at org.apache.wicket.velocity.Initializer#getVelocityProperties.
From a glance over the code, it looks like you need to configure
context parameters (in web.xml) 'velocityPropertiesFolder', which is a
folder relative to the web app root, and 'velocity.properties' that
should point to your Velocity properties file in that directory.

Tbh, Jean Baptiste, it looks to me like we could simply things a bit.
Can't we just have one parameter where you either give a relative path
that is then interpreted as relative to WEB-INF, or an absolute path
that is just interpreted as absolute, and can't we try a default
location (like WEB-INF/velocity.properties or maybe whatever is
customary in Velocity's world) in case a parameter isn't provided?

Eelco
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket customizability

2007-07-25 Thread Eelco Hillenius
> i don't really understand what you're talking about because i don't know
> your
> requirements.  but don't forget two things: 1) the primary unit of reuse in
> wicket is the panel and 2) you can put any component (such as a panel) in a
> completely self-contained jar because of packaged resources.  if you just
> want
> users to be able to add panels that work on entities exposed through an API
> maybe all you need is jarred panels.

Also, take a look at wicket.properties and IInitializer. Basically,
this is Wicket's mechanism for auto-discovery. When starting up, it
loads all instances of wicket.properties it can find it the (root of
the) classpath, and instantiates the IInitializer class that is
configured in it. That initializer can then for instance register the
components it has in case you would work with a central component
registry (sounds like this is something you might want to have). OSGi
can do even more for you, including automatic discovery at runtime (so
you drop in a jar and it should connect without even having to
restart... actually now that I think of it, we could poll for new
additions as well if we wanted) and it provides a much broader module
mechanism. Not an expert on this field though. Maybe on of the OSGi
experts on this list can throw in their opinion?

Btw, the system that I'm working on (and others on this list,
including Igor) works like a component system where business
components (can't think of a better name) provide their own panels for
end-users and tasks like administration/ configuration of the
components etc. It's all perfectly doable, but you gotta do some
upfront thinking :)

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] evil Page(params) bug in 1.3.0-xxx

2007-07-25 Thread Eelco Hillenius
On 7/25/07, Nathan Hamblen <[EMAIL PROTECTED]> wrote:
> spencer.c wrote:
> > Erm, why do you say that constructor is useless?  I use that a couple of
> > places...
>
> Because nothing happens to the PageParameter object that is passed in to
> it. I should have said WebPage, since that's the class we extend,   but
> it just calls super(parameters) into Page and skips the probably
> important commonInit() call. You've been warned.

I think we also call this a bug :) see
http://issues.apache.org/jira/browse/WICKET-791

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] evil Page(params) bug in 1.3.0-xxx

2007-07-25 Thread Eelco Hillenius
On 7/25/07, Nathan Hamblen <[EMAIL PROTECTED]> wrote:
> > I think we also call this a bug :) see
> > http://issues.apache.org/jira/browse/WICKET-791
>
> Yes, but I did want to suggest that someone reconsider having the method
> in the first place.

Ah, ok. It doesn't do much special atm, but it's not really wrong
either imho, as both Page and PageParameters are in the
org.apache.wicket package. The Javadocs for PageParameters are a bit
specific for URLs and web applications maybe, but the class itself in
abstract enough.

My 2c,

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user 
list. Send a message to: "users-subscribe at wicket.apache.org" and follow the 
instructions.
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] About to use Wicket. ORM?

2007-07-25 Thread Eelco Hillenius
> (Two others that I've heard good things about are Cayenne & Mr.
> Persister, but I've not used either yet.)

To make the list complete, people could take a look at
ActiveObjects[1], which is a new initiative to create something akin
to ActiveRecord, and has a Wicket based examples project.

Or you could even go for an object database, like db4o[2]. It would
have been great if the latter had a distribution with a friendly
(preferably Apache 2) license for just the API, so that we could
create a sample project for that sometimes. At least I would find it
interesting to play around with it.

Eelco


[1] https://activeobjects.dev.java.net/,
http://blogs.dzone.com/daniel/2007/07/18/an-easier-java-orm/
[2] http://www.db4o.com/

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket Excel Example

2007-07-25 Thread Eelco Hillenius
On 7/25/07, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
> i have attached it to this email...check the attached RAR file

I'm afraid attachements get filtered out, Aladejebi.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] AuthorizeAction and !Role

2007-07-25 Thread Eelco Hillenius
> I would like to submit a patch for this, but I can't see where I need to
> do this...
>
> I can see that the issue tracker is now Jira set up on the Apache
> infrastructure, but there is currently no component for
> "wicket-auth-roles".

The component should be in there though. It currently doesn't have any
issues assigned, so it doesn't show up on the front page, but if you
create a new issue, you should be able to select it.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page lifetime in wicket

2007-07-24 Thread Eelco Hillenius
> maybe we should make WebApplication.get() return
> (WebApplication)Application.get()?

When we switch to JDK 1.5 we should.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Custom session not working...

2007-07-24 Thread Eelco Hillenius
On 7/24/07, spencer.c <[EMAIL PROTECTED]> wrote:
>
> Sorry Matej, I opened the bug per Eelco's request before receiving your two
> responses.
>
> I will close the issue, since it sounds like this has been discussed before,
> and there are technical reasons for it staying as is.  I guess this is just
> a confirmation that it not intuitive to the uninitiated user, and might be
> something to keep in mind for future change.  In any case, we have known
> workaround, so no big deal.

We need to at least look at how multiple calls to #bind go though. I
think it currently just bluntly keep re-registering. Probably not a
big deal, but not right either.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Custom session not working...

2007-07-24 Thread Eelco Hillenius
> You need to call session.bind().
>
> We've been discussing this many times. It's no good to make
> session.dirty() bind the session, because it's called internally even
> on sessions that should not be bound.



On 7/24/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
> You need to call session.bind().
>
> We've been discussing this many times. It's no good to make
> session.dirty() bind the session, because it's called internally even
> on sessions that should not be bound.

You are right. But we do have a problem here. Maybe we should revisit
this code and specify what the dirty bit actually should mean. If even
we devs can't agree on it, what can we expect from our users?

Originally, the idea behind dirty was to be able to detect when we
needed to flush changes to the session (i.e. set the session as an
attribute on the http session) so that a cluster could be notified.
When this bit was introduced (pre 1.1 I believe), Wicket didn't have a
stateless mode, so that wasn't a consideration back then.

The code now:

if (dirty)
{
this.dirty = false;
setAttribute(SESSION_ATTRIBUTE_NAME, this);
}

seems to be exactly that. But this doesn't make sense when the session
is not bound anyway! Also, I know there are quite a few methods
calling Session#dirty, but I wonder if they all do it for the good
reasons.

The problem with explicitly calling bind is that the session store's
bind implementation is called as well. Maybe that implementation
should do some more checking whether the session was already bound or
not.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Custom session not working...

2007-07-24 Thread Eelco Hillenius
On 7/24/07, spencer.c <[EMAIL PROTECTED]> wrote:
>
> Alright, so from what you guys have said, I think there is a bug.

Darn! :) Could you open an issue please? I'll look into it asap.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Custom session not working...

2007-07-24 Thread Eelco Hillenius
> Couple of follow up questions/comments that anyone can field:
> 1) I understand why you would want a stateless application, however I don't
> understand why you would ever want your session to be regenerated on each
> request if during the request you specifically set a session value.  It
> seems like once you set a session value, the session should become bound.
> Is there a logical reason this isn't the case, or is it just a
> technological/implementation reason?  I'm just trying to understand this
> better.

Like Igor said, calling dirty when you set a value should do the
trick. If it doesn't it's a bug :)

> 2) The location quoted for the live examples
> (http://wicketstuff.org/wicket13/) is the one I was looking at, however for
> the specific example "stateless", it is not possible to view the source code
> and/or page files "live".  Not sure how the site is maintained, but perhaps
> a download link could be added on the examples page to the build that the
> live examples demonstrate, by default.  I've got the files now however, so
> thanks again!

Ah, ok. That example doesn't use the header all the other examples use
because that header would make it statefull :) Could probably be
fixed, but atm it's a bit too much trouble.

Cheers,

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponent*POST*InstantiationListener

2007-07-23 Thread Eelco Hillenius
> sometimes I find useful to be able to do some initialization once my
> component is attached to its hierarchy, mainly to be able to call
> getPage(). For example, if there are relevant events along some page
> lifecycle maybe panels contained in it may want to add themselves as
> listeners: ((MyPage)getPage()).addMyEventListener(this).
>
> Or maybe a model is attached to the page and you don't want to pass it
> deep down the hierarchy but just obtain it from the page when needed.
>
> For now I'm just visiting page components first time the page is
> attached (that is, I'm overriding onAttach).
>
> This implementation is fine but maybe the aforementioned event should
> be a provided, standard one. What do you think about it?

Erm, how would you implement that? :)

I think you should use IComponentOnBeforeRenderListener in this case
(and note there is also IComponentOnAfterRenderListener).

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Custom session not working...

2007-07-23 Thread Eelco Hillenius
> I have a custom session class that inherits from WebSession.  I have
> overridden the newSession method in my Application class.  The session is
> getting used during the request, because I initialize some of its values in
> its constructor, and they show up when I attach a label to them in a page.
> A new session gets created with every request, however, which obviously is
> not the desired behavior.  For instance, I have an Integer, and I initialize
> it to 1 in the constructor, and increment it before each page display.  I
> always get back a 2 on the page.

It sounds like your page is stateless, and the session instances are
temporary. As long as a session is not 'bound', you'll get a separate
instance per request and Wicket won't hold on to heap memory. You can
force the creation of a session by calling Session#bind, which I think
you should be able to call from your constructor as well.

> Related to this, can someone provide me a download link to the 1.3 examples?
> The live examples page does not allow you to view the source for the
> stateless example, which seems like it may have some relevant code in it,
> and I cannot find a download link for the 1.3 examples.  The 1.2 examples do
> not have that particular example, from what I can tell.

Use http://wicketstuff.org/wicket13/ to look at the examples. The
wicket-examples site is stale.

As for downloading the examples for 1.3.0, at this time you can best
get them from SVN directly, or download them from our maven repo at
http://wicketstuff.org/maven/repository/org/apache/wicket/wicket-examples/1.3.0-SNAPSHOT/

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] .setVisble not working for webmarkupcontainer

2007-07-23 Thread Eelco Hillenius
On 7/23/07, Christian Alejandro Marquez Grabia <[EMAIL PROTECTED]> wrote:
> The problem is that you have hidden the container in which the components
> were placed, and later when wicket attempts to add the components, it can't
> find the place where to.
>
> As Dipu says, you must modify the visibility of the inner components, not
> the container, so when wicket attempts to add the components, it can find
> the container to place them.

Both suggestions are good. As far as I know,
setOutputMarkupPlaceholderTag(true) should work as well.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] content loading on page scroll

2007-07-22 Thread Eelco Hillenius
> thoof.com has a very interesting feature - it loads more articles when
> you scroll down the page.  Have you seen it ?
>
> Do you have any idea about how to implement it in wicket ?

Some people have an idea, as Thoof is build with Wicket :) I wasn't
one of them, so I don't know. I can imagine that you react on a
scrolling event[1] in combination with a Wicket repeater, where you
add elements and order redraw (though that's probably quite a blunt/
unoptimized way to do it).

Eelco

[1] http://codepunk.hardwar.org.uk/ajs02.htm

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page lifetime in wicket

2007-07-22 Thread Eelco Hillenius
> By default which temp directory does all the all pages stored into?

public FilePageStore()
{

this((File)((WebApplication)Application.get()).getServletContext().getAttribute(
"javax.servlet.context.tempdir"));
}

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-07-22 Thread Eelco Hillenius
> i thought even if you explicitly mark a page as stateless that has stateful
> components ( link, form, etc ), it
> would still render as stateful ( creating session ) ? isn't that
> the behaviour?

yes that is true.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Browser not caching my images

2007-07-22 Thread Eelco Hillenius
On 7/20/07, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
> I recently upgraded to wicket 1.2.6 and although this time my application
> path is /*

With a servlet? Sure that's a good idea?

> and i realized for each page refresh or event, the same sets of images seems
> to be loading all over again making loading appear slow

How do you add these images? Any code you can share?

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] NPE in Session.cleanupFeedbackMessages in wicket 1.2.2

2007-07-22 Thread Eelco Hillenius
On 7/22/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> no one probably uses 1.2.2 still - like you said its ancient.

Nili, if you can't upgrade, maybe you can look at the changes in later
versions. If you find something obvious you can roll out a patched
version.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] validator.w3.org validation

2007-07-21 Thread Eelco Hillenius
> I hope it will be fixed.   Is there a JIRA issue so we can vote for it ?

I think not ATM, but please open up one. As far as I can remember we
encode at some places and don't at others, because at some occasions
we ran into trouble with that. Dunno, if you open up a JIRA issue,
we'll look at it. And as always a patch is welcome. :)

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Replace a component with another component by adding a Behaviour

2007-07-20 Thread Eelco Hillenius
> in the end it will be the panel-solution I think.
> but is there a way to diable the check?

Not really for those components. Though if you take a look at their
sources, they are not real difficult components. TextArea for
instance:

public class TextArea extends AbstractTextComponent
{
public TextArea(final String id)
{
super(id);
}

public TextArea(final String id, final IModel model)
{
super(id, model);
}

protected final void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
checkComponentTag(openTag, "textarea");
replaceComponentTagBody(markupStream, openTag, getValue());
}
}

If you just create your own class based on this, and remove the
checkComponentTag line, you have what you want. Or you could even do
something like this:

public class TextAreaOrHiddenField extends AbstractTextComponent
{
private boolean isHiddenField;

public TextAreaOrHiddenField(final String id, final IModel 
model)
{
super(id, model);
}

@Override
protected void onComponentTag(ComponentTag tag)
{
if (!isHiddenField)
{
tag.setName("textarea");
}
else
{
tag.setName("input");
tag.put("type", "hidden");
tag.put("value", getValue());
}

super.onComponentTag(tag);
}

protected final void onComponentTagBody(final MarkupStream 
markupStream,
final ComponentTag tag)
{
if (!isHiddenField)
{
replaceComponentTagBody(markupStream, tag, 
getValue());
}
else
{
super.onComponentTagBody(markupStream, tag);
}
}
}


Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Odd Refresh Page Behavior

2007-07-20 Thread Eelco Hillenius
> SOmeone is losing quite a bit of sleep!

You bet. Though more over that friggin' book than over the mailing list. :)

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Overriding button display for specific Wizard steps

2007-07-19 Thread Eelco Hillenius
On 7/19/07, David Leangen <[EMAIL PROTECTED]> wrote:
>
> I'm trying to figure out how to override the button displays for only
> specific steps during the Wizard.
>
> Essentially, I have a kind of license that a user needs to agree to, so
> rather than "Next >", I'd like to override with "I agree".
>
>
> No problem for overriding for all steps, but that doesn't work for me.
>
> When I try to receive the parent of the WizardStep to do this
> dynamically, I only get null, so that approach is not working...
>
>
> Any suggestions?

Provide a custom button bar by overriding Wizard#newButtonBar. Pass in
the wizard to the steps as well (like the default do) and let the
steps work with either the wizard's model object or the current wizard
step (getActiveStep) and see what you need to do. You could even try
doing something like

interface IMyWizardStep extends IWizardStep {
  getNextButtonLabel();
}

and let your button call that.

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] some errors appear in wicket-example 1.3beta2

2007-07-19 Thread Eelco Hillenius
> I just run through the library sample -
> http://wicketstuff.org/wicket13/library/
>
> Supposedly, if you don't key in the title and author field, it will show
> error as it has FormComponentFeedbackBorder component wrapped around the
> title and author fields. but in wicket1.3 beta2, it seems like it doesn't
> show any error when those fields are left blank during submission..

Thanks for reporting. I fixed it. See
https://issues.apache.org/jira/browse/WICKET-774

> Actually
> the other day  I ran across few other errors on some of the samples in
> wicket1.3 as well,  and i don't remember all for now..another one is the
> datepicker in http://wicketstuff.org/wicket13/forminput/.

Yeah, the forminput & datepicker thing had to do with ids assigned in
the markup for components that use it. It is a bug, and there is an
issue for it, but it can be avoided (and we don't know a good solution
for this yet... it's one of the things the constructor change of 2.0
actually did solve).

> This is just a
> post to highlight there are errors in the sample

Keep em coming please! :) Thanks for reporting.

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] line break after ImageMap?

2007-07-19 Thread Eelco Hillenius
On 7/16/07, verbal evasion <[EMAIL PROTECTED]> wrote:
> i had two images side by side, both inside the div tag. then i made the left
> one an ImageMap and the second image (on the right) went to the next line. i
> tried to resize them and everything, but nothing helped. how do i fix this?

Make it an inline element instead of a block element using CSS?

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Replace a component with another component by adding a Behaviour

2007-07-19 Thread Eelco Hillenius
> I try to replace a TextArea with a HiddenField (or in next step with a
> Panel).
>
> before:
> Input comes
> here
>
> after:
> 
>
> I added a Behaviour to the TextArea:
> public void bind(Component c)
> {
> target = c;
>
> HiddenField hiddenField = new HiddenField(target.getId(),
> target.getModel());
>
> target.replaceWith(hiddenField);
> }
>
> but get error:
> Component messageInput must be applied to a tag of type 'input', not
> '' (line 0, column 0)

For many components, Wicket checks whether you attach them to the
correct tags. Sometimes, addmittedly, this is annoying, though the
idea is that it saves you from making stupid mistakes. In this case,
just either use custom components (or one that can do both, this might
actually be a fairly elegant solution) or wrap those components in
panels (TextAreaPanel and HiddenFieldPanel) and use a  tag or
something similar.

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page getting redirected when accessing from mail reply

2007-07-19 Thread Eelco Hillenius
> Will that be included in your book?

It's still the plan. We're fighting to get it done in the first place
though, so it might prove tricky. Marcel Offermans was also
interesting in helping out, so the problem does not lie in lack of
help from OSGi people.

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Resource finder for files in a JAR

2007-07-19 Thread Eelco Hillenius
> With this code, resourceFinder.add() only accepts directories, isn't
> it? Now i want the templated to be searched from a jar (distributed as
> plugins) or from a directory (distributed with the installation).

You would be better off using IResourceStreamLocator directly. Use the
decorator pattern to pass on to other locators if the one you built
can't find it.

> Also, the theme can be dynamically changed, by the administrator, or
> by the user settings, so the new path for the templates must no be
> added to the current paths, the new path must overwrite the old value.

That's not really something you can implement in a straightforward
fashion I'm afraid, as you're typically not in charge of the
classloading. Maybe for your case, you have to take charge, but that's
way out of Wicket's scope. Or think about a solution where you don't
have to rely on the order of classloading. For instance, create some
dynamic registration and use e.g. time stamps with your register (new
time stamps 'win'). Look at how Wicket's IInitializers work for ideas
(not for time stamping, but you could do the registering in such an
initializer).

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] validator.w3.org validation

2007-07-19 Thread Eelco Hillenius
I don't know... I would still go for XML schema. DTDs don't know
namespaces, so anything you do with them will be a hack imho. Over the
last two years, I think various people have made a go at it, and tbh
I'm not sure whether anyone had the final working DTD or whether they
just gave up on it.

This issue is still open
http://issues.apache.org/jira/browse/WICKET-693. We really need a good
patch from someone who cares enough about getting it right.

Cheers,

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Setting custom session in a wicket unit test that doesn't take an Application as parameter.

2007-07-19 Thread Eelco Hillenius
> How do you create a mock session for this websession? WicketTester creates a
> new instance of MockWebApplication which extends WebApplication and not my
> custom AuthenticatedWebApplication. This becomes troublesome because the
> constructor of my custom session takes a subclass of
> AuthenticatedWebApplication and not a subclass of WebApplication. How should
> I go about to test this?

Looks a bit tricky. I don't have a good answer tbh. If I were you I
would just create my own test classes that work for this particular
case. One big copy 'n paste action, and some effort in customizing it
that it works for you, but then at least you'll know it does exactly
what you want. Sorry,

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Odd Refresh Page Behavior

2007-07-19 Thread Eelco Hillenius
> I have successfully deployed and verified that the behavior still seems to be
> in error. I have not actually run the phonebook application but was using it
> as a pattern.

One of the forgotten emails I'm afraid...

Did you make any progress on this, or is it still a problem? If it is,
would you mind opening up a JIRA issue for it please?

Eelco

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] .properties encoding

2007-07-19 Thread Eelco Hillenius
On 7/19/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> I vaguely remember something about xml properties files that do handle
> other encodings. Didn't we implement that? Or was it just one of those
> things to do in the next version?

Yes, that is implemented now. XML properties is a JDK 5 feature, but I
backported the functionality to Wicket a while ago. Look at the form
input example. See FormInput_ru.xml for instance, which has:


http://java.sun.com/dtd/properties.dtd";>

'${input}' не является
корректным URL
'${input}' не
является корректным телефонным номером США
Локаль:
по-умолчанию

Etc.

Eelco
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PasswordTextField encryption

2007-07-19 Thread Eelco Hillenius
On 7/19/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> It is configurable: don't use PasswordTextField but TextField instead.
>
> The reason behind PTF's encryption is that we want to provide a secure
> solution out-of-the-box. You can circumvent it, but then *you* need to
> open up Pandorra's box, not us. Same with escaping markup while
> outputting model values: the default is safe.

Didnt it have to do with persistency of fields via cookies as well?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Will the component be serialized twice ?

2007-07-18 Thread Eelco Hillenius
> This is my code:
> [code]
> public class MyPage extends WebPage {
> private Panel panel = null;
> public MyPage()
> {
> this.panel = new MyPanel(...);
> add(this.panel)
> //...
> }
> [/code]
>
> Will the panel be serialized twice ? Thx!

Nope. You just have multiple references to the same object. Java's
serialization is smart enough to make that distinction.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-picocontainer?

2007-07-18 Thread Eelco Hillenius
On 7/18/07, David Rosenstrauch <[EMAIL PROTECTED]> wrote:
> I saw that the 1.3 distribution contains wicket-ioc*.jar, along with
> wicket-guice*.jar, and wicket-spring*.jar.
>
> Just wondering:  has anybody put together a wicket-picocontainer package
> too, perchance?

That that I know of, but a contribution would be welcome :)

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Eelco Hillenius
> i think its time for you to build something that uses aop and get it out of
> your system :)

Get it out of my system? I'm not exactly recommending AOP as I think
other solutions would be better.

after(Component c) returning: this(c) && execution(Component.new(..)) {
System.out.println("constructed component with model " + 
c.getModel());
}

Something like that works. I'm sure there's lots of ifs and buts, but
the point is that it is a possible way out.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Eelco Hillenius
On 7/18/07, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> True you can't do setModel(foo) and expect your instantiation check to
> work. Which imho is perfectly logical if you want to use your model in
> the instantiation check you need to pass it in the constructor.
>
> As for the example
> We have a search page for students, uppon clicking on one of those
> students, you go to a detail page for that student. that page also
> contains several tabs to go to other relevant pages for the student
> (like it's school grades). on these pages we made a quicksearch
> function with contains amongst other things 2 buttons to navigate
> forth and back between the searchresults of the search page, while
> keeping the same view. Suppose i have sufficient rights to see the
> detail pages of all students but only enough rights to see the grades
> of my own students.
>
> So if i make the search wide enough to get all students and then
> select one of my own, going to the grades. That's fine. But if i then
> navigate to another student i am not allowed to see the grades
> (creating a new instance of the grades page in the process) i need to
> know if the page in combination with the student is allowed, because
> the page itself is basically allowed.

Sounds to me like you have alternative ways to implement this, for
instance, construct what's on your page according to what can be
displayed, throw an auth exception in the page itself (doesn't sound
like you were doing this generically to start with?) or use an
intermediate page that functions like a switch. Also, if you really
want to follow your approach and IComponentInstantiationListener is
not rich enough, consider using AOP, which should give you all the
freedom you wish for.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] feature suggestion component instantiation

2007-07-18 Thread Eelco Hillenius
I don't think I agree with that.

MyComponent c = new MyComponent(); c.setModel(foo) wouldn't work for
starters, and you can even set models mutliple times. Not to mention
the other problems you mentioned in this thread. And finally, it would
just invite people to go crazy with this functionality.

But give us a good example of where using the model to determine an
access restriction would actually be useful?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Row index in datatable

2007-07-18 Thread Eelco Hillenius
-- Forwarded message --
From: Pierre Coquentin <[EMAIL PROTECTED]>
Date: Jul 18, 2007 1:48 AM
Subject: Problem to send mail to user list Wicket
To: [EMAIL PROTECTED]



 Hi,
 this is not a spam :P
 Sorry to disturb you, i tried twice to send a question to user list
wicket but it appears that my mails have been lost and i don't know
why.
 Is there something i'm doing wrong ?
 Furthermore i have now another question about how to close a modal
window automatically without AJAX...  please help :)
 Thanks in advance,

 Pierre

 PS : i forward my first mail as attachment

-- Forwarded message --
From: Pierre Coquentin <[EMAIL PROTECTED]>
To: wicket-user@lists.sourceforge.net
Date: Wed, 18 Jul 2007 09:36:44 +0200
Subject: Row index in datatable

 hello all,

 I need to obtain row index in datatable when populating cell item.
 column = new AbstractColumn(...)
 {
 public void populateItem(Item cellItem, String componentId, IModel model)
 {
cellItem.getIndex() // Index of column
??? // Index  of row
cellItem.add(...);
 }
 };


 After some deep research, i found same question posted
http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg21743.html
but no answer except an hack which don't work with wicket 1.3b2 (and
didn't find the feature in JIRA).
 If someone can help me :P
 Thanks in advance.

 Pierre

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] one component class , many markap

2007-07-17 Thread Eelco Hillenius
On 7/17/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> see component.getvariation() override that, then the markup file used is
>
> componentname_variation.html
>
> but the component hierarchy still has to match. if you want different
> hierarchies within the component then use fragments

And for the extreme case (e.g. when you want to load from a database)
you can do custom loading. See the custom resource loading example of
wicket-examples.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] enum not serializable?

2007-07-16 Thread Eelco Hillenius
On 7/16/07, verbal evasion <[EMAIL PROTECTED]> wrote:
> yeah. i want to, but i dont see where i'm storing values(). i'll keep
> looking. must be somewhere.

I take it you are using Wicket 1.2, right? 1.3 should give a bit
better diagnostics.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-16 Thread Eelco Hillenius
> The problem here is that fact that I'm only testing page A, I don't care
> about the functionality of page B nor which services it might call.  So is
> there a better way?  Is there a way that you can mock the rendering of page
> B?  Has anyone else ran into this issue and  or questioned it, or has
> someone came up with a solution?

If you don't care about page B, why not soft code the link and just
test that it executes? For testing you let the link point to some mock
page. Would that help?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester and mocking up next page rendered.

2007-07-16 Thread Eelco Hillenius
> But due to unmanaged nature of Wicket, there is no chance to intercept 
> construction of page B unless you build your own factory for page.

Not entirely true as there is IComponentInstantiationListener.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] enum not serializable?

2007-07-16 Thread Eelco Hillenius
On 7/16/07, verbal evasion <[EMAIL PROTECTED]> wrote:
> this is what i see. i wonder if there is a way to get a more informative
> trace. i actually think now its that i'm doing HashMap.values() somewhere
> and its trying to serialize that, but shouldnt the values() be serializable
> if i marked that class serializable?

Well, values is defined as this:

private class Values extends AbstractCollection {
  ...

That class is not serializable. Serialization of HashMap works through
custom read/writeObject implementations. So it sounds like you should
try to get rid of values().

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] enum not serializable?

2007-07-16 Thread Eelco Hillenius
On 7/16/07, verbal evasion <[EMAIL PROTECTED]> wrote:
> i have an enum that has a HashMap in it. wicket is
> complaining that HashMap$Values is not serializable. am i doing something
> wrong or could  there be a bug in wicket for serializing enums?

Java 5 enums are serializable, and JDK hashmaps are as well... can you
give us a good stacktrace?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Submit method problem

2007-07-16 Thread Eelco Hillenius
> I found what was the problem.
>
> In web.xml in WicketServlet servlet mapping
> I had /*
>
> When I changed it to default /app/* everything
> works fine.

Note that with Wicket 1.3 you configure a filter instead of a servlet
and map that to /* without problems.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] stateless wicket?

2007-07-16 Thread Eelco Hillenius
On 7/16/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
> > I think it is wrong. Why would we set the pagemaps as attributes in
> > the session when using the second level cache page map? The whole idea
> > of storing in the session of page maps was clustering, and that works
> > for HttpSessionStore. But it doesn't make sense for SLCSS and
> > variants.
> >
>
> Because the default pagestore implementations are not clustered. So
> would have no failover if you didn't put the pagemap (that reference
> the last accessed page) to session.

Yeah, it's clear again. The SLCSS's pagemaps only hold the last
accessed page, so putting them in the session isn't redundant.

Igor is right.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Efficient DynamicResource Handling

2007-07-16 Thread Eelco Hillenius
> I agree, you'd probably best start with extending WebResource and then
> implement getResourceStream yourself. I'll put an extra note in
> DynamicWebResource to explain this.

And make a note in Wicket In Action. Thanks!

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Efficient DynamicResource Handling

2007-07-16 Thread Eelco Hillenius
> > Is there a way to do this more efficiently?  Looking at
> DynamicWebResource,
> > it looks like perhaps I could just override IResourceStream
> > getResourceStream() instead of the getResourceState() method.  Any
> > problems/gotchas doing that?  Is there a more standard/"wicket" way of
> doing
> > it that I should be aware of?
>
> sounds to me like you are starting in the wrong place in the hierarchy.
> perhaps you should extend WebResource, or maybe even Resource itself.

I agree, you'd probably best start with extending WebResource and then
implement getResourceStream yourself. I'll put an extra note in
DynamicWebResource to explain this.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester does not clean up resources very well

2007-07-16 Thread Eelco Hillenius
On 7/15/07, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> I just noticed that running the following minimal junittest fails.
> WicketTester mock=new WicketTester();
> mock.setupRequestAndResponse();
> mock.processRequestCycle();
> mock.destroy();
> assertNull(Session.get()); //actually should throw
> IllegalStateException but 
>
> I would expect the threadlocal Session to be gone after the request
> had been processed but it is even available after the application has
> been destroyed.
> Or am i missing something?

Could you open an issue for this Maurice? Thanks,

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3.0-beta2 & OutOfMemoryError

2007-07-16 Thread Eelco Hillenius
> This works a treat, thanks a million Eelco, you're a diamond.

Np. My girlfriend wants to know what grade... ;)

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3.0-beta2 & OutOfMemoryError

2007-07-16 Thread Eelco Hillenius
> FYI, while I'm happy with this solution, see also this thread, which
> suggests something else may be wrong:
> http://www.nabble.com/WicketTester-does-not-clean-up-resources-very-well-tf4083413.html

Yeah, could be. Did someone open an issue for that yet?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] stateless wicket?

2007-07-16 Thread Eelco Hillenius
On 7/16/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> not directly as a session attribute
> but hold on to through the pagemap.

I realized this last week, but forgot about it again.

I think it is wrong. Why would we set the pagemaps as attributes in
the session when using the second level cache page map? The whole idea
of storing in the session of page maps was clustering, and that works
for HttpSessionStore. But it doesn't make sense for SLCSS and
variants.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] initial Seam support in SVN

2007-07-15 Thread Eelco Hillenius
On 7/15/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > Really ?!  this is cool! but on which Seam version this integration is based
> > on ?
>
> On their current trunk (so 2.2 beta 2 in progress I believe).

Btw, at this time, only @In annotations are supported. I first have to
*understand* what @Out annotations are for, and then we can see how we
could support that. :)

I'm also not sure if all contexts are properly supported yet. I didn't
see any use for the Page context; doesn't make sense for Wicket as we
have the page scope just by supporting stateful pages. Anyway, this is
why tons of people should go and play with it now... that's the way to
make it better.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] initial Seam support in SVN

2007-07-15 Thread Eelco Hillenius
> Really ?!  this is cool! but on which Seam version this integration is based
> on ?

On their current trunk (so 2.2 beta 2 in progress I believe).

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] initial Seam support in SVN

2007-07-15 Thread Eelco Hillenius
Hi all,

I just committed initial Seam support (I know, I know, I didn't the
see the light two weeks ago, but after Gavin King contacted me and
Igor came up with the brilliant idea of just starting with DI in mind,
I couldn't resist and had to see whether I could make it work.

I just committed the result of that as a wicket-stuff project
(wicket-seam-test). Please take a look and committers on wicket-stuff
don't hold back playing with it. I'd be interested to learn what
people think of it. I really have to get back to other things for a
bit now, so I don't intend to work on it much the next two months, but
I'd be happy to coop in the background.

It's a bit messy to get working now, mainly because I couldn't find a
decent maven 2 build for Seam yet. Which wouldn't be so bad weren't it
for the fact that it currently has about 1,500 dependencies, not all
clear on the versions either. :)

Anyway, here's part of the README I committed with the project. Hope
you'll have fun with it! Please send discussions on this to the
developer list instead of replying to this thread. I sent to the user
list to get better exposure.


Initial project for Wicket Seam support. Currently hosts the
integration code (which
due to Igor's and Al's great work on Spring and Guice isn't too much)
and a simple example
that nevertheless shows off that Seam can do scoped DI.

It's a start, and I can imagine that there are quite a few issues and
features that can be
worked on. Anyone interested in working on this project, please drop us a line.

The plan is to keep it as Wicket stuff project for a while to play
around with, and if licensing
 issues are resolved, Seams has a decent and recent maven deployment
and hopefully
 a *much leaner* version (currently we'd need all the JSF, Hibernate
JEE dependencies
 just to get it running) we can consider migrating this to a core
project. Otoh, it might
 be a project with many interested people, in which case it'd actually
better stay here.

I think the most interesting features to look at first are related to
JPA/ Hibernate ORM and
validation support and transaction stuff. Next on my list would be
jBPM (might be nice
for wizard building) and possibly Seam's rule engine integration for
authorization. On the
longer term, we should keep an eye on WebBeans.

 Setting it up 

Currently, the only way to get this running is to check out this project from
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-seam-test,
and
check out and build Seam from anoncvs.forge.jboss.com, repo
'/cvsroot/jboss', module 'jboss-seam'.
The Eclipse project files are set up for this and the wicket and
wicket-ioc project to be
all in your workspace and use each other as project dependencies. Only
extra thing you need to do
is to export most of the classpath entries of Seam. At the end of this
document, you can find the
contents of my Eclipse .classpath file for jboss-seam. Contributions
for other IDEs are welcome.
Hopefully Seam gets a proper maven 2 build soon and we can make this a
decent project.


Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to apply sth. like setStripWicketTags() to a single component ?

2007-07-15 Thread Eelco Hillenius
> We know that there is IMarkupSetting.setStripWicketTags(), but it seems that
> it is a global setting. I want to apply sth. like setStripWicketTags() to a
> single component(for example: Panel/Fragment/Page), could I ? How ?

Component.setRenderBodyOnly(true) should do the trick I think.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3.0-beta2 & OutOfMemoryError

2007-07-13 Thread Eelco Hillenius
On 7/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> how about NonPageCachingDummyWebApplication?

Yep, that's better.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3.0-beta2 & OutOfMemoryError

2007-07-13 Thread Eelco Hillenius
On 7/13/07, Scott Swank <[EMAIL PROTECTED]> wrote:
> That sounds like a lovely inner class for WicketTester.
>
> tester = new WicketTester(new WicketTester.NonCachingWebApplication());

Done. I called it NonCachingDummyWebApplication.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] stateless wicket?

2007-07-13 Thread Eelco Hillenius
> > I have a question regarding this... I understand that in 1.3, previous
> page states are serialized to the file system and only the current page
> state stays in HttpSession. How would this work in a clustered web container
> that synchronizes the HttpSession object to other nodes? Do you lose the
> history?
>
> no. think about it - you replicate the current page every request - which
> means each node can save them to disk also.

Except for the fact that the pages aren't actually set as sessions
attributes to start with...

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] stateless forms don't work on mounted pages

2007-07-13 Thread Eelco Hillenius
On 7/13/07, Andrew Klochkov <[EMAIL PROTECTED]> wrote:
> I have stateless login form on every page of the site. But it works only
> on the home page where the form "action" param looks like this:
>
> ?wicket:bookmarkablePage=%3Acom.xxx.web.main.WelcomePage&wicket:interface=%3A0%3Aheader%3AloginMenu%3AloginForm%3A%3AIFormSubmitListener%3A%3A
>
> When I try to login from the another page which is mounted to some url
> it doesn't work because wicket generates "hybrid" url without
> "wicket:bookmarkablePage" param. I tried to debug and I just see that
> when there's no this param in the request wicket just throws
> PageExpiresException :-( The url is:
>
> page_mount_point?wicket:interface=%3A0%3Aheader%3AloginMenu%3AloginForm%3A%3AIFormSubmitListener%3A%3A

Which Wicket version are you using? Check out the stateless example of
wicket-examples... that uses URL mounting as well and works fine.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] SPAM ON THE LIST

2007-07-13 Thread Eelco Hillenius
> ps: how's the book comming along?

Still working on it. Manning is preparing WIA for MEAP. More in a
couple of weeks.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] stateless wicket?

2007-07-13 Thread Eelco Hillenius
> I have a question regarding this... I understand that in 1.3, previous page
> states are serialized to the file system and only the current page state
> stays in HttpSession. How would this work in a clustered web container that
> synchronizes the HttpSession object to other nodes? Do you lose the history?

You'd need to use a shared directory between nodes.

I think Matej can give you a more elaborate answer soon. He's
optimizing the hell out of the session stores and working for a SLCSS
that works well in clusters, and the plan is to contribute that to
Wicket. In the process he's also making it easier for people to
implement their own SLCSS implementations (which was pretty painful
because of all the magic serialization stuff that was happening
there).

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] SPAM ON THE LIST

2007-07-13 Thread Eelco Hillenius
On 7/13/07, Francisco Diaz Trepat - gmail
<[EMAIL PROTECTED]> wrote:
> Guys, I thinks is time to say something about the spam. I use gmail and have
> already reported 23 spammers.
>
> Is there something that can be done? For instance a place to report an
> address/domain, or an automated way to reply to the bot and set the subject
> as spam or something like that?

I'm sorry, we can't really, the lists are managed by Sourceforge.
Apache's spam blocker is a lot better. We'll be moving this list to
Apache shortly, so then these troubles will be over.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket 1.3.0-beta2 & OutOfMemoryError

2007-07-13 Thread Eelco Hillenius
> I noted that each individual test package (say 200 test cases) was running
> twice as slow as before.  I improved this dramatically by calling
> "getDebugSettings().setComponentUseCheck(false);"

The slow down is because of recording partial stacktraces when in
development mode. But for the next version, that's not the default
anymore (see a vote last week on this).

> in development mode (not ideal),

Like others said: preferably don't run unit tests in development mode.
Not much wrong with it per se, but you don't need the extra checks and
output for unit tests in the first place (and in deployment mode
you'll be closer to what your actual deployment should be).

> and this improved the running time of each individual test package
> back to something like its previous value.  But, when running the full suite
> (several packages, in either Maven or Eclipse), the tests still get
> progressively slower until the OutOfMemory error is raised.

This might be because recently the default session store for unit
tests was set to HttpSessionStore (instead of
SecondLevelCacheSessionStore). Uses less threads and no diskaccess,
which should speed up the test execution, but also uses more memory.

I think that, as long as you are not testing back button behavior, you
could best do this:

WebApplication myApplication = new DummyWebApplication()
{
protected ISessionStore newSessionStore()
{
return new SecondLevelCacheSessionStore(this, 
new IPageStore()
{

public void destroy()
{
}

public Page getPage(String sessionId, 
String pagemap, int id, int
versionNumber,
int ajaxVersionNumber)
{
return null;
}

public void pageAccessed(String 
sessionId, Page page)
{
}

public void removePage(String 
sessionId, String pagemap, int id)
{
}

public void storePage(String sessionId, 
Page page)
{
}

public void unbind(String sessionId)
{
}
});
}
};

tester = new WicketTester(myApplication);

Which only holds the current page in memory and immediately discards
the older ones.

Could give that a try and let us know whether that helped?

Thanks,

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] stateless wicket?

2007-07-13 Thread Eelco Hillenius
On 7/12/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> the real client side wicket , so storing the data in the browser didn't make
> it
> and i don't think it will make it very soon because no current committer
> really sees
> the big benefit of this approach.

Yep. We played with it a while ago and we have a fair idea how to do
it but we felt it wasn't worth the energy to keep working on it.

There are disadvantages to client side state saving:
* First of all you'd lose the secure-by-default model you have with
Wicket. For instance, imagine having a detail panel for a product. If
you pass around objects (or ids) on the server side, there is no way a
client could get access to the details he/ she is not supposed to see.
When passing state via the client, you would always have to check the
incoming state for misuse. This is actually a pretty strong feature
Wicket has over most other frameworks. The other side of this is that
if you want to have your whole app bookmarkable, you'll have to do
some extra work :)
* Secondly, synchronously serializing, encoding and sending the state
to the client eats processor time and bandwith. The size of the
serialized, encoded state will be larger than than on the server. Even
if we do something really smart, chances are we're sending *at least*
20KB to the client on each request. Maybe even more. We think using
RAM is way more favorible.
* Last but not least, GETs have to be made POSTs or you'd have to run
the risk that state doesn't fit a request.

Of course, there are advantages to client state saving as well:
* No worries about RAM, at least not because of Wicket[1].
* Pages are recoverable by default. Even when a session times out, you
could let the client pick up where he/ she left.
* No need for session affinity[2]

Conclussion: we don't support client side state saving currently, and
we don't feel it's a priority at this time. However, if someone does
feel it is important, we'd be more than happy to look at patches. I
think the easiest way to achieve this is to implement it as a
IResponseFilter and a custom session store.

Eelco


[1] worrying about using RAM is the typical knee-jerk reaction of
people. Before worrying, calculate how many concurrent sessions you'll
have to support, and how much RAM you'd need for that.
[2] this increases your options when it comes to the way you cluster,
though not using session affinity can have disadvantages as well (for
instance when using ORM caches).

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Is it possible to test Wicket templates out-of-container?

2007-07-12 Thread Eelco Hillenius
> Is it possible to expire the page cache with JMX? Or even better, expire
> individual pages from the cache with JMX?

You can clear the markup cache. See ApplicationMBean#clearMarkupCache
(mx Application/ApplicationSettings).

You can't do it for individual markup files, and tbh I don't think it
would be that useful. You'd first have to find a way to conveniently
selected from hundreds to thousands of markup files.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Is it possible to test Wicket templates out-of-container?

2007-07-12 Thread Eelco Hillenius
> Is it possible to use Tapestry's parser in tests to verify that template
> syntax is correct?

Certainly not Tapestry's; it's a different syntax :)

> I'd like to run tests (like you do when doing a JSP pre-compile) to verify
> syntax w/o having to start the app and find out at runtime.

I think your best bet is just to write test cases. I can imagine a
tool that simply checks only the syntax of tempatles without
validating them against the runtime component hiearchy. You can open a
feature request if you want.

> Also, is it possible to adjust Wicket's template caching strategy? In other
> words, is it possible to make it like JSP where there's a timestamp check to
> see if a page has been updated?
>
> I realize I can turn off page caching, but does that make Wicket slower than
> a JSP-based solution? Can I provide my own implementation (or configure the
> existing one) to check every 2 minutes?

In fact, it works the other way around. Caching is the default, but in
development mode (not recommended for deployments) every markupfile is
registered with a modification watcher, which by default works by
polling whether files are changed (in which case it will trigger
loading the new markup). The logic for this is in MarkupCache, which
implements IMarkupCache, for which you can supply a custom
implementation if you want (getMarkupSettings#setMarkupCache). This
would be a last resort though, as typically the defaults should work
fine.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] StringResourceModel feature or bug??

2007-07-11 Thread Eelco Hillenius
> Yes that is correct Eelco. The toString method is called getString, which
> will fetch the
> i18n message again. I havent looked at why the magic number is three instead
> of two,
> but it doesnt matter as long as the feature isnt a bug :)

My reply was actually to point out to Johan what caused this. Not sure
whether it is a feature. Imho, toString should do too much... just
printing out the key would be better here I think.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to get HTML source code from a wicket page

2007-07-11 Thread Eelco Hillenius
On 7/11/07, Tremelune <[EMAIL PROTECTED]> wrote:
>
> There we go. I've pretty much got this, thanks to everyone. Here's a helper
> class I drummed up--It's not fully tested, doesn't handle both HTML & text,
> and doesn't take parameters yet. I'll try and post a new thread (maybe even
> on the wiki?) when I get those details hashed out. For now, this is a good
> proof of concept that can be used virtually anywhere (to reiterate: This
> requires 1.3 beta 2):

It seems to be such a recurring issue (and tbh, I thought we recently
saw some contributions/ improvements here) that it might be a good
idea to create a JIRA issue for it and ultimately get it back in the
core project.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Using a component more than once on a wicket page

2007-07-11 Thread Eelco Hillenius
On 7/11/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> i dont think you can, because we really depend on one to onw mapping
> currently, but i gues juergen knows more on that (for example markup
> index)

Yes you can.

Index: 
/Users/eelcohillenius/Documents/workspace_wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorld.html
===
--- 
/Users/eelcohillenius/Documents/workspace_wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorld.html
  (revision
555176)
+++ 
/Users/eelcohillenius/Documents/workspace_wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorld.html
  (working
copy)
@@ -7,5 +7,6 @@
 
 
 Message goes here
+Message goes here
 
 
Index: 
/Users/eelcohillenius/Documents/workspace_wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorldApplication.java
===
--- 
/Users/eelcohillenius/Documents/workspace_wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorldApplication.java
   (revision
555176)
+++ 
/Users/eelcohillenius/Documents/workspace_wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorldApplication.java
   (working
copy)
@@ -40,4 +40,10 @@
{
return HelloWorld.class;
}
+   
+   @Override
+   protected void init()
+   {
+   getDebugSettings().setComponentUseCheck(false);
+   }
 }


:)

Whether it is smart to depend on this is another question.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Using a component more than once on a wicket page

2007-07-11 Thread Eelco Hillenius
> > Is there a way to turn off reporting of this as an error? Is it really
> > an error to bind to a component more than once in a markup unit?
>
> Yes it is an error to bind a component *instance* more than once.

Though you can turn that off (and is turned off in deployment mode):
getDebugSettings().setComponentUseCheck(false)

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] StringResourceModel feature or bug??

2007-07-11 Thread Eelco Hillenius
On 7/11/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
> why is that triggering 3 times? what is the difference? the log statement?

public String toString()
{
return getString();
}

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] AuthorizeAction and !Role

2007-07-11 Thread Eelco Hillenius
> Is there an elegant way to do the opposite of what the AuthorizeAction
> annotation was intended for?
>
> I have an "unregister" function that any user _except_ the admin user
> should be able to use. If the admin unregisters, I'm f*.
>
> Essentially, I'd really like to be able to do something like this:
>
>   @AuthorizeAction(
> action = Action.RENDER, roles = { !Roles.ADMIN, Roles.USER })
>
>
> Any ideas?

The best thing you can do is to create your own extension/
authorization strategy implementation for this. Maybe something like
(action = Action.RENDER, roles = { Roles.USER }, deny = { Roles.ADMIN })

Patch is welcome if it fits in elegantly.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Page getting redirected when accessing from mail reply

2007-07-11 Thread Eelco Hillenius
> The only drawback with my particular setup is that I need to actually
> create a bundle for the source and place it also in the target platform.
> That's too much work for a lazy person like me. ;-)

I bet you could have done that in the time you wrote these replies!
*cracks the whip* :)

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Non-English Boolean Conversion

2007-07-10 Thread Eelco Hillenius
Thanks for the contribution Logi. Could you please open a JIRA issue for it?

Thanks,

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket get together at O'Reilly Open Source convention? (Portland Oregon USA)

2007-07-10 Thread Eelco Hillenius
> I'm in Portland too, but I may not be in town that week.  Still
> working out the details.  It does sound like a great idea.  I got a
> friend here in town into wicket, so he might be interested as well.

Not directly related to this conference, but if there's enough
interest, Jonathan and I can probably organize a low-key Wicket
get-together in Seattle sometime. I mean: London, Copenhagen,
Amsterdam... we can't stay behind can we?! ;=)


Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Pages vs. Panels

2007-07-10 Thread Eelco Hillenius
> However, I discovered a navigation issue and am considering adding the
> Breadcrumb feature to this site.  Unfortunately, it looks like the
> breadcrumb control uses Panels instead of pages.  So it looks like I
> need to switch everything from being page-based to panel-based.  Of
> course, doing that will take some time, but it isn't the end of the
> world.

The bread crumbs component should be generic enough to be usable for a
more page based approach. At least, that's the idea. What we need
though is people - like you for instance - who need this in such a
context and build support for it and validate it by using it in a real
application (aka eating your own dogfood) :)

Also, it might very well turn out that it is easier to roll your own
component that does exactly what you want. That said, it is something
that a lot of people want to do, so anyone interested in it, please
pick it up and improve it (or write a new, better one) so that we have
a good solution for both page based and panel based approaches.

> So, I guess I'm just wondering, what do the rest of you end up doing?
> Do you find that most of your "web pages" are actually Panels in a
> single Page?  Or are your sites built using many Pages?  Or is it
> somewhere in between?  I'm just curious if there is a majority one way
> or the other and if there are any strong reasons for one approach over
> the other.

The project that I'm working on is primarily panel based. We only have
a couple of pages, but most works using panel replacements.

Not sure what is best as both have pros and cons. What I like about
panel replacements is that it promotes reuse. It's also very flexible.
The app I'm working on is pretty generic, with 'business components'
that plug in the system and provide their own interface (and e.g.
contributions to the bread crumbs model). The downside of this aproach
is that things can get complex; when you have errors it is sometimes
hard to track down exactly what/ where/ how, and getting an overview
of what your page will look like in the end is either a lot of work
maintaining preview sections, or just a lot of guessing :)

With a page based aproach it is easier to keep the overview, and it
will be easier to track down issues. And - like you said -
bookmarkability (and working with stateless pages) is way easier. The
downside is that it is not as flexible, and you'll have to watch out
for code duplication. Also, when you don't care much about
bookmarkability, I find it a slightly bloated programming model, as
you'lll have to write plumbing code just to stay on pages.

Imho, a mixed aproach is always an option, but if you need/ want to
choose between the two, probably the most important questions are
whether you need many areas to be bookmarkable (yes -> page based),
you work with separate designers (yes -> both are ok, but page based
probably easier) and whether working page based provides you with
enough flexibility (in other words: do you know all the functionality
upfront and can you code it simply by providing a couple of pages for
it).

It would be interesting to read what the experience of other's is in
this respect.

Cheers,

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


  1   2   3   4   5   6   7   8   9   10   >