Re: [Wicket-user] OpenSessionInViewFilter and Wicket Resources

2007-06-28 Thread John Krasnay
On Thu, Jun 28, 2007 at 09:16:13AM -0700, Igor Vaynberg wrote: On 6/28/07, Huergo Perez [EMAIL PROTECTED] wrote: One possible solution would be to move the static resources away from my JAR file directly into the WAR (as most Java web MVC apps usually have), however I would

Re: [Wicket-user] How to get HTML source code from a wicket page

2007-06-24 Thread John Krasnay
OK, so WicketTester is the way to go. JBQ's response implied that there was a more direct way to do it, but I'll give WicketTester a try. Thanks, jk On Sat, Jun 23, 2007 at 08:05:58PM -0700, Igor Vaynberg wrote: see our tests. all the mock setup is done for you. our tests simply call a

Re: [Wicket-user] How to get HTML source code from a wicket page

2007-06-24 Thread John Krasnay
Ah, that makes more sense. Thanks for the clarification and example. jk On Sun, Jun 24, 2007 at 05:15:14PM +0200, Jean-Baptiste Quenot wrote: Yes there is a more direct way. I'm sorry I made an error, I meant StringResponse, not StringRequestTarget. I spent a few minutes writing the

Re: [Wicket-user] How to get HTML source code from a wicket page

2007-06-23 Thread John Krasnay
Thanks for the tip, but could you give us a little more of a clue? For example, from where should we get the RequestCycle? Using RequestCycle.get() doesn't sound right, since that's for the response we're sending to the browser, not for the HTML we want to render into the email. I looked into the

[Wicket-user] SimpleConverterAdapter and primitive fields

2007-06-09 Thread John Krasnay
My application stores money amounts as an integer number of cents. I've written a converter to handle this as follows: public class MoneyConverter extends SimpleConverterAdapter { public Object toObject(String value) { try { return Math.round(Float.parseFloat(value) *

Re: [Wicket-user] wicket did not make the grade.

2007-06-06 Thread John Krasnay
On Tue, Jun 05, 2007 at 09:40:33PM -0700, JonLaidler wrote: I would be interested to hear how many companies are usng Wicket, and how many of those companies switched to Wicket from other frameworks. Here's my Wicket story. Our team is a small internal development group inside a large bank.

Re: [Wicket-user] wicket did not make the grade.

2007-06-05 Thread John Krasnay
Hear, hear...well said, Jim! jk On Tue, Jun 05, 2007 at 10:42:16AM -0500, James McLaughlin wrote: Hi Florian, To be honest, you should have titled this post My team did not make the grade. There are many developers in the world whose skill and ambition rise little above cut and paste robot,

Re: [Wicket-user] Implementing a PopupPanel

2007-05-30 Thread John Krasnay
One way to solve the abstract method from the constructor problem (or more precisely, the non-final method from the constructor problem) is to use a Model, e.g... public class PopupPanel extends Panel { public abstract String getTitle(); public PopupPanel(String id) { add(new

Re: [Wicket-user] [Nuub] Best practise: Navigation Component

2007-05-30 Thread John Krasnay
One idea would be to create a class that represents the logical idea of a link, e.g public class NavEntry { private String title; private Class pageClass; private PageParameters parameters; ... } Pass a list of these to the constructor of your panel, which then renders these

Re: [Wicket-user] Implementing a PopupPanel

2007-05-30 Thread John Krasnay
which it uses to construct the label but the parent calls getTitle() too soon. As there are 2 components within the parent (title and contents) that the child needs to fill, I could not use markup inheritance. Thanks, Ravi. John Krasnay wrote: One way to solve

Re: [Wicket-user] Multiple wicket:child tags in the same page

2007-05-18 Thread John Krasnay
This question does come up quite a bit on the list, though. I admit thinking the same thing when I was coming to grips with Wicket not so long ago. I think the problem is not that markup extension is hard to understand, but rather that it's very intuitive, so much so that new Wicket users want to

Re: [Wicket-user] Vertical Tabs

2007-05-17 Thread John Krasnay
I tried to explain this in an earlier thread, but I'm afraid I wasn't too successful. I'll give it another shot. Suppose your outer tabs are defined on a page like this: div wicket:id=outerTabs class=outerTabs/div When you attached the TabbedPanel component to it, it renders like this: div

Re: [Wicket-user] [Request for enhancement] TabbedPanel

2007-05-16 Thread John Krasnay
Hi Alex, The way I've tackled this is to have a wrapper div around the entire tab panel, like so... div class=mytabs div class=tab-row ul ... /ul /div /div You just need to add the wrapper div to your CSS selector: div.mytabs li { background-color: green; } Then you can

Re: [Wicket-user] [Request for enhancement] TabbedPanel

2007-05-16 Thread John Krasnay
In fact now that I think of it, you don't even need the wrapper div. Remember that the TabbedPanel renders the tabs *inside* the tag to which it's attached. That tag can contain the CSS class that makes that set of tabs unique: div wicket:id=tabs class=greentabs/div add(new TabbedPanel(tabs,

Re: [Wicket-user] [Request for enhancement] TabbedPanel

2007-05-16 Thread John Krasnay
the css class the the entire tabbedPanel container, subsequently all nested tabbedPanels will be treated the same way What I need is to identify the tab-row container John Krasnay wrote: In fact now that I think of it, you don't even need the wrapper div. Remember

[Wicket-user] [EMAIL PROTECTED]: [jira] Resolved: (WICKET-527) Panel header contribution breaks AJAX update in Internet Explorer]

2007-05-13 Thread John Krasnay
: https://issues.apache.org/jira/browse/WICKET-527 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.2.6 Reporter: John Krasnay Assigned To: Matej Knopp Attachments: quickstart.zip If a Panel subclass makes a header

Re: [Wicket-user] Wicket requiring one of my Spring managed beans to have a default constructor

2007-05-13 Thread John Krasnay
Not directly related to your question, but you might like to know that the name property of @SpringBean defaults to your field name, so you could have written it like this... @SpringBean private ContentSettings contentSettings; @SpringBean private LearningItemRepository

[Wicket-user] Header contributions and AjaxLink

2007-05-03 Thread John Krasnay
I think I may have found a bug with header contributions, AjaxLink, and Internet Explorer. Here's a test page: html body div wicket:id=subComponent/div /body /html ---8--- public class TestPage extends WebPage { public TestPage() { add(new SubComponent(subComponent)); }

Re: [Wicket-user] Header contributions and AjaxLink

2007-05-03 Thread John Krasnay
issue. -igor On 5/3/07, John Krasnay [EMAIL PROTECTED] wrote: I think I may have found a bug with header contributions, AjaxLink, and Internet Explorer. Here's a test page: html body div wicket:id=subComponent/div /body /html ---8--- public class

Re: [Wicket-user] question on localization

2007-04-24 Thread John Krasnay
You might want to make it so you can dynamically generate a page title where you need to, instead of always requiring a static page title. The trick is to return an IModel from the getPageTitle method in your base page. Here's how I've done it: title wicket:id=pageHeaderTitleFoo/title public

Re: [Wicket-user] question on localization

2007-04-24 Thread John Krasnay
(); } void detach() { getpagetitle().detach(); } } -igor On 4/24/07, John Krasnay [EMAIL PROTECTED] wrote: You might want to make it so you can dynamically generate a page title where you need to, instead of always requiring a static page title. The trick is to return an IModel from

Re: [Wicket-user] Where to place images

2007-04-19 Thread John Krasnay
You might consider referencing the image from a Panel, then just using the panel everywhere. In that case the image only needs to be kept in the package that defines the Panel. If it's something like a logo that appears at the top of every page, you could also define a base page that renders the

Re: [Wicket-user] AbstractAjaxTimerBehavior on a page not possible ?

2007-04-17 Thread John Krasnay
where the registration form is presented, I would have to update the page with this meta after successful submit, is that correct ? If so, is it possible to update the meta through ajax ? Thanks again ZedroS On 4/17/07, John Krasnay [EMAIL PROTECTED] wrote: How about doing this the old

Re: [Wicket-user] AbstractAjaxTimerBehavior on a page not possible ?

2007-04-17 Thread John Krasnay
How about doing this the old-fashioned way? meta http-equiv=refresh content=5;url=/welcome jk On Tue, Apr 17, 2007 at 02:16:57PM +0200, ZedroS Schwart wrote: First of all, thanks for your answer. Regarding this form, in fact it's the registration one. On successful form filling (having

Re: [Wicket-user] Input focus

2007-04-04 Thread John Krasnay
through the header response that is passed in. sounds like a mouthful, but should be pretty simple to implement. -igor On 4/2/07, John Krasnay [EMAIL PROTECTED] wrote: Hi folks, I'm new to Wicket and I'm wondering if there's a Wicket way to have input focus set to the first form

[Wicket-user] Input focus

2007-04-02 Thread John Krasnay
Hi folks, I'm new to Wicket and I'm wondering if there's a Wicket way to have input focus set to the first form component on the page. I could always code up some Javascript to do this but it would be nice if I could flag certain form components as wanting focus, then have the page set the focus