Re: DropDownChoiceWithStylingOptionsT

2010-01-11 Thread aditsu
There's a small bug - endOptGroup(tmp) for OptGroup changed actually closes the optgroup after the current option, not before. I replaced it with buffer.append(/optgroup), but I wonder if there can be some other markup after the previous /option and whether that matters. -- View this message in

Re: DropDownChoiceWithStylingOptionsT

2010-01-11 Thread aditsu
Hi, thanks for the quick reply. MartinM wrote: There's a small bug - endOptGroup(tmp) for OptGroup changed actually closes the optgroup after the current option, not before. Note: It is supposed to close the previous optgroup. Not the current optgroup. Yep, that's why it's a bug. It

Re: DropDownChoiceWithStylingOptionsT

2010-01-11 Thread aditsu
MartinM wrote: Hmm.. mine seems to work fine with some other test cases, is this the same code you have or is it different: It's the same, except for Utils.equalsOrNull which must be from your unpublished code, and I replaced it with one of my own utility methods. Just try my test case.

Re: Directions for Stateless Ajax

2008-12-04 Thread aditsu
nate roe wrote: I've written a stateless auto-complete TextField by adapting Wicket's own JavaScript and using a servlet for the back end. I don't like the servlet and I would like to instead use Wicket to serve the auto-complete suggestions list, but I'm not sure how. Well, I've just

Re: Directions for Stateless Ajax

2008-12-04 Thread aditsu
Nino.Martinez wrote: Why not put these to into wicketstuff minies? aditsu wrote: Well, I've just implemented a StatelessAutoCompleteTextField that works in wicket directly :) I used a similar technique to my StatlessAjaxLink described at http://www.nabble.com/Stateless-AJAX-links

Generics changes in 1.4-rc1

2008-11-20 Thread aditsu
Hi, I've been using m3 for a while and just tried switching to rc1. I found several problems: - LabelTree.getNodeTextModel requires IModel and returns IModel. I was overriding it and returning a ModelString, but I can't do that anymore. Why not just return IModel? ? - RatingPanel now requires an

Re: Generics changes in 1.4-rc1

2008-11-20 Thread aditsu
Johan Compagner wrote: Please make issues for this in jira Since you said issues, I created 3 issues: WICKET-1947, WICKET-1948, WICKET-1949 Adrian -- View this message in context: http://www.nabble.com/Generics-changes-in-1.4-rc1-tp20599173p20615568.html Sent from the Wicket - User

Re: Handling exceptions during render

2008-11-04 Thread aditsu
Alex Objelean wrote: Can you be more specific? What kind of unexpected runtime exceptions are you talking about? I don't think I understood you correctly. It could be anything.. NPE (probably the most popular), IllegalArgumentException and its descendants, ArithmeticException,

Re: Handling exceptions during render

2008-11-04 Thread aditsu
igor.vaynberg wrote: i would hate a user to look at a signup form without a signup button because something inside it caused an error. i would also hate to see a user at a checkout page with a missing $500.00 discount amount shown because there was an error in the discount label.

Re: Handling exceptions during render

2008-11-04 Thread aditsu
aditsu wrote: Anyway, I want to have the option to catch exceptions from child components at certain points that I can define. And I think I got a new idea.. involving replace and RestartResponseException Well, it seems to work, except I had to call setAuto(true) on the replacement

Re: Handling exceptions during render

2008-11-03 Thread aditsu
Ok, but how would that let me render the rest of the page? Alex Objelean wrote: There are more threads about this issue... In order to catch all runtime exception, you have to override default RequestCycle (newRequestCycle method) in your application class and override

Re: Handling exceptions during render

2008-11-03 Thread aditsu
Thanks, but I can't find any handleRuntimeException method in any class. I'm using wicket 1.4-m3. Also, if the method is private, then how can I possibly override it? Alex Objelean wrote: There are more threads about this issue... In order to catch all runtime exception, you have to

Handling exceptions during render

2008-11-03 Thread aditsu
Hi, how can I catch any exception thrown while a component is rendering, and either hide the component or show an error message, but allow the rest of the page to render? Modifying or replacing each such component is not an option, I need a general way to handle exceptions while rendering any

Re: Handling exceptions during render

2008-11-03 Thread aditsu
exceptions will help. But then again, exceptions are intended for controlling the non-expected. You should not use exceptions for normal page flow. In other words: just make sure that no exceptions are thrown. Regards, Erik. aditsu wrote: Ok, but how would that let me render

Re: Stateless AJAX links

2008-10-27 Thread aditsu
John Patterson wrote: aditsu wrote: Anyway, everything is working now, but I wanted some answers to those questions. I am very interested in what you have achieved here. Is there any chance you could summarise what you had to do to get stateless AJAX links to work? Perhaps just

Re: Stateless AJAX links

2008-10-27 Thread aditsu
Hi, I thought about what you said, and debugged some more. Here's what I found out: Johan Compagner wrote: RequestCycle.isRedirect() is right, because that is a call that tells us must i redirect of i get a page redirect and with ajax this is always the case. Problem is that the

Re: Stateless AJAX links

2008-10-26 Thread aditsu
Thanks. but some of the things don't really make sense: Johan Compagner wrote: - Why does wicket always do redirect for ajax requests? Because how else would you render the resulting page? It's an ajax request that makes changes to the current page (without going to another page). What

Re: Session ID

2008-10-26 Thread aditsu
aepelde wrote: I'have implemented a custom MySession session object and create an instance when my application's newSession method is called. Something simple like this: public Session newSession(Request request, Response response) { MySession session = new

Problem with a stateless form

2008-10-23 Thread aditsu
Hi, I made a small application to reproduce the problem. You can download it from http://aditsu.net/wickettest.zip Dependencies: jetty 6, wicket 1.4-m3, slf4j, log4j Steps to reproduce: 1. Run the test.Start class 2. Open http://localhost:8080 in a browser 3. Open http://localhost:8080/page2 in a

Re: RequestCycle.urlFor modifies a page's parameters?

2008-10-20 Thread aditsu
igor.vaynberg wrote: i dont think this is normal. please file a jira issue. Filed WICKET-1881 Thanks Adrian -- View this message in context: http://www.nabble.com/RequestCycle.urlFor-modifies-a-page%27s-parameters--tp20031013p20077002.html Sent from the Wicket - User mailing list

RequestCycle.urlFor modifies a page's parameters?

2008-10-17 Thread aditsu
Hi, I'm using wicket 1.4-m3 I was debugging a problem and I found that RequestCycle.urlFor(Component, RequestListenerInterface, ValueMap) can sometimes modify the parameters of an existing page. Here's the relevant code: if (listener != IRedirectListener.INTERFACE component.isStateless()

Stateless AJAX links

2008-10-17 Thread aditsu
Hi, I managed to hack wicket (1.4-m3) to do a kind of stateless ajax link. I extended AbstractLink and implemented ILinkListener, and added a custom stateless AjaxEventBehavior that creates a callback url using the ILinkListener interface (in order to get a

Re: DHTML DnD best practice?

2008-10-17 Thread aditsu
Look at wicketstuff-jquery, especially DnDSortableBehavior. It's not perfect, but at least it can give you some ideas. -- View this message in context: http://www.nabble.com/DHTML-DnD-best-practice--tp20010633p20031872.html Sent from the Wicket - User mailing list archive at Nabble.com.