Re: wicket-cdi and TomEE

2013-01-04 Thread Kurt Sys
Hey Bertrand,

I do get
No suitable constructor found for injection target class : [class
org.apache.wicket.cdi.DetachEventEmitter]. produce() method does not
work!
I don't think it matters a lot. I must be something like: it doesn't
find the right constructor for the annotated type (maybe something
with non-empty wicket constructors, but actually, I have not really a
clue, it's just openejb throwing some 'info' at you, no warnings :) ).

However, I don't get any other errors. I don't think you really need
'seam-conversation-owb' to make conversation scope etc working. The
only seam-library I use is (although I didn't test conversation
scope):
seam-conversation-spi-3.0.0.Final.jar

I'm not using maven, so I can't help you out with that part, but if
you can't get it working, I probably still have a mwe at home... I
might put it online this weekend somewhere.

Good luck,
Kurt Sys




2013/1/3 Bertrand Guay-Paquet ber...@step.polymtl.ca:
 Thanks to you both for you help.

 Here's what I did so far:
 -Upgraded from TomEE 1.0.0 to 1.5.1 (not sure if that made a change, but it
 was a todo anyway)
 -Removing the seam-conversation-weld dependency
 -Finally, added the following section to my pom:
 dependencyManagement
 dependencies
 dependency
 artifactIdcdi-api/artifactId
 groupIdjavax.enterprise/groupId
 scopeprovided/scope
 /dependency
 /dependencies
 /dependencyManagement
 wicket-cdi includes this dependency as compile but it is provided by the
 Java EE container.

 Igor: perhaps you could modify your blog post to include the info about
 changing the scope of cdi-api?

 With these changes, I can get @RequestScoped, @SessionScoped and
 @ApplicationScoped working, although with warnings. I get a ton of log
 messages of the following type:
 org.apache.webbeans.component.creation.AnnotatedTypeBeanCreatorImpl
 defineConstructor
 INFO: No suitable constructor found for injection target class : [class
 org.apache.wicket.cdi.DetachEventEmitter]. produce() method does not work!
 I can't understand why I get these or what they mean.

 As for the conversion scope, from what I understand I should simply have to
 replace the seam-conversation-weld dependency with seam-conversation-owb to
 run with OpenWebBeans (used by TomEE). However, when I do that, all wicket
 pages throw an exception:
 java.lang.NoSuchMethodError:
 org.apache.webbeans.conversation.ConversationManager.getInstance()Lorg/apache/webbeans/conversation/ConversationManager;
 org.jboss.seam.conversation.plugins.openwebbeans.OpenWebBeansSeamConversationManager.doActivate(OpenWebBeansSeamConversationManager.java:41)
 org.jboss.seam.conversation.plugins.openwebbeans.OpenWebBeansHttpSeamConversationContext.doActivate(OpenWebBeansHttpSeamConversationContext.java:44)
 org.jboss.seam.conversation.api.AbstractSeamConversationContext.activate(AbstractSeamConversationContext.java:54)
 org.apache.wicket.cdi.CdiContainer.activateConversationalContext(CdiContainer.java:94)
 org.apache.wicket.cdi.ConversationPropagator.activateConversationIfNeeded(ConversationPropagator.java:147)
 org.apache.wicket.cdi.ConversationPropagator.onRequestHandlerResolved(ConversationPropagator.java:123)
 org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:155)

 I don't need conversion scope right now, but all these warnings and errors
 worry me.

 Kurt, do you get all these errors?

 Regards,
 Bertrand

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



Re: wicket-cdi and TomEE

2012-12-20 Thread Kurt Sys
Hey,

I got it all working (wicket+tomee)

I had some posts to this list to get it to work:
http://mail-archives.apache.org/mod_mbox/wicket-users/201211.mbox/%3ccadltzbdlypzbbv-piofedam7unf2nt1dqvdvy4ttguaymu0...@mail.gmail.com%3E

I posted most of my configs in here, you don't need weld-stuff:
http://wicket-users.markmail.org/search/?q=kurt.sys#query:kurt.sys+page:1+mid:5bjezmiz7muq5iqj+state:results

... and check out this as well, there are some useful lilnks:
http://wicket-users.markmail.org/search/?q=tomee+cdi#query:tomee%20cdi+page:1+mid:ibec5hnkimampyr7+state:results

Kurt


2012/12/20 Bertrand Guay-Paquet ber...@step.polymtl.ca:
 Hi,

 My web application contains EJB stateless beans which I currently access in
 Wicket through JNDI injection with the wicketstuff-javaee-inject project.

 With Wicket 6.4.0, I am trying out CDI (@inject) but can't get it to work on
 the TomEE Java EE application server. In my Application class, I put:

 BeanManager manager = (BeanManager) new
 InitialContext().lookup(java:comp/BeanManager);

 This fails with ClassCastException:
 org.apache.webbeans.container.InjectableBeanManager cannot be cast to
 javax.enterprise.inject.spi.BeanManage

 So the BeanManager lookup does work, but there is a problem casting it.

 From what I understand, TomEE uses OpenWebBeans to provide CDI while Wicket
 is based on Weld. I found this discussion relating to this :
 http://wicket-users.markmail.org/thread/ibec5hnkimampyr7  but it only gave
 me solutions for using wicket-cdi with Tomcat (servlet container) and not
 TomEE (full application server) and its included OWB.

 Igor said (in http://wicket-dev.markmail.org/thread/lhwlhqmmyy5zemjg) that
 jboss seam-conversation module has plugins for every cdi container. Maybe
 this is the solution, but I'm not versed enough in CDI to understand it!

 Thanks for any hint.

 Regards,
 Bertrand

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


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



Re: wicket-cdi and TomEE

2012-12-20 Thread Kurt Sys
... forgot this one: my full system setup, used jars etc.

http://openejb.979440.n4.nabble.com/tomee-eclipselink-gt-NoClassDefFoundError-ClassNotFoundException-td4658870.html

Kurt

2012/12/20 Igor Vaynberg igor.vaynb...@gmail.com:
 looks like you have two jars on the classpath that provide the
 javax.enterprise.inject.spi.BeanManager interface. maybe one comes
 with wicket-cdi and the other one is included in tomee...

 -igor

 On Thu, Dec 20, 2012 at 12:54 PM, Bertrand Guay-Paquet
 ber...@step.polymtl.ca wrote:
 javax.enterprise.inject.spi.BeanManage

 -
 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: pageparameters in link onclick

2012-12-10 Thread Kurt Sys
Hey Martin,

It's not about 'nice urls' as such, but with the Link-component, the
page doesn't redirect to /req/post/1. The redirection worked fine in
1.4.x, but in 1.6.x, it didn't work anymore. Dunno exactly why, but
all the links redirected to /post/62, not using/reading the
PageParameters. For some reason, the PageParameters were not passed to
the component the link pointed to.
However, I now used BookmarkablePageLink and it seems to work.

Thanks a lot!
Best regards,
Kurt Sys

2012/12/10 Martin Grigorov mgrigo...@apache.org:
 Hi,

 You need to use BookmarkablePageLink (BPL) instead of Link to have a nice
 looking urls for the links themselves.
 With your approach the link url will be
 './req?4-2.ILinkListener-[...]-7-linkanchor'
 and when clicked it will make a redirect to /req/post/1
 With BPL the link url will be /req/post/1 and a redirect will be made to
 /req/post/1?pageId only if the page is stateful.


 On Sat, Dec 8, 2012 at 2:32 PM, Kurt Sys kurt@gmail.com wrote:

 Hey, I'm having some issues with pageparameters. I'm upgrading from wicket
 1.4.x to 1.6.x. Most is done, however, I can't get pageparameters to work
 properly.

 -- MainApp defines how I mount the pages, i.e. with two optional parameters
 (type and id):


 -- HomePage.java is nothing special but just loads a bunch of stuff,
 including BlogPanel (yeah, it's for a blog, how did you guess?) which
 includes a BlogDataView

 -- BlogDataView, if in the url I have somthing like /post/50, it should
 load
 the page with post 50 and scroll to the right post, hence the 'if (blogid 
 0)':



 All this works fine, but I have included in my homepage some panels with
 links to specific posts. In that case, the right page/post must be loaded.
 So I have stuff like this:



 However, the PageParameters are not set. The URL isn't updated properly and
 always ends with: '/post/62' (followed by '?2' or something, but that
 doesn't matter a lot). I, as a test, changed 'pars.add(type,post)'
 'pars.add(type,test)', but still get '/post/62'. I must be missing
 something, but I just can't get to it.

 Oh yeah, the links in the source code of the generated webpage:


 or, depending how the page was loaded (/post/xx or without parameters):


 Should I implement some kind of ILinkListener or how can I generate the URL
 properly (so it gets to /post/xx)? Or maybe just: why are the
 pageparameters
 not right? (That might be enough to get to the right answer, I suppose - it
 used to work in Wicket 1.4.x).

 Thanks, Kurt




 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/pageparameters-in-link-onclick-tp4654611.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com http://jweekend.com/

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



pageparameters in link onclick

2012-12-08 Thread Kurt Sys
Hey, I'm having some issues with pageparameters. I'm upgrading from wicket
1.4.x to 1.6.x. Most is done, however, I can't get pageparameters to work
properly. 

-- MainApp defines how I mount the pages, i.e. with two optional parameters
(type and id):


-- HomePage.java is nothing special but just loads a bunch of stuff,
including BlogPanel (yeah, it's for a blog, how did you guess?) which
includes a BlogDataView

-- BlogDataView, if in the url I have somthing like /post/50, it should load
the page with post 50 and scroll to the right post, hence the 'if (blogid 
0)':



All this works fine, but I have included in my homepage some panels with
links to specific posts. In that case, the right page/post must be loaded.
So I have stuff like this:



However, the PageParameters are not set. The URL isn't updated properly and
always ends with: '/post/62' (followed by '?2' or something, but that
doesn't matter a lot). I, as a test, changed 'pars.add(type,post)'
'pars.add(type,test)', but still get '/post/62'. I must be missing
something, but I just can't get to it. 

Oh yeah, the links in the source code of the generated webpage:


or, depending how the page was loaded (/post/xx or without parameters):


Should I implement some kind of ILinkListener or how can I generate the URL
properly (so it gets to /post/xx)? Or maybe just: why are the pageparameters
not right? (That might be enough to get to the right answer, I suppose - it
used to work in Wicket 1.4.x).

Thanks, Kurt




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/pageparameters-in-link-onclick-tp4654611.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Is wicket-cdi native to Wicket 6.1 and upwards?

2012-11-26 Thread Kurt Sys
Hey,

http://devlearnings.wordpress.com/2011/05/15/apache-openwebbeans-cdi-from-standalone-to-webapp/
http://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html/environments.html
- this is for jboss, but there's something for using it in tomcat as
well, and it's possible to replace weld-related stuff with
openwebbeans

Most of solutions I found are using Weld, but you actually don't need
it. You can use Openwebbeans (tomee) as well, as Igor states out:
http://web.archiveorange.com/archive/v/t3xmoyfvrPfZN7bZZbeB

I'm not using maven since it made me feel from time to time loosing
control, but it should work. I added some libraries (to tomcat/lib),
added some code to HomePage.java and all was fine. Making it work for
wicket WebSessions as well was a little harder, but I had it solved
(thanks to this mailing list), so you might check out the recent
archives of this list
(http://wicket-users.markmail.org/search/?q=injector.get%28%29). I
posted most of my code yesterday (to solve the issue with injection in
WebSession). I can send the configurations this afternoon - it's
morning now - and check how it made it work with tomee.

Kurt

2012/11/25 Yuci Gou ygou@gmail.com:
 Just read the article - Status of wicket-cdi Module at
 https://www.42lines.net/2012/09/11/status-of-wicket-cdi-module/.

 Wonder if wicket-cdi is part of Wicket 6.1 release and upwards. I tried a
 simple Wicket 6.3 application running in TomEE, but could not get the CDI
 injection to work. These are the steps I used:

 1. Create a Wicket project with Maven (according to
 http://wicket.apache.org/start/quickstart.html)

 mvn archetype:generate -DarchetypeGroupId=org.apache.wicket
 -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=6.3.0
 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=
 https://repository.apache.org/ -DinteractiveMode=false

 2. Generate the eclipse configuration files
 mvn eclipse:eclipse -Dwtpversion=2.0

 (Note: Following steps are based on the tutorial on Youtube:
 http://www.youtube.com/watch?v=Lr8pxEACVRI)
 3. In folder src/main/webapp/WEB-INF, create file beans.xml
 (Also in folder src/main/webapp/META-INF, create file beans.xml, according
 to the explanation for this example:
 http://tomee.apache.org/examples-trunk/cdi-basic/README.html, and also
 src/main/resources/META-INF/beans.xml just in case)

 4. Create a POJO
 public class Faculty {
 private ListString facultyMembers;
 private String facultyName;

 @PostConstruct
 public void initialize() {
 this.facultyMembers = new ArrayListString();
 facultyMembers.add(Ian Schultz);
 facultyMembers.add(Diane Reyes);
 facultyName = Computer Science;
 }

 public ListString getFacultyMembers() {
 return facultyMembers;
 }

 public String getFacultyName() {
 return facultyName;
 }
 }

 5. Inject the POJO in HomePage.java and display it.
 public class HomePage extends WebPage {
 private static final long serialVersionUID = 1L;

 @Inject
 private Faculty faculty;

 public HomePage(final PageParameters parameters) {
 super(parameters);

 if (faculty != null) {
 add(new Label(cdi, faculty.getFacultyName()));
 } else {
 add(new Label(cdi, Not working!));
 }
 }
 }

 Note, class HomePage is the class for the Wicket homepage, as specified
 below:
 public class WicketApplication extends WebApplication
 {
 /**
  * @see org.apache.wicket.Application#getHomePage()
  */
 @Override
 public Class? extends WebPage getHomePage()
 {
 return HomePage.class;
 }
 }

 These are the steps I tried, but when running, Not working! is displayed
 on the home page. I debugged it and confirmed that faculty is null, which
 means not injected.

 Many thanks for your kind help!

 Yuci

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



Injector.get() in websession returns null

2012-11-25 Thread Kurt Sys
Hey all,
I'm trying to get cdi/injection to work with wicket. So far,
everything seems to be allright except for one thing: injecting into a
wicket-websession. Seems logical in some way, since a session is not a
component, so I tried using 'Injector.get().inject(this)', but
apparently, Injector.get() returns null. Injection into components
does work flawlessly (DaoService as well as other components are
injected into HomePage.java).
What am I missing?

Thanks,
Kurt


Mainapp.java
--
package mypackage;

import javax.enterprise.inject.spi.BeanManager;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.apache.wicket.Application;
import org.apache.wicket.Session;
import org.apache.wicket.cdi.CdiConfiguration;
import org.apache.wicket.protocol.http.WebApplication;
import org.apache.wicket.request.Request;
import org.apache.wicket.request.Response;

public class MainApp
extends WebApplication {

public MainApp() {
}

@Override
public void init() {
super.init();

BeanManager manager = null;
try {
manager = (BeanManager) 
InitialContext.doLookup(java:comp/BeanManager);
} catch (NamingException e) {
e.printStackTrace();
}
new CdiConfiguration(manager).configure(this);
}

@Override
public void onDestroy() {
}

public Class? extends org.apache.wicket.Page getHomePage() {
return HomePage.class;
}

@Override
public final Session newSession(Request req, Response res) {
return new MySession(req);
}
}
--

MySession.java
--
package mypackage;

import javax.inject.Inject;
import org.apache.wicket.Session;
import org.apache.wicket.injection.Injector;
import org.apache.wicket.protocol.http.WebSession;
import org.apache.wicket.request.Request;

public class MySession
extends WebSession {

@Inject
DaoService daoService;

public static MySession get() {
return (MySession) Session.get();
}

MySession(Request req) {
super(req);
init();
}

private void init() {
Injector.get().inject(this);
}

private void test() {
daoService.someMethod();
}
}
--
I added the private void test-method to test if daoService is null.
However, there is a nullpointerexception earlier, at line
'Injector.get().inject(this)'. I avoid 'this' in the constructor, so I
put it in a init-method. That keeps the code a little cleaner, I
think.

DaoService.java:
--
package mypackage;

import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless
public class DaoService {

@PersistenceContext(unitName=testPU)
private EntityManager entityManager;

public void someMethod() {
}

[...]
}
--
Injecting persistencecontext into daoservice does work fine.

HomePage.java
--
package mypackage;

import javax.inject.Inject;
import org.apache.wicket.markup.html.basic.Label
import org.apache.wicket.model.PropertyModel;

public class HomePage
extends BasePage {

@Inject
DaoService daoService;
@Inject
Clock clock;

public HomePage() {
add(new Label(time, new PropertyModel(this, clock.time)));
daoService.someMethod();
}
}
--
No nullpointerexception or any other problem here.

I don't get any issues as long as I don't open the webapp (the
application starts fine). Some logs (line numbers are incorrect: line
number 28 is the one with 'Injector.get()'; I deleted some comments to
keep it a little more readable):
--
INFO: Server startup in 6005 ms
25-nov-2012 16:00:59 org.apache.wicket.DefaultExceptionMapper internalMap
SEVERE: Unexpected error occurred
java.lang.NullPointerException
at mypackage.MySession.init(MySession.java:28)
at mypackage.MySession.init(MySession.java:24)
at mypackage.MainApp.newSession(MainApp.java:45)
at 
org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1557)
at org.apache.wicket.Session.get(Session.java:152)
at org.apache.wicket.Restart
[...]
25-nov-2012 16:00:59 org.apache.wicket.DefaultExceptionMapper map
SEVERE: unexpected exception when handling another exception: null
java.lang.NullPointerException
at mypackage.MySession.init(MySession.java:28)
at mypackage.MySession.init(MySession.java:24)
at mypackage.MainApp.newSession(MainApp.java:45)
at 
org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1557)
at org.apache.wicket.Session.get(Session.java:152)
at 

Re: Injector.get() in websession returns null [SOLVED]

2012-11-25 Thread Kurt Sys
That looks nicer than what I had :). Great, thanks a lot!
Kurt

2012/11/25 Martin Grigorov mgrigo...@apache.org:
 I don't use Wicket-CDI in my applications so I don't have much experience
 with it but I just took a look at the APIs and here is how I would do it:

 CdiContainer.get().getNonContextualManager().inject(this);


 On Sun, Nov 25, 2012 at 4:59 PM, Kurt Sys kurt@gmail.com wrote:

 Hey Martin,

 Thanks. The init-method of MySession looks now like this:
 --
 private void init() {
 BeanManager manager = null;
 try {
 manager = (BeanManager)
 InitialContext.doLookup(java:comp/BeanManager);
 } catch (NamingException e) {
 e.printStackTrace();
 }

 NonContextual.of(MySession.class, manager).inject(this);
}
 --

 I don't now if this is the proper way of injecting into the session. I
 don't really get how NonContextual works, but so far, this is how I
 understand it: the class-parameter in the 'of'-method defines which
 non-contextual classes can be injected in (managed by) the manager,
 and inject actually makes the instance managed by the container.

 And well... there might be an easier way to get the BeanManager, but
 at least, it works now. Should I make BeanManager from MainApp
 accessible so MySession can get it from there, or should I leave it
 like it?

 Thanks again, that was pretty easy,
 Kurt


 2012/11/25 Martin Grigorov mgrigo...@apache.org:
  Hi,
 
  Wicket is a bit inconsistent with its CDI integration.
  It doesn't use wicket-ioc Injector at all.
  You have to use NonContextual.of(...).inject(this) instead.
 
 
  On Sun, Nov 25, 2012 at 4:27 PM, Kurt Sys kurt@gmail.com wrote:
 
  Hey all,
  I'm trying to get cdi/injection to work with wicket. So far,
  everything seems to be allright except for one thing: injecting into a
  wicket-websession. Seems logical in some way, since a session is not a
  component, so I tried using 'Injector.get().inject(this)', but
  apparently, Injector.get() returns null. Injection into components
  does work flawlessly (DaoService as well as other components are
  injected into HomePage.java).
  What am I missing?
 
  Thanks,
  Kurt
 
 
  Mainapp.java
  --
  package mypackage;
 
  import javax.enterprise.inject.spi.BeanManager;
  import javax.naming.InitialContext;
  import javax.naming.NamingException;
  import org.apache.wicket.Application;
  import org.apache.wicket.Session;
  import org.apache.wicket.cdi.CdiConfiguration;
  import org.apache.wicket.protocol.http.WebApplication;
  import org.apache.wicket.request.Request;
  import org.apache.wicket.request.Response;
 
  public class MainApp
  extends WebApplication {
 
  public MainApp() {
  }
 
  @Override
  public void init() {
  super.init();
 
  BeanManager manager = null;
  try {
  manager = (BeanManager)
  InitialContext.doLookup(java:comp/BeanManager);
  } catch (NamingException e) {
  e.printStackTrace();
  }
  new CdiConfiguration(manager).configure(this);
  }
 
  @Override
  public void onDestroy() {
  }
 
  public Class? extends org.apache.wicket.Page getHomePage() {
  return HomePage.class;
  }
 
  @Override
  public final Session newSession(Request req, Response res) {
  return new MySession(req);
  }
  }
  --
 
  MySession.java
  --
  package mypackage;
 
  import javax.inject.Inject;
  import org.apache.wicket.Session;
  import org.apache.wicket.injection.Injector;
  import org.apache.wicket.protocol.http.WebSession;
  import org.apache.wicket.request.Request;
 
  public class MySession
  extends WebSession {
 
  @Inject
  DaoService daoService;
 
  public static MySession get() {
  return (MySession) Session.get();
  }
 
  MySession(Request req) {
  super(req);
  init();
  }
 
  private void init() {
  Injector.get().inject(this);
  }
 
  private void test() {
  daoService.someMethod();
  }
  }
  --
  I added the private void test-method to test if daoService is null.
  However, there is a nullpointerexception earlier, at line
  'Injector.get().inject(this)'. I avoid 'this' in the constructor, so I
  put it in a init-method. That keeps the code a little cleaner, I
  think.
 
  DaoService.java:
  --
  package mypackage;
 
  import java.util.List;
  import javax.ejb.Stateless;
  import javax.persistence.EntityManager;
  import javax.persistence.PersistenceContext;
 
  @Stateless
  public class DaoService {
 
  @PersistenceContext(unitName=testPU)
  private EntityManager entityManager

Re: ajax GET stopped because of precondition check

2011-07-06 Thread Kurt Sys
Well, I got a new hosting, and for some reason, it seems to work in IE now,
except for the iframe. Nothing is loaded in the iframe so far. That'll be a
IE issue, so I suppose this thread may be closed.


2011/7/5 Kurt Sys kurt@gmail.com

 I found this thread:

 http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4m3-AjaxButton-AjaxSubmitLink-in-ModalWindow-in-IE-7-Problem-td1893357.html
 So I checked all wicket:ids, and none of them has a value of 'id' or
 'submit' or something similar. IE still fails to load the panels...


 2011/7/3 Kurt Sys kurt@gmail.com

 The lazy loading example seems to work fine (I tried Wicket 1.4.17, the
 one I'm using too).

 For some reason 'precondition()' returns false in IE when called from my
 app. The code loading the panels is really straight forward. I can't think
 of any reason (for now) why the precondition returns false, only in IE, and
 even not for all lazyloadpanels.
 I have actually no idea where precondition is changed or something - I
 checked the js file (wicket-ajax.js) and there the function of the prototype
 just returns true (see below). So, precondition it is changed somewhere, for
 some reason, and probably something in a javascript-file of wicket that is
 called from my code IE doesn't like (other browsers don't complain). What
 code can be wrong? Something 'wrong' in the html-files? Style files (which
 would be very odd, if you ask me)?

 --

 Wicket.Ajax.Request.prototype = {
 // Creates a new request object. initialize: function(url, 
 loadedCallback, parseResponse, randomURL, failureHandler, channel) {
  this.url = url;
  this.loadedCallback = loadedCallback;
  // whether we should give the loadedCallback parsed response 
 (DOM tree) or the raw string   this.parseResponse = 
 parseResponse != null ? parseResponse : true;
  this.randomURL = randomURL != null ? randomURL : true;
  this.failureHandler = failureHandler != null ? failureHandler : 
 function() { };
  this.async = true;
  this.channel = channel;
  this.precondition = function() { return true; } // allow a 
 condition to block request
  // when suppressDone is set, the loadedCallback is responsible 
 for calling  // Ajax.Request.done() to process possibly pendings 
 requests in the channel.this.suppressDone = false;
  this.instance = Math.random();
  this.debugContent = true;
  },
 --   




 2011/7/3 Martin Grigorov mgrigo...@apache.org

 Can you check http://wicketstuff.org/wicket/ajax/lazy-loading ?
 This is Wicket 1.5-RC5.1 and it works for me with IE8.

 Wicket 1.4.17 at http://wicketstuff.org/wicket14/ajax/lazy-loading

 On Sat, Jul 2, 2011 at 5:16 PM, Kurt Sys kurt@gmail.com wrote:
  Hey all,
 
  In IE, I can't get lazyloadpanels to load. I have a webapp with some
  lazyloadpanels, and none of them loads in IE - in other browsers, there
 is
  no problem. (Also, the content of an iframe doesn't load, which seems
 to be
  related, since it is also an ajax-request.) I've been trying both IE 8
 and
  IE 9 on three different pc's. Can someone give me a clue why it won't
 work
  in IE? (IE security settings are set to low, scripts etc are
  enabled/allowed, so I suppose ajax-requests can be performed... if not,
 I
  have no clue how to allow ajax in IE.) You may check it out:
  http://www.tinyleaps.be
 
  I've been checking on similar problems with lazyloadpanel in ie, and
 the
  problem was known in 2008 (if it's the same, but it looks really
 similar):
  http://www.mail-archive.com/users@wicket.apache.org/msg18815.html
  There seems to be a bug report and a 'fixed' status, although it
 doesn't
  seem to work out fine for me - the last comment states that the fix is
 not
  confirmed. Or I am  missing something, which wouldn't really surprise
 me :),
  or there still something wrong with the precondition stuff and loading
 the
  panel in IE:
  https://issues.apache.org/jira/browse/WICKET-1653
 
 
  Ajax debug window (only these three lines):
  --
  INFO: Ajax GET stopped because of precondition check,
 
 url:?wicket:interface=:3:mainpanel:bloglist:1:commentaar::IBehaviorListener:0:
  INFO: Ajax GET stopped because of precondition check,
 
 url:?wicket:interface=:3:mainpanel:bloglist:2:commentaar::IBehaviorListener:0:
  INFO: Ajax GET stopped because of precondition check,
  url:?wicket:interface=:3:weer::IBehaviorListener:0:
  --
 
  HomePage.html:
  --
  [...]
  body
  wicket:extend
  [...]
   div wicket:id=route /
  [...]
 div wicket:id=mainpanel /
  [...]
 div wicket:id=weer class=weer nbsp;
 /div
  [...]
   /div
  /wicket:extend
  /body
  /html
  --
 
  HomePage.java:
  --
  [...]
 
  public class HomePage
   extends BasePage {
 
Panel mainPanel;
Label linktekst;
 
 
public HomePage() {
   this(null);
}
 
 
public HomePage

Re: ajax GET stopped because of precondition check

2011-07-06 Thread Kurt Sys
It only worked once in IE (checked only on 1 pc). So, probably a caching
problem of IE?

I suppose the ajax-requests of wicket are 'GET'-requests and there is no
timestamp or something variable added to the response, or is there? Anyway,
the only thing I can think of so far is caching of ajax-requests somewhere
in IE, so:
http://www.codemiles.com/ajax/solution-to-ajax-cache-problem-with-internet-explorer-t602.html
http://www.codecouch.com/2009/01/how-to-stop-internet-explorer-from-caching-ajax-requests/
http://weblogs.asp.net/pleloup/archive/2006/06/08/451583.aspx
(and many more of these kind of solutions).
I remember: add some headers to the response. Question now is: how to
customize the response of an ajax-request? Or is there any other solution to
the caching of IE?  (In case caching is the problem here).

Thx, Kurt

2011/7/6 Kurt Sys kurt@gmail.com

 Well, I got a new hosting, and for some reason, it seems to work in IE now,
 except for the iframe. Nothing is loaded in the iframe so far. That'll be a
 IE issue, so I suppose this thread may be closed.


 2011/7/5 Kurt Sys kurt@gmail.com

 I found this thread:

 http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4m3-AjaxButton-AjaxSubmitLink-in-ModalWindow-in-IE-7-Problem-td1893357.html
 So I checked all wicket:ids, and none of them has a value of 'id' or
 'submit' or something similar. IE still fails to load the panels...


 2011/7/3 Kurt Sys kurt@gmail.com

 The lazy loading example seems to work fine (I tried Wicket 1.4.17, the
 one I'm using too).

 For some reason 'precondition()' returns false in IE when called from my
 app. The code loading the panels is really straight forward. I can't think
 of any reason (for now) why the precondition returns false, only in IE, and
 even not for all lazyloadpanels.
 I have actually no idea where precondition is changed or something - I
 checked the js file (wicket-ajax.js) and there the function of the prototype
 just returns true (see below). So, precondition it is changed somewhere, for
 some reason, and probably something in a javascript-file of wicket that is
 called from my code IE doesn't like (other browsers don't complain). What
 code can be wrong? Something 'wrong' in the html-files? Style files (which
 would be very odd, if you ask me)?

 --

 Wicket.Ajax.Request.prototype = {
 // Creates a new request object.initialize: function(url, 
 loadedCallback, parseResponse, randomURL, failureHandler, channel) {
 this.url = url;
 this.loadedCallback = loadedCallback;
 // whether we should give the loadedCallback parsed response 
 (DOM tree) or the raw string   this.parseResponse = 
 parseResponse != null ? parseResponse : true;
 this.randomURL = randomURL != null ? randomURL : true;
 this.failureHandler = failureHandler != null ? failureHandler : 
 function() { };
 this.async = true;
 this.channel = channel;
 this.precondition = function() { return true; } // allow a 
 condition to block request
 // when suppressDone is set, the loadedCallback is responsible 
 for calling  // Ajax.Request.done() to process possibly 
 pendings requests in the channel.this.suppressDone = false;
 this.instance = Math.random();
 this.debugContent = true;
 },
 --  




 2011/7/3 Martin Grigorov mgrigo...@apache.org

 Can you check http://wicketstuff.org/wicket/ajax/lazy-loading ?
 This is Wicket 1.5-RC5.1 and it works for me with IE8.

 Wicket 1.4.17 at http://wicketstuff.org/wicket14/ajax/lazy-loading

 On Sat, Jul 2, 2011 at 5:16 PM, Kurt Sys kurt@gmail.com wrote:
  Hey all,
 
  In IE, I can't get lazyloadpanels to load. I have a webapp with some
  lazyloadpanels, and none of them loads in IE - in other browsers,
 there is
  no problem. (Also, the content of an iframe doesn't load, which seems
 to be
  related, since it is also an ajax-request.) I've been trying both IE 8
 and
  IE 9 on three different pc's. Can someone give me a clue why it won't
 work
  in IE? (IE security settings are set to low, scripts etc are
  enabled/allowed, so I suppose ajax-requests can be performed... if
 not, I
  have no clue how to allow ajax in IE.) You may check it out:
  http://www.tinyleaps.be
 
  I've been checking on similar problems with lazyloadpanel in ie, and
 the
  problem was known in 2008 (if it's the same, but it looks really
 similar):
  http://www.mail-archive.com/users@wicket.apache.org/msg18815.html
  There seems to be a bug report and a 'fixed' status, although it
 doesn't
  seem to work out fine for me - the last comment states that the fix is
 not
  confirmed. Or I am  missing something, which wouldn't really surprise
 me :),
  or there still something wrong with the precondition stuff and loading
 the
  panel in IE:
  https://issues.apache.org/jira/browse/WICKET-1653
 
 
  Ajax debug window (only these three lines):
  --
  INFO

Re: ajax GET stopped because of precondition check

2011-07-05 Thread Kurt Sys
I found this thread:
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-4m3-AjaxButton-AjaxSubmitLink-in-ModalWindow-in-IE-7-Problem-td1893357.html
So I checked all wicket:ids, and none of them has a value of 'id' or
'submit' or something similar. IE still fails to load the panels...


2011/7/3 Kurt Sys kurt@gmail.com

 The lazy loading example seems to work fine (I tried Wicket 1.4.17, the one
 I'm using too).

 For some reason 'precondition()' returns false in IE when called from my
 app. The code loading the panels is really straight forward. I can't think
 of any reason (for now) why the precondition returns false, only in IE, and
 even not for all lazyloadpanels.
 I have actually no idea where precondition is changed or something - I
 checked the js file (wicket-ajax.js) and there the function of the prototype
 just returns true (see below). So, precondition it is changed somewhere, for
 some reason, and probably something in a javascript-file of wicket that is
 called from my code IE doesn't like (other browsers don't complain). What
 code can be wrong? Something 'wrong' in the html-files? Style files (which
 would be very odd, if you ask me)?

 --

 Wicket.Ajax.Request.prototype = {
 // Creates a new request object.  initialize: function(url, 
 loadedCallback, parseResponse, randomURL, failureHandler, channel) {
   this.url = url;
   this.loadedCallback = loadedCallback;
   // whether we should give the loadedCallback parsed response 
 (DOM tree) or the raw string   this.parseResponse = parseResponse 
 != null ? parseResponse : true;
   this.randomURL = randomURL != null ? randomURL : true;
   this.failureHandler = failureHandler != null ? failureHandler : 
 function() { };
   this.async = true;
   this.channel = channel;
   this.precondition = function() { return true; } // allow a 
 condition to block request
   // when suppressDone is set, the loadedCallback is responsible 
 for calling  // Ajax.Request.done() to process possibly pendings 
 requests in the channel.this.suppressDone = false;
   this.instance = Math.random();
   this.debugContent = true;
   },
 --




 2011/7/3 Martin Grigorov mgrigo...@apache.org

 Can you check http://wicketstuff.org/wicket/ajax/lazy-loading ?
 This is Wicket 1.5-RC5.1 and it works for me with IE8.

 Wicket 1.4.17 at http://wicketstuff.org/wicket14/ajax/lazy-loading

 On Sat, Jul 2, 2011 at 5:16 PM, Kurt Sys kurt@gmail.com wrote:
  Hey all,
 
  In IE, I can't get lazyloadpanels to load. I have a webapp with some
  lazyloadpanels, and none of them loads in IE - in other browsers, there
 is
  no problem. (Also, the content of an iframe doesn't load, which seems to
 be
  related, since it is also an ajax-request.) I've been trying both IE 8
 and
  IE 9 on three different pc's. Can someone give me a clue why it won't
 work
  in IE? (IE security settings are set to low, scripts etc are
  enabled/allowed, so I suppose ajax-requests can be performed... if not,
 I
  have no clue how to allow ajax in IE.) You may check it out:
  http://www.tinyleaps.be
 
  I've been checking on similar problems with lazyloadpanel in ie, and the
  problem was known in 2008 (if it's the same, but it looks really
 similar):
  http://www.mail-archive.com/users@wicket.apache.org/msg18815.html
  There seems to be a bug report and a 'fixed' status, although it doesn't
  seem to work out fine for me - the last comment states that the fix is
 not
  confirmed. Or I am  missing something, which wouldn't really surprise me
 :),
  or there still something wrong with the precondition stuff and loading
 the
  panel in IE:
  https://issues.apache.org/jira/browse/WICKET-1653
 
 
  Ajax debug window (only these three lines):
  --
  INFO: Ajax GET stopped because of precondition check,
 
 url:?wicket:interface=:3:mainpanel:bloglist:1:commentaar::IBehaviorListener:0:
  INFO: Ajax GET stopped because of precondition check,
 
 url:?wicket:interface=:3:mainpanel:bloglist:2:commentaar::IBehaviorListener:0:
  INFO: Ajax GET stopped because of precondition check,
  url:?wicket:interface=:3:weer::IBehaviorListener:0:
  --
 
  HomePage.html:
  --
  [...]
  body
  wicket:extend
  [...]
   div wicket:id=route /
  [...]
 div wicket:id=mainpanel /
  [...]
 div wicket:id=weer class=weer nbsp;
 /div
  [...]
   /div
  /wicket:extend
  /body
  /html
  --
 
  HomePage.java:
  --
  [...]
 
  public class HomePage
   extends BasePage {
 
Panel mainPanel;
Label linktekst;
 
 
public HomePage() {
   this(null);
}
 
 
public HomePage(PageParameters pars) {
  [...]
   add(new RoutePanel(route));
 
 
   if (pars != null) {
  mainPanel = new BlogPanel(mainpanel, pars.getAsInteger(id));
   }
   else {
  mainPanel = new BlogPanel(mainpanel

Re: ajax GET stopped because of precondition check

2011-07-03 Thread Kurt Sys
The lazy loading example seems to work fine (I tried Wicket 1.4.17, the one
I'm using too).

For some reason 'precondition()' returns false in IE when called from my
app. The code loading the panels is really straight forward. I can't think
of any reason (for now) why the precondition returns false, only in IE, and
even not for all lazyloadpanels.
I have actually no idea where precondition is changed or something - I
checked the js file (wicket-ajax.js) and there the function of the prototype
just returns true (see below). So, precondition it is changed somewhere, for
some reason, and probably something in a javascript-file of wicket that is
called from my code IE doesn't like (other browsers don't complain). What
code can be wrong? Something 'wrong' in the html-files? Style files (which
would be very odd, if you ask me)?

--

Wicket.Ajax.Request.prototype = {
// Creates a new request object.initialize: function(url,
loadedCallback, parseResponse, randomURL, failureHandler, channel) {
this.url = url;
this.loadedCallback = loadedCallback;
// whether we should give the loadedCallback parsed response 
(DOM
tree) or the raw string this.parseResponse = parseResponse != null ?
parseResponse : true;
this.randomURL = randomURL != null ? randomURL : true;
this.failureHandler = failureHandler != null ? failureHandler :
function() { };
this.async = true;
this.channel = channel;
this.precondition = function() { return true; } // allow a 
condition
to block request
// when suppressDone is set, the loadedCallback is responsible 
for
calling // Ajax.Request.done() to process possibly pendings requests
in the channel. this.suppressDone = false;
this.instance = Math.random();
this.debugContent = true;
},
--  




2011/7/3 Martin Grigorov mgrigo...@apache.org

 Can you check http://wicketstuff.org/wicket/ajax/lazy-loading ?
 This is Wicket 1.5-RC5.1 and it works for me with IE8.

 Wicket 1.4.17 at http://wicketstuff.org/wicket14/ajax/lazy-loading

 On Sat, Jul 2, 2011 at 5:16 PM, Kurt Sys kurt@gmail.com wrote:
  Hey all,
 
  In IE, I can't get lazyloadpanels to load. I have a webapp with some
  lazyloadpanels, and none of them loads in IE - in other browsers, there
 is
  no problem. (Also, the content of an iframe doesn't load, which seems to
 be
  related, since it is also an ajax-request.) I've been trying both IE 8
 and
  IE 9 on three different pc's. Can someone give me a clue why it won't
 work
  in IE? (IE security settings are set to low, scripts etc are
  enabled/allowed, so I suppose ajax-requests can be performed... if not, I
  have no clue how to allow ajax in IE.) You may check it out:
  http://www.tinyleaps.be
 
  I've been checking on similar problems with lazyloadpanel in ie, and the
  problem was known in 2008 (if it's the same, but it looks really
 similar):
  http://www.mail-archive.com/users@wicket.apache.org/msg18815.html
  There seems to be a bug report and a 'fixed' status, although it doesn't
  seem to work out fine for me - the last comment states that the fix is
 not
  confirmed. Or I am  missing something, which wouldn't really surprise me
 :),
  or there still something wrong with the precondition stuff and loading
 the
  panel in IE:
  https://issues.apache.org/jira/browse/WICKET-1653
 
 
  Ajax debug window (only these three lines):
  --
  INFO: Ajax GET stopped because of precondition check,
 
 url:?wicket:interface=:3:mainpanel:bloglist:1:commentaar::IBehaviorListener:0:
  INFO: Ajax GET stopped because of precondition check,
 
 url:?wicket:interface=:3:mainpanel:bloglist:2:commentaar::IBehaviorListener:0:
  INFO: Ajax GET stopped because of precondition check,
  url:?wicket:interface=:3:weer::IBehaviorListener:0:
  --
 
  HomePage.html:
  --
  [...]
  body
  wicket:extend
  [...]
   div wicket:id=route /
  [...]
 div wicket:id=mainpanel /
  [...]
 div wicket:id=weer class=weer nbsp;
 /div
  [...]
   /div
  /wicket:extend
  /body
  /html
  --
 
  HomePage.java:
  --
  [...]
 
  public class HomePage
   extends BasePage {
 
Panel mainPanel;
Label linktekst;
 
 
public HomePage() {
   this(null);
}
 
 
public HomePage(PageParameters pars) {
  [...]
   add(new RoutePanel(route));
 
 
   if (pars != null) {
  mainPanel = new BlogPanel(mainpanel, pars.getAsInteger(id));
   }
   else {
  mainPanel = new BlogPanel(mainpanel);
   }
 
   add(mainPanel);
  [...]
   add(new AjaxLazyLoadPanel(weer) {
 
  @Override
  public Component getLazyLoadComponent(String markupId) {
 return new WeerPanel(markupId,
  reis.getBlogitemList().get(0).getLocation().getName());
  }
 
   });
}
 
  }
  --
 
  BlogPanel.html

ajax GET stopped because of precondition check

2011-07-02 Thread Kurt Sys
Hey all,

In IE, I can't get lazyloadpanels to load. I have a webapp with some
lazyloadpanels, and none of them loads in IE - in other browsers, there is
no problem. (Also, the content of an iframe doesn't load, which seems to be
related, since it is also an ajax-request.) I've been trying both IE 8 and
IE 9 on three different pc's. Can someone give me a clue why it won't work
in IE? (IE security settings are set to low, scripts etc are
enabled/allowed, so I suppose ajax-requests can be performed... if not, I
have no clue how to allow ajax in IE.) You may check it out:
http://www.tinyleaps.be

I've been checking on similar problems with lazyloadpanel in ie, and the
problem was known in 2008 (if it's the same, but it looks really similar):
http://www.mail-archive.com/users@wicket.apache.org/msg18815.html
There seems to be a bug report and a 'fixed' status, although it doesn't
seem to work out fine for me - the last comment states that the fix is not
confirmed. Or I am  missing something, which wouldn't really surprise me :),
or there still something wrong with the precondition stuff and loading the
panel in IE:
https://issues.apache.org/jira/browse/WICKET-1653


Ajax debug window (only these three lines):
--
INFO: Ajax GET stopped because of precondition check,
url:?wicket:interface=:3:mainpanel:bloglist:1:commentaar::IBehaviorListener:0:
INFO: Ajax GET stopped because of precondition check,
url:?wicket:interface=:3:mainpanel:bloglist:2:commentaar::IBehaviorListener:0:
INFO: Ajax GET stopped because of precondition check,
url:?wicket:interface=:3:weer::IBehaviorListener:0:
--

HomePage.html:
--
[...]
body
wicket:extend
[...]
  div wicket:id=route /
[...]
div wicket:id=mainpanel /
[...]
div wicket:id=weer class=weer nbsp;
/div
[...]
  /div
/wicket:extend
/body
/html
--

HomePage.java:
--
[...]

public class HomePage
  extends BasePage {

   Panel mainPanel;
   Label linktekst;


   public HomePage() {
  this(null);
   }


   public HomePage(PageParameters pars) {
[...]
  add(new RoutePanel(route));


  if (pars != null) {
 mainPanel = new BlogPanel(mainpanel, pars.getAsInteger(id));
  }
  else {
 mainPanel = new BlogPanel(mainpanel);
  }

  add(mainPanel);
[...]
  add(new AjaxLazyLoadPanel(weer) {

 @Override
 public Component getLazyLoadComponent(String markupId) {
return new WeerPanel(markupId,
reis.getBlogitemList().get(0).getLocation().getName());
 }

  });
   }

}
--

BlogPanel.html
--
[...]
  wicket:panel
[...]
 ul class=bloglist
li wicket:id=bloglist class=blogitem
[...]
   div wicket:id=commentaar /
 /div
[...]
/li
 /ul
[...]
  /wicket:panel
   /body
/html
--

BlogPanel.java:
--
[...]
public final class BlogPanel
  extends Panel {

   private static final int ITEMSPERPAGE = 3;

   public BlogPanel(String id) {
  this(id, 0);
   }


   public BlogPanel(final String id, final int blogid) {
  super(id);

  setOutputMarkupId(true);

[...]
  ListBlogitem blogitemList =
Q.EM.createNamedQuery(Blogitem.findAll, Blogitem.class).
setHint(QueryHints.REFRESH, HintValues.TRUE).getResultList();

  BlogListView blogListView = new BlogListView(
bloglist,
new ListDataProvider(blogitemList),
ITEMSPERPAGE) {

 @Override
 protected void populateItem(final ItemBlogitem item) {

[...]
item.add(new AjaxLazyLoadPanel(commentaar) {

   @Override
   public Component getLazyLoadComponent(String markupId) {
  return new CommentaarPanel(markupId,
item.getModelObject());
   }

});
[...]
 }

  };

[...]
  add(blogListView);

[...]
}

abstract class BlogListView
  extends DataViewBlogitem {

   BlogListView(String id, ListDataProvider ldp, int i) {
  super(id, ldp, i);
   }

[...]
   }
}
--

CommentaarPanel.html:
--
[...]
   body
  wicket:panel
 div wicket:id=commentaarToevoegen /
 ul
li wicket:id=commentaarList class=commentaar
   p class=zegtspan wicket:id=tijdstip / - span
wicket:id=commentator class=schrift commentator / laat weten:/p
   p wicket:id=tekst class=schrift /
/li
div wicket:id=commentaarNav class=navigator navigatordown
/
 /ul
  /wicket:panel
   /body
/html
--

CommentaarPanel.java:
--
[...]
public final class CommentaarPanel
  extends Panel {

   private Blogitem blog;
   private ListComment commentList;
   private DataViewComment commentListView;


   public CommentaarPanel(String id, Blogitem blog) {
  super(id);

  this.blog = blog;

  setOutputMarkupId(true);

  commentList = blog.getCommentList();
  Collections.sort(commentList);
  commentListView =
new 

Re: ajaxlazyloadpanel and ie

2011-07-02 Thread Kurt Sys
updated info and code in 
http://apache-wicket.1842946.n4.nabble.com/ajax-GET-stopped-because-of-precondition-check-td3640560.html
new thread 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ajaxlazyloadpanel-and-ie-tp3637730p3640599.html
Sent from the Users forum mailing list archive at Nabble.com.

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



ajaxlazyloadpanel and ie

2011-07-01 Thread Kurt Sys
Hey all,

I've got a problem with ajaxlazyloadpanel and IE, being the panels do not
load in IE9 (didn't check IE8 or previous versions). The panels keep loading
forever. There is no problem with loading the panels in other browsers
(Chrome, Midori, Firefox). The panels are quite simpel, nothing really fancy
going on, actually. Moreover, I also see that an iframe is not loaded when I
use IE (hovering route normally shows a google-map, but the map itself isn't
loaded). Although this seems not really an wicket-IE-issue, it may be
related.
The code?
Sending all code is really overshoot, but simply put: I've got the
HomePage-class wich adds a BlogItems-panel. The BlogItems-panel adds a
DataView, and in each of the items  adds a comment-panel. So in the
populateItem-method of the Blogitems DataView, I have something like (it's
just loading the panels, nothing fancy here):

--
item.add(new AjaxLazyLoadPanel(String markupId) {

  @Override
  public Component getLazyLoadComponent(String id)
  {
   return CommentPanel(id, blogid);
  }

}
--
in which blogid is used to load the right comments. The CommentPanel itself
adds another DataView with comments.

I have also a  WeatherPanel (loading data from google weather api) on the
HomePage, also not loading in IE, no problem in other browsers.

Security settings of IE are set to low (everything, certainly javascript is
allowed).

You can check it on: http://www.tinyleaps.be

FYI: tomcat 5.5, wicket 1.4.17

Any ideas what can be wrong here?

Thanks a lot,
Kurt Sys


Re: ajaxeditablelabel and setescapemodelstrings to false

2010-10-27 Thread Kurt Sys
Hey all,

anyone...? How can I make 'setEscapeModelStrings(false)' work in a
AjaxEditablePanel?

Thx, Kurt

2010/10/23 Kurt Sys kurt@gmail.com

 Hi,

 I'm new to Wicket and I'm trying to get the feel of it. So I tried a small
 webapp, using a AjaxEditableMultiLineLabel, which so far worked perfectly.
 However, if I want it not to escape the html-tags - which is generally a bad
 idea, I know - I use 'setEscapeModelStrings(false)'. For some reason, it
 doesn't work. It does work, however, when I replace the AjaxEditablePanel
 (or AjaxEditableMultiLinePanel) with a Panel or MultiLinePanel. See code
 below, I'm using wicket-1.4.12 (and wicket-1.4.12-extensions). What am I
 missing here?
 Oh yeah, I want to extend it to store the panel content in a database
 (together with the content of some other panels, e.g. a title, author and
 time), so it's a kind of very lightweight personal wiki-like thingy. It
 might be I'm not using the best way to achieve this, but I want to keep the
 editable panel :). Any suggestions are welcome of course.

 Thx, Kurt

 'midregion.html'

 [...]
 div wicket:id=wikicontent
 /div
  span wicket:id=messagetext goes here/span
 [...]

 'midregion.java'

 import org.apache.wicket.markup.html.CSSPackageResource;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.basic.MultiLineLabel;
 import org.apache.wicket.model.IModel;
 import
 org.apache.wicket.extensions.ajax.markup.html.AjaxEditableMultiLineLabel;
 import org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel;


 public class midRegion extends Panel {

 public midRegion(String id) {
 super(id);
 add(CSSPackageResource.getHeaderContribution(main.class,
 css/midRegion.css));
 //AjaxEditableMultiLineLabelString mod = new
 AjaxEditableMultiLineLabelString(wikicontent, new contentModel()); //
 not ok
 //AjaxEditableLabelString mod = new
 AjaxEditableLabelString(wikicontent, new contentModel()); // not ok
 MultiLineLabel mod = new MultiLineLabel(wikicontent, new
 contentModel()); // ok
 add(mod.setEscapeModelStrings(false));
 add(new Label( message, h1Hello!/h1
 ).setEscapeModelStrings(false) ); // this is just another test for using
 setEscapeModelStrings
 }
 }

 class contentModel
 implements IModelString {

 private String content=blablabla b bold text /b;

 @Override
 public void setObject(String c) {
 this.content = c;
 }

 @Override
 public String getObject(){
 return content;
 }

 @Override
 public void detach() {
 }
 }





ajaxeditablelabel and setescapemodelstrings to false

2010-10-23 Thread Kurt Sys
Hi,

I'm new to Wicket and I'm trying to get the feel of it. So I tried a small
webapp, using a AjaxEditableMultiLineLabel, which so far worked perfectly.
However, if I want it not to escape the html-tags - which is generally a bad
idea, I know - I use 'setEscapeModelStrings(false)'. For some reason, it
doesn't work. It does work, however, when I replace the AjaxEditablePanel
(or AjaxEditableMultiLinePanel) with a Panel or MultiLinePanel. See code
below, I'm using wicket-1.4.12 (and wicket-1.4.12-extensions). What am I
missing here?
Oh yeah, I want to extend it to store the panel content in a database
(together with the content of some other panels, e.g. a title, author and
time), so it's a kind of very lightweight personal wiki-like thingy. It
might be I'm not using the best way to achieve this, but I want to keep the
editable panel :). Any suggestions are welcome of course.

Thx, Kurt

'midregion.html'

 [...]
 div wicket:id=wikicontent
 /div
  span wicket:id=messagetext goes here/span
 [...]

 'midregion.java'

 import org.apache.wicket.markup.html.CSSPackageResource;
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.basic.MultiLineLabel;
 import org.apache.wicket.model.IModel;
 import
 org.apache.wicket.extensions.ajax.markup.html.AjaxEditableMultiLineLabel;
 import org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel;


 public class midRegion extends Panel {

 public midRegion(String id) {
 super(id);
 add(CSSPackageResource.getHeaderContribution(main.class,
 css/midRegion.css));
 //AjaxEditableMultiLineLabelString mod = new
 AjaxEditableMultiLineLabelString(wikicontent, new contentModel()); //
 not ok
 //AjaxEditableLabelString mod = new
 AjaxEditableLabelString(wikicontent, new contentModel()); // not ok
 MultiLineLabel mod = new MultiLineLabel(wikicontent, new
 contentModel()); // ok
 add(mod.setEscapeModelStrings(false));
 add(new Label( message, h1Hello!/h1
 ).setEscapeModelStrings(false) ); // this is just another test for using
 setEscapeModelStrings
 }
 }

 class contentModel
 implements IModelString {

 private String content=blablabla b bold text /b;

 @Override
 public void setObject(String c) {
 this.content = c;
 }

 @Override
 public String getObject(){
 return content;
 }

 @Override
 public void detach() {
 }
 }