Re: [Wicket-user] Palette problem with latest snapshot

2007-06-16 Thread Timo Rantalaiho
On Fri, 15 Jun 2007, shumbola wrote:
 A few days ago I've upgraded my project to the 1.3 snapshot from June 12.
 Before I was using a one from May 10. Today I noticed that my page which
 uses the Palette component stopped working. Anytime I launch that page it

It's easier to diagnose your problem if you provide the
complete source code and markup. But could it be that there 
has been a change in the component hierarchy of Palette, and
your own markup is now incompatible with it?

We always use a snapshot of the current day and have 
extensive JUnit tests (covering about 90% of the lines).
This makes it a lot easier to notice and fix this kind of
problems, as we can easily see from commits / dev / user 
mailing lists what is going on, and just diff the whole
wicket source code when needed. A couple of days of diff is
perfectly readable, but one month not.

- Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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


Re: [Wicket-user] wicketstuff confluence and jira

2007-06-16 Thread Jean-Baptiste Quenot
* Martijn Dashorst:
 The page is generated automatically. All you have to do is label your
 page as 'component':

Thanks for the tip.
-- 
 Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

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


[Wicket-user] Form inside a modalWindow inside a Form :-/

2007-06-16 Thread diego
Hi, i'm having an strange behavior in my application.
i have a form with a listview inside and the items in this listview can be
reordered using buttons (that's why the list is inside a form). In the
form i have a link that opens a modalWindow to add a new element to my
list (the link and the modal are defined as elements inside the form).
This modalWindow contains a new form to complete the necesary information
and a button to close the modal and add it to the original (reorderable)
listview.
The thing is that the 'second' form created inside the modal does not
write the html correctly and thus the javascript fails with form has no
properties.
Using firebug i could find that the modal doesn't have the form tag
inside, after the div defining the window it just have the all the
inputs and selects, so when javascript is looking for it to make the
submition, it fails.
I added setOutputMarkupId(true) to all my involved components to check if
i was missing something but still has the same issue.
I think there is a bug in somewhere... what do you think? there's some
workaround for this?

thanks a lot.

--
D.


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


[Wicket-user] infinite loop

2007-06-16 Thread Jonathan Locke


anyone have any ideas on what might cause this?  in particular can a user
exception cause it or is it definitely a wicket bug?

java.lang.IllegalStateException?: Request processing executed 32767 steps,
which means it is probably in an infinite loop.

at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at
org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at
org.apache.wicket.protocol.http.WicketFilter?.doGet(WicketFilter?.java:251)
at
org.apache.wicket.protocol.http.WicketFilter?.doFilter(WicketFilter?.java:125)
at
org.apache.catalina.core.ApplicationFilterChain?.internalDoFilter(ApplicationFilterChain?.java:202)
at
org.apache.catalina.core.ApplicationFilterChain?.doFilter(ApplicationFilterChain?.java:173)
at
org.apache.catalina.core.StandardWrapperValve?.invoke(StandardWrapperValve?.java:213)
at
org.apache.catalina.core.StandardContextValve?.invoke(StandardContextValve?.java:178)
at
org.apache.catalina.core.StandardHostValve?.invoke(StandardHostValve?.java:126)
at
org.apache.catalina.cluster.tcp.ReplicationValve?.invoke(ReplicationValve?.java:346)
at
org.apache.catalina.valves.ErrorReportValve?.invoke(ErrorReportValve?.java:105)
at
org.apache.catalina.core.StandardEngineValve?.invoke(StandardEngineValve?.java:107)
at
org.apache.catalina.connector.CoyoteAdapter?.service(CoyoteAdapter?.java:148)
at org.apache.coyote.ajp.AjpAprProcessor?.process(AjpAprProcessor?.java:425)
at
org.apache.coyote.ajp.AjpAprProtocol?$AjpConnectionHandler?.process(AjpAprProtocol?.java:452)
at
org.apache.tomcat.util.net.AprEndpoint?$Worker.run(AprEndpoint?.java:1285)
at java.lang.Thread.run(Thread.java:619)


-- 
View this message in context: 
http://www.nabble.com/infinite-loop-tf3933416.html#a11155701
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [Wicket-user] infinite loop

2007-06-16 Thread Al Maw
I've seen this happen if you run behind a mod_proxy and fail to set up
the ProxyPassReverse setting properly. Make sure you have
ProxyPassReverseCookiePath, too. See the wiki for details.

Al

Jonathan Locke wrote:
 
 anyone have any ideas on what might cause this?  in particular can a user
 exception cause it or is it definitely a wicket bug?
 
 java.lang.IllegalStateException?: Request processing executed 32767 steps,
 which means it is probably in an infinite loop.
 
 at org.apache.wicket.RequestCycle?.steps(RequestCycle?.java:1187) at
 org.apache.wicket.RequestCycle?.request(RequestCycle?.java:510) at
 org.apache.wicket.protocol.http.WicketFilter?.doGet(WicketFilter?.java:251)
 at
 org.apache.wicket.protocol.http.WicketFilter?.doFilter(WicketFilter?.java:125)
 at
 org.apache.catalina.core.ApplicationFilterChain?.internalDoFilter(ApplicationFilterChain?.java:202)
 at
 org.apache.catalina.core.ApplicationFilterChain?.doFilter(ApplicationFilterChain?.java:173)
 at
 org.apache.catalina.core.StandardWrapperValve?.invoke(StandardWrapperValve?.java:213)
 at
 org.apache.catalina.core.StandardContextValve?.invoke(StandardContextValve?.java:178)
 at
 org.apache.catalina.core.StandardHostValve?.invoke(StandardHostValve?.java:126)
 at
 org.apache.catalina.cluster.tcp.ReplicationValve?.invoke(ReplicationValve?.java:346)
 at
 org.apache.catalina.valves.ErrorReportValve?.invoke(ErrorReportValve?.java:105)
 at
 org.apache.catalina.core.StandardEngineValve?.invoke(StandardEngineValve?.java:107)
 at
 org.apache.catalina.connector.CoyoteAdapter?.service(CoyoteAdapter?.java:148)
 at org.apache.coyote.ajp.AjpAprProcessor?.process(AjpAprProcessor?.java:425)
 at
 org.apache.coyote.ajp.AjpAprProtocol?$AjpConnectionHandler?.process(AjpAprProtocol?.java:452)
 at
 org.apache.tomcat.util.net.AprEndpoint?$Worker.run(AprEndpoint?.java:1285)
 at java.lang.Thread.run(Thread.java:619)
 
 


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


Re: [Wicket-user] Location of css, images, js files

2007-06-16 Thread Al Maw
Tauren Mills wrote:
 My goal is to allow a client with minimal web design skills to manage
 the html, css, image, and properties files with minimal risk of
 damaging the application.  I'd like the java class files to be located
 in a separate location.  And I'd like the folder structure of the
 webroot to be clean and make sense to the designer.

Can you give us more information on how things are not working as expected?

Specifically, how are you linking to your CSS/JS files? I presume you're
using resource references, and instead are including link elements in
the HTML?

Is Wicket rewriting these? See PrependContextPathHandler. This should
make your JS/CSS links absolute, against your context root. If your HTML
files are in there too, then this should Just Work.

Note that I don't think putting your HTML files into your web context
root is a great idea (at least, not for deployment).

You could instead create a parallel source folder (if you're using Maven
2, src/main/resources is automatic, and is ideal for this), and get your
web designer to put the CSS link elements inside a wicket:remove tag.

You'd then just go add(HeaderContributor.forCss(getClass(), foo.css));
in your actual code.

This has the benefit that if you wish to refactor bits of your app out
into libraries, all the CSS/HTML/etc. comes along with it, and it all
gets automatically packaged up my maven or whatever.

Other than that, I'm not sure if there's a more elegant way of doing
that in Wicket 1.2.x (1.3 makes this a little easier). Anyone else?

Al

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


Re: [Wicket-user] wicket-contrib-gmap2

2007-06-16 Thread Al Maw
I really think you guys should get together and do this, right now while
the project still has lots of momentum and the code is fresh. Having two
components, one of which seems to have a superset of the functionality
of the other, seems a little unnecessary.

I've checked gmap2 out, BTW - very nice. ;-)

Al

Iulian Costan wrote:
 yap, well done, also maybe we can put together the effort and improve
 things.
 
 /iulian
 
 On 6/14/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]
 wrote:

 Hi Martin

 Well, both Iulian and me has done a lot of work on this during the last
 couple of weeks. It's always nice to see to sides of the coin, maybe we
 should pick the best stuff from our components and join up?

 Currently Iulian are working on upgrading the gmap contrib to wicket
 1.3, we decided not to make a release on wicket 1.2.6 since some of the
 ajax stuff we are using arent working on the IE browser series(I have
 another thread concering this). Upon releasing v 1 we will update
 confluence so that the features we are using will be shown installation
 instructions etc, heres a short list of features:

 All updates done via ajax, clicklisteners of all sorts(dragend,
 zoomend). Possibility to integrate loading screens. 2 step initialized
 and  refresh, meaning no visible postbacks, we are using panTo. Control
 the map serverside eg if user clicks the las vegas button the map will
 pan to that area. Add overlays at will. Create custom overlays with
 tooltips. Since we are using ajax all normal wicket ajax  behavior are
 also supported from the ajax target.

 Not sure if I forgot anything...


 regards Nino

 Martin Funk wrote:
  Hi,
 
  may I draw your attention to a little project I was allowed to add to
  the wicket-stuff svn repository yesterday.
 
  Being highly inspired by Julians and Nicos wicket-contrib-gmap I got
  exited enough to try to create a project that does the same and a
 little
  bit more with a little different approach. Kinda bold, since I haven't
  looked into JavaScript before. Julian and Nico I hope you don't mind
  that I tried to invent the wheel a second time, but if your project
  wouldn't have been around I probably never would have tried. So thank
  you for that.
 
  Features:
  There can be more than one GMap on a page, I think there can be
 many, at
  least I succeeded with two.
 
  Components may become controls of the GMap. Any Component capable of
  firing events can become a controller. The controls are executed
  whenever the named event is fired by the Component. Currently ZooOut,
  ZoomIn, PanDirection, AddOverlay and OpenInfoWindow are implemented.
 
  Listeners may be added to the GMap. These are called whenever the GMap
  fires the corresponding Events. So far a ClickListener and a
  MoveEndListener are implemented. This allows to dynamically update any
  Component and the GMap itself.
 
  The events and the controls always do a round trip from the browser to
  the server and back, this way any call can be intercepted and
 controlled
  on the server side. The network traffic is kept down, since all needed
  JavaScript functions are defined in a js-file. So only arguments
 have to
  be transfered.
 
  Status:
  Is best described by, consolidating. As I said, being a JavaScript
  newbie and a Java mediocre, it was sort of bold to start this. The
  features in mind I basically cut right through any API ahead of me
  without taking care of any design principles. So if you ever find the
  time to look into the code, give feedback! And I fear this project
 is in
  need for a lot of feedback.
 
  Last but not least: Installation.
  There is no release currently planed. The code compiles against the
  current HEAD of wicket. So get get wicket from svn as described in
  http://incubator.apache.org/wicket/building-from-svn.html first.
  This project relies on the well maintained structure of wickets pom.xml
  files. It needs to be checked out into wicket jdk-1.5 folder:
 
  cd wickets-jdk-1.5-folder
  svn co
 
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-gmap2

  svn co
 
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-gmap2-examples

 
  This should do the install and get a jetty started for the examples:
  mvn -f wicket-contrib-gmap2/pom.xml install
  mvn -f wicket-contrib-gmap2-examples/pom.xml jetty:run
 
  Now browse to:
  http://localhost:8080/wicket-contrib-gmap2-examples/gmap/
  and click around.
 
 
  Have fun,
 
  Martin
 
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 

Re: [Wicket-user] Prototype scoped Spring beans

2007-06-16 Thread Rüdiger Schulz

I finally had the time to try this out. The re-injection after
de-serialization apparently works now. However, the problems didn't stop
there, as I was accessing DAOs and an EntityManager from within this bean. I
read more stuff on that ( the book Java Persistence with Hibernate covers
this pattern quite well), and came to the conclusion that all the trouble
involved is not worth it in this particular case.

Just to put some more detail to this:
I developed this particular bean as a stateful EJB on Jboss. But as
development on Jboss is often very slow when you have to restart your server
(at least compared to Jetty), I switched to Spring. This solved some (not
all!) of the problems I had there, but raised the ones I discussed in this
thread.

At least with the current state, I would discourage anyone implementing long
conversations within spring beans. Some of the magic happening in EJB (like
propagating the right EntityManager to your stateful DAOs) is just not
there yet; or at least I don't see it :) The following thread was not very
encouraging either:
http://forum.springframework.org/showthread.php?t=39523highlight=long+conversation

Still, thanks a lot again, Igor. In some other context, this might very well
become useful.

Rüdiger

2007/6/13, Rüdiger Schulz [EMAIL PROTECTED]:


Igor, that makes perfect sense, thank you very much. I still have to try
it, but if it works with @Configurable, this will be great! It is definitely
better than implementing readResolve(), and manually injecting the
dependencies via reflection, as someone suggested on the myfaces list.

I'll post my experience after trying it.


Rüdiger

2007/6/12, Igor Vaynberg [EMAIL PROTECTED]:

 if you think about it, your problem comes from the fact that you do not
 want to serialize this stateful bean because it has references to other
 beans which are not serializable and yet you want to put it into
 httpsession.

 the requirement of anything you put into httpsession is that it _is_
 serializable for replication to other server nodes, etc. - unless you use
 some nonstandard replication technique.

 shale will run into the same limitation. its dialog scope is pretty
 much the same as making something a field of a page. that field is there
 while the page is, and is then cleaned up when the page is not needed.
 however it runs into the same limitation because it most likely uses
 httpsession for storing that dialog-scoped data and thus you are back to
 serialization problem.

 now a solution i see is thus. make this bean @Configurable and
 serializable. keep all dependencies in transient vars. that way when the
 bean is serialized its dependencies are not, and when it is deserialized i
 think @Configurable wires in an intercept that will reinject the bean. that
 way you get the best of both worlds. makes sense?

 -igor

 On 6/12/07, Rüdiger Schulz  [EMAIL PROTECTED] wrote:
 
  1) Convert the bean to a stateless service, and keep the state in
  another bean.
  2) Make the bean references transient, and re-fetch them manually (i.e.
  without DI from spring) after de-serialization.
 
  There is nothing wrong with 1), I use it in other parts of my app. It
  sure would be nice to have stateful beans with DI-ed application logic, but
  2) seems very clumsy. However, later in the above thread, someone mentions
  the dialog feature of Shale:
  http://mail-archives.apache.org/mod_mbox/myfaces-users/200609.mbox/[EMAIL 
PROTECTED]
 
 
  Maybe something like that could be applied to wicket as well?
 
 



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




--
greetings from Berlin,

Rüdiger Schulz

www.2rue.de





--
greetings from Berlin,

Rüdiger Schulz

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


Re: [Wicket-user] [Question] wicket.markup.html.form.Radio

2007-06-16 Thread Kent Tong
Alex Objelean alexandru.objelean at isdc.ro writes:

 Thank you Jan! Sad thing is that 1.2.x branch will never support this
 feature.

Try:

Form f = ...;
RadioGroup rg2 = new RadioGroup(rg2, ...);
rg2.setOutputMarkupId(true);
setupAjaxRadio(f, rg2, new Radio(r3, new Model(abc)));
setupAjaxRadio(f, rg2, new Radio(r4, new Model(def)));
...

  private void setupAjaxRadio(final Form form, 
  final RadioGroup radioGroup,
  final Radio radio) {
radioGroup.add(radio.add(new AjaxEventBehavior(onchange) {
  protected void onEvent(AjaxRequestTarget target) {
radioGroup.processInput();
target.addComponent(form);
  }
  protected CharSequence getEventHandler() {
return getCallbackScript(new AppendingStringBuffer(
wicketAjaxPost(').append(getCallbackUrl()).append(
', wicketSerialize(document.getElementById('
+ radio.getMarkupId() + '))), null, null);
  }

}));
  }



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


Re: [Wicket-user] HomePage url changes when user returns from a second wicket page

2007-06-16 Thread howzat

Page A has this code in its constructor:
Link b = new Link(b){
public void onClick(){
 setResponsePage(B.class);
}
};
add(b);

Page B has a no-args constructor. It has a link to page A. It also has a
form (with a bit of Ajax) which takes some user input. The no args
constructor writes a debug message In constructor of class B.

The user starts on page A, clicks the link to B, enters some data into the
form on B, clicks on the link to A and then clicks on the link on A to go
back to B; all the user's data has disappeared. 
In fact, B's constructor has been called twice. 
Is it not the case that the setResponsePage(B.class);   (as opposed to
setResponsePage(new B());)  should use the _original_ instance of B, which
was stored in the user's session (as per the perfectly reasonable post
below)?
How can I achieve the desired effect (ie not losing the user's input on
returning to B) ?
Is the only way to achieve this to manually put the user's input data into
some sort of dumb object, put that dumb object into the session, and then
pass it as a PageParameter when heading back to B ?



Alastair Maw wrote:
 
 howzat wrote:
 Al, that is a very helpful reply, thank you!
 
 No problem. ;-)
 
 Yes, I have a lot to learn about wicket, but I know a lot more than I did
 a
 few days ago, and I like it so far.
 
 Great!
 
 In my particular case, the page in question is the HomePage, so, since
 the
 user has already been there on her way to Page2, I suppose I will always
 need to create a new instance if I want to show an alert (for example) as
 the HomePage is visited from Page2's submit (eg user saved some data
 entered
 on a Page2 form by hitting submit).
 I acheived this, albeit by dubious methods (as you kindly pointed out),
 by
 including an alert in the head of the HomePage if the constructor that
 takes a message (eg HomePage(String successMessage)) is called using a
 StringHeaderContributor.
 I suppose I need to review this.
 On the other hand, it is still a useful learning exercise, either way,
 and I
 will now study your post in detail before I try again, cheers.
 
 If you wish, you can pass the home page into your Page2.
 
 add(new Link(someId) {
 public void onClick() {
 setResponsePage(new Page2(HomePage.this));
 }
 });
 
 And take the Page arg in Page2's constructor.
 That way, you have a reference to it, and can link back to that.
 
 It's probably better to do status alert type stuff using Wicket's
 FeedbackPanel (if it's for a form) or via some other Session-based
 mechanism, though.
 
 Have fun playing.
 
 Regards,
 
 
 Al
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/HomePage-url-changes-when-user-returns-from-a-second-wicket-page-tf3732701.html#a11160780
Sent from the Wicket - User mailing list archive at Nabble.com.


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