Re: Ajax refresh problem with WebMarkupContainer and CSS class in DeploymentMode

2010-03-23 Thread Ilja Pavkovic
Hi,

this looks wrong:
 / span]
use /span 


Best Regards,
Ilja Pavkovic

Am Dienstag, 23. März 2010 10:28:41 schrieb Peter Diefenthaeler:
 Hi Wicket Folks,
 I have a little problem using a WebMarkupContainer with Ajax refresh in
 Deployment Mode.
 
 The page shows a table like the sorting data view example in the Wicket
 Examples. The table resides in a div section with a y-Scrollbar and a
 ButtonPagingNavigator.
 
 My IE7 doesn't show the view in Deployment Mode, while in Development Mode
 the page works fine. If I delete the class attribute in the DIV tag, the
 page works fine in both modes. Adding the CSS class in HTML or as a
 AttributeModifier in the java code makes no difference. Also using a style
 attribute or using wicket:container inside the DIV tag doesn't help.
 
 Markup:
 div class=genYScrollContainer wicket:id=configView
   table class=genTable
   tbody
 tr wicket:id=sorting
   td class=GenColKey
 a href=# wicket:id=detailLinkspan wicket:id=
 key[cnfBTest]/span/a/td
   td class=GenColValuespan wicket:id=value[Yes]/
 span]/td
 /tr
   /tbody
   /table
 /div
 
 Java code:
 
 private final WebMarkupContainer configView = new WebMarkupContainer(
 configView);
 ...
 configView.setOutputMarkupId(true);
 add(configView);
 configView.add(dataView);
 
 Deployment mode:
 
 (Embedded image moved to file: pic08363.gif)
 Development mode:
 (Embedded image moved to file: pic04651.gif)
 
 Thanks in advance,
 Peter Diefenthäler


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

   +49 · 171 · 9342 465

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

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



LoadableDetachableListModel

2010-03-18 Thread Ilja Pavkovic
();
}
};
}

public int lastIndexOf(Object o) {
throw new UnsupportedOperationException();
}

public ListIteratorT listIterator() {
throw new UnsupportedOperationException();
}

public ListIteratorT listIterator(int index) {
throw new UnsupportedOperationException();
}

public boolean remove(Object o) {
int idx = indexOf(o);
if(idx == -1) {
return false;
}
remove(idx);
return true;
}

public T remove(int index) {
IModelT model = modelsList.remove(index);
return model == null ? null : model.getObject();
}

public boolean removeAll(Collection? c) {
throw new UnsupportedOperationException();
}

public boolean retainAll(Collection? c) {
throw new UnsupportedOperationException();  

}

public T set(int index, T element) {
IModelT model = modelsList.set(index, 
createModel(element));
return model == null ? null : model.getObject();
}

public int size() {
return modelsList.size();
}

public ListT subList(int fromIndex, int toIndex) {
return loadAll().subList(fromIndex, toIndex);
}

public Object[] toArray() {
throw new UnsupportedOperationException();
}

public U U[] toArray(U[] a) {
throw new UnsupportedOperationException();
}
};
return entities;
}

public boolean add(T entity) {
return modelsList.add(createModel(entity));
}

protected abstract IModelT createModel(T entity);

}



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

   +49 · 171 · 9342 465

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

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



Re: AutoCompleteTextField bug

2010-03-10 Thread Ilja Pavkovic
Hi,

 The component works fine in the Chrome browser. The behavior described
 above was in IE8. I'm currently using wicket 1.3.6.
You should upgrade to 1.4.7 and see if the problem still occurs.

Best Regards,
Ilja Pavkovic


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

   +49 · 171 · 9342 465

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

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



Re: Session expired drives me mad!

2010-03-08 Thread Ilja Pavkovic
Hi,

 I enabled the DEBUG of Wicket and messages like the following one are
 flooding the log. Here it is:
 
 08-03-2010 17:30:03,445 ERROR
 org.apache.wicket.util.lang.Objects.objectToByteArray:1134 - Error
 serializing object class com.mycompany.myapp.ui.users.Users [object=[Page
 class = com.mycompany.myapp.ui.users.Users, id = 21, version = 0]]
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableExcepti
 on: Unable to serialize class:
 org.springframework.orm.jpa.AbstractEntityManagerFactoryBean$ManagedEntity
 ManagerFactoryInvocationHandler Field hierarchy is:
   21 [class=com.mycompany.myapp.ui.users.Users, path=21]
 private java.lang.Object org.apache.wicket.MarkupContainer.children
 [class=[Ljava.lang.Object;] protected java.lang.Object
 com.mycompany.myapp.ui.MyFormPanel.model[15]
Wicket (or better: your model implementations) should not serialize your 
entity objects. They are managed by spring orm, therefore use a specialized 
LoadableDetachableModel in MyFormPanel that dynamically load your objects if 
needed.

Best Regards,
Ilja Pavkovic

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

   +49 · 171 · 9342 465

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

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



Re: how to get domain name

2010-03-05 Thread Ilja Pavkovic
Hi,

 Hi all,
 
 I've searched around to no avail for an example on how to get the
 domain name of the server where the wicket application runs on.
 Can anybody help with this?
Something like:


HttpServletRequest request = (HttpServletRequest) ((WebRequestCycle) 
getRequestCycle()).getRequest();
// maybe we are behind a proxy
String header = request.getHeader(X-Forwarded-Host);
if(header != null) {
// we are only interested in the first header entry
header = new StringTokenizer(header,,).nextToken().trim();
}
if(header == null) {
header = request.getHeader(Host);
}
return header;


Best Regards,
Ilja Pavkovic

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

   +49 · 171 · 9342 465

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

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



Re: Wicket used for mobile.walmart.com

2010-02-25 Thread Ilja Pavkovic
Hi,

how did you measure the system performance? I know that you investigated some 
time for improving wicket performace and I see you created jolirium. Did you 
use this for multiuser performance measurements? Or anything else?

Best Regards,
Ilja Pavkovic

Am Mittwoch, 24. Februar 2010 19:19:36 schrieb Joachim F. Kainz:
 Jeff,
 
 I will try to do better on the documentation and examples, but I think
 the tests are quite useful if you would like to see how the components
 work.
 
 Best regards,
 
 Joachim
 
 On Tue, 2010-02-23 at 09:46 -0600, Jeffrey Schneller wrote:
  Joachim,
  
  
  
  Thanks for this information.  It shows that we made the right choice with
  Wicket for a new retail site.  Also thank you for posting your
  components as open source.  Do you have any examples of how these
  components can and should be used.  In particular the jofilter,
  wicket-stateless, and expiring-cache.
  
  
  
  Thanks.
  
  
  
  Jeff
  
  
  
  
  
  From: Joachim F. Kainz [mailto:j...@jolira.com]
  Sent: Monday, February 22, 2010 12:05 PM
  To: users@wicket.apache.org
  Subject: Wicket used for mobile.walmart.com
  
  
  
  Fellow Wicket Users,
  
  The question if Wicket is suitable for large enterprises has just become
  easier to answer: The largest enterprise in the world is now using
  Wicket for its mobile site. Check out mobile.walmart.com (or just point
  your mobile phone to www.walmart.com and get redirected automatically).
  
  The reason why my client decided to go with Wicket makes it easy to
  support multiple different types of devices. The walmart mobile
  application supports different HTML for three categories of devices (L1:
  iPhones  challengers, L2: BlackBerries, L3: Plain Old Devices). These
  three experiences are supported by the same Java code on the server
  side.
  
  We added a few components to Wicket, mostly because in the retail arena
  being stateless is very important. Our components are available at
  http://code.google.com/p/jolira-tools/.
  http://code.google.com/p/jolira-tools/
  
  Wicket is an awesome product and I would like to thank the Wicket team
  for all there work. One day I hope to get the largest enterprise in the
  world to donate an appropriate amount of money for future development!
  :)
  
  Best regards,
  
  Joachim
  
  http://www.jolira.com


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

   +49 · 171 · 9342 465

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

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



Re: Timeouts when requesting resources from a jar

2010-02-18 Thread Ilja Pavkovic
Hi,

this sounds like a missing content-length header line in combination with a 
keep-alive header line in the response. In such a case the connection must be 
kept open until all data is sent but the receiving instance (your apache 
proxy) does not know when to stop the transmission and the timeout stops the 
transmission.

Best Regards,
Ilja Pavkovic

Am Donnerstag, 18. Februar 2010 01:25:24 schrieb Adam Bender:
 Greetings,
 
 This is kind of an odd problem so I will do my best to explain it.
 
 First our environment:
 
 We are running a wicket 1.4 app inside Tomcat
 Tomcat is front-ended by Apache 2.2 using mod_proxy_http so we are talking
 to the Http 1.1 connector in Tomcat Our Http 1.1 connector has a
 connectionTimeout parameter of 20 seconds (I believe this is the default
 it is shipped with)
 
 We are using the Wicket DateTextField which includes the use of some yui
 css and javascript
 
 
 Now for the problem:
 
 Whenever we load a page with a DateTextField on it the loading takes a very
 long time. I have been able to trace the problem to the loading of all of
 the js/css elements that are used by the DateTextField. Each element takes
 exactly 20 seconds to load (again this is the timeout on Tomcat's Http 1.1
 connector) which means in total it can take over minute for the
 DateTextField to be usable.
 
 When I change the connectionTimeout parameter to something smaller like 2
 seconds it takes each js/css element exactly 2 seconds to load. This lead
 me to believe that the loading of these files is timing out. Tracking it
 down further it looks like the timeout is coming on the
 java.net.SocketInputStream when it performs a read.
 
 I have tried moving some of these files out of the jar they came with and
 it seems to reduce the loading time to tens of milliseconds so it seems
 like the problem has to do with the fact tomcat is being asked to serve a
 file out of a jar.
 
 Now I realize that this is not a bug in Wicket but I have exhausted Google
 in a search for someone else who has had this problem. Has anyone run into
 problems using the DateTextField component when running right off of an
 Http 1.1 connector.
 
 I should also mention that when we started with the AJP connector in tomcat
 and the problem doesnt appear, however we have had reliability issues with
 AJP and it occasionally drops packets so we have been asked to switch to
 the Http 1.1 connector.
 
 Thanks,
 Adam
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org


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

   +49 · 171 · 9342 465

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

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



Re: best way to detect session termination

2010-02-18 Thread Ilja Pavkovic
Hi,

_userDao shouldn't be null if you annotate it in your applicationContext.xml 
and grep it out of the ApplicationContext, e.g.

applicationContext.getBean(sessionDestroyedService);

otherwise spring would have already failed as it was not able to autowire 
_userDao.

Best Regards,
Ilja Pavkovic

Am Donnerstag, 18. Februar 2010 12:52:46 schrieb Andreas Lüdtke:
 Ilja,
 
 thanks for your reply. If I create a service class like the one below, my
 _userDao object is always null. This _userDao works perfectly in other
 parts of my app. Do I need to inject the dao in a special way? I think the
 integration into spring is the problem, because I don't know where to
 place the corresponding part in the config/xml files. As I said, my
 knowledge of spring is limited.
 
 My class looks like this:
 
 @Service
 @Transactional
 public class SessionDestroyedService
 {
   @ Autowired
   private UserDao _userDao;
 
   public void forceLogout(String sessionId)
   {
 if (_userDao == null)
   System.out.println(SessionDestroyedService.forceLogout(): _userDao
 is NULL);
 else
 {
   System.out.println(SessionDestroyedService.forceLogout(): _userDao
 is OK);
   User user = _userDao.getBySessionId(sessionId);
   if (user != null)
   {
 // do the work here...
   }
 }
   }
 }
 
 Andreas
 
  -Original Message-
  From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de]
  Sent: Wednesday, February 17, 2010 5:38 PM
  To: users@wicket.apache.org
  Subject: Re: best way to detect session termination
  
  Hi,
  
  create a service class marked with Annotation @Transactional
  and manage it
  with spring. Calls to this function will have get a session
  from the spring
  context.
  
  Spring will open a session before calling any function on
  this service and
  close the session afterwards.
  
  @Service
  @Transactional
  public class MyService {
  
  @Autowired
  private MyDao dao;
  
  public destroySession(String sessionId) {
  
  myDao.deleteMySessionById(sessionId);
  
  }
  
  }
  
  Best Regards,
  
  Ilja Pavkovic
  
  Am Mittwoch, 17. Februar 2010 13:24:11 schrieb Andreas Lüdtke:
   Vineet,
   
   I'm now storing the session id in the user record. But now
  
  I have another
  
   problem, because hibernate tells me now in sessionDestroy():
   
   org.hibernate.HibernateException: No Hibernate Session
  
  bound to thread, and
  
   configuration does not allow creation of non-transactional one here
   
   I'm using spring to inject my dao. I also tried to use the dao in my
   HttpSessionListener which is configured in web.xml, but
  
  that prevents my
  
   app from being started by Tomcat.
   Next I did was to create a manual created hibernate
  
  session, but that
  
   raised other problems like a missing hibernate.hbm.xml file
  
  and I don't
  
   want to configure that manually...
   
   Does somebody see another way to access my user data, or am I doing
   something stupid?
   
   Andreas
   
-Original Message-
From: vineet semwal [mailto:vineetsemwal1...@gmail.com]
Sent: Tuesday, February 16, 2010 2:15 PM
To: users@wicket.apache.org; sam.lued...@t-online.de
Subject: Re: best way to detect session termination

can't you simply do that in
webapplication.sessiondestroy(String sessionid),

 you can store the sessionid when user logs in and on
  
  sessiondestroyed
  
,search the user by this sessionid ,
and change whatever in user object and then persist it..

On Tue, Feb 16, 2010 at 6:23 PM, Andreas Lüdtke

sam.lued...@t-online.dewrote:
 I studied the classes HttpSessionBindingListener and
 AbstractHttpSessionStore
 as you noted, but I think I'll still have no link between

the SessionId

 from
 the HTTPSession and my own Session. Maybe I'm missing

something or I don't

 see the wood among all the trees as we say in Germany...
 
 Andreas
 
  -Original Message-
  From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
  Sent: Monday, February 15, 2010 7:08 PM
  To: sam.lued...@t-online.de
  Cc: users@wicket.apache.org
  Subject: Re: best way to detect session termination
  
  You could use a HttpSessionBindingListener like Wicket

does internally

  (see AbstractHttpSessionStore). Or as a hack store

references to the

  session objects in the session listener. That's the
  
  easy fix, but
  
  doesn't scale if you need session replication (unless

maybe you use

  e.g. Terracotta).
  
  Eelco
  
  On Sun, Feb 14, 2010 at 4:36 AM, Andreas Lüdtke
  
  sam.lued...@t-online.de wrote:
   Hi Eelco,
   
   thanks for the hint. Now I can detect the end of a session.
  
  Unfortunately I
  
   can't access my own wicket session

Re: best way to detect session termination

2010-02-17 Thread Ilja Pavkovic
Hi,

create a service class marked with Annotation @Transactional and manage it 
with spring. Calls to this function will have get a session from the spring 
context. 

Spring will open a session before calling any function on this service and 
close the session afterwards. 

@Service
@Transactional
public class MyService {
@Autowired 
private MyDao dao;

public destroySession(String sessionId) {
myDao.deleteMySessionById(sessionId);
}
}

Best Regards,
Ilja Pavkovic

Am Mittwoch, 17. Februar 2010 13:24:11 schrieb Andreas Lüdtke:
 Vineet,
 
 I'm now storing the session id in the user record. But now I have another
 problem, because hibernate tells me now in sessionDestroy():
 
 org.hibernate.HibernateException: No Hibernate Session bound to thread, and
 configuration does not allow creation of non-transactional one here
 
 I'm using spring to inject my dao. I also tried to use the dao in my
 HttpSessionListener which is configured in web.xml, but that prevents my
 app from being started by Tomcat.
 Next I did was to create a manual created hibernate session, but that
 raised other problems like a missing hibernate.hbm.xml file and I don't
 want to configure that manually...
 
 Does somebody see another way to access my user data, or am I doing
 something stupid?
 
 Andreas
 
  -Original Message-
  From: vineet semwal [mailto:vineetsemwal1...@gmail.com]
  Sent: Tuesday, February 16, 2010 2:15 PM
  To: users@wicket.apache.org; sam.lued...@t-online.de
  Subject: Re: best way to detect session termination
  
  can't you simply do that in
  webapplication.sessiondestroy(String sessionid),
  
   you can store the sessionid when user logs in and on sessiondestroyed
  
  ,search the user by this sessionid ,
  and change whatever in user object and then persist it..
  
  On Tue, Feb 16, 2010 at 6:23 PM, Andreas Lüdtke
  
  sam.lued...@t-online.dewrote:
   I studied the classes HttpSessionBindingListener and
   AbstractHttpSessionStore
   as you noted, but I think I'll still have no link between
  
  the SessionId
  
   from
   the HTTPSession and my own Session. Maybe I'm missing
  
  something or I don't
  
   see the wood among all the trees as we say in Germany...
   
   Andreas
   
-Original Message-
From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
Sent: Monday, February 15, 2010 7:08 PM
To: sam.lued...@t-online.de
Cc: users@wicket.apache.org
Subject: Re: best way to detect session termination

You could use a HttpSessionBindingListener like Wicket
  
  does internally
  
(see AbstractHttpSessionStore). Or as a hack store
  
  references to the
  
session objects in the session listener. That's the easy fix, but
doesn't scale if you need session replication (unless
  
  maybe you use
  
e.g. Terracotta).

Eelco

On Sun, Feb 14, 2010 at 4:36 AM, Andreas Lüdtke

sam.lued...@t-online.de wrote:
 Hi Eelco,
 
 thanks for the hint. Now I can detect the end of a session.

Unfortunately I

 can't access my own wicket session in that

sessionDestroyed() method in order

 to get the info about the connected user. I've got ther

error message

 java.lang.IllegalStateException: you can only locate or

create sessions in

 the context of a request cycle.
 
 Do you know how I can achieve this?
 
 Andreas
 
 -Original Message-
 From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
 Sent: Saturday, February 13, 2010 7:02 PM
 To: users@wicket.apache.org; sam.lued...@t-online.de
 Subject: Re: best way to detect session termination
  
  http://www.xyzws.com/Servletfaq/when-do-i-use-httpsessionlistener/7
  
 Eelco
 
 On Sat, Feb 13, 2010 at 8:38 AM, Andreas Lüdtke
 
 sam.lued...@t-online.de wrote:
  I would like to detect the termination of the
  
  session to set the
  
  lastAccesTime in the user profile. This should also
 
 happen if the session
 
  times out.
  
  I read in archive about a HttpSessionListener that should
 
 do the trick.
 
  Unfortunately I can't find a place to install it.
  
  Thanks
  
  Andreas
  
  -
  
  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: Large number components and redering time

2010-02-17 Thread Ilja Pavkovic
please don't tell me that there is any person around that needs 25k elements 
per page...

this is a fault in the specification of the former system also :)


Am Mittwoch, 17. Februar 2010 19:30:29 schrieb d...@agentlab.de:
 Surely a change in the use case would ease our lives, unfortunately we are
 migrating a legacy application to a new technology and the look and feel
 (if you could call it that) must be retained...
 
 J,
 
 Josh Chappelle wrote:
  Could you use a PageableListView or does that not fall within your
  business requirements?
  
  Josh
  
  -Original Message-
  From: d...@agentlab.de [mailto:d...@agentlab.de]
  Sent: Wednesday, February 17, 2010 12:08 PM
  To: users@wicket.apache.org
  Subject: Large number components and redering time
  
  Hi,
  
  I have a question on how to address a certain problem that arose in my
  current
  project: we have a two-dimensional array with a variable number of rows
  and columns
  (not exactly rocket science, I know) that needs to be rendered in an HTML
  table where
  each cell is currently represented by a wicket-Label. Now, in the
  production environment, the number of rows and columns gets quite large
  such that we have roughly
  25.000 cells to render. This yields to the effect, that the rendering
  process for the
  component tree takes a lot of time: on my windows machine approx 7
  seconds and, for
  some reason we have not found out about until now, on the integration
  machine (IBM
  server) around 45 seconds. Clearly, this is not acceptable.
  
  Now, my question is, how should we address this problem? Is the naive
  approach of
  using two nested ListViews and rendering each as component plain dumb?
  What would be
  the alternatives?
  
  Thanks for any help,
  
  J.
  
  
  
  
  
  __
  This email has been scanned by the MessageLabs Email Security System.
  For more information please visit http://www.messagelabs.com/email
  __
  
  -
  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


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

   +49 · 171 · 9342 465

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

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



Re: jdbc

2010-02-15 Thread Ilja Pavkovic
 commands, e-mail: users-h...@wicket.apache.org


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

   +49 · 171 · 9342 465

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

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



Re: jdbc

2010-02-15 Thread Ilja Pavkovic
 Can you give me an example, how i can use ResultSet transformed into
 Map with for example datatable component?
 I think i can write method transforming ResultSet to a Map.
 
 I do not want to use any ORM, because web tier for my app is just
 control panel and main features implemented in the backend.

You want to swim without getting wet. Fine :)

public class MyMilkFactory {
public ListMilk provideHoneyObjects() {
// iterate over sql statement/REsultSet
   Milk milk = createMilk(rs);
   Honey honey provideHoney(rs.getInteger(honeyid));
   
}

public Milk createMilk(ResultSet rs) { // do not use an OR/mapper here 
but do the dirty work on your own}

public Honey provideHoney(int id) {//read from database, again do the 
dirty work on your own }
}




 2010/2/15 Ilja Pavkovic ilja.pavko...@binaere-bauten.de:
  use any preferred OR mapper like hibernate, toplink, 
  
  now problem is not accessing object fields..
  
  problem is transform resultset to these objects..
  
  2010/2/12 James Carman jcar...@carmanconsulting.com:
   You could create a reference from Honey to Milk, since you have a
   milkid field there.  Then, you'd use a list of Honey objects and
   you'd display these properties:
   
   id
   milk.id
   name
   milk.name
   
   On Fri, Feb 12, 2010 at 3:58 AM, Ivan Dudko ivan.du...@gmail.com 
wrote:
   For example..
   class Honey {
   int id;
   int milkid;
   String name;
   // getters and setters
   }
   class Milk {
   int id;
   String name;
   // getters and setters
   }
   
   and my query:
   SELECT honey.id ID, honey.milkid MILKID, honey.name HONEYNAME,
   milk.name MILKNAME FROM honey, milk
   WHERE  honey.milkid=milk.id;
   
   And i want to display table with these fields.
   
   Which object i must use?
   
   2010/2/11 James Carman jcar...@carmanconsulting.com:
   Well, what sort of object do you want to display?  Are you going to
   just create an Object[] for each row in the table?  Or, are you
   creating a DTO of some sort?
   
   On Thu, Feb 11, 2010 at 10:50 AM, Ivan Dudko ivan.du...@gmail.com
  
  wrote:
   Thank you.
   I already do simple things with hibernate and spring ioc.
   Now i want to use plain old jdbc.
   I already get the datatable wich works with one pojo (table).
   Now i am in trouble.. how i can get table for two joined tables,
   for example?
   
   2010/2/11 James Carman jcar...@carmanconsulting.com:
   Yeah, but this doesn't give them an example of how to get the
   results out of a JDBC result set.  This is based on a static,
   in-memory list of Contact objects.  What I would recommend is to
   look at a Hibernate-based example and come up with the JDBC
   analog.  Here's an example from my Advanced Wicket talk I gave a
   while back:
   
   http://svn.carmanconsulting.com/public/wicket-advanced/trunk/src/m
   ain
   /java/com/carmanconsulting/wicket/advanced/web/story3/page/Home.j
   ava
   
   At the bottom, there's a data provider which talks to a
   repository to get its data.
   
   
   
   On Thu, Feb 11, 2010 at 10:11 AM, Giambalvo, Christian
   
   christian.giamba...@excelsisnet.com wrote:
   http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.
   htm l
   
   -Ursprüngliche Nachricht-
   Von: Ivan Dudko [mailto:ivan.du...@gmail.com]
   Gesendet: Donnerstag, 11. Februar 2010 15:47
   An: users@wicket.apache.org
   Betreff: Re: jdbc
   
   I already have method that return my data from db as arraylist.
   And i use this in iterator() method of dataprovider.
   But which object (i think model) i must return?
   
   2010/2/11 James Carman jcar...@carmanconsulting.com:
   You need to create a provider for your data.  Look at what the
   constructor takes and then implement the interface.
   
   On Thu, Feb 11, 2010 at 8:26 AM, Ivan Dudko
   ivan.du...@gmail.com
  
  wrote:
   Hello!
   
   I can't understand how to populate data from a resultset object
   into datatable. Anyone have an example?
   
   Thank you!
   
   ---
   --- --- 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

Re: Howto load StringResources from Database for Iternationalization?

2010-01-29 Thread Ilja Pavkovic
Hi,

 i don't know if this question was ever done, but i didn't find anything
 suitable for me.
 
 In a huge webapplication which is being in the first steps of
 implementation, we want to use a Database (table) to store there
 any String Resources by locale for translation.
 
 I have been jumping through the class-hierarchy for many hours but i
  haven't found the right point to plug-in a ResourceLoader
 from Database.
 
 There are some different Interface of them i could imagine This is the
 right place but I am not sure at all.
 
 Have i to Implement my own *IResourceSettings*? I hope not, cause the
 Implementation Settings looks very complicated to me.
 or is it enough to implement *IStringResourceLoader*? But then, where can i
 add my own loader to the Chain of processing?
in your Application implementation:

public void init() {
  
getResourceSettings().addStringResourceLoader(createMyIStringResourceLoader());
}

obviously you will have to implement createMyIstringResourceLoader :)

Best Regards,
Ilja Pavkovic

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

   +49 · 171 · 9342 465

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

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



ModalWindow as confirmation dialog for forms

2010-01-29 Thread Ilja Pavkovic
Hi,

has anyone an idea how to achieve the following:

A form has a modal window that shall confirm the changes.
- After validation but before writing the changes to the model the modalWindow 
shall be shown.
- If one closes the modal window (clicking on an AjaxButton) the form shall 
write the changes to the form.


Best Regards,
Ilja Pavkovic


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

   +49 · 171 · 9342 465

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

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



Re: SV: Override fragments in subclasses

2010-01-25 Thread Ilja Pavkovic

public abstract class MyPage extends WebPage {

public MyPage() {
add(createMyDiv(myDiv));
   }

public abstract Component createMyDiv(String markuId);
}

public MyConcretePage extends MyPage {


public createMyDiv(String markupId) {
return new Label(markupId);
}
}

Am Montag, 25. Januar 2010 11:24:55 schrieb Wilhelmsen Tor Iver:
  So in my parent html :
  body
  span wicket:id=myDiv/span
  div wicket:id=myNewPanel/div
  div wicket:id=myNewPanel2/div
  /body
 
  And add a label with id myDiv in related parent java. This part is
  common to all classes.
 
  But when I render the TestFormOne, that doesn't work because,
  apparently the label myDiv must be define in subclass.
 
 You should add a default component for it in the parent class then use
  replace() in subclasses as needed.
 
 - Tor Iver
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



Re: SV: Override fragments in subclasses

2010-01-25 Thread Ilja Pavkovic
Hi,

I think you should provide component classes that are responsible for sub 
elements


class TestFormPanel extends Panel {
public TestFormPanel(String markupId) {
super(markupId);
add(new Label(label,My very good label 1));
}
}

TestFormPanel.html:
body
div wicket:id=label[label]/div
/body

and use it in TestFormOne
public class TestFormOne extends TestForm {
@Override
protected Component createDivWithComponent(String divId) {
return new TestFormPanel(divId);
}   


But maybe I don't quite understand your problem.

Best Regards,
Ilja



 There was a problem when copy/paste html, sorry about that:
 
 TestForm.html (parent html):
 body
 
   div wicket:id=myNewPanel/div
   div wicket:id=myNewPanel2/div
  
 /body
 
 and TestFormOne.html(subclass html):
 body
 wicket:fragment wicket:id=myNewPanel
 
 /wicket:fragment
 
 wicket:fragment wicket:id=myNewPanel2
   div wicket:id=div1/div
 /wicket:fragment
 /body
 
 aurelie.boiteux wrote:
  That's what I did when the component has to be overriden in subclasses.
  But how does it work when the component is common to every concrete page?
  I would not want to redefine common component in every concrete page.
 
  Let's see my example, In my parent page :
 
  public abstract class TestForm extends WebPage {
 
  public TestForm() {
  add(new Label(myDiv, my div from test form)); = common to
  every concrete page
  add(createDivWithComponent(myNewPanel)); = has to be redefine
  by each concrete page
  add(createDivWithComponent2(myNewPanel2)); = has to be
  redefine by each concrete page
 
  }
 
  protected abstract WebMarkupContainer createDivWithComponent(String
  divId);
 
  protected abstract WebMarkupContainer createDivWithComponent2(String
  divId);
  }
 
  body
 
  div wicket:id=myNewPanel/div
  div wicket:id=myNewPanel2/div
  /body
 
  And, the concrete page :
  public class TestFormOne extends TestForm {
 
 
  public TestFormOne() {
 super();
  }
 
  @Override
  protected WebMarkupContainer createDivWithComponent(String divId) {
  WebMarkupContainer container = new WebMarkupContainer(divId);
  container.add(new Label(label,My very good label 1));
  return container;
  }
 
  @Override
  protected WebMarkupContainer createDivWithComponent2(String divId) {
  WebMarkupContainer container = new WebMarkupContainer(divId);
  WebMarkupContainer container2 = new WebMarkupContainer(div1);
  container2.add(new Label(label2,My very good label 2));
  container.add(container2);
  return container;
  }
 
  }
  body
  wicket:fragment wicket:id=myNewPanel
 
  /wicket:fragment
 
  wicket:fragment wicket:id=myNewPanel2
  div wicket:id=div1/div
  /wicket:fragment
  /body
 
  And this is the error message I get : WicketMessage: The component(s)
  below failed to render. A common problem is that you have added a
  component in code but forgot to reference it in the markup (thus the
  component will never be rendered).1. [Component id = myDiv]
 
  What did I miss?
 
  Thank you.
 
  Ilja Pavkovic-3 wrote:
  public abstract class MyPage extends WebPage {
 
 public MyPage() {
 add(createMyDiv(myDiv));
 }
 
 public abstract Component createMyDiv(String markuId);
  }
 
  public MyConcretePage extends MyPage {
 
 
 public createMyDiv(String markupId) {
 return new Label(markupId);
 }
  }
 
  Am Montag, 25. Januar 2010 11:24:55 schrieb Wilhelmsen Tor Iver:
   So in my parent html :
   body
  
   div wicket:id=myNewPanel/div
   div wicket:id=myNewPanel2/div
   /body
  
   And add a label with id myDiv in related parent java. This part is
   common to all classes.
  
   But when I render the TestFormOne, that doesn't work because,
   apparently the label myDiv must be define in subclass.
 
  You should add a default component for it in the parent class then use
   replace() in subclasses as needed.
 
  - Tor Iver
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



Re: Page refresh increases size of pagemap disk storage

2010-01-23 Thread Ilja Pavkovic
Hi,

I think at least you increase the version number of the page with every 
refresh (as your page seems to have state). Therefore the PageMap keeps the 
old revisions of your page.

Best Regards,
Ilja Pavkovic


Am Samstag, 23. Januar 2010 08:42:49 schrieb Andrew Lombardi:
 I've got a really simple page, which has components of Label, ListView,
  etc.
 
 The only component (and correctly so) that stores anything in the Pagemap
  that gets saved to disk is a Link.  But subsequent refreshes of that same
  page, without doing anything in the UI, keeps increasing the storage for
  that pagemap store?  Is this the intended behavior?  The link is really
  fairly simple, it's only adding 12K or so on every refresh ... but if
  nothing has changed, I don't know why it needs to increase at all
 
 Any thoughts?
 
 Thanks!
 
 
 To our success!
 
 Mystic Coders, LLC | Code Magic | www.mysticcoders.com
 
 ANDREW LOMBARDI | and...@mysticcoders.com
 2321 E 4th St. Ste C-128, Santa Ana CA 92705
 ofc: 714-816-4488
 fax: 714-782-6024
 cell: 714-697-8046
 linked-in: http://www.linkedin.com/in/andrewlombardi
 twitter: http://www.twitter.com/kinabalu
 
 Eco-Tip: Printing e-mails is usually a waste.
 
 
 This message is for the named person's use only. You must not, directly or
  indirectly, use, disclose, distribute, print, or copy any part of this
  message if you are not the intended recipient.
  
 

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

   +49 · 171 · 9342 465

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

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



Re: Override fragments in subclasses

2010-01-22 Thread Ilja Pavkovic
Hi,

 And the related html:
 body
   wicket:extend
   wicket:fragment wicket:id=myNewPanel 
   span wicket:id=label/
   /wicket:fragment
   /wicket:extend
remove wicket:extend and /wicket:extend. wicket:id=myNewPanel is not 
part of the wicket:child declaration of the parent class.

Best Regards,
Ilja Pavkovic

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

   +49 · 171 · 9342 465

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

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



Re: Lazy loading

2010-01-11 Thread Ilja Pavkovic
Hi,

use a veil. You could use this one:

http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-lines-
of-code/

or (as I personally think it bloats the ajax links)

get familiar with some javascript, add

div id=veil/ to your page with a style like

#veil {
position: absolute;
z-index:1;
top: 0px;
left: 0px;
height:100%;
width:100%;
background: grey;
display: none;
}

and add some javascript to your page like 

window.wicketGlobalPreCallHandler = function() {
window.getElementById(veil).style.display=block;
};

window.wicketGlobalPostCallHandler = function() {
window.getElementById(veil).style.display=none;
};

javascript may not work as I personally use jquery here to get some more fance 
fadeIn fadeOut and I just wrote it down here :)


Best Regards,
Ilja Pavkovic


Am Montag, 11. Januar 2010 14:43:42 schrieb Giovanni:
 In my current project, we have many situations in which we have to load a
  page, which is very slow. The slowness is not because of Wicket, but
  because there are heavy queries on the DB.
 
 In some of these situations, we used the AjaxLazyLoadPanel, when we have to
  load a slow panel.
 
 In some other situations, when we are not loading a panel, but a page, how
  can we do to prevent the user from crazy clicking on the application,
  because he is impatient with the slow loading?
 
 More generally, is there a standard way to disable all the links and
  click-able components of the application, while a new component is
  loading?
 
 best regards,
 giovanni
 

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

   +49 · 171 · 9342 465

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

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



Re: Lazy loading

2010-01-11 Thread Ilja Pavkovic
Dear Douglas,

 Do you mind sharing your JQuery?
no fancy stuff but as we already use jquery ...

You can play around with the fadeIn-fadeOut times, from a visual point of view 
it should not be too short or you will have flickering.

function showModalOverlay() {
//Set the css and fade in our overlay
$(#veil).css(opacity, 0.8).fadeIn(100);

}

function hideModalOverlay() {
// stop running animations and fadeOut
 $(#veil).stop().fadeOut(100);
}

window.wicketGlobalPreCallHandler = function() {
showModalOverlay();
};

window.wicketGlobalPostCallHandler = function() {
hideModalOverlay();
};

To show an  message just put something into the veil div:

div id=veil
divcenterwait for ajax call.../center/div 

or put some images inside, you can create some nice ajax load indicators at

http://www.ajaxload.info/

Best Regards,
Ilja Pavkovic



Am Montag, 11. Januar 2010 17:21:27 schrieb Douglas Ferguson:
 
 On Jan 11, 2010, at 8:00 AM, Ilja Pavkovic wrote:
  Hi,
 
  use a veil. You could use this one:
 
  http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-li
 nes- of-code/
 
  or (as I personally think it bloats the ajax links)
 
  get familiar with some javascript, add
 
  div id=veil/ to your page with a style like
 
  #veil {
 position: absolute;
 z-index:1;
 top: 0px;
 left: 0px;
 height:100%;
 width:100%;
 background: grey;
 display: none;
  }
 
  and add some javascript to your page like
 
  window.wicketGlobalPreCallHandler = function() {
  window.getElementById(veil).style.display=block;
  };
 
  window.wicketGlobalPostCallHandler = function() {
  window.getElementById(veil).style.display=none;
  };
 
  javascript may not work as I personally use jquery here to get some more
  fance fadeIn fadeOut and I just wrote it down here :)
 
 
  Best Regards,
  Ilja Pavkovic
 
  Am Montag, 11. Januar 2010 14:43:42 schrieb Giovanni:
  In my current project, we have many situations in which we have to load
  a page, which is very slow. The slowness is not because of Wicket, but
  because there are heavy queries on the DB.
 
  In some of these situations, we used the AjaxLazyLoadPanel, when we have
  to load a slow panel.
 
  In some other situations, when we are not loading a panel, but a page,
  how can we do to prevent the user from crazy clicking on the
  application, because he is impatient with the slow loading?
 
  More generally, is there a standard way to disable all the links and
  click-able components of the application, while a new component is
  loading?
 
  best regards,
  giovanni
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



Re: Lazy loading

2010-01-11 Thread Ilja Pavkovic
Hi,

 Is this technique working also with IE6?
 
 I tried the suggestions given previously, but they are not working on IE6.
  They are working on Firefox.
 
 Unfortunately, the standard browser of my client (big bank) is still IE6.
  :(
 
 Do you know of some ways to make the veil work on IE6?
Perhaps one could use 

http://www.lmgtfy.com/?q=ie6+overlay+div

and read - for example - this post: 

http://interactivevolcano.com/grayed-out-overlays-with-jquery-and-css

The layout problem ist not a jquery nor wicket problem but IE6 specific. There 
are many people around offering solutions and/or ideas addressing this problem.

I must admit that I am in an IE6-ignore mode. Therefore further investigations 
must be done on your own.

Best Regards,
Ilja

 
 best regards
 giovanni
 
 
 
 
 
 From: Ilja Pavkovic ilja.pavko...@binaere-bauten.de
 To: users@wicket.apache.org
 Cc: Douglas Ferguson doug...@douglasferguson.us
 Sent: Mon, January 11, 2010 5:33:01 PM
 Subject: Re: Lazy loading
 
 Dear Douglas,
 
  Do you mind sharing your JQuery?
 
 no fancy stuff but as we already use jquery ...
 
 You can play around with the fadeIn-fadeOut times, from a visual point of
  view it should not be too short or you will have flickering.
 
 function showModalOverlay() {
 //Set the css and fade in our overlay
 $(#veil).css(opacity, 0.8).fadeIn(100);
 
 }
 
 function hideModalOverlay() {
 // stop running animations and fadeOut
  $(#veil).stop().fadeOut(100);
 }
 
 window.wicketGlobalPreCallHandler = function() {
 showModalOverlay();
 };
 
 window.wicketGlobalPostCallHandler = function() {
 hideModalOverlay();
 };
 
 To show an  message just put something into the veil div:
 
 div id=veil
 divcenterwait for ajax call.../center/div
 
 or put some images inside, you can create some nice ajax load indicators at
 
 http://www.ajaxload.info/
 
 Best Regards,
 Ilja Pavkovic
 
 Am Montag, 11. Januar 2010 17:21:27 schrieb Douglas Ferguson:
  On Jan 11, 2010, at 8:00 AM, Ilja Pavkovic wrote:
   Hi,
  
   use a veil. You could use this one:
  
   http://wicketinaction.com/2008/12/preventing-double-ajax-requests-in-3-
  li nes- of-code/
  
   or (as I personally think it bloats the ajax links)
  
   get familiar with some javascript, add
  
   div id=veil/ to your page with a style like
  
   #veil {
  position: absolute;
  z-index:1;
  top: 0px;
  left: 0px;
  height:100%;
  width:100%;
  background: grey;
  display: none;
   }
  
   and add some javascript to your page like
  
   window.wicketGlobalPreCallHandler = function() {
   window.getElementById(veil).style.display=block;
   };
  
   window.wicketGlobalPostCallHandler = function() {
   window.getElementById(veil).style.display=none;
   };
  
   javascript may not work as I personally use jquery here to get some
   more fance fadeIn fadeOut and I just wrote it down here :)
  
  
   Best Regards,
   Ilja Pavkovic
  
   Am Montag, 11. Januar 2010 14:43:42 schrieb Giovanni:
   In my current project, we have many situations in which we have to
   load a page, which is very slow. The slowness is not because of
   Wicket, but because there are heavy queries on the DB.
  
   In some of these situations, we used the AjaxLazyLoadPanel, when we
   have to load a slow panel.
  
   In some other situations, when we are not loading a panel, but a page,
   how can we do to prevent the user from crazy clicking on the
   application, because he is impatient with the slow loading?
  
   More generally, is there a standard way to disable all the links and
   click-able components of the application, while a new component is
   loading?
  
   best regards,
   giovanni
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



Re: component xxx:yyy:zzz not found on page

2010-01-10 Thread Ilja Pavkovic
http://www.lmgtfy.com/?q=wicket+veil

Best Regards,
Ilja Pavkovic

Am Samstag, 9. Januar 2010 22:32:06 schrieb Douglas Ferguson:
 Anybody have any thoughts on how to systematically deal with this problem
  rather than updating every link to disable after onclick..
 
 D/
 
 On Jan 8, 2010, at 12:46 PM, nino martinez wael wrote:
  I your site is slow and the user manages to click the delete twice i
  could happen (I can see you write that too)..
 
  Put a veil over the button when it's clicked so the user cant click it
  twice..
 
  2010/1/8 Douglas Ferguson doug...@douglasferguson.us:
  Our application periodically gets these errors, where wicket say the
  component could not be found.
 
  Take this example.
 
  1) There is a delete link on the page.
  2) The user clicks the delete button
  3) They get the delete button component not found error.
 
  The intriguing part is that the item is actually deleted.
 
  This makes me think it could be a double click error.
  i.e. the item is delete and the js has another click call queued up but
  the page changes before it comes through.
 
  Is this possible? If so how do I prevent it?
 
 
 
  -
  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
 

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

   +49 · 171 · 9342 465

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

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



Re: Autosize modal window

2010-01-07 Thread Ilja Pavkovic
Hi,

I forgot the following line: modalWindow.setUseInitialHeight(false);

Best Regards,
Ilja Pavkovic

Am Donnerstag, 7. Januar 2010 12:40:25 schrieb Kogel, Jonck-van-der:
 Hi Ilja,
 Ok, that's good, I'm not using PageCreator. But how do I then make the
  ModalWindow autosize? Perhaps I'm missing something in the JavaDocs but I
  can't find it anywhere.
 
 Thanks, Jonck
 
 -Original Message-
 From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de]
 Sent: woensdag 6 januari 2010 17:23
 To: users@wicket.apache.org
 Subject: Re: Autosize modal window
 
 Hi,
 
 according to the inline documentation of ModalWindow you can only autosize
  if you add components and don't use  ModalWindow.PageCreator
 
 something like
 
 ModalWindow modalWindow = new ModalWindow(); modalWindow.add(new
  MyPanel(modalWindow.getComponentId());
 
 
 
 Best Regards,
   Ilja Pavkovic
 
 Am Mittwoch, 6. Januar 2010 17:12:05 schrieb Kogel, Jonck-van-der:
  Hi,
  Is it possible to have a modal window auto-size depending on its
  contents? I've been fiddling with header contributions and such but
  can't get it to work.
 
  Thanks!
 
  Jonck
 
 --
 binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin
 
+49 · 171 · 9342 465
 
 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
 Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



Re: Autosize modal window

2010-01-07 Thread Ilja Pavkovic
Hi,

 Ok, great, the height is indeed autosizing nicely now. Is there any way to
  have the width autosize as well?
no, as you need either a height or a width to calculate on out of the other  
automatically with respect to the window content (content dimension and aspect 
ratio would be sufficient, but we don't have that :))

You could get the width from ClientProperties after enabling 
gatherExtendedBrowserInfo in the Application settings

ApplicationClass.init() {
getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
}

But you will have one flickering extra page that is used to gather this 
information.

Perhaps when you could use something like 

int width = ((WebClientInfo) 
getRequestCycle().getClientInfo()).getProperties().getBrowserWidth();

width = width/3;


Easier would be to use a reasonable width.

Best Regards,
Ilja


 Thanks, Jonck
 
 
 -Original Message-
 From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de]
 Sent: donderdag 7 januari 2010 13:51
 To: users@wicket.apache.org
 Cc: Kogel, Jonck-van-der
 Subject: Re: Autosize modal window
 
 Hi,
 
 I forgot the following line: modalWindow.setUseInitialHeight(false);
 
 Best Regards,
   Ilja Pavkovic
 
 Am Donnerstag, 7. Januar 2010 12:40:25 schrieb Kogel, Jonck-van-der:
  Hi Ilja,
  Ok, that's good, I'm not using PageCreator. But how do I then make the
  ModalWindow autosize? Perhaps I'm missing something in the JavaDocs
  but I  can't find it anywhere.
 
  Thanks, Jonck
 
  -Original Message-
  From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de]
  Sent: woensdag 6 januari 2010 17:23
  To: users@wicket.apache.org
  Subject: Re: Autosize modal window
 
  Hi,
 
  according to the inline documentation of ModalWindow you can only
  autosize  if you add components and don't use  ModalWindow.PageCreator
 
  something like
 
  ModalWindow modalWindow = new ModalWindow(); modalWindow.add(new
  MyPanel(modalWindow.getComponentId());
 
  
 
  Best Regards,
  Ilja Pavkovic
 
  Am Mittwoch, 6. Januar 2010 17:12:05 schrieb Kogel, Jonck-van-der:
   Hi,
   Is it possible to have a modal window auto-size depending on its
   contents? I've been fiddling with header contributions and such but
   can't get it to work.
  
   Thanks!
  
   Jonck
 
  --
  binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin
 
 +49 · 171 · 9342 465
 
  Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
  Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost
  Becker
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 --
 binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin
 
+49 · 171 · 9342 465
 
 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
 Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?

2010-01-07 Thread Ilja Pavkovic
Hi,

use a different applicationContext.xml that is used for integration testing.

(use maven profiles for using different resource path pointing to different 
applicationContext.xml files).

You cannot use WebApplication.getConfigurationType() as you need a preloaded 
spring configuration before your WebApplication is instantiated.

Best Regards,
Ilja Pavkovic


Am Donnerstag, 7. Januar 2010 23:05:23 schrieb Liam Clarke-Hutchinson:
 Hi all,
 
 This is probably more of a Spring question than a Wicket question, but I'm
 asking here in the hopes that someone else has done this before. Basically,
 we have a page that uses the @SpringBean annotation to inject a credit card
 validation service. At the moment, when we're developing, it's injecting
  the actual service, that then goes off to our card processor and validates
  the card etc. For integration testing etc. I want to avoid this, so I've
  created a simple implementation of the validation service that always
  returns true. Question I have, is how can I provide this bean instead of
  the real bean, based on the value of
  WebApplication.getConfigurationType()?
 
 The obvious solution for me would be to do it in the initialization of our
 WicketApplication - we already have a if we're in development mode
  section where we output component paths and turn on request logging and
  session size recording etc. is there a way I can programmatically provide
  my bean at this point? Or am I going about this entirely the wrong way?
 
 Many thanks for any advice offered,
 
 Regards,
 
 Liam Clarke
 

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

   +49 · 171 · 9342 465

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

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



Re: Autosize modal window

2010-01-06 Thread Ilja Pavkovic
Hi,

according to the inline documentation of ModalWindow you can only autosize if 
you add components and don't use  ModalWindow.PageCreator

something like

ModalWindow modalWindow = new ModalWindow();
modalWindow.add(new MyPanel(modalWindow.getComponentId());



Best Regards,
Ilja Pavkovic

Am Mittwoch, 6. Januar 2010 17:12:05 schrieb Kogel, Jonck-van-der:
 Hi,
 Is it possible to have a modal window auto-size depending on its
 contents? I've been fiddling with header contributions and such but
 can't get it to work.
 
 Thanks!
 
 Jonck
 

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

   +49 · 171 · 9342 465

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

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



Re: error page

2010-01-04 Thread Ilja Pavkovic
Hi,

  what is the difference between
 
  @Override
  public IApplicationSettings getApplicationSettings() {
  IApplicationSettings settings= super.getApplicationSettings();
  settings.setInternalErrorPage(internalErrorPage)
  return settings;
  }
 
  settings.setInternalErrorPage(internalErrorPage) and
 
 You have no acces to the exception thrown.
 
 Perhaps this could be a RFE ?
 a) Something like: ErrorWebPage extends WebPage with ErrorWebPage(Exception
  e) as constructor?
I created a RFE, see https://issues.apache.org/jira/browse/WICKET-2659

Best Regards,
Ilja Pavkovic

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

   +49 · 171 · 9342 465

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

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



Re: error page

2009-12-31 Thread Ilja Pavkovic
Hi,

 what is the difference between
 
   @Override
   public IApplicationSettings getApplicationSettings() {
   IApplicationSettings settings= super.getApplicationSettings();
   settings.setInternalErrorPage(internalErrorPage)
   return settings;
   }
 
 settings.setInternalErrorPage(internalErrorPage) and
You have no acces to the exception thrown.

Perhaps this could be a RFE ? 
a) Something like: ErrorWebPage extends WebPage with ErrorWebPage(Exception e) 
as constructor? 

b) if the annotated error Page has a constructor 
InternalErrorPage(Exception e) use this one to create the class?

 reqauestcycle.onruntimeexception(exception e) { return new myerrorpage(e);
  }
You acces the exception via the constructor.

Best Regards,
Ilja Pavkovic

 
 when is   InternalErrorPageused and when is   myerrorpage used ?
 and also we have   IExceptionSettings ,  when is this used ?
 
 igor.vaynberg wrote:
  reqauestcycle.onruntimeexception(exception e) { return new
  myerrorpage(e); }
 
  -igor
 
  On Wed, Dec 30, 2009 at 7:22 AM, tubin gen fachh...@gmail.com wrote:
  We created our custom error page so any time error happens wicket
  redirects
  to this error page , I want also want to display the exception stack
  trace
  in this page , please tell me how  to do this ?
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



Re: Too Many Open Files Wicket 1.4.1

2009-12-30 Thread Ilja Pavkovic

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

Am Mittwoch, 30. Dezember 2009 04:29:00 schrieb Doug Leeper:
 Was a JIRA ticket ever created for this?  I couldn't find any thing related
 to it.
 
 Is any one else seeing this issue?  I just ran across it in our dev env
 after redeploying my web app.
 
 Not sure if this wicket, jdk, or weblogic.
 
 Weblogic 10
 JRockit (BEA JRockit(R) (build
 R27.6.5-32_o-121899-1.6.0_14-20091001-2113-linux-ia32, compiled mode))
 Linux
 Wicket 1.4.4
 

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

   +49 · 171 · 9342 465

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

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



Re: GAE big table PageStore

2009-12-24 Thread Ilja Pavkovic
Hi,

http://lmgtfy.com/?q=google+app+engine+wicket

first link :)

Best Regards,
Ilja Pavkovic


Am Donnerstag, 24. Dezember 2009 10:56:51 schrieb sudhir543-...@yahoo.com:
 I need to write app specifically for GAE, I know Disk based page store
  wouldnt work. Is there any existing solution for this? I searched mailing
  lists and did googling, seems that it has been discussed earlier too, but
  I don't find any implementation.
 
 If I can get a prebuilt solution, I want to avoid my self from writing.
 
 SN
 
 
 
 
 
 Sudhir NimavatSenior software engineer.
 Quick start global PVT LTD.
 Baroda - 390007
 Gujarat, India
 
 Personally I'm always ready to learn, although I do not always like being
  taught
 
 
   The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
  http://in.yahoo.com/
 

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

   +49 · 171 · 9342 465

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

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



Re: File Upload Issues

2009-12-19 Thread Ilja Pavkovic
Hi,

did you check the output of the wicket debug window? Perhaps any error line 
shows up?

Best Regards,
Ilja Pavkovic

Am Freitag, 18. Dezember 2009 21:13:11 schrieb Corbin, James:
 Doug,
 
 I retested on IE6, IE7, FF3 and IE6 is the only browser that the issue
 shows up in.  IE7 and FF3.x seem to work just fine.
 
 In IE6 I have an Add New button that adds a row to a model in a
 listview and then via ajax updates the listviews container which in this
 case is a WebMarkupContainer (yes, setOutputMarkupId(true), is specified
 for all updatable components in the hierarchy - and we remove all
 elements prior to issuing the target.addComponent(...)).
 
 If the file upload component is present on the page, clicking the Add
 New button's onUpdate() gets called just fine, but the expected refresh
 behavior from the target.addComponent(...) has no effect.
 
 If I remove the upload component from the page, then the ajax begins
 functioning normally.  I believe we saw this issue in 1.4.1 as well and
 had to patch our local version of the library.  I will get more details
 on the patch we made, but were hoping this was fixed in 1.4.4.  I
 believe we put in a JIRA issue around this problem.  I'll try and get
 those details as well.
 
 J.D.
 
 -Original Message-
 From: Corbin, James [mailto:jcor...@iqnavigator.com]
 Sent: Friday, December 18, 2009 12:47 PM
 To: users@wicket.apache.org
 Subject: RE: File Upload Issues
 
 Ajax has stopped working.  If I remove the file upload component, the
 ajax begins working as expected.
 
 Is there a workaround or a pending fix?
 
 Thanks,
 J.D.
 
 -Original Message-
 From: Douglas Ferguson [mailto:doug...@douglasferguson.us]
 Sent: Friday, December 18, 2009 12:03 PM
 To: users@wicket.apache.org
 Subject: Re: File Upload Issues
 
 There is a bug in 1.4.4. related to resource loading.
 
 Are you sure AJAX has stopped or is it just taking A REALLY LONG TIME?
 
 This is the reason they are trying to get 1.4.5 out quickly.
 
 D/
 
 On Dec 18, 2009, at 10:15 AM, Corbin, James wrote:
  Hello,
 
 
 
  I'm having issues in IE6 relating to the the File Upload Control after
  upgrading to Wicket 1.4.4.
 
 
 
  If I attempt to put a file upload component onto a form that contains
  other components that do ajax, everything stops working in regards to
  ajax.
 
 
 
  Now I understand that the file upload component does NOT support ajax.
  Does it follow that putting a file upload component on a form that
 
 does
 
  ajax is not supported?
 
 
 
  J.D.
 
 -
 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
 

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

   +49 · 171 · 9342 465

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

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



add javascript code to form onsubmit=

2009-12-14 Thread Ilja Pavkovic
Hi,

I am inside a Form and want to add some javascript code dynamically to the 
onsubmit method of the outer form. Can anyone point me to a wicket compatible 
solution for this?

Best Regards,
Ilja Pavkovic

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

   +49 · 171 · 9342 465

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

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



Re: add javascript code to form onsubmit=

2009-12-14 Thread Ilja Pavkovic
Hi,

 I am inside a Form and want to add some javascript code dynamically to the
 onsubmit method of the outer form. Can anyone point me to a wicket
  compatible solution for this?
one additional requirement: this must work for nested forms also - with the 
result that the java script code is bound to the most outer form.


Best Regards,
Ilja Pavkovic


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

   +49 · 171 · 9342 465

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

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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-11 Thread Ilja Pavkovic | Apliki
Hi,

the same problem occurs with an UploadProgressBar in a nested form. The nested 
form is a div having an onsubmit-tag holding the ajax call to the progress 
bar.

Best Regards,
Ilja

Am Freitag, 4. Dezember 2009 08:38:18 schrieb Igor Vaynberg:
 sounds like we may have to search up the component tree until we find a
  form...
 
 can you create a quickstart and attach it to the jira issue?
 
 -igor
 
 On Thu, Dec 3, 2009 at 10:43 PM, Doug Leeper douglee...@yahoo.com wrote:
  Found the code where the iframe is being used
  (resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js)
 
  When looking at the generated html for the modal window in a nested form
  situation, it shows the submit button actually being submitted by
  wicketSubmitFormById(formId,...)  The formId is the inner form but the
  Form class actually generates a div element instead of a form (not
  the root form) and removes the enctype.  Since the enctype has been
  removed, the Javascript cannot create the iframe as it looking to see if
  the form has the enctype=multipart/form-data...hence the request is
  being sent via Ajax still and not the iframe.
 
  So my thought is that that in the Form.onComponentTag() it should not
  remove the enctype if isMultiPart() is true but add a variable enctype to
  the div...but not sure if this is allowed.
 
  Can someone verify this as this is not my area of expertise (JavaScript
  or Ajax internals)?
 
  Thanks
  - Doug
  --
  View this message in context:
  http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29
 --tp26577255p26635788.html Sent from the Wicket - User mailing list
  archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

-- 
Ilja Pavkovic
Leitung Entwicklung und Projektsteuerung, Gesellschafter

Bitte beachten Sie unsere neuen Kontaktdaten!

Apliki
Psychologische IT-Beratung
Tempelhofer Ufer 1a
10961 Berlin

Fon +49 · 30 · 99277999 · 0
Mob +49 · 171 · 9342465
Mail ilja.pavko...@apliki.de
Netz www.apliki.de
__
Apliki GmbH  Co. KG, Berlin, AG Charlottenburg, HRA 39114

Persönlich haftend: 
Apliki Beteiligungs GmbH, Berlin, AG Charlottenburg, HRB 104921
vertreten durch: Steffen Eßers, Björn Balazs, Ilja Pavkovic

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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-11 Thread Ilja Pavkovic
Hi,

UploadProgressBar in a nested form also does not work (onsubmit added to a div 
representing the  inner form, but should be added to the onsubmit button of 
the outer form element).

a *very hacky* solution is something like 

boolean added = false;
protected void onBeforeRender() {
if(!added) {
added = true;
add(new UploadProgressBar(progress, this.getRootForm()));
}
super.onBeforeRender();
}

May or may not work, in my prelimary tests this solution works. 

might be better to add the onsubmit code to the most outer form, anyone 
skilled with javascript may help me here :)

Best Regards,
Ilja Pavkovic

Am Freitag, 4. Dezember 2009 08:38:18 schrieb Igor Vaynberg:
 sounds like we may have to search up the component tree until we find a
  form...
 
 can you create a quickstart and attach it to the jira issue?
 
 -igor
 
 On Thu, Dec 3, 2009 at 10:43 PM, Doug Leeper douglee...@yahoo.com wrote:
  Found the code where the iframe is being used
  (resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js)
 
  When looking at the generated html for the modal window in a nested form
  situation, it shows the submit button actually being submitted by
  wicketSubmitFormById(formId,...)  The formId is the inner form but the
  Form class actually generates a div element instead of a form (not
  the root form) and removes the enctype.  Since the enctype has been
  removed, the Javascript cannot create the iframe as it looking to see if
  the form has the enctype=multipart/form-data...hence the request is
  being sent via Ajax still and not the iframe.
 
  So my thought is that that in the Form.onComponentTag() it should not
  remove the enctype if isMultiPart() is true but add a variable enctype to
  the div...but not sure if this is allowed.
 
  Can someone verify this as this is not my area of expertise (JavaScript
  or Ajax internals)?
 
  Thanks
  - Doug
  --
  View this message in context:
  http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29
 --tp26577255p26635788.html Sent from the Wicket - User mailing list
  archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



Re: JNDI and mvn test

2009-12-08 Thread Ilja Pavkovic
Hi,

 I'm executing the standard Wicket maven archetype's test target and it is
 having trouble finding my JNDI datasource.
 
 *mvn jetty:run* works just fine but when I execute the *mvn test* target
 from within m2eclipse, I get a huge stracktrace with the following excerpt:
 
 Caused by: javax.naming.NameNotFoundException; remaining name
 'jdbc/ds'
 
 My pom references a jetty-env.xml file which includes the definition for
 this datasource but that entry is in the Jetty plugin section and I don't
 think it is is getting sourced when exec'ing the *mvn test *target.
How should the maven lifecycle test know about jetty specific configuration 
files read by the jetty plugin? You could use simple-jndi for your purposes. I 
could provide you an example if you want to give it a try.

Best Regards,
Ilja Pavkovic

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

   +49 · 171 · 9342 465

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

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



Re: file descriptor leak

2009-12-03 Thread Ilja Pavkovic
Hi,

I wonder if the complete lastModified evaluation in the constructor is 
necessary at all. The only place were lastModified is used is in the function 
lastModified() . This one *always* recalculates lastModified. 

And lastModified() calls urlConnection.getInputstream().close();


Best Regards,
Ilja Pavkovic

Am Donnerstag, 3. Dezember 2009 11:40:04 schrieb Johan Compagner:
 ahh
 i did knew that there was already code for that in place
 but thats only in the lastMofified() method... of that UrlResourceStream
 not in the constructor..
 
 On Thu, Dec 3, 2009 at 10:56, Maarten Bosteels 
mbosteels@gmail.comwrote:
  Have you seen this thread:
  http://www.mail-archive.com/users@wicket.apache.org/msg43879.html
 
  Maarten
 
  On Thu, Dec 3, 2009 at 9:46 AM, Johan Compagner jcompag...@gmail.com
 
  wrote:
  
   We try to do our best, but the problem is that this is a leak internal
   to java itself (classloader and urlconnection)
  
   http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
  
   play with antiJarLocking and antiResouceLocking attributes.
  
   johan
  
  
   On Thu, Dec 3, 2009 at 09:41, Pascal Grange 
  
   pascal1.gra...@orange-ftgroup.com wrote:
Hello,
   
I observe file descriptor leaks when running my wicket application.
By
  
   leak
  
I mean that the java process tries to open more than 1024 file
  
   descriptors.
  
When I lsof the process, here is what I see :
   
lsof -p 24689 | wc -l - 1095
lsof -p 24689 | grep wicket-1.3.4.jar | wc -l - 522
lsof -p 24689 | grep  wicket-datetime-1.3.4.jar | wc -l - 401
lsof -p 24689 | grep  wicket-extensions-1.3.4.jar | wc -l - 6
   
I am new to wicket and I need help to fix this. Searching for file
descriptor leaks in wicket on google I found some old mailing-list
post
  
   but
  
that doesn't help me a lot so I post here :) I red about issues with
 
  jar
 
   url
  
but the post are so old that I understand those are fixed bug ?
   
No need to precise what versions of wicket stuffs I use, your can see
  
   that
  
above. For java, it's version 1.5.0_14 and Tomcat version is 5.5.25.
   
Thanks for your help,
Pascal.
   
   

Ce message et toutes les pieces jointes (ci-apres le message) sont
confidentiels et etablis a l'intention exclusive de ses
destinataires. Toute utilisation ou diffusion non autorisee est
interdite.
Tout message electronique est susceptible d'alteration. Multimedia
  
   Business
  
Services decline toute responsabilite au titre de ce message s'il a
ete altere, deforme ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire
immediatement et d'avertir l'expediteur.
*
This message and any attachments (the message) are confidential and
intended solely for the addressees. Any unauthorised use or
 
  dissemination
 
   is
  
prohibited.
Messages are susceptible to alteration. Multimedia Business Services
  
   shall
  
not be liable for the message if altered, changed or
falsified.
If you are not the intended addressee of this message, please cancel
it immediately and inform the sender.

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

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

   +49 · 171 · 9342 465

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

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



Re: InvalidUrlException considered evil?

2009-12-02 Thread Ilja Pavkovic
Am Mittwoch, 2. Dezember 2009 12:18:55 schrieb Marat Radchenko:
 There some places in Wicket sources where it throws
 InvalidUrlException that causes exception logging and
 InternalErrorPage is shown.
 
 However, I don't agree that badly constructed URL is and _internal_
 error. It is external error (for example, user was playing with urls,
 modifying them by hand).
 
 So, my proposal: stop treating invalid urls and internal errors, don't
 log traces for them, don't show InternalErrorPage. Instead, either
 redirect user to home page, or show him 404, or show him 400 (bad
 request), or whatever else.
 
 The main point: do _not_ log errors just because user passed us an url
 that we couldn't resolve to a page/component.
Hi, I have a slightly different proposal:
- log errors for invalid urls in development mode only
- log warnings for invalid urls in deployment mode

Best Regards,
Ilja

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

   +49 · 171 · 9342 465

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

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



Re: PageExpiredException: Cannot find the rendered page in session

2009-11-20 Thread Ilja Pavkovic
Hi,

  Ok I just want to clarify that if we get:
 
 [pagemap=null,componentPath=20,versionNumber=0]
 
 pagemap null thats not a problem?
pagemap with name null indicates the default pagemap. Everything is fine :)

Best Regards,
Ilja Pavkovic

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

   +49 · 171 · 9342 465

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

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



Re: multi file upload question

2009-11-18 Thread Ilja Pavkovic
Hi,

 couldnt it be done with some clever javascript? creating a new input
 type=file each time one is selected?
well, there is a reason why google did NOT use javascript to implement it. In 
fact, the upload browser widget does not support multi file selection. Some 
http extensions exist but they are not unified nor available for all browsers.

Best Regards,
Ilja Pavkovic

 
 On Mon, Nov 16, 2009 at 3:51 PM, Pieter Degraeuwe
 
 pieter.degrae...@systemworks.be wrote:
  The multiple files upload is achieved by a flash object. It works both in
  firefox as chrome (but, indeed, sometimes it is in gmail not available).
  I didn't need such a feature yet, however I was curious how they (google)
  did it :-)
 
  To prove it is flash, just right click on the 'Attach a file', and you
  get the Flash context menu :-)
 
  Pieter
 
  On Mon, Nov 16, 2009 at 6:05 PM, Igor Vaynberg 
igor.vaynb...@gmail.comwrote:
  hrm, i know chrome supports it, but not firefox in gmail. you will
  have to look at how chrome does it, im sure building support for that
  should be pretty easy.
 
  -igor
 
  On Mon, Nov 16, 2009 at 8:51 AM, Troy Cauble troycau...@gmail.com 
wrote:
   I'm familiar with this multi file upload example:
   http://www.wicket-library.com/wicket-examples/upload/multi
   where a system file chooser is used multiple times to
   select single files to build the upload list.
  
   I see other web apps (gmail for example) where the user
   can select multiple files with one system chooser dialog.
   Is there a way to do this with Wicket?
  
   Thanks,
   troy
  
   -
   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
 
  --
  Pieter Degraeuwe
  Systemworks bvba
  Belgiëlaan 61
  9070 Destelbergen
  GSM: +32 (0)485/68.60.85
  Email: pieter.degrae...@systemworks.be
  visit us at http://www.systemworks.be
 

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

   +49 · 171 · 9342 465

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

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



Re: wicketstuff.org down?

2009-11-08 Thread Ilja Pavkovic
Dear Martijn,

 THE server had been moves to another ip. I havent had time to update dns
perhaps you can tell us the ip so I am able to use the maven repository while 
the dns update is not yet synchronized with the rest of the dns world?

Best regards,
Ilja Pavkovic

 
 On Saturday, November 7, 2009, Janos Cserep cser...@metaprime.hu wrote:
  Yes.
 
  2009/11/7 Ilja Pavkovic ilja.pavko...@binaere-bauten.de:
  Hi,
 
  I cannot reach wicketstuff.org anymore. Anyone else experiencing this
  problem?
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



Re: wicketstuff.org down?

2009-11-08 Thread Ilja Pavkovic
Hi,

 193.46.80.204
thanks. For maven you can create a file ~/.m2/settings.xml with the following 
content: 

settings
  mirrors
mirror
  idWicketStuff/id
  namewicketstuff dns problem/name
  urlhttp://193.46.80.204/maven/repository/url
  mirrorOfWicketStuff/mirrorOf
/mirror
  /mirrors
/settings

Best Regards,
Ilja Pavkovic

 
 On Sun, Nov 8, 2009 at 10:46, Ilja Pavkovic
  ilja.pavko...@binaere-bauten.de
 
  wrote:
 
  Dear Martijn,
 
   THE server had been moves to another ip. I havent had time to update
   dns
 
  perhaps you can tell us the ip so I am able to use the maven repository
  while
  the dns update is not yet synchronized with the rest of the dns world?
 
  Best regards,
  Ilja Pavkovic
 
   On Saturday, November 7, 2009, Janos Cserep cser...@metaprime.hu
 
  wrote:
Yes.
   
2009/11/7 Ilja Pavkovic ilja.pavko...@binaere-bauten.de:
Hi,
   
I cannot reach wicketstuff.org anymore. Anyone else experiencing
this problem?
   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
 
  --
  binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin
 
+49 · 171 · 9342 465
 
  Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
  Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 

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

   +49 · 171 · 9342 465

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

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



wicketstuff.org down?

2009-11-07 Thread Ilja Pavkovic
Hi,

I cannot reach wicketstuff.org anymore. Anyone else experiencing this problem?

Best Regards,
Ilja Pavkovic

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

   +49 · 171 · 9342 465

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

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



Re: I18N for bookmarkable urls

2009-10-26 Thread Ilja Pavkovic
Hi,

a better solution (in my eyes.. :)) is something like: 

import java.util.Locale;

import org.apache.wicket.IRequestTarget;
import org.apache.wicket.Page;
import org.apache.wicket.Session;
import 
org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy;

public class I18NBookmarkablePageRequestTargetUrlCodingStrategy extends 
BookmarkablePageRequestTargetUrlCodingStrategy {

private Locale locale;

public C extends Page 
I18NBookmarkablePageRequestTargetUrlCodingStrategy(Locale locale, String 
mountPath,
ClassC bookmarkablePageClass) {
this(locale, mountPath, bookmarkablePageClass, null);
}

private C extends Page 
I18NBookmarkablePageRequestTargetUrlCodingStrategy(Locale locale, String 
mountPath,
ClassC bookmarkablePageClass, String pageMapName) {
super(mountPath, bookmarkablePageClass, pageMapName);
this.locale = locale;
}

//public IRequestTarget decode(RequestParameters requestParameters)
public boolean matches(IRequestTarget requestTarget) {
boolean matches = super.matches(requestTarget);
if(matches) {
matches = locale == null || 

locale.equals(Session.get().getLocale()) || 
// also match en and en_US

locale.getLanguage().equals(Session.get().getLocale().getLanguage()); 
}
return matches;
}
}

you can use it with: 

mount(new 
I18NBookmarkablePageRequestTargetUrlCodingStrategy(Locale.GERMAN,startseite,getHomePage()));
mount(new 
I18NBookmarkablePageRequestTargetUrlCodingStrategy(Locale.ENGLISH,homepage,getHomePage()));


Be warned: this is only a hack that may break at your site :))

Am Montag, 26. Oktober 2009 15:25:49 schrieb Bernhard Grünewaldt:
 Hello,
 
 After thinking a bit I came up with a solution (which many of you might
 call dirty workaround). But since no one else came up with a solution
 I will stick to it until something better will be provided.
 
 The solution can be found here:
 
 http://blog.gruenewaldt.net/en/programming/java/apache-wicket-1_4-mounting-
 urls-for-a-multilanguage-setup-i18n-seo/
 
 Perhaps someone might find that useful.
 
 Bernhard
 
 Bernhard Grünewaldt schrieb:
  Hi folks,
 
  Since my app will be english and german aswell, that is something I need
  too. I tried to mount and unmount my pages
  when the locale changes from german to english or vice versa.
  I tried using ResourceModel Strings for the urls, but it's not working
  the way I want it to be. And it would be a massive amount of code for
  something that seems to be so simple.
 
  The problem is, that I want both urls to be accessed via the url like in
  the example:
http://xxx/impressum
  and
http://xxx/imprint
  should be accessible not depending on a specific locale setting.
  (Perhaps the locale should change to english or german depending on the
  url when accessed via a browser bookmark with no session)
 
  The problem is, that you can mount a class multiple times, but for
  creating the BookmarkablePageLinks the first one mounted will be used
  for the link. (tested with wicket 1.4.3).
 
  Wouldn't it be cool to have such a mechanism which uses the Locale
  setting to generate links and mount pages.
 
  For example (Just pseudo code):
 
  .mount(
new HybridUrlCodingStrategy(
  impressum, ImprintPage.class, Locale.GERMAN)
  );
  .mount(
new HybridUrlCodingStrategy(
  imprint, ImprintPage.class, Locale.ENGLISH)
  );
 
  And when you then generate a url you could use:
 
  add(new BookmarkablePageLinkVoid(
 bookmarked,
 ImprintPage.class,
 getSession().getLocale())
  );
 
  That way both urls would be accessible if bookmarked.
  And the user gets the url generated in his locale while browsing through
  the app.
 
  Is there a cool(=easy) way to do that or will it lead to
  a massive code section that mounts and unmounts pages on locale change?
 
  Bernhard
 
  Ilja Pavkovic schrieb:
  Hi,
 
  as we need some SEO optimization I want to provide the following
  bookmarkable pages:
 
  http://xxx/impressum
  http://xxx/imprint
 
  the native approach would be somethink like:
 
  mountBookmarkablePage(imprint, ImprintPage.class);
 
  mountBookmarkablePage(impressum, ImprintPage.class);
 
  This looks ugly but works.
  Now I don't know how to create a bookmarkable links having an url in
  the expected language.
 
  if( getLocale().equals(Locale.GERMAN)) {
//create http://xxx/impressum
  } else {
// http://xxx/imprint
  }
 
  Obviously the following code does not help:
add(new BookmarkablePageLink(link, ImprintPage.class));
 
  Does anyone have a good idea?
 
  Best regards,
  Ilja Pavkovic

I18N for bookmarkable urls

2009-10-22 Thread Ilja Pavkovic
Hi,

as we need some SEO optimization I want to provide the following bookmarkable 
pages:

http://xxx/impressum
http://xxx/imprint

the native approach would be somethink like:

mountBookmarkablePage(imprint, ImprintPage.class);

mountBookmarkablePage(impressum, ImprintPage.class);

This looks ugly but works. 

Now I don't know how to create a bookmarkable links having an url in the 
expected language.

if( getLocale().equals(Locale.GERMAN)) {
  //create http://xxx/impressum
} else {
  // http://xxx/imprint
}

Obviously the following code does not help:
  add(new BookmarkablePageLink(link, ImprintPage.class));

Does anyone have a good idea?

Best regards,
Ilja Pavkovic


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

   +49 · 171 · 9342 465

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

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