Re: Do AJAX calls exnted life of a Session

2011-09-23 Thread Igor Vaynberg
ajax requests do extend the session timeout. if you have a page that you do not want to expire add an ajax timer behavior to it that does nothing - that way as long as its open in a browser it will stay alive. -igor On Thu, Sep 22, 2011 at 9:30 PM, Arjun Dhar dhar...@yahoo.com wrote: Hi In

Re: Help with URL Rewrite in IFrame!

2011-09-23 Thread Igor Vaynberg
dont really understand what you mean... -igor On Thu, Sep 22, 2011 at 9:57 PM, kugaprakash kvisagam...@infoblox.com wrote: Hi, Appreciate the response. Is there any way to redirect the URL when wicket gets it?  Is there a URL rewriting capability? NOTE: Need to rewrite the URL only for the

Re: DecimalFormatLabel (proposed)

2011-09-23 Thread Viktoras
Wouldn't it be better to create a model of String type which is constructed with a Number and NumberFormat as arguments, and use it as model for standard label? On 2011.09.22 23:45, Pranav kacholia wrote: I have foound many places where i need to format a number and display it in a label. Can

RE: DecimalFormatLabel (proposed)

2011-09-23 Thread Pranav kacholia
I figured this would work best if we use things like CompoundPropertyModel. Imagine you have a property of type int called myInt in POJO called myPojo Then the code becomes extremely simple WebMarkupContainer container = new WebMarkupContainer(container, new

RE: BookmarkablePageLink works differently in 1.5?

2011-09-23 Thread Chris Colman
attach a patch to a jira issue. New JIRA issue created: https://issues.apache.org/jira/browse/WICKET-4079 Looks like others have had the same issue so it seems like it would be a generally useful improvement:

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 fachh...@gmail.com wrote: I want to embed youtube into my page , for this I created a panel which implements

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

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 checkbox

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? extends Serializable model) { super (id); setDefaultModel(new AbstractReadOnlyModelString() {

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 http://sanityresort.blogspot.com/2011/09/adding-footnote-support-to-wicket.html (another chance for shameless blog advertising

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

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

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

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?

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

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

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 ch...@webperformance.com wrote: In my short time with Wicket, I've found that whenever something seems really

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 s.lue...@gmail.com

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

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:

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
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: 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(final

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 kvisagam...@infoblox.comwrote: Thanks a lot for the response. I was also thinking along the similar lines. However, have a question: How is the authentication done? Doesnt

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

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 ms...@buk.cvut.cz wrote: Hi, is it possible to consume or remove