RE: missing page

2011-10-12 Thread Miroslav F.
Thanks Martin, finaly my java code is:
public PageNotFound(PageParameters params)
{
ServletWebRequest servletWebRequest = (ServletWebRequest)
this.getRequest();
HttpServletRequest request =
servletWebRequest.getHttpServletRequest();
this.add(new Label(missingPage, (String)
request.getAttribute(javax.servlet.error.request_uri)));
} 
and corresponding markup:
Page span wicket:id=missingPage[missing page name]/span which you were
looking for is not here.

Works.

Supplement question is: do I need raw servlet request to make lookup for
atributes or there is more
wicket way to do it?



 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org] 
 Sent: 12. October 2011 10:55
 To: users@wicket.apache.org
 Subject: Re: missing page
 
 javax.servlet.error.request_uri
 google this for more information
 
 On Wed, Oct 12, 2011 at 11:18 AM, Martin Funk 
 mafulaf...@googlemail.com wrote:
  is
 
  RequestCycle.get().getRequest().getUrl()
 
  what you are looking for?
 
  mf
 
  2011/10/11 Miroslav F. mir...@seznam.cz
 
  Hi guys,
 
  I need a help - have my custom class PageNotFound based on 
 this help:
  
 https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.htm
  l
 
  In my PageNotFound class I have:
  this.add(new Label(missingPage, 
  _put_pagename_which_was_not_found));
  but I have no idea how to find-out pagename. I just know 
 that somehow 
  system must know this pagename.
 
  Any ideas please?
 
  Miro
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



missing page

2011-10-11 Thread Miroslav F.
Hi guys,

I need a help - have my custom class PageNotFound based on this help:
https://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html

In my PageNotFound class I have:
this.add(new Label(missingPage, _put_pagename_which_was_not_found));
but I have no idea how to find-out pagename. I just know that somehow
system must know this pagename.

Any ideas please?

Miro


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



replace asterix (FormComponentFeedbackBorder)

2011-10-01 Thread Miroslav F.
Hello,

how to replace red asterix in FormComponentFeedbackBorder my own markup?
Is there example?

Any hints would be appreciated. Thanks


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



RE: replace asterix (FormComponentFeedbackBorder)

2011-10-01 Thread Miroslav F.
Finaly I do subclassing with custom markup and it works :-)


 -Original Message-
 From: Miroslav F. [mailto:mir...@seznam.cz] 
 Sent: 01. October 2011 12:06
 To: users@wicket.apache.org
 Subject: replace asterix (FormComponentFeedbackBorder)
 
 Hello,
 
 how to replace red asterix in FormComponentFeedbackBorder my 
 own markup?
 Is there example?
 
 Any hints would be appreciated. Thanks
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



filter feedback messages

2011-09-28 Thread Miroslav F.
hi folks,

i have this problem:

have panel:
wicket:panel
ba href=cart.htmlcart:/a/b
span wicket:id=cartItems[0]/span
items,nbsp;nbsp;nbsp;bspan wicket:id=cartPrice[0]/span $/b
/span
/div
/wicket:panel

then implementing class:
package cz.mineralshop;

import java.util.ArrayList;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;



@SuppressWarnings(serial)
public class PanelCart extends Panel
{
public PanelCart(String id)
{
super(id);
ArrayList cart = (new ModelPanelCart()).load();
this.add(new Label(cartItems, (new
Integer(cart.size())).toString()));
Integer cartPrice = new Integer(0);
for(int i = 0; i  cart.size(); i++)
{
ArrayList polozka = (ArrayList) cart.get(i);
Integer cenaPolozky = new Integer((String)
polozka.get(2));
cenaCelkova = cenaCelkova + cenaPolozky;
}
this.add(new Label(cartPrice, cenaCelkova.toString()));
}
}

panel works fine (implementation is ugly, i know..)

on one page i have form with validators, again works fine. problem is with
panel above: it shows feedback messages
of the form so final result is that on page i have feedback messages twice:
in form (which is correct) and in panel
above (which is wrong).

i know it has what to do with feedback message filter - but how to set it
for the panel? simply do:
this.add(new FeedbackPanel(feedback, new
ComponentFeedbackMessageFilter(this)));
in PanelCart.class don't work.

can you someone help me please?

miro


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



RE: filter feedback messages

2011-09-28 Thread Miroslav F.
   Page1
 \
 +--- PanelCart
 |
 +--- Form

i know all fedback panels displays all feedback messages and i have to
filter them. what i don't know is how to tell in PanelCart to display
only messages produced in PanelCart and ignore others messages?



 -Original Message-
 From: manuelbarzi [mailto:manuelba...@gmail.com] 
 Sent: 28. September 2011 11:51
 To: users@wicket.apache.org
 Subject: Re: filter feedback messages
 
 how is your composite?
 
 page
|-Form (with own FeedbackPanel)
||-Panel (with own FeedbackPanel)
|
|-Other stuff
 
 ?
 
 
 
 
 On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F. 
 mir...@seznam.cz wrote:
  hi folks,
 
  i have this problem:
 
  have panel:
  wicket:panel
         ba href=cart.htmlcart:/a/b
                 span wicket:id=cartItems[0]/span 
  items,nbsp;nbsp;nbsp;bspan wicket:id=cartPrice[0]/span 
  $/b
                 /span
         /div
  /wicket:panel
 
  then implementing class:
  package cz.mineralshop;
 
  import java.util.ArrayList;
  import org.apache.wicket.markup.html.basic.Label;
  import org.apache.wicket.markup.html.panel.Panel;
 
 
 
  @SuppressWarnings(serial)
  public class PanelCart extends Panel
  {
         public PanelCart(String id)
         {
                 super(id);
                 ArrayList cart = (new ModelPanelCart()).load();
                 this.add(new Label(cartItems, (new 
  Integer(cart.size())).toString()));
                 Integer cartPrice = new Integer(0);
                 for(int i = 0; i  cart.size(); i++)
                 {
                         ArrayList polozka = (ArrayList) cart.get(i);
                         Integer cenaPolozky = new Integer((String) 
  polozka.get(2));
                         cenaCelkova = cenaCelkova + cenaPolozky;
                 }
                 this.add(new Label(cartPrice, 
  cenaCelkova.toString()));
         }
  }
 
  panel works fine (implementation is ugly, i know..)
 
  on one page i have form with validators, again works fine. 
 problem is 
  with panel above: it shows feedback messages of the form so final 
  result is that on page i have feedback messages twice:
  in form (which is correct) and in panel above (which is wrong).
 
  i know it has what to do with feedback message filter - but 
 how to set 
  it for the panel? simply do:
  this.add(new FeedbackPanel(feedback, new 
  ComponentFeedbackMessageFilter(this)));
  in PanelCart.class don't work.
 
  can you someone help me please?
 
  miro
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: filter feedback messages

2011-09-28 Thread Miroslav F.
yes. it doesn't matter if i do:
this.add(new FeedbackPanel(feedback, new
ComponentFeedbackMessageFilter(this)));
or
this.add(new FeedbackPanel(feedback, new
ContainerFeedbackMessageFilter(this))); 
in PanelCart.class, panel still show messages produced in form.


 -Original Message-
 From: manuelbarzi [mailto:manuelba...@gmail.com] 
 Sent: 28. September 2011 12:02
 To: users@wicket.apache.org
 Subject: Re: filter feedback messages
 
 have you tried ContainerFeedbackMessageFilter instead?
 
 
 2011/9/28 Miroslav F. mir...@seznam.cz:
    Page1
      \
      +--- PanelCart
      |
      +--- Form
 
  i know all fedback panels displays all feedback messages 
 and i have to 
  filter them. what i don't know is how to tell in PanelCart 
 to display 
  only messages produced in PanelCart and ignore others messages?
 
 
 
  -Original Message-
  From: manuelbarzi [mailto:manuelba...@gmail.com]
  Sent: 28. September 2011 11:51
  To: users@wicket.apache.org
  Subject: Re: filter feedback messages
 
  how is your composite?
 
  page
     |-Form (with own FeedbackPanel)
     |    |-Panel (with own FeedbackPanel)
     |
     |-Other stuff
 
  ?
 
 
 
 
  On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
  mir...@seznam.cz wrote:
   hi folks,
  
   i have this problem:
  
   have panel:
   wicket:panel
          ba href=cart.htmlcart:/a/b
                  span wicket:id=cartItems[0]/span 
   items,nbsp;nbsp;nbsp;bspan 
 wicket:id=cartPrice[0]/span 
   $/b
                  /span
          /div
   /wicket:panel
  
   then implementing class:
   package cz.mineralshop;
  
   import java.util.ArrayList;
   import org.apache.wicket.markup.html.basic.Label;
   import org.apache.wicket.markup.html.panel.Panel;
  
  
  
   @SuppressWarnings(serial)
   public class PanelCart extends Panel {
          public PanelCart(String id)
          {
                  super(id);
                  ArrayList cart = (new ModelPanelCart()).load();
                  this.add(new Label(cartItems, (new 
   Integer(cart.size())).toString()));
                  Integer cartPrice = new Integer(0);
                  for(int i = 0; i  cart.size(); i++)
                  {
                          ArrayList polozka = (ArrayList) 
 cart.get(i);
                          Integer cenaPolozky = new 
 Integer((String) 
   polozka.get(2));
                          cenaCelkova = cenaCelkova + cenaPolozky;
                  }
                  this.add(new Label(cartPrice, 
   cenaCelkova.toString()));
          }
   }
  
   panel works fine (implementation is ugly, i know..)
  
   on one page i have form with validators, again works fine.
  problem is
   with panel above: it shows feedback messages of the form 
 so final 
   result is that on page i have feedback messages twice:
   in form (which is correct) and in panel above (which is wrong).
  
   i know it has what to do with feedback message filter - but
  how to set
   it for the panel? simply do:
   this.add(new FeedbackPanel(feedback, new 
   ComponentFeedbackMessageFilter(this)));
   in PanelCart.class don't work.
  
   can you someone help me please?
  
   miro
  
  
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: filter feedback messages

2011-09-28 Thread Miroslav F.
i think that form doesn't need filter - or to be precise i don't want to
filter messages in form.

i only need to filter messages in panelcart (which extends panel):

public class PanelCart extends Panel
{
public PanelCart(String id)
{
super(id);
...do_something...
---//this don't work, the panel still shows messages from
another page components
this.add(new FeedbackPanel(feedback, new
ContainerFeedbackMessageFilter(this)));
}
}

public class PageObjednavka extends PageBase
{
public PageObjednavka()
{
FormObject form = new FormObject(formOrder)
{
...set_form... (own code)
};
this.add(form);

form.add(formOrderName.setRequired(true).add(StringValidator.lengthBetween(2
, 35)));
//if validation faild show message from property file
---form.add(new FeedbackPanel(feedback));
}
}

public class PageBase extends WebPage
{
public PageBase()
{
this.add(new PanelCart(cart));
}


 -Original Message-
 From: manuelbarzi [mailto:manuelba...@gmail.com] 
 Sent: 28. September 2011 12:22
 To: users@wicket.apache.org
 Subject: Re: filter feedback messages
 
 what's the feedback message filter you've added to the form?
 
 
 2011/9/28 Miroslav F. mir...@seznam.cz:
  yes. it doesn't matter if i do:
  this.add(new FeedbackPanel(feedback, new 
  ComponentFeedbackMessageFilter(this)));
  or
  this.add(new FeedbackPanel(feedback, new 
  ContainerFeedbackMessageFilter(this)));
  in PanelCart.class, panel still show messages produced in form.
 
 
  -Original Message-
  From: manuelbarzi [mailto:manuelba...@gmail.com]
  Sent: 28. September 2011 12:02
  To: users@wicket.apache.org
  Subject: Re: filter feedback messages
 
  have you tried ContainerFeedbackMessageFilter instead?
 
 
  2011/9/28 Miroslav F. mir...@seznam.cz:
     Page1
       \
       +--- PanelCart
       |
       +--- Form
  
   i know all fedback panels displays all feedback messages
  and i have to
   filter them. what i don't know is how to tell in PanelCart
  to display
   only messages produced in PanelCart and ignore others messages?
  
  
  
   -Original Message-
   From: manuelbarzi [mailto:manuelba...@gmail.com]
   Sent: 28. September 2011 11:51
   To: users@wicket.apache.org
   Subject: Re: filter feedback messages
  
   how is your composite?
  
   page
      |-Form (with own FeedbackPanel)
      |    |-Panel (with own FeedbackPanel)
      |
      |-Other stuff
  
   ?
  
  
  
  
   On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
   mir...@seznam.cz wrote:
hi folks,
   
i have this problem:
   
have panel:
wicket:panel
       ba href=cart.htmlcart:/a/b
               span wicket:id=cartItems[0]/span 
items,nbsp;nbsp;nbsp;bspan
  wicket:id=cartPrice[0]/span
$/b
               /span
       /div
/wicket:panel
   
then implementing class:
package cz.mineralshop;
   
import java.util.ArrayList;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
   
   
   
@SuppressWarnings(serial)
public class PanelCart extends Panel {
       public PanelCart(String id)
       {
               super(id);
               ArrayList cart = (new ModelPanelCart()).load();
               this.add(new Label(cartItems, (new 
Integer(cart.size())).toString()));
               Integer cartPrice = new Integer(0);
               for(int i = 0; i  cart.size(); i++)
               {
                       ArrayList polozka = (ArrayList)
  cart.get(i);
                       Integer cenaPolozky = new
  Integer((String)
polozka.get(2));
                       cenaCelkova = cenaCelkova + 
 cenaPolozky;
               }
               this.add(new Label(cartPrice, 
cenaCelkova.toString()));
       }
}
   
panel works fine (implementation is ugly, i know..)
   
on one page i have form with validators, again works fine.
   problem is
with panel above: it shows feedback messages of the form
  so final
result is that on page i have feedback messages twice:
in form (which is correct) and in panel above (which 
 is wrong).
   
i know it has what to do with feedback message filter - but
   how to set
it for the panel? simply do:
this.add(new FeedbackPanel(feedback, new 
ComponentFeedbackMessageFilter(this)));
in PanelCart.class don't work.
   
can you someone help me please?
   
miro
   
   
   
  
  
 -
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

RE: filter feedback messages

2011-09-28 Thread Miroslav F.
at the moment o don't deal with form filter, i deal with problem
how to filter in PanelCart messages not produced in PanelCart and
how to set it in PanelCart -see below ;-) 

 -Original Message-
 From: manuelbarzi [mailto:manuelba...@gmail.com] 
 Sent: 28. September 2011 12:39
 To: users@wicket.apache.org
 Subject: Re: filter feedback messages
 
 form may need a filter too.
 
 
 2011/9/28 Miroslav F. mir...@seznam.cz:
  i think that form doesn't need filter - or to be precise i 
 don't want 
  to filter messages in form.
 
  i only need to filter messages in panelcart (which extends panel):
 
  public class PanelCart extends Panel
  {
         public PanelCart(String id)
         {
                 super(id);
                 ...do_something...
  ---            //this don't work, the panel still shows 
 messages from
  another page components
                 this.add(new FeedbackPanel(feedback, new 
  ContainerFeedbackMessageFilter(this)));
         }
  }
 
  public class PageObjednavka extends PageBase {
         public PageObjednavka()
         {
                 FormObject form = new FormObject(formOrder)
                 {
                         ...set_form... (own code)
                 };
                 this.add(form);
 
  
 form.add(formOrderName.setRequired(true).add(StringValidator.lengthBet
  ween(2
  , 35)));
                 //if validation faild show message from property file
  ---            form.add(new FeedbackPanel(feedback));
         }
  }
 
  public class PageBase extends WebPage
  {
         public PageBase()
         {
                 this.add(new PanelCart(cart)); }
 
 
  -Original Message-
  From: manuelbarzi [mailto:manuelba...@gmail.com]
  Sent: 28. September 2011 12:22
  To: users@wicket.apache.org
  Subject: Re: filter feedback messages
 
  what's the feedback message filter you've added to the form?
 
 
  2011/9/28 Miroslav F. mir...@seznam.cz:
   yes. it doesn't matter if i do:
   this.add(new FeedbackPanel(feedback, new
   ComponentFeedbackMessageFilter(this)));
   or
   this.add(new FeedbackPanel(feedback, new
   ContainerFeedbackMessageFilter(this)));
   in PanelCart.class, panel still show messages produced in form.
  
  
   -Original Message-
   From: manuelbarzi [mailto:manuelba...@gmail.com]
   Sent: 28. September 2011 12:02
   To: users@wicket.apache.org
   Subject: Re: filter feedback messages
  
   have you tried ContainerFeedbackMessageFilter instead?
  
  
   2011/9/28 Miroslav F. mir...@seznam.cz:
  Page1
    \
    +--- PanelCart
    |
    +--- Form
   
i know all fedback panels displays all feedback messages
   and i have to
filter them. what i don't know is how to tell in PanelCart
   to display
only messages produced in PanelCart and ignore others 
 messages?
   
   
   
-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 11:51
To: users@wicket.apache.org
Subject: Re: filter feedback messages
   
how is your composite?
   
page
   |-Form (with own FeedbackPanel)
   |    |-Panel (with own FeedbackPanel)
   |
   |-Other stuff
   
?
   
   
   
   
On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
mir...@seznam.cz wrote:
 hi folks,

 i have this problem:

 have panel:
 wicket:panel
        ba href=cart.htmlcart:/a/b
                span wicket:id=cartItems[0]/span
 items,nbsp;nbsp;nbsp;bspan
   wicket:id=cartPrice[0]/span
 $/b
                /span
        /div
 /wicket:panel

 then implementing class:
 package cz.mineralshop;

 import java.util.ArrayList;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.panel.Panel;



 @SuppressWarnings(serial)
 public class PanelCart extends Panel {
        public PanelCart(String id)
        {
                super(id);
                ArrayList cart = (new 
 ModelPanelCart()).load();
                this.add(new Label(cartItems, (new
 Integer(cart.size())).toString()));
                Integer cartPrice = new Integer(0);
                for(int i = 0; i  cart.size(); i++)
                {
                        ArrayList polozka = (ArrayList)
   cart.get(i);
                        Integer cenaPolozky = new
   Integer((String)
 polozka.get(2));
                        cenaCelkova = cenaCelkova +
  cenaPolozky;
                }
                this.add(new Label(cartPrice,
 cenaCelkova.toString()));
        }
 }

 panel works fine (implementation is ugly, i know..)

 on one page i have form with validators, again works fine.
problem is
 with panel above: it shows feedback messages of the form
   so final
 result is that on page i have feedback messages twice:
 in form (which is correct) and in panel above (which
  is wrong

RE: filter feedback messages

2011-09-28 Thread Miroslav F.
1.4.13 

 -Original Message-
 From: Andrea Del Bene [mailto:adelb...@ciseonweb.it] 
 Sent: 28. September 2011 13:00
 To: users@wicket.apache.org
 Subject: Re: filter feedback messages
 
 Which version of Wicket are you using? I'm trying to 
 reproducing the bug wit 1.4.17 but without success.
  at the moment o don't deal with form filter, i deal with 
 problem how 
  to filter in PanelCart messages not produced in PanelCart 
 and how to 
  set it in PanelCart -see below ;-)
 
  -Original Message-
  From: manuelbarzi [mailto:manuelba...@gmail.com]
  Sent: 28. September 2011 12:39
  To: users@wicket.apache.org
  Subject: Re: filter feedback messages
 
  form may need a filter too.
 
 
  2011/9/28 Miroslav F.mir...@seznam.cz:
  i think that form doesn't need filter - or to be precise i
  don't want
  to filter messages in form.
 
  i only need to filter messages in panelcart (which extends panel):
 
  public class PanelCart extends Panel {
  public PanelCart(String id)
  {
  super(id);
  ...do_something...
  ---  //this don't work, the panel still shows
  messages from
  another page components
  this.add(new FeedbackPanel(feedback, new 
  ContainerFeedbackMessageFilter(this)));
  }
  }
 
  public class PageObjednavka extends PageBase {
  public PageObjednavka()
  {
  FormObject  form = new FormObject(formOrder)
  {
  ...set_form... (own code)
  };
  this.add(form);
 
 
  
 form.add(formOrderName.setRequired(true).add(StringValidator.lengthBe
  t
  ween(2
  , 35)));
  //if validation faild show message from property 
  file
  ---  form.add(new FeedbackPanel(feedback));
  }
  }
 
  public class PageBase extends WebPage {
  public PageBase()
  {
  this.add(new PanelCart(cart)); }
 
 
  -Original Message-
  From: manuelbarzi [mailto:manuelba...@gmail.com]
  Sent: 28. September 2011 12:22
  To: users@wicket.apache.org
  Subject: Re: filter feedback messages
 
  what's the feedback message filter you've added to the form?
 
 
  2011/9/28 Miroslav F.mir...@seznam.cz:
  yes. it doesn't matter if i do:
  this.add(new FeedbackPanel(feedback, new
  ComponentFeedbackMessageFilter(this)));
  or
  this.add(new FeedbackPanel(feedback, new
  ContainerFeedbackMessageFilter(this)));
  in PanelCart.class, panel still show messages produced in form.
 
 
  -Original Message-
  From: manuelbarzi [mailto:manuelba...@gmail.com]
  Sent: 28. September 2011 12:02
  To: users@wicket.apache.org
  Subject: Re: filter feedback messages
 
  have you tried ContainerFeedbackMessageFilter instead?
 
 
  2011/9/28 Miroslav F.mir...@seznam.cz:
 Page1
   \
   +--- PanelCart
   |
   +--- Form
 
  i know all fedback panels displays all feedback messages
  and i have to
  filter them. what i don't know is how to tell in PanelCart
  to display
  only messages produced in PanelCart and ignore others
  messages?
 
 
  -Original Message-
  From: manuelbarzi [mailto:manuelba...@gmail.com]
  Sent: 28. September 2011 11:51
  To: users@wicket.apache.org
  Subject: Re: filter feedback messages
 
  how is your composite?
 
  page
  |-Form (with own FeedbackPanel)
  ||-Panel (with own FeedbackPanel)
  |
  |-Other stuff
 
  ?
 
 
 
 
  On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
  mir...@seznam.cz  wrote:
  hi folks,
 
  i have this problem:
 
  have panel:
  wicket:panel
  ba href=cart.htmlcart:/a/b
  span wicket:id=cartItems[0]/span
  items,nbsp;nbsp;nbsp;bspan
  wicket:id=cartPrice[0]/span
  $/b
  /span
  /div
  /wicket:panel
 
  then implementing class:
  package cz.mineralshop;
 
  import java.util.ArrayList;
  import org.apache.wicket.markup.html.basic.Label;
  import org.apache.wicket.markup.html.panel.Panel;
 
 
 
  @SuppressWarnings(serial)
  public class PanelCart extends Panel {
  public PanelCart(String id)
  {
  super(id);
  ArrayList cart = (new
  ModelPanelCart()).load();
  this.add(new Label(cartItems, (new
  Integer(cart.size())).toString()));
  Integer cartPrice = new Integer(0);
  for(int i = 0; i  cart.size(); i++)
  {
  ArrayList polozka = (ArrayList)
  cart.get(i);
  Integer cenaPolozky = new
  Integer((String)
  polozka.get(2));
  cenaCelkova = cenaCelkova +
  cenaPolozky;
  }
  this.add(new Label(cartPrice,
  cenaCelkova.toString()));
  }
  }
 
  panel works fine (implementation is ugly, i know..)
 
  on one page i have form with validators, again works fine.
  problem is
  with panel above: it shows feedback messages of the form
  so

FW: filter feedback messages

2011-09-28 Thread Miroslav F.
same with 1.4.18 

 -Original Message-
 From: Miroslav F. [mailto:mir...@seznam.cz] 
 Sent: 28. September 2011 13:26
 To: users@wicket.apache.org
 Subject: RE: filter feedback messages
 
 1.4.13 
 
  -Original Message-
  From: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
  Sent: 28. September 2011 13:00
  To: users@wicket.apache.org
  Subject: Re: filter feedback messages
  
  Which version of Wicket are you using? I'm trying to 
 reproducing the 
  bug wit 1.4.17 but without success.
   at the moment o don't deal with form filter, i deal with
  problem how
   to filter in PanelCart messages not produced in PanelCart
  and how to
   set it in PanelCart -see below ;-)
  
   -Original Message-
   From: manuelbarzi [mailto:manuelba...@gmail.com]
   Sent: 28. September 2011 12:39
   To: users@wicket.apache.org
   Subject: Re: filter feedback messages
  
   form may need a filter too.
  
  
   2011/9/28 Miroslav F.mir...@seznam.cz:
   i think that form doesn't need filter - or to be precise i
   don't want
   to filter messages in form.
  
   i only need to filter messages in panelcart (which 
 extends panel):
  
   public class PanelCart extends Panel {
   public PanelCart(String id)
   {
   super(id);
   ...do_something...
   ---  //this don't work, the panel still shows
   messages from
   another page components
   this.add(new FeedbackPanel(feedback, new 
   ContainerFeedbackMessageFilter(this)));
   }
   }
  
   public class PageObjednavka extends PageBase {
   public PageObjednavka()
   {
   FormObject  form = new 
 FormObject(formOrder)
   {
   ...set_form... (own code)
   };
   this.add(form);
  
  
   
  
 form.add(formOrderName.setRequired(true).add(StringValidator.lengthBe
   t
   ween(2
   , 35)));
   //if validation faild show message from 
 property 
   file
   ---  form.add(new FeedbackPanel(feedback));
   }
   }
  
   public class PageBase extends WebPage {
   public PageBase()
   {
   this.add(new PanelCart(cart)); }
  
  
   -Original Message-
   From: manuelbarzi [mailto:manuelba...@gmail.com]
   Sent: 28. September 2011 12:22
   To: users@wicket.apache.org
   Subject: Re: filter feedback messages
  
   what's the feedback message filter you've added to the form?
  
  
   2011/9/28 Miroslav F.mir...@seznam.cz:
   yes. it doesn't matter if i do:
   this.add(new FeedbackPanel(feedback, new 
   ComponentFeedbackMessageFilter(this)));
   or
   this.add(new FeedbackPanel(feedback, new 
   ContainerFeedbackMessageFilter(this)));
   in PanelCart.class, panel still show messages 
 produced in form.
  
  
   -Original Message-
   From: manuelbarzi [mailto:manuelba...@gmail.com]
   Sent: 28. September 2011 12:02
   To: users@wicket.apache.org
   Subject: Re: filter feedback messages
  
   have you tried ContainerFeedbackMessageFilter instead?
  
  
   2011/9/28 Miroslav F.mir...@seznam.cz:
  Page1
\
+--- PanelCart
|
+--- Form
  
   i know all fedback panels displays all feedback messages
   and i have to
   filter them. what i don't know is how to tell in PanelCart
   to display
   only messages produced in PanelCart and ignore others
   messages?
  
  
   -Original Message-
   From: manuelbarzi [mailto:manuelba...@gmail.com]
   Sent: 28. September 2011 11:51
   To: users@wicket.apache.org
   Subject: Re: filter feedback messages
  
   how is your composite?
  
   page
   |-Form (with own FeedbackPanel)
   ||-Panel (with own FeedbackPanel)
   |
   |-Other stuff
  
   ?
  
  
  
  
   On Wed, Sep 28, 2011 at 11:33 AM, Miroslav F.
   mir...@seznam.cz  wrote:
   hi folks,
  
   i have this problem:
  
   have panel:
   wicket:panel
   ba href=cart.htmlcart:/a/b
   span wicket:id=cartItems[0]/span 
   items,nbsp;nbsp;nbsp;bspan
   wicket:id=cartPrice[0]/span
   $/b
   /span
   /div
   /wicket:panel
  
   then implementing class:
   package cz.mineralshop;
  
   import java.util.ArrayList;
   import org.apache.wicket.markup.html.basic.Label;
   import org.apache.wicket.markup.html.panel.Panel;
  
  
  
   @SuppressWarnings(serial)
   public class PanelCart extends Panel {
   public PanelCart(String id)
   {
   super(id);
   ArrayList cart = (new
   ModelPanelCart()).load();
   this.add(new Label(cartItems, (new 
   Integer(cart.size())).toString()));
   Integer cartPrice = new Integer(0);
   for(int i = 0; i  cart.size(); i++)
   {
   ArrayList polozka = (ArrayList)
   cart.get(i);
   Integer cenaPolozky = new
   Integer((String)
   polozka.get(2

RE: filter feedback messages

2011-09-28 Thread Miroslav F.
hmm, stil no succes, still trying. again recap:

public class PageBase extends WebPage
{
public PageBase()
{
this.add(new PanelCart(cart).setRenderBodyOnly(true));
}
}

public class PageOrder extends PageBase
{
public PageOrder()
{
FormObject form = new FormObject(formOrder)
{
@Override
protected void onSubmit()
{
//...do_something..
}
};
this.add(form);
TextField formOrderName = new TextField(formOrderName);

form.add(formOrderName.setRequired(true).add(StringValidator.lengthBetween(2
, 35)));
form.add(new FeedbackPanel(feedback));
}
}

public class PanelCart extends Panel
{
public PanelCart(String id)
{
super(id);
//...do_something...
this.add(new FeedbackPanel(feedback, new
ComponentFeedbackMessageFilter(this)));
}
}

on pageorder when i put value long 1 character then there is error message -
but one on pageorder
and one on panelcart. message is on panelcart and it seems that
add(new FeedbackPanel(feedback, new
ComponentFeedbackMessageFilter(this)));
is on panelcart. not know what doing wrong.




 -Original Message-
 From: Miroslav F. [mailto:mir...@seznam.cz] 
 Sent: 28. September 2011 14:46
 To: users@wicket.apache.org
 Subject: FW: filter feedback messages
 
 same with 1.4.18 
 
  -Original Message-
  From: Miroslav F. [mailto:mir...@seznam.cz]
  Sent: 28. September 2011 13:26
  To: users@wicket.apache.org
  Subject: RE: filter feedback messages
  
  1.4.13
  
   -Original Message-
   From: Andrea Del Bene [mailto:adelb...@ciseonweb.it]
   Sent: 28. September 2011 13:00
   To: users@wicket.apache.org
   Subject: Re: filter feedback messages
   
   Which version of Wicket are you using? I'm trying to
  reproducing the
   bug wit 1.4.17 but without success.
at the moment o don't deal with form filter, i deal with
   problem how
to filter in PanelCart messages not produced in PanelCart
   and how to
set it in PanelCart -see below ;-)
   
-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 12:39
To: users@wicket.apache.org
Subject: Re: filter feedback messages
   
form may need a filter too.
   
   
2011/9/28 Miroslav F.mir...@seznam.cz:
i think that form doesn't need filter - or to be precise i
don't want
to filter messages in form.
   
i only need to filter messages in panelcart (which
  extends panel):
   
public class PanelCart extends Panel {
public PanelCart(String id)
{
super(id);
...do_something...
---  //this don't work, the panel still shows
messages from
another page components
this.add(new FeedbackPanel(feedback, new 
ContainerFeedbackMessageFilter(this)));
}
}
   
public class PageObjednavka extends PageBase {
public PageObjednavka()
{
FormObject  form = new
  FormObject(formOrder)
{
...set_form... (own code)
};
this.add(form);
   
   

   
  
 form.add(formOrderName.setRequired(true).add(StringValidator.lengthBe
t
ween(2
, 35)));
//if validation faild show message from
  property
file
---  form.add(new FeedbackPanel(feedback));
}
}
   
public class PageBase extends WebPage {
public PageBase()
{
this.add(new PanelCart(cart)); }
   
   
-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 12:22
To: users@wicket.apache.org
Subject: Re: filter feedback messages
   
what's the feedback message filter you've added to the form?
   
   
2011/9/28 Miroslav F.mir...@seznam.cz:
yes. it doesn't matter if i do:
this.add(new FeedbackPanel(feedback, new 
ComponentFeedbackMessageFilter(this)));
or
this.add(new FeedbackPanel(feedback, new 
ContainerFeedbackMessageFilter(this)));
in PanelCart.class, panel still show messages
  produced in form.
   
   
-Original Message-
From: manuelbarzi [mailto:manuelba...@gmail.com]
Sent: 28. September 2011 12:02
To: users@wicket.apache.org
Subject: Re: filter feedback messages
   
have you tried ContainerFeedbackMessageFilter instead?
   
   
2011/9/28 Miroslav F.mir...@seznam.cz:
   Page1
 \
 +--- PanelCart
 |
 +--- Form
   
i know all fedback panels displays all feedback messages
and i have to
filter them. what i

RE: I am having trouble mounting shared resources

2011-08-05 Thread Miroslav F.
Project dirs:

. com.myapp
.  MyStartAppPoint.java
. com.myapp.resources
.  MyResources.java
.  fancybox-123.js

In MyStartAppPoint.init() do:

mountSharedResource(/js/fancybox.js, new
ResourceReference(MyResources.class,
fancybox-123.js).getSharedResourceKey());

MyResources.java is just empty class (for classloader to find your
resource):
package com.myapp.resources;
public class MyResources
{
}

and then in html markup you can write:
script type=text/javascript src=./js/fancybox.js/script

Hope helps,

Miro




 -Original Message-
 From: Alec Swan [mailto:alecs...@gmail.com] 
 Sent: Friday, 05. August 2011 08:42
 To: users@wicket.apache.org
 Subject: I am having trouble mounting shared resources
 
 Hello,
 
 I am having troubles figuring out how to organize my static resources.
 
 I would like to map a static URL alias, e.g. /js/fancybox, to 
 a file such as /js/fancybox/version123/fancybox-123.js. I 
 also want to be able to update the file version and after 
 that have it served under the same alias. This assumes that I 
 will modify my Java code to reference the new file name.
 
 I think I need to create a resource reference class that 
 points to /js/fancybox/version123/fancybox-123.js and mount 
 it in my Wicket Application. But I can only mount a resource, 
 not a JavaScriptResourceReference in Application.init().
 
 Can anybody please explain how to do this right?
 
 Thanks
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



tomcat eats memory

2011-08-05 Thread Miroslav F.
Hi folks,

I have these classes:

package com.myapp;
public class Minerals extends WebPage{
public Minerals(){
RepeatingView repeater = new RepeatingView(repeater);
//data from database - images and descriptions
ArrayList dataFromDB = (new ImagesMinerals()).load();
//descriptions
ArrayList desc = new ArrayList();
desc = (ArrayList) dataFromDB.get(0);
//images
ArrayList images = new ArrayList();
images = (ArrayList) dataFromDB.get(1);
int size = images.size();
for(int i = 0; i  size; i++){
String repeaterID = repeater.newChildId();
ImageRepeater repeaterChild = new
ImageRepeater(repeaterID);
//add description
repeaterChild.add(new Label(description, (String)
desc.get(i)));
//add image
DBImage image = new DBImage();
image.setImageData((byte[]) images.get(i));
//not caching on browser
Double random = Math.random();
//put shared resource (image) on clean path
Start.get().getSharedResources().add(image +
random.toString() + .jpg, image);
ResourceReference imageResource = new
ResourceReference(image + random.toString() + .jpg);
String url =
RequestCycle.get().urlFor(imageResource).toString();
//href in a and src in img should have same path
because lightbox won't work...
ExternalLink odkaz = new ExternalLink(anchor,
url);
WebMarkupContainer imageSrcAttribute = new
WebMarkupContainer(image);
imageSrcAttribute.add(new AttributeModifier(src,
new ModelString(url)));
odkaz.add(imageSrcAttribute);
odkaz.add(new SimpleAttributeModifier(title,
(String) desc.get(i)));
repeaterChild.add(odkaz);
repeater.add(repeaterChild);
}
this.add(repeater);
}
}

package com.myapp;
public class ImagesMinerals extends
LoadableDetachableModelArrayListbyte[]{
@Override
protected ArrayList load(){
DBGetImages databaseMinerals = new DBGetImages();
ArrayList dataMineraly = databaseMinerals.getData();
return dataMinerals;
}
}

My problem is that when i again and again click on page the memory in tomcat
is eaten and I end-up with 
Java heap space error. Doesn't matter if heap is 64MB or 1GB on start, after
some clicks memory is eaten.

Somethink wrong with my LDM?

Miro


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



RE: tomcat eats memory

2011-08-05 Thread Miroslav F.
Using non-shared images? My problem is that I need same url for href in a
and for
src in img for lightbox to work.



 -Original Message-
 From: Dan Retzlaff [mailto:dretzl...@gmail.com] 
 Sent: Friday, 05. August 2011 18:45
 To: users@wicket.apache.org
 Subject: Re: tomcat eats memory
 
 This is your problem:
 
 Start.get().getSharedResources().add(image +
  random.toString() + .jpg, image);
 
 
 Adding shared resources during page construction is very 
 unusual. Consider registering shared resources in 
 Application.init(), or using non-shared images. Refer to 
 http://wicketstuff.org/wicket/images/
 
 On Fri, Aug 5, 2011 at 9:20 AM, Miroslav F. mir...@seznam.cz wrote:
 
  Hi folks,
 
  I have these classes:
 
  package com.myapp;
  public class Minerals extends WebPage{
 public Minerals(){
 RepeatingView repeater = new 
 RepeatingView(repeater);
 //data from database - images and descriptions
 ArrayList dataFromDB = (new ImagesMinerals()).load();
 //descriptions
 ArrayList desc = new ArrayList();
 desc = (ArrayList) dataFromDB.get(0);
 //images
 ArrayList images = new ArrayList();
 images = (ArrayList) dataFromDB.get(1);
 int size = images.size();
 for(int i = 0; i  size; i++){
 String repeaterID = repeater.newChildId();
 ImageRepeater repeaterChild = new 
  ImageRepeater(repeaterID);
 //add description
 repeaterChild.add(new Label(description, 
  (String) desc.get(i)));
 //add image
 DBImage image = new DBImage();
 image.setImageData((byte[]) images.get(i));
 //not caching on browser
 Double random = Math.random();
 //put shared resource (image) on clean path
 
 Start.get().getSharedResources().add(image +
  random.toString() + .jpg, image);
 ResourceReference imageResource = new 
  ResourceReference(image + random.toString() + .jpg);
 String url =
  RequestCycle.get().urlFor(imageResource).toString();
 //href in a and src in img 
 should have same 
  path because lightbox won't work...
 ExternalLink odkaz = new 
 ExternalLink(anchor, 
  url);
 WebMarkupContainer imageSrcAttribute = new 
  WebMarkupContainer(image);
 imageSrcAttribute.add(new 
  AttributeModifier(src, new ModelString(url)));
 odkaz.add(imageSrcAttribute);
 odkaz.add(new 
 SimpleAttributeModifier(title,
  (String) desc.get(i)));
 repeaterChild.add(odkaz);
 repeater.add(repeaterChild);
 }
 this.add(repeater);
 }
  }
 
  package com.myapp;
  public class ImagesMinerals extends
  LoadableDetachableModelArrayListbyte[]{
 @Override
 protected ArrayList load(){
 DBGetImages databaseMinerals = new DBGetImages();
 ArrayList dataMineraly = databaseMinerals.getData();
 return dataMinerals;
 }
  }
 
  My problem is that when i again and again click on page the 
 memory in 
  tomcat is eaten and I end-up with Java heap space error. Doesn't 
  matter if heap is 64MB or 1GB on start, after some clicks memory is 
  eaten.
 
  Somethink wrong with my LDM?
 
  Miro
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


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



RE: I am having trouble mounting shared resources

2011-08-05 Thread Miroslav F.
Same way as is mounted .js and .css mount images and then in .css you can
just use this path.
 

 -Original Message-
 From: Alec Swan [mailto:alecs...@gmail.com] 
 Sent: Friday, 05. August 2011 19:30
 To: users@wicket.apache.org
 Subject: Re: I am having trouble mounting shared resources
 
 Thanks, mounting JS worked perfectly.
 
 However, mounting CSS was problematic because it references 
 quite a few images and they don't get loaded/mounted 
 correctly. How do I mount the folder that contains all images 
 so that they can be loaded from the CSS?
 
 Thanks,
 
 Alec
 
 
 On Fri, Aug 5, 2011 at 11:51 AM, Miroslav F. mir...@seznam.cz wrote:
  Project dirs:
 
  . com.myapp
  .      MyStartAppPoint.java
  . com.myapp.resources
  .      MyResources.java
  .      fancybox-123.js
 
  In MyStartAppPoint.init() do:
 
  mountSharedResource(/js/fancybox.js, new 
  ResourceReference(MyResources.class,
  fancybox-123.js).getSharedResourceKey());
 
  MyResources.java is just empty class (for classloader to find your
  resource):
  package com.myapp.resources;
  public class MyResources
  {
  }
 
  and then in html markup you can write:
  script type=text/javascript src=./js/fancybox.js/script
 
  Hope helps,
 
  Miro
 
 
 
 
  -Original Message-
  From: Alec Swan [mailto:alecs...@gmail.com]
  Sent: Friday, 05. August 2011 08:42
  To: users@wicket.apache.org
  Subject: I am having trouble mounting shared resources
 
  Hello,
 
  I am having troubles figuring out how to organize my 
 static resources.
 
  I would like to map a static URL alias, e.g. /js/fancybox, 
 to a file 
  such as /js/fancybox/version123/fancybox-123.js. I also want to be 
  able to update the file version and after that have it 
 served under 
  the same alias. This assumes that I will modify my Java code to 
  reference the new file name.
 
  I think I need to create a resource reference class that points to 
  /js/fancybox/version123/fancybox-123.js and mount it in my Wicket 
  Application. But I can only mount a resource, not a 
  JavaScriptResourceReference in Application.init().
 
  Can anybody please explain how to do this right?
 
  Thanks
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: tomcat eats memory

2011-08-05 Thread Miroslav F.
Answer myself: should be solution before
Start.get().getSharedResources().add(image + random.toString() + .jpg,
image);
do something like unmount all previosly mounted images?

In Application.init() isn't possible to mount them - I don't know which page
user click. In database is around 1.000 images
and there are on around 100 pages (every page has around 10 images). For me
it looks crazy in Application.init() take all images
from DB and mount them.


 -Original Message-
 From: Miroslav F. [mailto:mir...@seznam.cz] 
 Sent: Friday, 05. August 2011 18:54
 To: users@wicket.apache.org
 Subject: RE: tomcat eats memory
 
 Using non-shared images? My problem is that I need same url 
 for href in a and for src in img for lightbox to work.
 
 
 
  -Original Message-
  From: Dan Retzlaff [mailto:dretzl...@gmail.com]
  Sent: Friday, 05. August 2011 18:45
  To: users@wicket.apache.org
  Subject: Re: tomcat eats memory
  
  This is your problem:
  
  Start.get().getSharedResources().add(image +
   random.toString() + .jpg, image);
  
  
  Adding shared resources during page construction is very unusual. 
  Consider registering shared resources in 
 Application.init(), or using 
  non-shared images. Refer to http://wicketstuff.org/wicket/images/
  
  On Fri, Aug 5, 2011 at 9:20 AM, Miroslav F. 
 mir...@seznam.cz wrote:
  
   Hi folks,
  
   I have these classes:
  
   package com.myapp;
   public class Minerals extends WebPage{
  public Minerals(){
  RepeatingView repeater = new
  RepeatingView(repeater);
  //data from database - images and descriptions
  ArrayList dataFromDB = (new 
 ImagesMinerals()).load();
  //descriptions
  ArrayList desc = new ArrayList();
  desc = (ArrayList) dataFromDB.get(0);
  //images
  ArrayList images = new ArrayList();
  images = (ArrayList) dataFromDB.get(1);
  int size = images.size();
  for(int i = 0; i  size; i++){
  String repeaterID = repeater.newChildId();
  ImageRepeater repeaterChild = new 
   ImageRepeater(repeaterID);
  //add description
  repeaterChild.add(new Label(description,
   (String) desc.get(i)));
  //add image
  DBImage image = new DBImage();
  image.setImageData((byte[]) images.get(i));
  //not caching on browser
  Double random = Math.random();
  //put shared resource (image) on clean path
  
  Start.get().getSharedResources().add(image +
   random.toString() + .jpg, image);
  ResourceReference imageResource = new 
   ResourceReference(image + random.toString() + .jpg);
  String url =
   RequestCycle.get().urlFor(imageResource).toString();
  //href in a and src in img
  should have same
   path because lightbox won't work...
  ExternalLink odkaz = new
  ExternalLink(anchor,
   url);
  WebMarkupContainer imageSrcAttribute = new 
   WebMarkupContainer(image);
  imageSrcAttribute.add(new 
   AttributeModifier(src, new ModelString(url)));
  odkaz.add(imageSrcAttribute);
  odkaz.add(new
  SimpleAttributeModifier(title,
   (String) desc.get(i)));
  repeaterChild.add(odkaz);
  repeater.add(repeaterChild);
  }
  this.add(repeater);
  }
   }
  
   package com.myapp;
   public class ImagesMinerals extends
   LoadableDetachableModelArrayListbyte[]{
  @Override
  protected ArrayList load(){
  DBGetImages databaseMinerals = new DBGetImages();
  ArrayList dataMineraly = 
 databaseMinerals.getData();
  return dataMinerals;
  }
   }
  
   My problem is that when i again and again click on page the
  memory in
   tomcat is eaten and I end-up with Java heap space error. Doesn't 
   matter if heap is 64MB or 1GB on start, after some clicks 
 memory is 
   eaten.
  
   Somethink wrong with my LDM?
  
   Miro
  
  
   
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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

RE: tomcat eats memory

2011-08-05 Thread Miroslav F.
With this I have problem that then I need to take url from Image component
and put it into Link component:
a  href=# !-- -this atribute -- wicket:id=anchor
rel=lightbox
title=
imgstyle=border: 3px solid #DCD4A7;
padding: 1px 1px 1px 1px; width: 199px; height: 149px; alt= src= !--
-and this atribute --
wicket:id=image
/a
!-- have to had the same url + .jpg at the end. Otherwise Lightbox won't
work --

No problem make Image component as in example (my first attempt was same)
but not know how then take url from image component and put into Link
component.



 -Original Message-
 From: Dan Retzlaff [mailto:dretzl...@gmail.com] 
 Sent: Friday, 05. August 2011 19:58
 To: users@wicket.apache.org
 Subject: Re: tomcat eats memory
 
 It sounds like a shared resource is not the right solution 
 for your problem.
 Just throw a wicket:id on your Lightbox image tag and create 
 a Wicket Image like image5 of the wicketstuff examples link I sent.
 
 On Fri, Aug 5, 2011 at 10:46 AM, Miroslav F. mir...@seznam.cz wrote:
 
  Answer myself: should be solution before 
  Start.get().getSharedResources().add(image + random.toString() + 
  .jpg, image); do something like unmount all previosly mounted 
  images?
 
  In Application.init() isn't possible to mount them - I don't know 
  which page user click. In database is around 1.000 images and there 
  are on around 100 pages (every page has around 10 images). 
 For me it 
  looks crazy in Application.init() take all images from DB and mount 
  them.
 
 
   -Original Message-
   From: Miroslav F. [mailto:mir...@seznam.cz]
   Sent: Friday, 05. August 2011 18:54
   To: users@wicket.apache.org
   Subject: RE: tomcat eats memory
  
   Using non-shared images? My problem is that I need same 
 url for href 
   in a and for src in img for lightbox to work.
  
  
  
-Original Message-
From: Dan Retzlaff [mailto:dretzl...@gmail.com]
Sent: Friday, 05. August 2011 18:45
To: users@wicket.apache.org
Subject: Re: tomcat eats memory
   
This is your problem:
   
Start.get().getSharedResources().add(image +
 random.toString() + .jpg, image);
   
   
Adding shared resources during page construction is 
 very unusual.
Consider registering shared resources in
   Application.init(), or using
non-shared images. Refer to 
 http://wicketstuff.org/wicket/images/
   
On Fri, Aug 5, 2011 at 9:20 AM, Miroslav F.
   mir...@seznam.cz wrote:
   
 Hi folks,

 I have these classes:

 package com.myapp;
 public class Minerals extends WebPage{
public Minerals(){
RepeatingView repeater = new
RepeatingView(repeater);
//data from database - images and descriptions
ArrayList dataFromDB = (new
   ImagesMinerals()).load();
//descriptions
ArrayList desc = new ArrayList();
desc = (ArrayList) dataFromDB.get(0);
//images
ArrayList images = new ArrayList();
images = (ArrayList) dataFromDB.get(1);
int size = images.size();
for(int i = 0; i  size; i++){
String repeaterID = 
 repeater.newChildId();
ImageRepeater repeaterChild = new 
 ImageRepeater(repeaterID);
//add description
repeaterChild.add(new 
 Label(description,
 (String) desc.get(i)));
//add image
DBImage image = new DBImage();
image.setImageData((byte[]) 
 images.get(i));
//not caching on browser
Double random = Math.random();
//put shared resource (image) on clean 
 path

Start.get().getSharedResources().add(image +
 random.toString() + .jpg, image);
ResourceReference imageResource = new 
 ResourceReference(image + random.toString() + .jpg);
String url = 
 RequestCycle.get().urlFor(imageResource).toString();
//href in a and src in img
should have same
 path because lightbox won't work...
ExternalLink odkaz = new
ExternalLink(anchor,
 url);
WebMarkupContainer imageSrcAttribute = 
 new WebMarkupContainer(image);
imageSrcAttribute.add(new 
 AttributeModifier(src, new ModelString(url)));
odkaz.add(imageSrcAttribute);
odkaz.add(new
SimpleAttributeModifier(title,
 (String) desc.get(i)));
repeaterChild.add

RE: Static Files (CSS, JPG) not Found by Wicket in HTML

2011-07-27 Thread Miroslav F.
Use structure:
.src
.java
..com
...myapp
...[HTML  Java go here]
...img
...css
...somethink else you would like

In img dir put Images.class, in css put Styles.class and so on, for example:
package com.myapp.images;
public class Images{
}

Then in WebApplication.init() do:
mountSharedResource(/img/myimage.jpg, new ResourceReference(Images.class,
myimage.jpg).getSharedResourceKey());

and in html file do:
img src=./img/myimage.jpg/

No need to do something else in html.

Hope this helps.

Miro




 -Original Message-
 From: eugenebalt [mailto:eugeneb...@yahoo.com] 
 Sent: Wednesday, 27. July 2011 00:04
 To: users@wicket.apache.org
 Subject: Static Files (CSS, JPG) not Found by Wicket in HTML
 
 My project structure looks like this:
 
 .src
 .java
 ..com
 ...myapp
 ...[HTML  Java go here]
 
 .web
 .img
 .css
 .WEB-INF
 
 
 In my HTML, when I reference img/image.jpg or 
 css/main.css, these files are not found. I also tried 
 /img/image.jpg and /css/main.css and that doesn't work either.
 
 Thanks
 
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Static-Files-CSS-JP
G-not-Found-by-Wicket-in-HTML-tp3697146p3697146.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: How to Catch WebApplication's Destroy()?

2011-07-26 Thread Miroslav F.
As I understand it's called when app is undeployed or servlet container
(Tomcat, Jetty,...)
is going down. And it should be very long time after app is started.


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org] 
 Sent: Tuesday, 26. July 2011 08:21
 To: users@wicket.apache.org
 Subject: Re: How to Catch WebApplication's Destroy()?
 
 org.apache.wicket.Application.onDestroy()
 
 On Tue, Jul 26, 2011 at 4:34 AM, eugenebalt 
 eugeneb...@yahoo.com wrote:
  To clarify, this is not per-request, it should be per-application.
 
  I have a static Connection object in my WebApplication, and 
 it's used 
  for all transactions in the app. I construct it initially in the 
  init(), and was just wondering where to close the 
 Connection at the end of the app.
 
  --
  View this message in context: 
  
 http://apache-wicket.1842946.n4.nabble.com/How-to-Catch-WebApplication
  -s-Destroy-tp3694556p3694614.html Sent from the Users forum mailing 
  list archive at Nabble.com.
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 
 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: url for images from database

2011-07-26 Thread Miroslav F.
No one has experience with LightBox/Slimbox/Shadowbox/Other? How do you
implement
same src (in img) and href (in a) attributes to make it works?

 -Original Message-
 From: Miroslav F. [mailto:mir...@seznam.cz] 
 Sent: Monday, 25. July 2011 21:55
 To: users@wicket.apache.org
 Subject: RE: url for images from database
 
 Thanks, was looking on classes :-)
 
 Now I have code:
 
 HTML:
 div style=  border: 1px solid #DCD4A7;
   float: left; position: relative;
   width: 207px; height: 340px;
   margin-top: 5px; margin-right: 20px; 
 margin-bottom:
 10px;
   a  href=# wicket:id=anchor
   rel=zbox
   title=
   imgstyle=border: 3px solid 
 #DCD4A7; padding:
 1px 1px 1px 1px; width: 199px; height: 149px; alt= src=
   wicket:id=image
   /a
 
 Wicket:
 DBImage image = new DBImage();
 image.setImageData((byte[]) dataFromDB.get(dataOffset));
 
 //not to cache images in browser
 Double random = Math.random();
 
 //put image into shared resources
 Start.get().getSharedResources().add(image+((String)
 dataFromDB.get(textOffset)) + random.toString() + .jpg, 
 image); ResourceReference imageResource = new 
 ResourceReference(image+((String)
 dataFromDB.get(textOffset))+ random.toString()+.jpg); 
 String url=RequestCycle.get().urlFor(imageResource).toString();
 
 //make href in a and src in img point to the same 
 location for zbox to make work ExternalLink odkaz = new 
 ExternalLink(anchor, url); WebMarkupContainer 
 imageSrcAttribute = new WebMarkupContainer(image); 
 imageSrcAttribute.add(new AttributeModifier(src, new 
 ModelString(url))); odkaz.add(imageSrcAttribute); 
 odkaz.add(new SimpleAttributeModifier(title, (String) 
 nazvy.get(i)));
 
 this.add(odkaz); 
 
 
 This works, not know if code is good from point of right way 
 to do this in wicket..
 
 Miro
 
 
 
  -Original Message-
  From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
  Sent: Thursday, 14. July 2011 18:11
  To: users@wicket.apache.org
  Subject: Re: url for images from database
  
  look at the very bottom of that page
  
  -igor
  
  On Thu, Jul 14, 2011 at 6:50 AM, Miroslav F. 
 mir...@seznam.cz wrote:
   Still be lost :-(
  
   This code I have in AppStart class:
   mountSharedResource(/images/image1.jpg, new 
   ResourceReference(Images.class,
  image1.jpg).getSharedResourceKey());
  
   Now after reading recomended example still not idea how to
  replace new
   ResourceReference(... in above code snippet in a way in 
 which I get 
   from byte[] shared resource key.
  
   Please be kindfull, I'm in low level in java and greenhorn
  in wicket
   :-D
  
   Miro
  
  
  
   -Original Message-
   From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
   Sent: Tuesday, 12. July 2011 17:09
   To: users@wicket.apache.org
   Subject: Re: url for images from database
  
   https://cwiki.apache.org/WICKET/uploaddownload.html
  
   -igor
  
   On Tue, Jul 12, 2011 at 2:54 AM, Miroslav F. 
  mir...@seznam.cz wrote:
Is there example? How to get shared resource key from
  byte[] (image
from DB)? In my App class i do for several shared resources:
mountSharedResource(/styles/style.css, new 
ResourceReference(Styles.class,
   style.css).getSharedResourceKey());
   
Is is possible in this code getsharedResource() for byte[]
   (image from
DB) in some way?
   
   
-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
Sent: Sunday, 10. July 2011 18:16
To: users@wicket.apache.org
Subject: Re: url for images from database
   
use a shared resource to output the images instead of 
 an Image 
component
   
-igor
   
On Sun, Jul 10, 2011 at 6:44 AM, Miroslav F.
   mir...@seznam.cz wrote:
 Hi folks,

 please direct me to right docu with following problem: I
have image as
 byte[] from database which I display on pages.

 Works fine, on image atribute src is somethink like this:
 img

   
 src=?wicket:interface=:0:repeater:1:obrazok::IResourceListener::/
 

 For lightbox I need make this ugly src atribute
  transform to
 something like src=/images/xxx.jpg and mount it
on-the-fly but don't
 know how to do it.

 Is somewhere related example please?

 Thanks in advance,

 Miro



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


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

RE: url for images from database

2011-07-25 Thread Miroslav F.
Thanks, was looking on classes :-)

Now I have code:

HTML:
div style=border: 1px solid #DCD4A7;
float: left; position: relative;
width: 207px; height: 340px;
margin-top: 5px; margin-right: 20px; margin-bottom:
10px;
a  href=# wicket:id=anchor
rel=zbox
title=
imgstyle=border: 3px solid #DCD4A7; padding:
1px 1px 1px 1px; width: 199px; height: 149px; alt= src=
wicket:id=image
/a

Wicket:
DBImage image = new DBImage();
image.setImageData((byte[]) dataFromDB.get(dataOffset));

//not to cache images in browser
Double random = Math.random();

//put image into shared resources
Start.get().getSharedResources().add(image+((String)
dataFromDB.get(textOffset)) + random.toString() + .jpg, image);
ResourceReference imageResource = new ResourceReference(image+((String)
dataFromDB.get(textOffset))+ random.toString()+.jpg);
String url=RequestCycle.get().urlFor(imageResource).toString();

//make href in a and src in img point to the same location for zbox
to make work
ExternalLink odkaz = new ExternalLink(anchor, url);
WebMarkupContainer imageSrcAttribute = new WebMarkupContainer(image);
imageSrcAttribute.add(new AttributeModifier(src, new ModelString(url)));
odkaz.add(imageSrcAttribute);
odkaz.add(new SimpleAttributeModifier(title, (String) nazvy.get(i)));

this.add(odkaz); 


This works, not know if code is good from point of right way to do this in
wicket..

Miro



 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
 Sent: Thursday, 14. July 2011 18:11
 To: users@wicket.apache.org
 Subject: Re: url for images from database
 
 look at the very bottom of that page
 
 -igor
 
 On Thu, Jul 14, 2011 at 6:50 AM, Miroslav F. mir...@seznam.cz wrote:
  Still be lost :-(
 
  This code I have in AppStart class:
  mountSharedResource(/images/image1.jpg, new 
  ResourceReference(Images.class, 
 image1.jpg).getSharedResourceKey());
 
  Now after reading recomended example still not idea how to 
 replace new 
  ResourceReference(... in above code snippet in a way in which I get 
  from byte[] shared resource key.
 
  Please be kindfull, I'm in low level in java and greenhorn 
 in wicket 
  :-D
 
  Miro
 
 
 
  -Original Message-
  From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
  Sent: Tuesday, 12. July 2011 17:09
  To: users@wicket.apache.org
  Subject: Re: url for images from database
 
  https://cwiki.apache.org/WICKET/uploaddownload.html
 
  -igor
 
  On Tue, Jul 12, 2011 at 2:54 AM, Miroslav F. 
 mir...@seznam.cz wrote:
   Is there example? How to get shared resource key from 
 byte[] (image 
   from DB)? In my App class i do for several shared resources:
   mountSharedResource(/styles/style.css, new 
   ResourceReference(Styles.class,
  style.css).getSharedResourceKey());
  
   Is is possible in this code getsharedResource() for byte[]
  (image from
   DB) in some way?
  
  
   -Original Message-
   From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
   Sent: Sunday, 10. July 2011 18:16
   To: users@wicket.apache.org
   Subject: Re: url for images from database
  
   use a shared resource to output the images instead of an Image 
   component
  
   -igor
  
   On Sun, Jul 10, 2011 at 6:44 AM, Miroslav F.
  mir...@seznam.cz wrote:
Hi folks,
   
please direct me to right docu with following problem: I
   have image as
byte[] from database which I display on pages.
   
Works fine, on image atribute src is somethink like this:
img
   
  src=?wicket:interface=:0:repeater:1:obrazok::IResourceListener::/

   
For lightbox I need make this ugly src atribute 
 transform to 
something like src=/images/xxx.jpg and mount it
   on-the-fly but don't
know how to do it.
   
Is somewhere related example please?
   
Thanks in advance,
   
Miro
   
   
   
  
  
 -
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
   
   
  
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
  
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional

RE: Problems with Wicket JARs: jcl-over-slf4j

2011-07-25 Thread Miroslav F.
put just slf4j-simple-1.6.1.jar and slf4j-api-1.6.1.jar in WEB-INF/lib


 -Original Message-
 From: eugenebalt [mailto:eugeneb...@yahoo.com] 
 Sent: Tuesday, 26. July 2011 03:10
 To: users@wicket.apache.org
 Subject: Re: Problems with Wicket JARs: jcl-over-slf4j
 
 I resolved all my issues, but I had to add a ton of JAR's 
 that were never mentioned anywhere. Thanks anyway.
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Problems-with-Wicke
t-JARs-jcl-over-slf4j-tp3694328p3694554.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: How to Catch WebApplication's Destroy()?

2011-07-25 Thread Miroslav F.
Bad. Wicket application start when you deploy it into Tomcat (it's time when
WebApplication.init() is
executed) and stop when you undeploy it or when you stop Tomcat - it should
be very long time ;-)

My scenario is: In WebPage class i do LoadableDetachableModel.load() and
here I load all data what I need
from database and do all DB stufs - open connection, run SQL, close
connection.
 

 -Original Message-
 From: eugenebalt [mailto:eugeneb...@yahoo.com] 
 Sent: Tuesday, 26. July 2011 03:12
 To: users@wicket.apache.org
 Subject: How to Catch WebApplication's Destroy()?
 
 I have a DB connection that I initialize on 
 WebApplication.init(), which I override.
 
 At the end, I need to close the DB connection in something 
 like a destroy method for the app, but I couldn't find any 
 overridable method for that. I tried overriding 
 sessionDestroy() but it's not getting called when I close my 
 browser, according to my debug statements.
 
 So what's the way to close DB connections at the end of the 
 Wicket app's lifecycle? Thanks.
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/How-to-Catch-WebApp
 lication-s-Destroy-tp3694556p3694556.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: RE: How to Catch WebApplication's Destroy()?

2011-07-25 Thread Miroslav F.
will be next level ;-) - at current status of learning wicket framework is
better
to know how thinks works and do it myself.

 

 -Original Message-
 From: Josh Kamau [mailto:joshnet2...@gmail.com] 
 Sent: Tuesday, 26. July 2011 06:51
 To: users@wicket.apache.org
 Subject: Re: RE: How to Catch WebApplication's Destroy()?
 
 are you prohibited from using a DI framework such as guice or 
 spring?  it can help you manage your object scope and lifecycle
 
 On 26 Jul 2011 07:41, Miroslav F. mir...@seznam.cz wrote:
 
 Bad. Wicket application start when you deploy it into Tomcat 
 (it's time when
 WebApplication.init() is
 executed) and stop when you undeploy it or when you stop 
 Tomcat - it should be very long time ;-)
 
 My scenario is: In WebPage class i do 
 LoadableDetachableModel.load() and here I load all data what 
 I need from database and do all DB stufs - open connection, 
 run SQL, close connection.
 
 
 
  -Original Message-
  From: eugenebalt [mailto:eugeneb...@yahoo.com]
  Sent: Tuesday, 2...
 


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



RE: url for images from database

2011-07-14 Thread Miroslav F.
Still be lost :-( 

This code I have in AppStart class:
mountSharedResource(/images/image1.jpg, new
ResourceReference(Images.class, image1.jpg).getSharedResourceKey());

Now after reading recomended example still not idea how to replace new
ResourceReference(... in above code snippet
in a way in which I get from byte[] shared resource key.

Please be kindfull, I'm in low level in java and greenhorn in wicket :-D

Miro



 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
 Sent: Tuesday, 12. July 2011 17:09
 To: users@wicket.apache.org
 Subject: Re: url for images from database
 
 https://cwiki.apache.org/WICKET/uploaddownload.html
 
 -igor
 
 On Tue, Jul 12, 2011 at 2:54 AM, Miroslav F. mir...@seznam.cz wrote:
  Is there example? How to get shared resource key from byte[] (image 
  from DB)? In my App class i do for several shared resources:
  mountSharedResource(/styles/style.css, new 
  ResourceReference(Styles.class, 
 style.css).getSharedResourceKey());
 
  Is is possible in this code getsharedResource() for byte[] 
 (image from 
  DB) in some way?
 
 
  -Original Message-
  From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
  Sent: Sunday, 10. July 2011 18:16
  To: users@wicket.apache.org
  Subject: Re: url for images from database
 
  use a shared resource to output the images instead of an Image 
  component
 
  -igor
 
  On Sun, Jul 10, 2011 at 6:44 AM, Miroslav F. 
 mir...@seznam.cz wrote:
   Hi folks,
  
   please direct me to right docu with following problem: I
  have image as
   byte[] from database which I display on pages.
  
   Works fine, on image atribute src is somethink like this:
   img
   
 src=?wicket:interface=:0:repeater:1:obrazok::IResourceListener::/
   
  
   For lightbox I need make this ugly src atribute transform to 
   something like src=/images/xxx.jpg and mount it
  on-the-fly but don't
   know how to do it.
  
   Is somewhere related example please?
  
   Thanks in advance,
  
   Miro
  
  
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: url for images from database

2011-07-12 Thread Miroslav F.
Is there example? How to get shared resource key from byte[] (image from
DB)? In my App class i do for several
shared resources:
mountSharedResource(/styles/style.css, new ResourceReference(Styles.class,
style.css).getSharedResourceKey());

Is is possible in this code getsharedResource() for byte[] (image from DB)
in some way?


 -Original Message-
 From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
 Sent: Sunday, 10. July 2011 18:16
 To: users@wicket.apache.org
 Subject: Re: url for images from database
 
 use a shared resource to output the images instead of an 
 Image component
 
 -igor
 
 On Sun, Jul 10, 2011 at 6:44 AM, Miroslav F. mir...@seznam.cz wrote:
  Hi folks,
 
  please direct me to right docu with following problem: I 
 have image as 
  byte[] from database which I display on pages.
 
  Works fine, on image atribute src is somethink like this:
  img 
  src=?wicket:interface=:0:repeater:1:obrazok::IResourceListener::/
 
  For lightbox I need make this ugly src atribute transform to 
  something like src=/images/xxx.jpg and mount it 
 on-the-fly but don't 
  know how to do it.
 
  Is somewhere related example please?
 
  Thanks in advance,
 
  Miro
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



url for images from database

2011-07-10 Thread Miroslav F.
Hi folks,

please direct me to right docu with following problem: I have image as
byte[]
from database which I display on pages.

Works fine, on image atribute src is somethink like this:
img src=?wicket:interface=:0:repeater:1:obrazok::IResourceListener::/

For lightbox I need make this ugly src atribute transform to something
like src=/images/xxx.jpg and mount it on-the-fly but don't know how to do
it.

Is somewhere related example please?

Thanks in advance,

Miro


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



getSession() in LDM

2011-07-08 Thread Miroslav F.
Hi,

is it possible to getSession() in load() in LDM?

Miro


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



RE: getSession() in LDM

2011-07-08 Thread Miroslav F.
Thanks, was confused that getSessions() didn't work.
 

 -Original Message-
 From: Alexander Morozov [mailto:alexander.v.moro...@gmail.com] 
 Sent: Friday, 08. July 2011 19:01
 To: users@wicket.apache.org
 Subject: Re: getSession() in LDM
 
 Yep, use Session.get() method.
 
 -
 --
 http://www.linkedin.com/in/amorozov
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/getSession-in-LDM-t
p3654618p3654647.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: error - serialization

2011-07-07 Thread Miroslav F.
After investigation I will answer myself - it is bug in tomcat, if you are
using tomcat
6.0.29 upgrade to 6.0.31.

Carl, static variables are good if you are going to do something like DB
connection
factory and you will reuse existing connection. When you will do in your
style you will
make new connection in each request (it is expensive).



 -Original Message-
 From: Carl-Eric Menzel [mailto:cmen...@wicketbuch.de] 
 Sent: Wednesday, 06. July 2011 13:13
 To: users@wicket.apache.org
 Subject: Re: error - serialization
 
 First of all, don't manage your own DB connection. That is 
 fragile and error-prone. The best solution is to use 
 something like Hibernate, iBatis, JPA or any other such tool. 
 These things manage the connection setup for you, and you 
 don't have to worry about it.
 
 Second, in this particular case, get rid of all the static variables.
 I'm not entirely sure what exactly is causing the no 
 suitable driver found issue, but keeping connections and all 
 this stuff around statically is thread-unsafe and can cause 
 all kinds of confusion. If you have to do the DBImage and 
 Database stuff, do it like this (pseudocode, you get the idea):
 
 byte[] getRecord {
   try {
   Connection c = makeConnection();
   Statement s = makeStatement();
   } finally {
 // ...cleanup...
   }
 }
 
 Basically, move all the static stuff into method-local 
 variables to get rid of threading issues.
 
 Carl-Eric
 www.wicketbuch.de
 
 On Tue, 5 Jul 2011 11:35:31 +0200
 Miroslav F. mir...@seznam.cz wrote:
 
  Index.java:
  public class Index extends WebPage
  {
  public Index()
  {
  add(new Image(obrazokzdb, new ImagesIndex()));
  }
  }
  
  ImagesIndex.java:
  public class ImagesIndex extends LoadableDetachableModelObject {
  private DBImage myImage;
  
  @Override
  protected Object load()
  {
  myImage = new DBImage();
  myImage.setImageData(Database.getRecord());
  return myImage;
  }
  }
  
  DBImage.java:
  public class DBImage extends DynamicImageResource {
  private byte[] imageData;
  
  @Override
  protected byte[] getImageData()
  {
  return this.imageData;
  }
  
  public void setImageData(byte[] inputImageData)
  {
  this.imageData = inputImageData;
  }
  }
  
  Database.java (poor organisation, at the moment just 
 testing working 
  with BLOBs):
  public class Database
  {
  private static Connection connection;
  private static Statement statement;
  private static ResultSet result;
  private static LargeObject object;
  private static LargeObjectManager manager;
  private static String query = SELECT * FROM 
 mydatabase.images WHERE 
  id = 8;
  private static byte[] record;
  
  public static byte[] getRecord()
  {
  makeConnection();
  makeStatement();
  makeResultSet();
  try
  {
  result.next();
  Long oid = result.getLong(7);
  object = manager.open(oid,
  LargeObjectManager.READ); record = new byte[object.size()];
  object.read(record, 0, object.size());
  object.close();
  closeResultSet();
  closeStatement();
  makeCommit();
  }
  catch(SQLException e)
  {
  e.printStackTrace();
  }
  return record;
  }
  
  public static void makeConnection()
  {
  try
  {
  Class.forName(org.postgresql.Driver);
  connection =
  
 DriverManager.getConnection(jdbc:postgresql://localhost:5432/mydataba
  se,
  postgres, postgres);
  connection.setAutoCommit(false);
  manager = ((org.postgresql.PGConnection) 
  connection).getLargeObjectAPI();
  }
  catch(ClassNotFoundException e)
  {
  e.printStackTrace();
  }
  catch(SQLException e)
  {
  e.printStackTrace();
  }
  }
  
  public static void makeStatement()
  {
  try
  {
  statement = connection.createStatement();
  }
  catch(SQLException e)
  {
  e.printStackTrace();
  }
  }
  
  public static void setQuery(String inputQuery)
  {
  query = null;
  query = inputQuery;
  }
  
  public static void makeResultSet()
  {
  try
  {
  result = statement.executeQuery(query);
  }
  catch(SQLException e)
  {
  e.printStackTrace();
  }
  }
  
  public static ResultSet

RE: error - serialization

2011-07-06 Thread Miroslav F.
Martijn, thanks for pointing me this :-)

Problem with JDBC driver still remains :-(

 

 -Original Message-
 From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
 Sent: Tuesday, 05. July 2011 12:39
 To: users@wicket.apache.org
 Subject: Re: error - serialization
 
 On Tue, Jul 5, 2011 at 11:35 AM, Miroslav F. mir...@seznam.cz wrote:
  ImagesIndex.java:
  public class ImagesIndex extends LoadableDetachableModelObject {
         private DBImage myImage;
 
         @Override
         protected Object load()
         {
                 myImage = new DBImage();
                 myImage.setImageData(Database.getRecord());
                 return myImage;
         }
  }
 
 Don't do this, LDM already caches the model object for you, 
 and now you have bound the DBImage to the LDM.
 
 Instead do:
 
 public class ImagesIndex extends LoadableDetachableModelObject {
        @Override
        protected Object load()
        {
                DBImage myImage = new DBImage();
                myImage.setImageData(Database.getRecord());
                return myImage;
        }
 }
 
 Martijn
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: error - serialization

2011-07-05 Thread Miroslav F.
Code or project layout? Driver for ostgreSQL JDBC is in tomcat lib
directory and code is standard
init and usage code from jdbc.postgresql.org examples. It works but from
some reason just for first
time. When I do F5 on page or redeploy project error occurs - see my
original post (look at the end):
http://apache-wicket.1842946.n4.nabble.com/error-serialization-td3641636.htm
l

Miro

 -Original Message-
 From: Carl-Eric Menzel [mailto:cmen...@wicketbuch.de] 
 Sent: Monday, 04. July 2011 20:47
 To: users@wicket.apache.org
 Subject: Re: error - serialization
 
 Can you show some code?
 
 Carl-Eric
 
 On Mon, 4 Jul 2011 08:02:16 +0200
 Miroslav F. mir...@seznam.cz wrote:
 
  Driver is in classpath and is initialized. When I start tomcat, it 
  works (load images from database) but when i redeploy or 
 reload page 
  (F5) it complains about java.sql.SQLException: No suitable driver 
  found I have to restart tomcat and than it works again.
   
  
   -Original Message-
   From: Carl-Eric Menzel [mailto:cmen...@wicketbuch.de]
   Sent: Sunday, 03. July 2011 23:22
   To: users@wicket.apache.org
   Subject: Re: error - serialization
   
   That means you don't have the appropriate driver jar in your 
   classpath.
   You need the PostgreSQL driver jar, put it on your classpath, and 
   initialize it.
   
   Carl-Eric
   www.wicketbuch.de
   
   On Sun, 3 Jul 2011 23:08:40 +0200
   Miroslav F. mir...@seznam.cz wrote:
   
Still problem with no suitable driver found

Does someone has experience with this and solved it?

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


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



RE: error - serialization

2011-07-05 Thread Miroslav F.
 
 of your page and model?
 
 Carl-Eric
 www.wicketbuch.de
 
 On Tue, 5 Jul 2011 10:08:33 +0200
 Miroslav F. mir...@seznam.cz wrote:
 
  Code or project layout? Driver for ostgreSQL JDBC is in tomcat lib
  directory and code is standard
  init and usage code from jdbc.postgresql.org examples. It works but 
  from some reason just for first time. When I do F5 on page 
 or redeploy 
  project error occurs - see my original post (look at the end):
  
 http://apache-wicket.1842946.n4.nabble.com/error-serialization-td36416
  36.htm
  l
  
  Miro
  
   -Original Message-
   From: Carl-Eric Menzel [mailto:cmen...@wicketbuch.de]
   Sent: Monday, 04. July 2011 20:47
   To: users@wicket.apache.org
   Subject: Re: error - serialization
   
   Can you show some code?
   
   Carl-Eric
   
   On Mon, 4 Jul 2011 08:02:16 +0200
   Miroslav F. mir...@seznam.cz wrote:
   
Driver is in classpath and is initialized. When I start 
 tomcat, it 
works (load images from database) but when i redeploy or
   reload page
(F5) it complains about java.sql.SQLException: No 
 suitable driver 
found I have to restart tomcat and than it works again.

 -Original Message-
 From: Carl-Eric Menzel [mailto:cmen...@wicketbuch.de]
 Sent: Sunday, 03. July 2011 23:22
 To: users@wicket.apache.org
 Subject: Re: error - serialization
 
 That means you don't have the appropriate driver jar in your 
 classpath.
 You need the PostgreSQL driver jar, put it on your classpath, 
 and initialize it.
 
 Carl-Eric
 www.wicketbuch.de
 
 On Sun, 3 Jul 2011 23:08:40 +0200 Miroslav F. 
 mir...@seznam.cz wrote:
 
  Still problem with no suitable driver found
  
  Does someone has experience with this and solved it?
  
  Miro
 
 
   
 
 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 



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

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


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



RE: error - serialization

2011-07-04 Thread Miroslav F.
Driver is in classpath and is initialized. When I start tomcat, it works
(load images
from database) but when i redeploy or reload page (F5) it complains about
java.sql.SQLException: No suitable driver found I have to restart
tomcat and than
it works again.
 

 -Original Message-
 From: Carl-Eric Menzel [mailto:cmen...@wicketbuch.de] 
 Sent: Sunday, 03. July 2011 23:22
 To: users@wicket.apache.org
 Subject: Re: error - serialization
 
 That means you don't have the appropriate driver jar in your 
 classpath.
 You need the PostgreSQL driver jar, put it on your classpath, 
 and initialize it.
 
 Carl-Eric
 www.wicketbuch.de
 
 On Sun, 3 Jul 2011 23:08:40 +0200
 Miroslav F. mir...@seznam.cz wrote:
 
  Still problem with no suitable driver found
  
  Does someone has experience with this and solved it?
  
  Miro
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: image from data

2011-07-03 Thread Miroslav F.
Adam,

thanks for pointing me this, after reading doc and few examles it works for
me. I have found this source:
https://svn.apache.org/repos/test/wicket/releases/wicket-1.2.1/wicket-exampl
es/src/java/wicket/examples/captcha/JCaptcha.java
where is nice example of using DynamicImageResource

Miro

 

 -Original Message-
 From: Adam Gray [mailto:adam.j.g...@gmail.com] 
 Sent: Saturday, 02. July 2011 14:42
 To: users@wicket.apache.org
 Subject: Re: image from data
 
 Perhaps check out DynamicImageResource?
 
 On Sat, Jul 2, 2011 at 7:39 AM, Miroslav F. mir...@seznam.cz wrote:
 
  Hi folks,
 
  I have images in database as BLOBs and retrieving it with JDBC (not 
  good code, just test at the moment) with this (just snip of 
 the code):
 
  conn = Utils.makeConnection();//make connection with JDBC try {
 conn.setAutoCommit(false);
 st = conn.createStatement();
 rs = st.executeQuery(SELECT * FROM testdatabase.images);
 LargeObjectManager lobj = ((org.postgresql.PGConnection) 
  conn).getLargeObjectAPI();
 while(rs.next())
 {
 Long oid = rs.getLong(7);
 LargeObject obj = lobj.open(oid, 
 LargeObjectManager.READ);
 byte buf[] = new byte[obj.size()];
 obj.read(buf, 0, obj.size());
 //--now I have image data in buf[], how can 
 I put them 
  into html?
 obj.close();
 }
 rs.close();
 st.close();
 conn.commit();
  }
  catch(SQLException e)
  {
 e.printStackTrace();
  }
 
  How can I put this image data into html page? Save it as file onto 
  file system and then insert in src atribute of img tag? Or 
 something 
  else? Example is welcome.
 
  Thanks in advance,
 
  Miro
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


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



error - serialization

2011-07-03 Thread Miroslav F.
Folks,

another problem of my testing app - I have this error in tomcat console
(looks like app is stil working):
...
9094 [http-80-1] ERROR org.apache.wicket.util.lang.Objects - Error
serializing object class com.mypackage.Index [object=[Page class =
com.mypackage.Index, id = 2, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException
: Unable to serialize class: org.postgresql.jdbc4.Jdbc4Connection
Field hierarchy is:
  2 [class=com.mypackage.Index, path=2]
private java.sql.Connection com.mypackage.Index.conn
[class=org.postgresql.jdbc4.Jdbc4Connection] - field that is not
serializable
at
org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChec
ker.java:372)
...

and after redeploy app I have JDBC error in tomcat log:
java.sql.SQLException: No suitable driver found for
jdbc:postgresql://localhost:5432/mydatabase
When I restart tomcat, JDBC error is left. Maybe wrong version of tomcat?
Does someone experience with this?

My environment is:
WinXP 32bit SP3
Eclipse 3.5.2 J2EE
Tomcat 6.0.29
Java 1.6.0_24
Wicket 1.4.13
JDBC driver postgresql-9.0-801.jdbc4.jar
PostgreSQL 9.0

Does someone has been faced with same errors and solved them?

Thanks,

Miro


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



RE: error - serialization

2011-07-03 Thread Miroslav F.
Alexander,

it (of course..) works, thanks for pointing me right direction.

Miro
 

 -Original Message-
 From: Alexander Morozov [mailto:alexander.v.moro...@gmail.com] 
 Sent: Sunday, 03. July 2011 11:27
 To: users@wicket.apache.org
 Subject: Re: error - serialization
 
 You have JDBC Connection reference within Index page 
 implementation. Check LoadableDetachableModel and never store 
 Connection and other JDBC stuff within wicket components.
 
 
 -
 --
 http://www.linkedin.com/in/amorozov
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/error-serialization
-tp3641636p3641695.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



FW: error - serialization

2011-07-03 Thread Miroslav F.
Still problem with no suitable driver found

Does someone has experience with this and solved it?

Miro

 -Original Message-
 From: Miroslav F. [mailto:mir...@seznam.cz] 
 Sent: Sunday, 03. July 2011 10:14
 To: users@wicket.apache.org
 Subject: error - serialization
 
 Folks,
 
 another problem of my testing app - I have this error in 
 tomcat console (looks like app is stil working):
 ...
 9094 [http-80-1] ERROR org.apache.wicket.util.lang.Objects - 
 Error serializing object class com.mypackage.Index 
 [object=[Page class = com.mypackage.Index, id = 2, version = 
 0]] 
 org.apache.wicket.util.io.SerializableChecker$WicketNotSeriali
 zableException
 : Unable to serialize class: org.postgresql.jdbc4.Jdbc4Connection
 Field hierarchy is:
   2 [class=com.mypackage.Index, path=2]
 private java.sql.Connection com.mypackage.Index.conn 
 [class=org.postgresql.jdbc4.Jdbc4Connection] - field 
 that is not serializable
 at
 org.apache.wicket.util.io.SerializableChecker.internalCheck(Se
 rializableChec
 ker.java:372)
 ...
 
 and after redeploy app I have JDBC error in tomcat log:
 java.sql.SQLException: No suitable driver found for 
 jdbc:postgresql://localhost:5432/mydatabase
 When I restart tomcat, JDBC error is left. Maybe wrong 
 version of tomcat?
 Does someone experience with this?
 
 My environment is:
 WinXP 32bit SP3
 Eclipse 3.5.2 J2EE
 Tomcat 6.0.29
 Java 1.6.0_24
 Wicket 1.4.13
 JDBC driver postgresql-9.0-801.jdbc4.jar PostgreSQL 9.0
 
 Does someone has been faced with same errors and solved them?
 
 Thanks,
 
 Miro
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



image from data

2011-07-02 Thread Miroslav F.
Hi folks,

I have images in database as BLOBs and retrieving it with JDBC (not good
code, just test at the moment)
with this (just snip of the code):

conn = Utils.makeConnection();//make connection with JDBC
try
{
conn.setAutoCommit(false);
st = conn.createStatement();
rs = st.executeQuery(SELECT * FROM testdatabase.images);
LargeObjectManager lobj = ((org.postgresql.PGConnection)
conn).getLargeObjectAPI();
while(rs.next())
{
Long oid = rs.getLong(7);
LargeObject obj = lobj.open(oid, LargeObjectManager.READ);
byte buf[] = new byte[obj.size()];
obj.read(buf, 0, obj.size());
//--now I have image data in buf[], how can I put them into
html?
obj.close();
}
rs.close();
st.close();
conn.commit();
}
catch(SQLException e)
{
e.printStackTrace();
}

How can I put this image data into html page? Save it as file onto file
system and then
insert in src atribute of img tag? Or something else? Example is welcome.

Thanks in advance,

Miro


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



RE: database

2011-06-09 Thread Miroslav F.
Hielke,

this is what I was looking for :-)

Thanks,

Miro

 

 -Original Message-
 From: Hielke Hoeve [mailto:hielke.ho...@topicus.nl] 
 Sent: Wednesday, 08. June 2011 08:37
 To: users@wicket.apache.org
 Subject: RE: database
 
 http://lmgtfy.com/?q=wicket+hibernate+spring+howto
 
 First hit: 
 http://wicketinaction.com/2009/06/wicketspringhibernate-configuration/
 
 
 Hielke
 
 -Original Message-
 From: Miroslav F. [mailto:mir...@seznam.cz]
 Sent: dinsdag 7 juni 2011 11:42
 To: users@wicket.apache.org
 Subject: RE: database
 
 The original question was I would like to make my wicket app 
 to store images in database. No problem but I don't know how 
 to configure tomcat
 + wicket for database.
 
 No is it good idea to store images in database? ;-)
 
 Still don't know how to work with database in wicket. Is 
 anywhere examples?
 wicket phonebook example is not working:
 http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook/
 
 I move to direction not use pure JDBC and using Hibernate. 
 Does someone know where to find docs for using Hibernate in 
 webapp project? Where to put config file or any other 
 specific issues for using Hibernate in webapp?
 
 Thanks, Miro
 
 
 
  -Original Message-
  From: meduolis [mailto:meduol...@gmail.com]
  Sent: Sunday, 05. June 2011 12:19
  To: users@wicket.apache.org
  Subject: Re: database
  
  Why do you want to store images in database? I think that is not a 
  very good idea. You better store images in your file system, and 
  persist into database only the paths to images.
  
  --
  View this message in context: 
  http://apache-wicket.1842946.n4.nabble.com/database-tp3573282p
 3574812.html
  Sent from the Users forum mailing list archive at Nabble.com.
  
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: database

2011-06-07 Thread Miroslav F.
The original question was I would like to make my wicket app to store
images in
database. No problem but I don't know how to configure tomcat + wicket for
database.

No is it good idea to store images in database? ;-)

Still don't know how to work with database in wicket. Is anywhere examples?
wicket phonebook example is not working:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook/

I move to direction not use pure JDBC and using Hibernate. Does someone know
where to find docs for using Hibernate in webapp project? Where to put
config
file or any other specific issues for using Hibernate in webapp?

Thanks, Miro



 -Original Message-
 From: meduolis [mailto:meduol...@gmail.com] 
 Sent: Sunday, 05. June 2011 12:19
 To: users@wicket.apache.org
 Subject: Re: database
 
 Why do you want to store images in database? I think that is 
 not a very good idea. You better store images in your file 
 system, and persist into database only the paths to images.
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/database-tp3573282p
3574812.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



database

2011-06-04 Thread Miroslav F.
Hi folks,

I'm newbie in wicket. I would like to make my wicket app to store
images in database. No problem but I don't know how to configure
tomcat + wicket for database. I'm using database in other java apps
(I'm Java SWING programmer).

Should I use pure JDBC and manage my connections in wicket code?
Or should I use Hibernate?
Or tomcat database connection pool - I have never use it so I don't
know how to make it and use with tomcat and wicket.

Please be patient to me - wicket and tomcat is something new for me
and I'm confused with doc I have found. In finish I don't know where
is right docu for this problem.

Examples are welcome.

Thanks in advance,

Miro


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



RE: database

2011-06-04 Thread Miroslav F.
Hi Martin,

ok, so can I use Hibernate as in my Swing apps? And Hibernate .jars just to
incude in same place as wicket .jar? Where to store Hibernate config file?

Miro


 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
 Sent: Saturday, 04. June 2011 14:59
 To: users@wicket.apache.org
 Subject: Re: database
 
 Hi!
 
  I'm newbie in wicket. I would like to make my wicket app to store 
  images in database. No problem but I don't know how to configure 
  tomcat + wicket for database. I'm using database in other java apps 
  (I'm Java SWING programmer).
 
  Should I use pure JDBC and manage my connections in wicket code?
  Or should I use Hibernate?
  Or tomcat database connection pool - I have never use it so I don't 
  know how to make it and use with tomcat and wicket.
 
 Don't mix database and wicket java code.
 
 Make a database service module (or use a ready one from 
 spring etc.) and make invocations to it from wicket.
 
 Is just the same as using swing.
 
 **
 Martin
 
 
  Please be patient to me - wicket and tomcat is something new for me 
  and I'm confused with doc I have found. In finish I don't 
 know where 
  is right docu for this problem.
 
  Examples are welcome.
 
  Thanks in advance,
 
  Miro
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



RE: database

2011-06-04 Thread Miroslav F.
Separate project? I would to deploy just one .jar into tomcat for my wicket
app. I think this wicket app .jar should contain database code for wicket
app.

I don't need to mix swing apps with wicket apps.
 

 -Original Message-
 From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
 Sent: Saturday, 04. June 2011 15:34
 To: users@wicket.apache.org
 Subject: Re: database
 
 Hi!
 
 Make a separate project for wicket app and database module, 
 so you don't need to worry about where to place what in what 
 combination.
 
 This way you can share you db module with both your wicket 
 project and swing project. Also you should keep swing project 
 and wicket project sparate.
 
 **
 Martin
 
 2011/6/4 Miroslav F. mir...@seznam.cz:
  Hi Martin,
 
  ok, so can I use Hibernate as in my Swing apps? And Hibernate .jars 
  just to incude in same place as wicket .jar? Where to store 
 Hibernate config file?
 
  Miro
 
 
  -Original Message-
  From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com]
  Sent: Saturday, 04. June 2011 14:59
  To: users@wicket.apache.org
  Subject: Re: database
 
  Hi!
 
   I'm newbie in wicket. I would like to make my wicket app 
 to store 
   images in database. No problem but I don't know how to configure 
   tomcat + wicket for database. I'm using database in 
 other java apps 
   (I'm Java SWING programmer).
  
   Should I use pure JDBC and manage my connections in wicket code?
   Or should I use Hibernate?
   Or tomcat database connection pool - I have never use it 
 so I don't 
   know how to make it and use with tomcat and wicket.
 
  Don't mix database and wicket java code.
 
  Make a database service module (or use a ready one from 
 spring etc.) 
  and make invocations to it from wicket.
 
  Is just the same as using swing.
 
  **
  Martin
 
  
   Please be patient to me - wicket and tomcat is something 
 new for me 
   and I'm confused with doc I have found. In finish I don't
  know where
   is right docu for this problem.
  
   Examples are welcome.
  
   Thanks in advance,
  
   Miro
  
  
  
  
 -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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