Re: Tomcat crashes out of memory

2008-08-30 Thread Mathias P.W Nilsson

Ok!

Tried to google on external resource wicket by didn't find what I was
looking for. Can you please give me some direction on what way to go?
-- 
View this message in context: 
http://www.nabble.com/Tomcat-crashes-out-of-memory-tp19203247p19231691.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Mount files outside container

2008-08-30 Thread Mathias P.W Nilsson

Hi!

I want to mount files

c:/myFolder/files/. so that I can get it in wicket and from my html.
like /Files/..

Can wicket do this for me? Pointers?
-- 
View this message in context: 
http://www.nabble.com/Mount-files-outside-container-tp19232069p19232069.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Mount files outside container

2008-08-30 Thread James Carman
You mean you want Wicket to serve up files from outside of your webapp
directory?  We do that at work with images.  I just created a special
image resource class that basically just streams back the file
contents from the disk.  Try something like this:

public class FileImageResource extends DynamicImageResource
{
private static final long serialVersionUID = 1L;
private final String path;

public FileImageResource( File file, String format )
{
super(format);
this.path = file.getAbsolutePath();
setCacheable(true);
setLastModifiedTime(Time.valueOf(file.lastModified()));
}

protected byte[] getImageData()
{
return FileUtils.getFileContents(new File(path));
}
}

On Sat, Aug 30, 2008 at 6:15 AM, Mathias P.W Nilsson
<[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I want to mount files
>
> c:/myFolder/files/. so that I can get it in wicket and from my html.
> like /Files/..
>
> Can wicket do this for me? Pointers?
> --
> View this message in context: 
> http://www.nabble.com/Mount-files-outside-container-tp19232069p19232069.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Clicking "add to cart" repeatedly

2008-08-30 Thread wil2008

I am new to Wicket (but not new to HTML, Java and Spring).
I tried to follow the examples in the ebook of "Wicket in Action".
Everything is fine until Chapter 3. I followed the cheese application which
demonstrates a plain shopping cart. I compiled and ran the front page
successfully (including the Index.html and Index.java, up to page 60). I
could "add to cart" and "remove" successfully. So far so good. When I
clicked "add to cart" repeatedly and slowly, it was still good. But If I
clicked quickly enough, the following bunch of "Unexpected RuntimeException"
appeared.

I am not sure this is particular to this specific example or is general for
other Wicket components.
Did I miss something? Does anyone come across something similar?
This is important if I am to propose Wicket in a serious project.
Thank you very much!

Wicket version: 1.3.4


Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)


Caused by: java.lang.ClassNotFoundException: [Lmycheese.Cheese;
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
.


-- 
View this message in context: 
http://www.nabble.com/Clicking-%22add-to-cart%22-repeatedly-tp19232702p19232702.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Mount files outside container

2008-08-30 Thread Mathias P.W Nilsson

Thank you very much for the suggestion. By doing this I must add all my
images from Wicket code.

Let's say I want to server a logo, background image or something like that.
And just do it via my markup file. Can this be achieved or do I have to use
a servlet?
-- 
View this message in context: 
http://www.nabble.com/Mount-files-outside-container-tp19232069p19233284.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Clicking "add to cart" repeatedly

2008-08-30 Thread Martijn Dashorst
On Sat, Aug 30, 2008 at 1:54 PM, wil2008 <[EMAIL PROTECTED]> wrote:
> 
> Could not deserialize object using
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> object factory
> at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
> 
> 
> Caused by: java.lang.ClassNotFoundException: [Lmycheese.Cheese;
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
> .
> 
> 

Certainly not something we'd expect. This is weird: The
ClassNotFoundException suggests a classloader error, could be a bug in
Tomcat though.

Can you please post the whole stack trace?

Martijn

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

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



Re: Mount files outside container

2008-08-30 Thread James Carman
I would think you would have to use a servlet (unless they're in some
location that can be served by your web browser).

On Sat, Aug 30, 2008 at 9:16 AM, Mathias P.W Nilsson
<[EMAIL PROTECTED]> wrote:
>
> Thank you very much for the suggestion. By doing this I must add all my
> images from Wicket code.
>
> Let's say I want to server a logo, background image or something like that.
> And just do it via my markup file. Can this be achieved or do I have to use
> a servlet?
> --
> View this message in context: 
> http://www.nabble.com/Mount-files-outside-container-tp19232069p19233284.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Header contributions despite failed RENDER authorization

2008-08-30 Thread classacts

Hello,

   I have been playing around with authorization strategies and I have
noticed that even though components that are not authorized to RENDER, its
header contributions are still going through.  I understand that isVisible
!= RENDER as discussed in previous threads however I feel there is a
practical need to be able to prevent header contributions from going through
if a component is not rendered.

My case in point is that I have certain heavy components that should not be
rendered to users not logged in and I would prefer that all the excess
javascript, css and other header contributions are not displayed.

As a temporary work around and I am overriding isVisible in these heavy
components and doing the necessary authorization checks there.  Although it
works, it isn't very elegant as my authorization strategy is now decoupled
across the whole application.

Any thoughts on this are appreciated!

Regards.
-- 
View this message in context: 
http://www.nabble.com/Header-contributions-despite-failed-RENDER-authorization-tp19235888p19235888.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Header contributions despite failed RENDER authorization

2008-08-30 Thread Igor Vaynberg
open a jira issue, sounds like a bug

-igor

On Sat, Aug 30, 2008 at 11:27 AM, classacts <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
>   I have been playing around with authorization strategies and I have
> noticed that even though components that are not authorized to RENDER, its
> header contributions are still going through.  I understand that isVisible
> != RENDER as discussed in previous threads however I feel there is a
> practical need to be able to prevent header contributions from going through
> if a component is not rendered.
>
> My case in point is that I have certain heavy components that should not be
> rendered to users not logged in and I would prefer that all the excess
> javascript, css and other header contributions are not displayed.
>
> As a temporary work around and I am overriding isVisible in these heavy
> components and doing the necessary authorization checks there.  Although it
> works, it isn't very elegant as my authorization strategy is now decoupled
> across the whole application.
>
> Any thoughts on this are appreciated!
>
> Regards.
> --
> View this message in context: 
> http://www.nabble.com/Header-contributions-despite-failed-RENDER-authorization-tp19235888p19235888.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



FREE Tests at www.yfrindia.com

2008-08-30 Thread YFR India

http://www.yfrindia.com/
Take FREE online TEST, read FREE articles, download FREE presentation, use
FREE source code, useful links, competition updates, free ONLINE TEST TESTS,
http://www.yfrindia.com/resources/Tests
free APTITUDE TEST, English Test, Computer Test, Mechanical Test,
Electronics Test, Electrical Test, GATE preparation, CAT preparation, Job
preparation, resume.
http://www.yfrindia.com/
-- 
View this message in context: 
http://www.nabble.com/FREE-Tests-at-www.yfrindia.com-tp19236884p19236884.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wizard question

2008-08-30 Thread jWeekend

Edward,

You could try something like:

class Step1 extends WizardStep {
public Step1() {
super("Step 1", "How many?");
add(new TextField("numberOfThings"));
}
};

class Step2 extends WizardStep {
public Step2() {
super("Things", "Now Enter As Many 'Things' As You Opted For");
add(new Loop("things", new
ComponentPropertyModel("numberOfThings")) {
@Override
protected void populateItem(LoopItem item) {
IModel model = thingModel(item.getIteration()); //
create model or reuse existing
item.add(new TextField("thing", model));
}
});
};
}

... where some ancestor has a CompoundPropertyModel whose model object has a
"numberOfThings" property and this model object's setNumberOfThings method
may also manage a list of models backed by "thing"s. Does that make sense?

Hej core devs, I was wondering when I'd use the Loop class - is this a
decent abuse of it?!

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 



Edward Zarecor-2 wrote:
> 
> I'm relatively new to wicket and have question about the wizard
> implementation.
> 
> It seems all the steps added to the Wizard in its constructor are
> themselves
> constructed when init is called on the Wizard.  What I would like to do is
> have a mechanism for dynamically changing the second step in my wizard so
> that an arbitrarily sized editable list is displayed.
> 
> Say step one was "How many events would you like to create," step two
> would
> be a list that corresponded in size to the answer provided in step one.
> 
> What's the best way to approach this?
> 
> I'm using 1.3.3 and a panel style wizard.
> 
> Thanks.
> 
> Ed.
> 
> 

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


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



Re: Clicking "add to cart" repeatedly

2008-08-30 Thread Ritesh Trivedi

I have gotten ClassNotFoundException several times.

I repeatedly get it with 2 browser tabs opened and accessing the same page
and doing some actions on the same page. I havent received any response from
the Wicket team on this yet.

I have also seen it happening with pressing back and forward buttons a few
times.



wil2008 wrote:
> 
> I am new to Wicket (but not new to HTML, Java and Spring).
> I tried to follow the examples in the ebook of "Wicket in Action".
> Everything is fine until Chapter 3. I followed the cheese application
> which demonstrates a plain shopping cart. I compiled and ran the front
> page successfully (including the Index.html and Index.java, up to page
> 60). I could "add to cart" and "remove" successfully. So far so good. When
> I clicked "add to cart" repeatedly and slowly, it was still good. But If I
> clicked quickly enough, the following bunch of "Unexpected
> RuntimeException" appeared.
> 
> I am not sure this is particular to this specific example or is general
> for other Wicket components.
> Did I miss something? Does anyone come across something similar?
> This is important if I am to propose Wicket in a serious project.
> Thank you very much!
> 
> Wicket version: 1.3.4
> 
> 
> Could not deserialize object using
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> object factory
> at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:411)
> 
> 
> Caused by: java.lang.ClassNotFoundException: [Lmycheese.Cheese;
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
> .
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Clicking-%22add-to-cart%22-repeatedly-tp19232702p19239430.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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