RE: ModalWindow and reusable components

2011-09-23 Thread Chris Colman
We wanted to make ModelWindowS more reusable in Wicket and so we created the ModalX project that is now part of WicketStuff. Not sure if it's what you're looking for but it certainly makes the use of ModalWindowS in our apps much more generic/reusable. https://github.com/wicketstuff/core/wiki/Moda

Re: Removing/Consuming FeedbackMessage

2011-09-23 Thread Igor Vaynberg
you have to call markRendered() followed by cleanupFeedbackMessages() which removes all messages marked rendered and by default is done for you at the end of every request. -igor On Fri, Sep 23, 2011 at 1:40 PM, Marek Šabo wrote: > Hi, > > is it possible to consume or remove feedback message fr

Removing/Consuming FeedbackMessage

2011-09-23 Thread Marek Šabo
Hi, is it possible to consume or remove feedback message from session? I've tried removing through iterator but that's unsupported. I thought markRendered() would do but it doesn't help either. What I would like to do is display some messages (based on reporter) via javascript and some in fee

Re: Help with URL Rewrite in IFrame!

2011-09-23 Thread Dan Retzlaff
Yes, it can mean that. It's definitely something you should think about. :) On Fri, Sep 23, 2011 at 12:37 PM, kugaprakash wrote: > Thanks a lot for the response. I was also thinking along the similar lines. > However, have a question: How is the authentication done? Doesnt this kind > of proxy me

Re: DecimalFormatLabel (proposed)

2011-09-23 Thread Yves-Marie LAINÉ
In my opinion, it could be more usefull to nest a StringResourceModel directly in a "ResourceLabel", as formating number is often application wide and sometimes Locale dependent. And it covers more use case. It's just my point of view. Maybe like this : protected void onComponentTagBody(fina

Re: Help with URL Rewrite in IFrame!

2011-09-23 Thread kugaprakash
Thanks a lot for the response. I was also thinking along the similar lines. However, have a question: How is the authentication done? Doesnt this kind of proxy mean that, any request with that URL from any browser gets forwarded via this proxy? Sorry for repeating emails Regards Kuga On Sep

Re: Help with URL Rewrite in IFrame!

2011-09-23 Thread Dan Retzlaff
This use case is more typically handled by setting up a reverse proxy. We use http://httpd.apache.org/docs/2.2/mod/mod_proxy.html. For trivial content making the request yourself might be okay, but as soon as the page refers to other images/CSS/etc, you'll be reinventing the wheel. :) On Fri, Sep

RE: Help with URL Rewrite in IFrame!

2011-09-23 Thread kugaprakash
Hi Dan, Yes, I believe you are right, and that's prettymuch what I am looking for. One of the developer who was trying to prototype the FB app with wicket, mentioned that we could override the WebResponse, and achieve this: https://cwiki.apache.org/WICKET/wicket-form-submits-fbml-and-redirects.htm

Re: Help with URL Rewrite in IFrame!

2011-09-23 Thread Dan Retzlaff
It sounds like you want to make a request to your internal, third party web app and render the response to an external user. That's not typically called URL rewriting. To accomplish that, from your Wicket page/resource you'll need to make a new HTTP request using the JDK or a library like http://hc

Re: Update Component automatically without extending Session life

2011-09-23 Thread Dan Retzlaff
Rather than use Wicket components, can you just redirect the user to a logout URL when your JavaScript inactivity timer expires? Each user input could use JavaScript's clearTimeout and setTimeout functions to re-arm this "on activity timeout" function. 2011/9/23 Sebastian Lütge > As a workaround

Re: ModalWindow and reusable components

2011-09-23 Thread Igor Vaynberg
the window has a WindowClosedCallback you can use to refresh the appropriate part of the page once the window has been closed. -igor On Fri, Sep 23, 2011 at 8:48 AM, Chris Merrill wrote: > In my short time with Wicket, I've found that whenever something seems really > hard, I'm probably doing i

Re: Update Component automatically without extending Session life

2011-09-23 Thread Sebastian Lütge
As a workaround / alternate solution to my problem of eventually terminating a session that is kept alive by an AjaxSelfUpdatingTimerBehavior I'm currently trying to update a TextField via JavaScript (detecting user activity) and then passing this timestamp to wicket. My question now is: how do I s

Re: ModalWindow and reusable components

2011-09-23 Thread Dan Retzlaff
Hi Chris, I have struggled with this pattern myself. Ultimately I ended up using an eventing pattern to decouple the modal from the page components that need to be refreshed. I rolled my own event dispatch mechanism in Wicket 1.4 using event-specific interfaces and IVisitors that find all componen

Re: DecimalFormatLabel (proposed)

2011-09-23 Thread Pranav kacholia
Or we go one step further back. I think this would handle all use cases. If we want to put in a NumberFormat or a DecimalFormat , in both cases it should work. public class FormattedLabel extends Label{ final private Format formatter; public FormattedLabel(String id, IModel mode

Re: DecimalFormatLabel (proposed)

2011-09-23 Thread Yves-Marie LAINÉ
Yes, you're right, but this way fit 90% of my needs (It's a Label...) Otherwise, it's possible to use a CustomConverter to do it, and then override getConverter on Component. So, it also work on TextField (but i agree, it's not exactly your use case. ) : @Override public IConverter getCon

ModalWindow and reusable components

2011-09-23 Thread Chris Merrill
In my short time with Wicket, I've found that whenever something seems really hard, I'm probably doing it wrong :> I'm hoping this is such a case. We have a number of components that are used on multiple pages. They are pretty simple - typically a couple of form field linked together for data en

RE: DecimalFormatLabel (proposed)

2011-09-23 Thread Pranav kacholia
Suppose someone wants to call formatlLabel.getModelObject() ... I don’t see why they would, but hypothetically. In this case you would get the formatted string. Since the label is merely a view, should it be changing the model even by formatting it? From: Yves-Marie LAINÉ [via Apache Wic

Re: Footnote-Support

2011-09-23 Thread Christian Huber
Hi again, for those who might be interessted I just wanted to let you know that I now have a working footnote support implementation. The details can be found here (another chance for shameless blog advertising

Re: DecimalFormatLabel (proposed)

2011-09-23 Thread Yves-Marie LAINÉ
Hi all, Personnaly I did it like that (simpler for i18n, i think) : public class FormatLabel extends Label { public FormatLabel(String id,final String formatKey, final IModel model) { super (id); setDefaultModel(new AbstractReadOnlyModel() { @Override

Re: creating a textarea with a radiobutton using Listview

2011-09-23 Thread manuelbarzi
> First I created one checkbox and one textfield for each line. And when the > user selects the checkbox I was able to set the related boolean values > succesfuly. But I needed to put a restriction. Only one checkbox can be > selected to submit the form in the followıng structure. > > Textarea chec

RE: DecimalFormatLabel (proposed)

2011-09-23 Thread Pranav kacholia
Perhaps we can keep it as a NumberFormatLabel for greater flexibility import java.text.NumberFormat; import org.apache.wicket.markup.ComponentTag; import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.IModel; import org.apach

Re: embed youtube player

2011-09-23 Thread Martin Grigorov
Extend WebComponent, override onComponentTag() method and set the required attributes (e.g. src) depending on the model/context. On Fri, Sep 23, 2011 at 6:36 AM, fachhoch wrote: > I want to embed youtube into my page , for this I created a panel which > implements IMarkupResourceStreamProvider, i