RE: submit a form from outside of it

2010-01-18 Thread Martin Asenov
Hi namesake! :-) 

Unfortunately this is not what I need since as I said panels do not have 
reference to their parent page. Anyway thanks for your time!

After all I put the feedbackpanel in every single subpanel (well , only in the 
markup, because my abstract parent panel defines it in code).

Thank you all!

Best Regards,
Martin

-Original Message-
From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
Sent: Monday, January 18, 2010 7:12 PM
To: users@wicket.apache.org
Subject: Re: submit a form from outside of it

IFeedbackProvider {
FeedbackPanel getFeedbackPanel();
}

MyPage extends Webpage implements IFeedbackProvider {
public MyPage() {
add(new FeedbackPanel("feedback"));
add(new MySubPanel("panel", this));
}
@Override
FeedbackPanel getFeedbackPanel() {
return get("feedback");
}
}

MySubPanel extends Panel {
private IFeedbackProvider feedback;
public MySubPanel(String id, IFeedbackProvider provider) {
super(id);
this.feedback = provider;

... some ajax handler ...
onSubmit(AjaxRequestTarget t) {
 t.addComponent(feedback.getFeedbackPanel());
}
}
}



On Mon, Jan 18, 2010 at 5:52 PM, Martin Asenov  wrote:
> Yes, but in my case the panels don't even know about the parent - they don't 
> have a reference to it. I've got to think of some workaround on this one.
>
> Thanks for your time,
> Martin
>
> -Original Message-
> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Sent: Monday, January 18, 2010 6:45 PM
> To: users@wicket.apache.org
> Subject: Re: submit a form from outside of it
>
> Ah - I see.  Yeah - you just have to roll your own option for this now.  I'd
> just recommend some sort of listener pattern - something like adding a void
> formSubmitted(form, requesttarget) method on the page that child forms can
> call.  Then the pages can do whatever they need with it.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Jan 18, 2010 at 10:40 AM, Martin Asenov  wrote:
>
>> Yeah, Jeremy, that's pretty clear. I was saying that I can't know in the
>> parent page when the submit button is pressed , so that I can say
>> target.addComponent(feed); when feed is in parent page...
>>
>> BR,
>> Martin
>>
>> -Original Message-
>> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
>> Sent: Monday, January 18, 2010 6:37 PM
>> To: users@wicket.apache.org
>> Subject: Re: submit a form from outside of it
>>
>> What do you mean - you can't tell which button was pressed?
>>
>> Just add an onSubmit to the button and inside of it, add your feedback
>> message.  or call getPage().info("..."), etc.  Then allow the onSubmit of
>> the form to do its thing.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Mon, Jan 18, 2010 at 10:35 AM, Martin Asenov  wrote:
>>
>> > Thank you both for the replies! After all I put the buttons in
>> myFormPanel.
>> > But this way I can't know when the submit and cancel buttons are pressed
>> so
>> > that I can render the feedback that is located in the parent page.
>> >
>> > Should I think of some listener?
>> >
>> > BR,
>> > Martin
>> >
>> > -Original Message-
>> > From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
>> > Sent: Monday, January 18, 2010 6:31 PM
>> > To: users@wicket.apache.org
>> > Subject: Re: submit a form from outside of it
>> >
>> > Or wrap the outer page in a form so that any nested forms work with your
>> > out-of-place submit button.
>> >
>> > --
>> > Jeremy Thomerson
>> > http://www.wickettraining.com
>> >
>> >
>> >
>> > On Mon, Jan 18, 2010 at 9:43 AM, Alexandru Barbat <
>> > alexandrubar...@gmail.com
>> > > wrote:
>> >
>> > > I think you have to pass the form to the behavior in some way or you
>> can
>> > do
>> > > something like this..but it is ugly in some way :)
>> > >
>> > >
>> > > 1. in the form panel
>> > >
>> > >  AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(form,
>> > > "onchange") {
>> > >            ...
>> > >            public void renderHead(IHeaderResponse response) {
>> > >                super.renderHead(response);
>> > >                response.renderJavascript("function submit_my_form(){\n"
>> +
>> > > getEventHandler().toString() + "\n}", "submit_my_form");
>> > >            }
>> > >        };
>> > >
>> > > form.add(behave);
>> > >
>> > >
>> > > ...
>> > >
>> > > 2. anywhere in the page
>> > >
>> > > and your button will look like this:
>> > >
>> > > 
>> > >
>> > >
>> > >
>> > >
>> > > On Mon, Jan 18, 2010 at 12:22 PM, Martin Asenov 
>> > wrote:
>> > >
>> > > > Hi, Alexandru, thanks for the quick reply.
>> > > >
>> > > > I get
>> > > >
>> > > > java.lang.IllegalStateException: form was not specified in the
>> > > constructor
>> > > > and cannot be found in the hierarchy of the component this behavior
>> is
>> > > > attached to
>> > > >
>> > > > the form is located in the same page and displayed, but it's actually
>> > >

Re: PageLink deprecated

2010-01-18 Thread Emond Papegaaij
That's what I'm trying to say: it can't be accomplished by either  
BookmarkablePageLink or Link. Link does not have a getPageIdentity method and 
BookmarkablePageLink only works for bookmarkable links (duh). So Link is never 
an option because of the missing getPageIdentity method and 
BookmarkablePageLink only works for bookmarkable pages. What about links to 
pages that are not bookmarkable?

Emond

On Monday 18 January 2010 17:12:49 Igor Vaynberg wrote:
> well, if the functionality can be accomplished using either
> BookmarkablePageLink or Link, why do we need yet another way to do it?
> 
> -igor
> 
> On Sun, Jan 17, 2010 at 11:44 PM, Jeroen Steenbeeke
> 
>  wrote:
> > Guys, no need to keep explaining what's wrong with passing a Page in
> > the constructor, we understand that!
> >
> > Forget about that filthy 3rd constructor, I know it's wrong and I
> > never used it anyway. That wasn't what my question was about.
> >
> > There are two more constructors:
> >
> > PageLink(String, Class)
> > PageLink(String, IPageLink)
> >
> > Both of these do not replicate the dangerous behavior illustrated in
> > this thread so far. I understand that we can easily create our own
> > implementation that simulates the behavior we want. I just wanted to
> > understand the reasoning for removing the whole class when only one of
> > the constructors is dangerous. From what Martijn Dashorst just told
> > me, it was a case of "seeing as we already have Link and
> > BookmarkablePageLink, we figured you could just use those instead".
> >
> > This is also the source of miscommunication so far. The Javadoc simply
> > states what you should use instead, but does not explicitly state why.
> > The assumption is that any behavior you can achieve with the
> > PageLink/IPageLink combination can also be done with a simple Link.
> > This does not take into account the use of the Page Identity for
> > security checks however (mainly for determining link visibility,
> > which, frankly, does not need an actual instance of the page in
> > question), which brings us back to Emond's original point.
> >
> > On the other hand, one could argue that the only use for the page
> > identity is for security purposes, and it would therefore be more at
> > home in a specialized class in wicket-security.
> >
> > --
> > Jeroen Steenbeeke
> > www.fortuityframework.com
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Property Expression Language : Combing bean value and string ?

2010-01-18 Thread Ashika Umanga Umagiliya

Greetings all,

In my Datatable , I use PropertyColumn to create my columns.
I want to know whether using Wicket EL  , I can do something like following:

Input object has  'name' field.

EL String : "Your name is ${name}"
Output String : "Your name is Tom"

Thanks in advance.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: wicketstuff push, publishing event in a page2 and component installed with channel listener in page1

2010-01-18 Thread vineet semwal
thanks,
i will take a look at them.

On Mon, Jan 18, 2010 at 9:32 PM, Rodolfo Hansen  wrote:

> On Fri, Jan 15, 2010 at 5:24 AM, vineet semwal
> wrote:
>
> >
> > Sorry ,a little late ..
> > push is a great project,thanks for your efforts.
> >
> > i am a little confused,
> > 1)does the time out only happens after a remove event is published or
> apart
> > from this, there is another
> > timeout  which happens when server is finished pushing into the client?
> >
>
> Here are the configuration options for the Jetty implementation of cometd.
> You can change the connection timeout value
> to notice disconects sooner (at the cost of ineffiency)
> http://cometd.org/documentation/cometd-java/server/configuration
>
> You can check the bayeux  specificition for the details. (
> http://svn.cometd.com/trunk/bayeux/bayeux.html)
>
>
>
>
> >
> > 2)i see some problems when using more than one listener on one component,
> i
> > tried
> > reproducing the problem by a little tinkering in your example ,
> > currently the example in the quickstart i am attaching has two listeners
> on
> > different
> > components ,you can reproduce the problem by adding listeners to the same
> > component.
> >  a event in one channel is caught by channel listener meant for another
> > channel.
> >
>
> Great, I'll look into this.
>
> >
> >
> > thanks again ..
> >
> >
> >
> > On Sat, Dec 26, 2009 at 11:15 PM, Rodolfo Hansen 
> wrote:
> >
> >> Regarding remove listeners:
> >>
> >> Most browsers fail to report the remove event.
> >> Only firefox reports removal immediately, all other browsers depend on
> the
> >> timeout for a comet reconnect to notice and fire the remove event; you
> may
> >> need to lower the timeout for the cometd connections.
> >>
> >>
> >> Also,can i install more than one channel listener on a component?
> >> Never tried it, but there should be no problem, can you write a
> quickstart
> >> with your use cases, so I can flesh any bugs out?
> >>
> >>
> >> On Thu, Dec 24, 2009 at 10:03 AM, vineet semwal
> >> wrote:
> >>
> >> > Hellos,
> >> > recently i started using wicketstuff push ,i have few doubts as
> >> following
> >> > ..
> >> > i have a situation where i need to publish a event in page 2 and add
> the
> >> > channel listener in page 1 .
> >> > for eg. a sign out event published in page 2 which i do using a remove
> >> > listener.
> >> >
> >> > Also,can i install more than one channel listener on a component?
> >> >
> >> > --
> >> > regards,
> >> > Vineet Semwal
> >> >
> >>
> >>
> >>
> >> --
> >> Rodolfo Hansen
> >> CTO, KindleIT Software Development
> >> Email: rhan...@kindleit.net
> >> Mobile: +1 (809) 860-6669
> >>
> >
> >
> >
> > --
> > regards,
> > Vineet Semwal
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>
>
>
> --
> Rodolfo Hansen
> CTO, KindleIT Software Development
> Email: rhan...@kindleit.net
> Mobile: +1 (809) 860-6669
>



-- 
regards,
Vineet Semwal


Re: Getting control of Wicket Session.

2010-01-18 Thread Andrew Lombardi
((WebRequest)getRequest()).getHttpServletRequest().getSession()

On Jan 18, 2010, at 10:12 PM, Apple Grew wrote:

> @Pedro
> 
> Thanks for the response. Now I have two questions.
> 
>   1. How do I get reference of HttpSession? In Wicket I seem to get
>   reference of WebSession.
>   2. How do I notify the servlet container (I guess Wicket is not in-charge
>   of maintaining the HttpSession), that the user is active? If I make any Http
>   request from client's end (AJAX), even if that request is simply ignored by
>   my application, will that help to keep the session alive?
> 
> 
> @Steve
> Yup this will be AJAX. When my solution is ready, will share it, definitely.
> :)
> 
> Regards,
> Apple Grew
> my blog @ http://blog.applegrew.com/
> 
> 
> On Tue, Jan 19, 2010 at 8:57 AM, Steve Swinsburg
> wrote:
> 
>> Presumably, if the user is typing a long document and hasn't clicked on
>> anything for a while, you'll need to indicate to Wicket/HttpSession
>> (probably via AJAX), that the session is to be kept alive. I believe this is
>> how the autosave functions of things like rich text editors work, keeping
>> the session from timing out.
>> 
>> Interested to see your solution.
>> 
>> cheers,
>> Steve
>> 
>> 
>> 
>> On 19/01/2010, at 10:19 AM, Pedro Santos wrote:
>> 
>>> Use attributes from HttpSession like getLastAccessedTime() and
>>> getMaxInactiveInterval(). You can get access through WebRequest that
>> holds
>>> an HttpServletRequest object. When HttpSession ends, the wicket session
>> ends
>>> too.
>>> 
>>> 
>>> On Mon, Jan 18, 2010 at 5:33 PM, Apple Grew  wrote:
>>> 
 Hi,
 
 I am a Wicket fresher. I am still getting the hang of this.
 
 I want to develop a web application where I would like to show the user
>> a
 message informing him that his session is about to expire in x minutes.
>> If
 he wants to save his session then can click on a button which appears
>> along
 with this message.
 
 Also, using javascript I would like to 'sense' that the user is
>> typing-in
 or
 moving his mouse over the webpage, which is evident enough that he is
>> using
 the session.
 
 I will somehow figure out the js code needed but *how will I tell Wicket
>> to
 keep the session alive? Also how can I be notified x minutes before
>> Wicket
 expires the session?*
 
 Regards,
 Apple Grew
 my blog @ http://blog.applegrew.com/
 
>>> 
>>> 
>>> 
>>> --
>>> Pedro Henrique Oliveira dos Santos
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Getting control of Wicket Session.

2010-01-18 Thread Apple Grew
@Pedro

Thanks for the response. Now I have two questions.

   1. How do I get reference of HttpSession? In Wicket I seem to get
   reference of WebSession.
   2. How do I notify the servlet container (I guess Wicket is not in-charge
   of maintaining the HttpSession), that the user is active? If I make any Http
   request from client's end (AJAX), even if that request is simply ignored by
   my application, will that help to keep the session alive?


@Steve
Yup this will be AJAX. When my solution is ready, will share it, definitely.
:)

Regards,
Apple Grew
my blog @ http://blog.applegrew.com/


On Tue, Jan 19, 2010 at 8:57 AM, Steve Swinsburg
wrote:

> Presumably, if the user is typing a long document and hasn't clicked on
> anything for a while, you'll need to indicate to Wicket/HttpSession
> (probably via AJAX), that the session is to be kept alive. I believe this is
> how the autosave functions of things like rich text editors work, keeping
> the session from timing out.
>
> Interested to see your solution.
>
> cheers,
> Steve
>
>
>
> On 19/01/2010, at 10:19 AM, Pedro Santos wrote:
>
> > Use attributes from HttpSession like getLastAccessedTime() and
> > getMaxInactiveInterval(). You can get access through WebRequest that
> holds
> > an HttpServletRequest object. When HttpSession ends, the wicket session
> ends
> > too.
> >
> >
> > On Mon, Jan 18, 2010 at 5:33 PM, Apple Grew  wrote:
> >
> >> Hi,
> >>
> >> I am a Wicket fresher. I am still getting the hang of this.
> >>
> >> I want to develop a web application where I would like to show the user
> a
> >> message informing him that his session is about to expire in x minutes.
> If
> >> he wants to save his session then can click on a button which appears
> along
> >> with this message.
> >>
> >> Also, using javascript I would like to 'sense' that the user is
> typing-in
> >> or
> >> moving his mouse over the webpage, which is evident enough that he is
> using
> >> the session.
> >>
> >> I will somehow figure out the js code needed but *how will I tell Wicket
> to
> >> keep the session alive? Also how can I be notified x minutes before
> Wicket
> >> expires the session?*
> >>
> >> Regards,
> >> Apple Grew
> >> my blog @ http://blog.applegrew.com/
> >>
> >
> >
> >
> > --
> > Pedro Henrique Oliveira dos Santos
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Getting control of Wicket Session.

2010-01-18 Thread Steve Swinsburg
Presumably, if the user is typing a long document and hasn't clicked on 
anything for a while, you'll need to indicate to Wicket/HttpSession (probably 
via AJAX), that the session is to be kept alive. I believe this is how the 
autosave functions of things like rich text editors work, keeping the session 
from timing out.

Interested to see your solution.

cheers,
Steve



On 19/01/2010, at 10:19 AM, Pedro Santos wrote:

> Use attributes from HttpSession like getLastAccessedTime() and
> getMaxInactiveInterval(). You can get access through WebRequest that holds
> an HttpServletRequest object. When HttpSession ends, the wicket session ends
> too.
> 
> 
> On Mon, Jan 18, 2010 at 5:33 PM, Apple Grew  wrote:
> 
>> Hi,
>> 
>> I am a Wicket fresher. I am still getting the hang of this.
>> 
>> I want to develop a web application where I would like to show the user a
>> message informing him that his session is about to expire in x minutes. If
>> he wants to save his session then can click on a button which appears along
>> with this message.
>> 
>> Also, using javascript I would like to 'sense' that the user is typing-in
>> or
>> moving his mouse over the webpage, which is evident enough that he is using
>> the session.
>> 
>> I will somehow figure out the js code needed but *how will I tell Wicket to
>> keep the session alive? Also how can I be notified x minutes before Wicket
>> expires the session?*
>> 
>> Regards,
>> Apple Grew
>> my blog @ http://blog.applegrew.com/
>> 
> 
> 
> 
> -- 
> Pedro Henrique Oliveira dos Santos


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: root context, IE, home page is not found

2010-01-18 Thread Vadim Tesis

looks like BookmarkablePageRequestTarget.respond(RequestCycle requestCycle) has 
code to strip "./" if url starts with it.

can it be changed to strip "." as well?  will it be the right fix?
 
> From: vad...@hotmail.com
> To: users@wicket.apache.org
> Subject: root context, IE, home page is not found
> Date: Mon, 18 Jan 2010 20:36:55 +
> 
> 
> all,
> 
> 
> 
> my wicket 1.4.5 application is configured to run in root context. for some 
> reason, when it sets response page to the home page (which is not mounted), 
> the webserver produces error: The requested resource () is not available.
> 
> 
> 
> here's the code:
> 
> formFooter.add(new Link(ID_LINK_HOME)
> {
> private static final long serialVersionUID = 1L;
> @Override
> public void onClick()
> {
> setResponsePage(getApplication().getHomePage());
> }
> });
> 
> 
> 
> 
> it happens only with IE (6, 7), only with root context, with Tomcat 6 and 
> Sun's Glassfish servers. looks like URL generated in that case has '.' 
> appended to it: "http://localhost/.";.
> 
> if i simply hit F5 in the browser after the error shows up, it opens home 
> page just fine.
> 
> if i use bookmarkable link, it works fine: formFooter.add(new 
> BookmarkablePageLink(ID_LINK_HOME, 
> getApplication().getHomePage()).setAutoEnable(true));
> 
> 
> 
> the issue looks very similar to 
> http://issues.apache.org/jira/browse/WICKET-1449
> 
> 
> 
> is there a workaround?
> 
> 
> 
> Thanks,
> 
> Vadim
> 
> _
> Hotmail: Trusted email with powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/196390707/direct/01/
  
_
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/196390707/direct/01/

Re: yui context menu after ajax request

2010-01-18 Thread Dave Kallstrom
Interesting... I'll give that a try.. Thanks...

On Mon, Jan 18, 2010 at 6:06 PM, Alexander Elsholz <
alexander.elsh...@widas.de> wrote:

> for my problem with dojo this works:
>
> public void refreshMenu(AjaxRequestTarget pTarget) {
>
>   String js =  "dojo.addOnLoad(function(){\n + menu.generateJS()
> + "\n});" ;
>pTarget.appendJavascript(sss);
> }
>
>
> and i know the same stuff works for jquery and yui. the problem is that the
> header javascript brokes after rerendering the component (i think its a
> problem
> with object references because most browsers replace the object by creating
> a
> new one and the javascript stuff bind on the dom-bject). What seems to work
> is
> to put the javascript stuff into the  tag using the
> onComponentRendered()
> to "reactivate" the behavior.
>
> the ugly is you have to reload the menu in every ajax-event reredering the
> component with menu.
>
> hth
> alex
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Dave Kallstrom


Re: yui context menu after ajax request

2010-01-18 Thread Alexander Elsholz
for my problem with dojo this works: 

public void refreshMenu(AjaxRequestTarget pTarget) {

   String js =  "dojo.addOnLoad(function(){\n + menu.generateJS()
 + "\n});" ;
pTarget.appendJavascript(sss);
}


and i know the same stuff works for jquery and yui. the problem is that the
header javascript brokes after rerendering the component (i think its a problem
with object references because most browsers replace the object by creating a
new one and the javascript stuff bind on the dom-bject). What seems to work is
to put the javascript stuff into the  tag using the onComponentRendered()
to "reactivate" the behavior. 

the ugly is you have to reload the menu in every ajax-event reredering the
component with menu.

hth
alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Getting control of Wicket Session.

2010-01-18 Thread Pedro Santos
Use attributes from HttpSession like getLastAccessedTime() and
getMaxInactiveInterval(). You can get access through WebRequest that holds
an HttpServletRequest object. When HttpSession ends, the wicket session ends
too.


On Mon, Jan 18, 2010 at 5:33 PM, Apple Grew  wrote:

> Hi,
>
> I am a Wicket fresher. I am still getting the hang of this.
>
> I want to develop a web application where I would like to show the user a
> message informing him that his session is about to expire in x minutes. If
> he wants to save his session then can click on a button which appears along
> with this message.
>
> Also, using javascript I would like to 'sense' that the user is typing-in
> or
> moving his mouse over the webpage, which is evident enough that he is using
> the session.
>
> I will somehow figure out the js code needed but *how will I tell Wicket to
> keep the session alive? Also how can I be notified x minutes before Wicket
> expires the session?*
>
> Regards,
> Apple Grew
> my blog @ http://blog.applegrew.com/
>



-- 
Pedro Henrique Oliveira dos Santos


Re: yui context menu after ajax request

2010-01-18 Thread Dave Kallstrom
That breaks all the menu item links. So far I have tried everything
imaginable to rebuild the menu post ajax request and nothing works. I have
tried rebuilding the entire context menu behavior and also re-rendering the
markup that contains the menu even going so far as to re-render the entire
panel that contains the markup. From what I can tell there is no way to add
to the menu and then re-render it via ajax.

On Mon, Jan 18, 2010 at 3:03 PM, Alexander Elsholz <
alexander.elsh...@widas.de> wrote:

> rerender the menu javascripcode in ajaxevent.
>
> alex
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Dave Kallstrom


Re: OnChangeAjaxBehavior only first time

2010-01-18 Thread Jeremy Thomerson
Do you mean the issue is that the onchange behavior is not called without
taking the focus off of the textfield?  If you want something that is going
to work without taking focus off the textfield, hook into the onkeyup (or
down) event instead.


--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Jan 18, 2010 at 3:03 PM, Antoine van Wel
wrote:

> Hi,
>
> Does anybody have ideas how to solve this by *not* updating the form?
>
> I'm running into the same issue when putting an OnChangeAjaxBehavior
> on a TextField inside a form (triggered only once). The component to
> be updated is outside the form.
>
> Updating the form like suggested "solves" the issue; however, when the
> user types in text in this textfield and the form is constantly
> updated, this means text will get lost. Adjusting the throttle delay
> helps, but not enough. I just cannot update the form part via AJAX. So
> are there any other ways to fix this problem?
>
>
> Antoine.
>
>
> On Wed, Mar 18, 2009 at 3:22 PM, Filippo De Luca
>  wrote:
> > Hi wicketers,
> > I have fixed this issue by including form in target component:
> >
> >private void registerBehaviors() {
> >userAgentField.add(new OnChangeAjaxBehavior() {
> >
> >@Override
> >protected void onUpdate(AjaxRequestTarget target) {
> >
> >logger.debug("AJAX matching user agent");
> >
> >matchUserAgent();
> >target.addComponent(resultPanel);
> >target.addComponent(matchingForm);
> >}
> >});
> >}
> >
> > I've found this mail:
> >
> http://www.nabble.com/OnChangeAjaxBehavior-receives-only-first-input-character-td20207317.html
> ,
> > it is the same issue.
> >
> > It is this behavior default? or it is an issue?
> >
> > 2009/3/18 Filippo De Luca 
> >
> >> Hi,
> >> I have a panel MatchingPanel with a form and a result div:
> >>
> >> 
> >>
> >> 
> >> 
> >>  >> key="form.userAgent">[form.userAgent]
> >>  >> type="text" maxlength="255" />
> >> 
> >> 
> >>  >> wicket:message="value:form.match" />
> >> 
> >> 
> >> 
> >> 
> >>  >>
> key="result.matchedUserAgent">[result.matchedUserAgent]
> >>  >> wicket:id="matchedUserAgent">[sourceUserAgent]
> >> 
> >> 
> >> 
> >>
> >> while my java code is:
> >>
> >> class MatchingForm extends Form {
> >>
> >> ...
> >>
> >> private void registerBehaviors() {
> >> userAgentField.add(new OnChangeAjaxBehavior() {
> >>
> >> @Override
> >> protected void onUpdate(AjaxRequestTarget target) {
> >>
> >> logger.debug("AJAX matching user agent");
> >>
> >> matchUserAgent();
> >> target.addComponent(resultPanel);
> >> }
> >> });
> >> }
> >>
> >> ...
> >>
> >> private void matchUserAgent() {
> >>
> >> String userAgent = userAgentModel.getObject();
> >> WURFLManager wurflManager = getWurflManager();
> >>
> >> MatchingResult result = null;
> >>
> >> if (StringUtils.isNotBlank(userAgent)) {
> >>
> >> Instant start = new Instant();
> >> Device device =
> >> wurflManager.getDeviceForRequest(userAgent);
> >> Instant end = new Instant();
> >>
> >> Period duration = new Period(start, end);
> >> result = new MatchingResult(userAgent, device, (long)
> >> duration
> >> .getMillis());
> >>
> >> }
> >> resultPanel.setResult(result);
> >>
> >> }
> >>
> >> }
> >>
> >> The OnChangeBehaviour is called only the first time the userAgent field
> >> take the focus. To call other time, i have to lost focus and give focus
> to
> >> userAgent input text. Why? The target component is outside the frm, it
> is an
> >> issue?
> >>
> >> Thank you
> >>
> >> --
> >> Filippo De Luca
> >> --
> >> Email: dl.fili...@filosganga.it
> >> Web:   http://www.filosganga.it
> >> LinkedIn: http://www.linkedin.com/in/filippodeluca
> >> mobile: +393395822588
> >>
> >
> >
> >
> > --
> > Filippo De Luca
> > --
> > Email: dl.fili...@filosganga.it
> > Web:   http://www.filosganga.it
> > LinkedIn: http://www.linkedin.com/in/filippodeluca
> > mobile: +393395822588
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Popup New Window After Submit

2010-01-18 Thread Jeremy Thomerson
Either submit the form to the new window (using target="windowName") or else
you will need to submit the form, then in the response generate JS that
opens a window to display the results.  Of course, the second option will
likely be blocked by many popup blockers because it isn't the direct result
of a user action.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Jan 18, 2010 at 2:27 PM, Jered Myers
wrote:

> I need to process my Form and then popup a report in a new browser window
> with the result of the Form processing.  I would like to do this with one
> click from the user.  Any ideas if this solution is already built?  I tried
> to use Link with PopupSettings, but the form submit does not trigger and
> results in the form not being validated and the form component models not
> being updated with the user input.
>
> Here is a simplified example, in Form.onSubmit():
> {
>int sum = userInput1 + userInput2;
>PageParameters params = new PageParameters();
>params.add("Total", String.valueOf(sum));
>
>// I want the response in a new window
>setResponse(new ReportPage(params));
> }
> --
> Jered Myers
> Programmer/Project Analyst
> jer...@maplewoodsoftware.com 
>
> Maplewood Software
> 508 W. 6th Ave, Suite 900
> Spokane, WA 99204
> (509) 252-3550 ext. 109
> www.maplewoodsoftware.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: DataView component path in WicketTester

2010-01-18 Thread Alexander Elsholz
hi,

here my "hack" to test tables:

override: newChildId() in your dataview - class.


and build a common assert method...

private static final String PATH_CELLS = ":cells:";
private static final String PATH_ROWS = ":rows:";   

protected final void assertTable(String pTablePath, int pRow, int pColumn, 
String pText) {
assertComponent(pTablePath, YourDataView.class);
long lRowIndex = getRowIndex(pTablePath, pRow);
assertText(pTablePath + PATH_ROWS + (lRowIndex) + PATH_CELLS + 
(pColumn + 1) + ":cell:"...", pText);
}
private long getRowIndex(String pTablePath, int pRow) {
YourDataView lTable = (YourDataView) 
baseWicketTester.getComponentFromLastRenderedPage(pTablePath);
long lChildID = lTable.getCurrentChildID();
int lSizeOfTable = lTable.getDataProvider().size();
long lRowIndex = lChildID - lSizeOfTable + pRow + 1;
return lRowIndex;
}

insert your cell stuff to path and the most important thing:

vote for better wickettestersupport in 1.5;-)

alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket Reaction Game

2010-01-18 Thread nino martinez wael
Is now somewhat public available from assembla (not a svn url) :

http://www.assembla.com/spaces/WicketReactionGame

next time I get time, i'll move it to sourceforge or some real open
place and maybe activate it on my server again so you can play it and
compete against other wicketeers :)

On a more serious note, it demonstrates ajax pretty well with wicket.

Regards Nino

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: OnChangeAjaxBehavior only first time

2010-01-18 Thread Antoine van Wel
Hi,

Does anybody have ideas how to solve this by *not* updating the form?

I'm running into the same issue when putting an OnChangeAjaxBehavior
on a TextField inside a form (triggered only once). The component to
be updated is outside the form.

Updating the form like suggested "solves" the issue; however, when the
user types in text in this textfield and the form is constantly
updated, this means text will get lost. Adjusting the throttle delay
helps, but not enough. I just cannot update the form part via AJAX. So
are there any other ways to fix this problem?


Antoine.


On Wed, Mar 18, 2009 at 3:22 PM, Filippo De Luca
 wrote:
> Hi wicketers,
> I have fixed this issue by including form in target component:
>
>        private void registerBehaviors() {
>            userAgentField.add(new OnChangeAjaxBehavior() {
>
>               �...@override
>                protected void onUpdate(AjaxRequestTarget target) {
>
>                    logger.debug("AJAX matching user agent");
>
>                    matchUserAgent();
>                    target.addComponent(resultPanel);
>                    target.addComponent(matchingForm);
>                }
>            });
>        }
>
> I've found this mail:
> http://www.nabble.com/OnChangeAjaxBehavior-receives-only-first-input-character-td20207317.html,
> it is the same issue.
>
> It is this behavior default? or it is an issue?
>
> 2009/3/18 Filippo De Luca 
>
>> Hi,
>> I have a panel MatchingPanel with a form and a result div:
>>
>>         
>>
>>             
>>                 
>>                     > key="form.userAgent">[form.userAgent]
>>                     > type="text" maxlength="255" />
>>                 
>>                 
>>                     > wicket:message="value:form.match" />
>>                 
>>             
>>             
>>                 
>>                     > key="result.matchedUserAgent">[result.matchedUserAgent]
>>                     > wicket:id="matchedUserAgent">[sourceUserAgent]
>>                 
>>             
>>         
>>
>> while my java code is:
>>
>>     class MatchingForm extends Form {
>>
>> ...
>>
>>         private void registerBehaviors() {
>>             userAgentField.add(new OnChangeAjaxBehavior() {
>>
>>                 @Override
>>                 protected void onUpdate(AjaxRequestTarget target) {
>>
>>                     logger.debug("AJAX matching user agent");
>>
>>                     matchUserAgent();
>>                     target.addComponent(resultPanel);
>>                 }
>>             });
>>         }
>>
>> ...
>>
>>         private void matchUserAgent() {
>>
>>             String userAgent = userAgentModel.getObject();
>>             WURFLManager wurflManager = getWurflManager();
>>
>>             MatchingResult result = null;
>>
>>             if (StringUtils.isNotBlank(userAgent)) {
>>
>>                 Instant start = new Instant();
>>                 Device device =
>> wurflManager.getDeviceForRequest(userAgent);
>>                 Instant end = new Instant();
>>
>>                 Period duration = new Period(start, end);
>>                 result = new MatchingResult(userAgent, device, (long)
>> duration
>>                         .getMillis());
>>
>>             }
>>             resultPanel.setResult(result);
>>
>>         }
>>
>>     }
>>
>> The OnChangeBehaviour is called only the first time the userAgent field
>> take the focus. To call other time, i have to lost focus and give focus to
>> userAgent input text. Why? The target component is outside the frm, it is an
>> issue?
>>
>> Thank you
>>
>> --
>> Filippo De Luca
>> --
>> Email: dl.fili...@filosganga.it
>> Web:   http://www.filosganga.it
>> LinkedIn: http://www.linkedin.com/in/filippodeluca
>> mobile: +393395822588
>>
>
>
>
> --
> Filippo De Luca
> --
> Email: dl.fili...@filosganga.it
> Web:   http://www.filosganga.it
> LinkedIn: http://www.linkedin.com/in/filippodeluca
> mobile: +393395822588
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: yui context menu after ajax request

2010-01-18 Thread Alexander Elsholz
rerender the menu javascripcode in ajaxevent.

alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



root context, IE, home page is not found

2010-01-18 Thread Vadim Tesis

all,

 

my wicket 1.4.5 application is configured to run in root context.  for some 
reason, when it sets response page to the home page (which is not mounted), the 
webserver produces error: The requested resource () is not available.

 

here's the code:

  formFooter.add(new Link(ID_LINK_HOME)
  {
   private static final long serialVersionUID = 1L;
   @Override
   public void onClick()
   {
setResponsePage(getApplication().getHomePage());
   }
  });


 

it happens only with IE (6, 7), only with root context, with Tomcat 6 and Sun's 
Glassfish servers.  looks like URL generated in that case has '.' appended to 
it: "http://localhost/.";.

if i simply hit F5 in the browser after the error shows up, it opens home page 
just fine.

if i use bookmarkable link, it works fine: formFooter.add(new 
BookmarkablePageLink(ID_LINK_HOME, 
getApplication().getHomePage()).setAutoEnable(true));

 

the issue looks very similar to http://issues.apache.org/jira/browse/WICKET-1449

 

is there a workaround?

 

Thanks,

Vadim
  
_
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/196390707/direct/01/

Popup New Window After Submit

2010-01-18 Thread Jered Myers
I need to process my Form and then popup a report in a new browser 
window with the result of the Form processing.  I would like to do this 
with one click from the user.  Any ideas if this solution is already 
built?  I tried to use Link with PopupSettings, but the form submit does 
not trigger and results in the form not being validated and the form 
component models not being updated with the user input.


Here is a simplified example, in Form.onSubmit():
{
int sum = userInput1 + userInput2;
PageParameters params = new PageParameters();
params.add("Total", String.valueOf(sum));

// I want the response in a new window
setResponse(new ReportPage(params));
}
--
Jered Myers
Programmer/Project Analyst
jer...@maplewoodsoftware.com 

Maplewood Software
508 W. 6th Ave, Suite 900
Spokane, WA 99204
(509) 252-3550 ext. 109
www.maplewoodsoftware.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Getting control of Wicket Session.

2010-01-18 Thread Apple Grew
Hi,

I am a Wicket fresher. I am still getting the hang of this.

I want to develop a web application where I would like to show the user a
message informing him that his session is about to expire in x minutes. If
he wants to save his session then can click on a button which appears along
with this message.

Also, using javascript I would like to 'sense' that the user is typing-in or
moving his mouse over the webpage, which is evident enough that he is using
the session.

I will somehow figure out the js code needed but *how will I tell Wicket to
keep the session alive? Also how can I be notified x minutes before Wicket
expires the session?*

Regards,
Apple Grew
my blog @ http://blog.applegrew.com/


Re: filtering a datatable

2010-01-18 Thread TahitianGabriel

Hi,

You'll find everything you need in the phonebook application :
https://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicketstuff-core/phonebook/
https://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicketstuff-core/phonebook/
 

Regards,

Gabriel.



julien Graglia wrote:
> 
> 
> I you have a piece of code of how to use filter and
> IFilterStateLocator...
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/filtering-a-datatable-tp23062814p27214593.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: PageLink deprecated

2010-01-18 Thread Igor Vaynberg
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.wicket/wicket/1.4.2/org/apache/wicket/markup/html/link/BookmarkablePageLink.java#BookmarkablePageLink.getPageClass%28%29

-igor

On Mon, Jan 18, 2010 at 8:36 AM, Jeroen Steenbeeke
 wrote:
> Because neither has a getPageClass() method?
>
> 2010/1/18 Igor Vaynberg :
>> well, if the functionality can be accomplished using either
>> BookmarkablePageLink or Link, why do we need yet another way to do it?
>>
>> -igor
>>
>> On Sun, Jan 17, 2010 at 11:44 PM, Jeroen Steenbeeke
>>  wrote:
>>> Guys, no need to keep explaining what's wrong with passing a Page in
>>> the constructor, we understand that!
>>>
>>> Forget about that filthy 3rd constructor, I know it's wrong and I
>>> never used it anyway. That wasn't what my question was about.
>>>
>>> There are two more constructors:
>>>
>>> PageLink(String, Class)
>>> PageLink(String, IPageLink)
>>>
>>> Both of these do not replicate the dangerous behavior illustrated in
>>> this thread so far. I understand that we can easily create our own
>>> implementation that simulates the behavior we want. I just wanted to
>>> understand the reasoning for removing the whole class when only one of
>>> the constructors is dangerous. From what Martijn Dashorst just told
>>> me, it was a case of "seeing as we already have Link and
>>> BookmarkablePageLink, we figured you could just use those instead".
>>>
>>> This is also the source of miscommunication so far. The Javadoc simply
>>> states what you should use instead, but does not explicitly state why.
>>> The assumption is that any behavior you can achieve with the
>>> PageLink/IPageLink combination can also be done with a simple Link.
>>> This does not take into account the use of the Page Identity for
>>> security checks however (mainly for determining link visibility,
>>> which, frankly, does not need an actual instance of the page in
>>> question), which brings us back to Emond's original point.
>>>
>>> On the other hand, one could argue that the only use for the page
>>> identity is for security purposes, and it would therefore be more at
>>> home in a specialized class in wicket-security.
>>>
>>> --
>>> Jeroen Steenbeeke
>>> www.fortuityframework.com
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
> --
> Jeroen Steenbeeke
> www.fortuityframework.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: final in MarkupContainer#add(Component...) method

2010-01-18 Thread Igor Vaynberg
On Mon, Jan 18, 2010 at 4:52 AM, Sergejs Olefirs
 wrote:
>
> This kind of brings us back to original question -- why is
> MarkupContainer.add(..) method final? Maybe it's something that needs to be
> changed (or alternatively mechanism provided for hooking into this method)?

even if we make it non-final you still have the same problem of adding
components two different ways. one way using add() which adds it to
some internal component, the other way using super.add() or some other
method like addToDirectParent()  to invoke the original behavior and
add components to the actual parent. so really, making it nonfinal
does not solve the problem, just adds confusion as to what add()
actually does.

if its formcomponents you are worried about then you can create
add(FormComponent fc) and add them to some other parent.

you can also override oncomponentadded() and add some runtime
validation to make it easier for developers to fix their code.

> It also resolved the issue with page inheritance. As it stands right now (in
> out-of-the-box Wicket), if  is inside of any other tag with
> wicket-id, then children pages can no longer use add(..) method directly (as
> it would then add components in the wrong place in the hierarchy and page
> rendering will crash). With 'final' gone, it is a simple matter to override
> add(..) in the parent page so that it would add components properly -- thus
> children need not be aware of the parent innards.

does it really? so if i were to subclass the parent page and
substitute my own markup i would be ok? oh wait, no! because i now
need to know that in that page i cannot call add() like everywhere
else because it would add it to some child but i want to add directly
to the component. but i cant, because now even calling super.add()
still adds to the container. darn. so now i still have to provide a
second method addDirectlyToComponent() so subclasses can properly add
components.

the proper way to handle this situation is to make the container that
contains wicket:child tag transparent. search the list, plenty threads
with details on this one.

so really, where are we at? we still always need two methods to add
components in these situations.

first option is to make add nonfinal, allowing you to override the
default and make it easy to add components from the outside while
making it harder to add components from inside.

second option is to leave add final and make it easy to add components
from the inside while making it harder to add components from the
outside.

for me there is no clear cut solution because there are plenty of
components and usecases that fall under the different groups.

it also depends on how one views the "add" call. to you view it as a
logical: "i am putting this component inside this one" or a semantic:
"i am adding this component as a direct child" - which is the
expecation everyone has currently with add() being final.

-igor

>
> Best regards,
> Sergey
>
>
>
> Pedro H. O. dos Santos wrote:
>>
This brings us to a suggested "wrapping" of the children in
> WebMarkupContainers
>> This is not the only option you have, you can use lenient form components
>> like:
>> public class LenientTextField extends TextField
>> {
>> @Override
>> protected void onComponentTag(final ComponentTag tag)
>> {
>> tag.setName("input");
>> tag.put("type", "text");
>> super.onComponentTag(tag);
>> }
>> }
>> so you have an text field that you can your for any tag you place on your
>> template.
>>
>> About the meaningful wicket ids, you doesn't need to call rv.newchildid(),
>> only make sure to don't repeat the ids.
>>
>> 2010/1/14 Ilya German 
>>> This brings us to a suggested "wrapping" of the children in
>>> WebMarkupContainers, but we'd like to hide it to get rid of the
>>>
>>> webmarkupcontainer item=new webmarkupcontainer(rv.newchildid());
>>>
>>> part. To do this, it seems logical to extend the RepeatingView overriding
>>> the add() method to be wrapping every component, however the add() method
>>> is
>>> final :(
>>>
>>> Could anyone suggest some other way to resolve this situation? Or,
>>> perhaps,
>>> it could be acceptable to "officially" remove the final modifier from the
>>> add() method?
>>>
>>> Thanks in advance!
>>>
>>> Ilya German.
>>
>>
>>
>>
>> --
>> Pedro Henrique Oliveira dos Santos
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/final-in-MarkupContainer-add%28Component...%29-method-tp27161187p27210046.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: submit a form from outside of it

2010-01-18 Thread Martijn Dashorst
IFeedbackProvider {
FeedbackPanel getFeedbackPanel();
}

MyPage extends Webpage implements IFeedbackProvider {
public MyPage() {
add(new FeedbackPanel("feedback"));
add(new MySubPanel("panel", this));
}
@Override
FeedbackPanel getFeedbackPanel() {
return get("feedback");
}
}

MySubPanel extends Panel {
private IFeedbackProvider feedback;
public MySubPanel(String id, IFeedbackProvider provider) {
super(id);
this.feedback = provider;

... some ajax handler ...
onSubmit(AjaxRequestTarget t) {
 t.addComponent(feedback.getFeedbackPanel());
}
}
}



On Mon, Jan 18, 2010 at 5:52 PM, Martin Asenov  wrote:
> Yes, but in my case the panels don't even know about the parent - they don't 
> have a reference to it. I've got to think of some workaround on this one.
>
> Thanks for your time,
> Martin
>
> -Original Message-
> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Sent: Monday, January 18, 2010 6:45 PM
> To: users@wicket.apache.org
> Subject: Re: submit a form from outside of it
>
> Ah - I see.  Yeah - you just have to roll your own option for this now.  I'd
> just recommend some sort of listener pattern - something like adding a void
> formSubmitted(form, requesttarget) method on the page that child forms can
> call.  Then the pages can do whatever they need with it.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Jan 18, 2010 at 10:40 AM, Martin Asenov  wrote:
>
>> Yeah, Jeremy, that's pretty clear. I was saying that I can't know in the
>> parent page when the submit button is pressed , so that I can say
>> target.addComponent(feed); when feed is in parent page...
>>
>> BR,
>> Martin
>>
>> -Original Message-
>> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
>> Sent: Monday, January 18, 2010 6:37 PM
>> To: users@wicket.apache.org
>> Subject: Re: submit a form from outside of it
>>
>> What do you mean - you can't tell which button was pressed?
>>
>> Just add an onSubmit to the button and inside of it, add your feedback
>> message.  or call getPage().info("..."), etc.  Then allow the onSubmit of
>> the form to do its thing.
>>
>> --
>> Jeremy Thomerson
>> http://www.wickettraining.com
>>
>>
>>
>> On Mon, Jan 18, 2010 at 10:35 AM, Martin Asenov  wrote:
>>
>> > Thank you both for the replies! After all I put the buttons in
>> myFormPanel.
>> > But this way I can't know when the submit and cancel buttons are pressed
>> so
>> > that I can render the feedback that is located in the parent page.
>> >
>> > Should I think of some listener?
>> >
>> > BR,
>> > Martin
>> >
>> > -Original Message-
>> > From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
>> > Sent: Monday, January 18, 2010 6:31 PM
>> > To: users@wicket.apache.org
>> > Subject: Re: submit a form from outside of it
>> >
>> > Or wrap the outer page in a form so that any nested forms work with your
>> > out-of-place submit button.
>> >
>> > --
>> > Jeremy Thomerson
>> > http://www.wickettraining.com
>> >
>> >
>> >
>> > On Mon, Jan 18, 2010 at 9:43 AM, Alexandru Barbat <
>> > alexandrubar...@gmail.com
>> > > wrote:
>> >
>> > > I think you have to pass the form to the behavior in some way or you
>> can
>> > do
>> > > something like this..but it is ugly in some way :)
>> > >
>> > >
>> > > 1. in the form panel
>> > >
>> > >  AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(form,
>> > > "onchange") {
>> > >            ...
>> > >            public void renderHead(IHeaderResponse response) {
>> > >                super.renderHead(response);
>> > >                response.renderJavascript("function submit_my_form(){\n"
>> +
>> > > getEventHandler().toString() + "\n}", "submit_my_form");
>> > >            }
>> > >        };
>> > >
>> > > form.add(behave);
>> > >
>> > >
>> > > ...
>> > >
>> > > 2. anywhere in the page
>> > >
>> > > and your button will look like this:
>> > >
>> > > 
>> > >
>> > >
>> > >
>> > >
>> > > On Mon, Jan 18, 2010 at 12:22 PM, Martin Asenov 
>> > wrote:
>> > >
>> > > > Hi, Alexandru, thanks for the quick reply.
>> > > >
>> > > > I get
>> > > >
>> > > > java.lang.IllegalStateException: form was not specified in the
>> > > constructor
>> > > > and cannot be found in the hierarchy of the component this behavior
>> is
>> > > > attached to
>> > > >
>> > > > the form is located in the same page and displayed, but it's actually
>> > > > placed within a panel that is a child of the page. :-(
>> > > >
>> > > > BR,
>> > > >
>> > > > -Original Message-
>> > > > From: Alexandru Barbat [mailto:alexandrubar...@gmail.com]
>> > > > Sent: Monday, January 18, 2010 11:26 AM
>> > > > To: users@wicket.apache.org
>> > > > Subject: Re: submit a form from outside of it
>> > > >
>> > > > Hi,
>> > > >
>> > > > Try this:
>> > > >
>> > > > AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
>> > > > "onclick") {
>> > > >            protected void onSubmit(Aja

RE: submit a form from outside of it

2010-01-18 Thread Martin Asenov
Yes, but in my case the panels don't even know about the parent - they don't 
have a reference to it. I've got to think of some workaround on this one.

Thanks for your time,
Martin

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Monday, January 18, 2010 6:45 PM
To: users@wicket.apache.org
Subject: Re: submit a form from outside of it

Ah - I see.  Yeah - you just have to roll your own option for this now.  I'd
just recommend some sort of listener pattern - something like adding a void
formSubmitted(form, requesttarget) method on the page that child forms can
call.  Then the pages can do whatever they need with it.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Jan 18, 2010 at 10:40 AM, Martin Asenov  wrote:

> Yeah, Jeremy, that's pretty clear. I was saying that I can't know in the
> parent page when the submit button is pressed , so that I can say
> target.addComponent(feed); when feed is in parent page...
>
> BR,
> Martin
>
> -Original Message-
> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Sent: Monday, January 18, 2010 6:37 PM
> To: users@wicket.apache.org
> Subject: Re: submit a form from outside of it
>
> What do you mean - you can't tell which button was pressed?
>
> Just add an onSubmit to the button and inside of it, add your feedback
> message.  or call getPage().info("..."), etc.  Then allow the onSubmit of
> the form to do its thing.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Jan 18, 2010 at 10:35 AM, Martin Asenov  wrote:
>
> > Thank you both for the replies! After all I put the buttons in
> myFormPanel.
> > But this way I can't know when the submit and cancel buttons are pressed
> so
> > that I can render the feedback that is located in the parent page.
> >
> > Should I think of some listener?
> >
> > BR,
> > Martin
> >
> > -Original Message-
> > From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> > Sent: Monday, January 18, 2010 6:31 PM
> > To: users@wicket.apache.org
> > Subject: Re: submit a form from outside of it
> >
> > Or wrap the outer page in a form so that any nested forms work with your
> > out-of-place submit button.
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > On Mon, Jan 18, 2010 at 9:43 AM, Alexandru Barbat <
> > alexandrubar...@gmail.com
> > > wrote:
> >
> > > I think you have to pass the form to the behavior in some way or you
> can
> > do
> > > something like this..but it is ugly in some way :)
> > >
> > >
> > > 1. in the form panel
> > >
> > >  AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(form,
> > > "onchange") {
> > >...
> > >public void renderHead(IHeaderResponse response) {
> > >super.renderHead(response);
> > >response.renderJavascript("function submit_my_form(){\n"
> +
> > > getEventHandler().toString() + "\n}", "submit_my_form");
> > >}
> > >};
> > >
> > > form.add(behave);
> > >
> > >
> > > ...
> > >
> > > 2. anywhere in the page
> > >
> > > and your button will look like this:
> > >
> > > 
> > >
> > >
> > >
> > >
> > > On Mon, Jan 18, 2010 at 12:22 PM, Martin Asenov 
> > wrote:
> > >
> > > > Hi, Alexandru, thanks for the quick reply.
> > > >
> > > > I get
> > > >
> > > > java.lang.IllegalStateException: form was not specified in the
> > > constructor
> > > > and cannot be found in the hierarchy of the component this behavior
> is
> > > > attached to
> > > >
> > > > the form is located in the same page and displayed, but it's actually
> > > > placed within a panel that is a child of the page. :-(
> > > >
> > > > BR,
> > > >
> > > > -Original Message-
> > > > From: Alexandru Barbat [mailto:alexandrubar...@gmail.com]
> > > > Sent: Monday, January 18, 2010 11:26 AM
> > > > To: users@wicket.apache.org
> > > > Subject: Re: submit a form from outside of it
> > > >
> > > > Hi,
> > > >
> > > > Try this:
> > > >
> > > > AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
> > > > "onclick") {
> > > >protected void onSubmit(AjaxRequestTarget target) {
> > > >//do what you have to do
> > > >}
> > > >
> > > >
> > > >};
> > > >
> > > >
> > > > Button submitButton = new Button("submitButton");
> > > >
> > > > submitButton.add(behave);
> > > >
> > > > ...
> > > >
> > > > Alexandru
> > > >
> > > > 2010/1/18 Martin Asenov 
> > > >
> > > > > Hello, everyone!
> > > > >
> > > > > I have a form that has validation and so on, but the main
> difference
> > to
> > > > > ordinary forms is that my form does not contain it's submit button.
> > > It's
> > > > > located in a parent, in my case a web page.
> > > > >
> > > > > I'm wondering how can I force the form submitting from the page.
> The
> > > code
> > > > > is
> > > > >
> > > > > submitButton = new AjaxButton("submit_button) {
> > > > > protected void onSubmit(AjaxRequestTarget target, Form
> > form)
> > > 

Re: submit a form from outside of it

2010-01-18 Thread Jeremy Thomerson
Ah - I see.  Yeah - you just have to roll your own option for this now.  I'd
just recommend some sort of listener pattern - something like adding a void
formSubmitted(form, requesttarget) method on the page that child forms can
call.  Then the pages can do whatever they need with it.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Jan 18, 2010 at 10:40 AM, Martin Asenov  wrote:

> Yeah, Jeremy, that's pretty clear. I was saying that I can't know in the
> parent page when the submit button is pressed , so that I can say
> target.addComponent(feed); when feed is in parent page...
>
> BR,
> Martin
>
> -Original Message-
> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Sent: Monday, January 18, 2010 6:37 PM
> To: users@wicket.apache.org
> Subject: Re: submit a form from outside of it
>
> What do you mean - you can't tell which button was pressed?
>
> Just add an onSubmit to the button and inside of it, add your feedback
> message.  or call getPage().info("..."), etc.  Then allow the onSubmit of
> the form to do its thing.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Jan 18, 2010 at 10:35 AM, Martin Asenov  wrote:
>
> > Thank you both for the replies! After all I put the buttons in
> myFormPanel.
> > But this way I can't know when the submit and cancel buttons are pressed
> so
> > that I can render the feedback that is located in the parent page.
> >
> > Should I think of some listener?
> >
> > BR,
> > Martin
> >
> > -Original Message-
> > From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> > Sent: Monday, January 18, 2010 6:31 PM
> > To: users@wicket.apache.org
> > Subject: Re: submit a form from outside of it
> >
> > Or wrap the outer page in a form so that any nested forms work with your
> > out-of-place submit button.
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.com
> >
> >
> >
> > On Mon, Jan 18, 2010 at 9:43 AM, Alexandru Barbat <
> > alexandrubar...@gmail.com
> > > wrote:
> >
> > > I think you have to pass the form to the behavior in some way or you
> can
> > do
> > > something like this..but it is ugly in some way :)
> > >
> > >
> > > 1. in the form panel
> > >
> > >  AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(form,
> > > "onchange") {
> > >...
> > >public void renderHead(IHeaderResponse response) {
> > >super.renderHead(response);
> > >response.renderJavascript("function submit_my_form(){\n"
> +
> > > getEventHandler().toString() + "\n}", "submit_my_form");
> > >}
> > >};
> > >
> > > form.add(behave);
> > >
> > >
> > > ...
> > >
> > > 2. anywhere in the page
> > >
> > > and your button will look like this:
> > >
> > > 
> > >
> > >
> > >
> > >
> > > On Mon, Jan 18, 2010 at 12:22 PM, Martin Asenov 
> > wrote:
> > >
> > > > Hi, Alexandru, thanks for the quick reply.
> > > >
> > > > I get
> > > >
> > > > java.lang.IllegalStateException: form was not specified in the
> > > constructor
> > > > and cannot be found in the hierarchy of the component this behavior
> is
> > > > attached to
> > > >
> > > > the form is located in the same page and displayed, but it's actually
> > > > placed within a panel that is a child of the page. :-(
> > > >
> > > > BR,
> > > >
> > > > -Original Message-
> > > > From: Alexandru Barbat [mailto:alexandrubar...@gmail.com]
> > > > Sent: Monday, January 18, 2010 11:26 AM
> > > > To: users@wicket.apache.org
> > > > Subject: Re: submit a form from outside of it
> > > >
> > > > Hi,
> > > >
> > > > Try this:
> > > >
> > > > AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
> > > > "onclick") {
> > > >protected void onSubmit(AjaxRequestTarget target) {
> > > >//do what you have to do
> > > >}
> > > >
> > > >
> > > >};
> > > >
> > > >
> > > > Button submitButton = new Button("submitButton");
> > > >
> > > > submitButton.add(behave);
> > > >
> > > > ...
> > > >
> > > > Alexandru
> > > >
> > > > 2010/1/18 Martin Asenov 
> > > >
> > > > > Hello, everyone!
> > > > >
> > > > > I have a form that has validation and so on, but the main
> difference
> > to
> > > > > ordinary forms is that my form does not contain it's submit button.
> > > It's
> > > > > located in a parent, in my case a web page.
> > > > >
> > > > > I'm wondering how can I force the form submitting from the page.
> The
> > > code
> > > > > is
> > > > >
> > > > > submitButton = new AjaxButton("submit_button) {
> > > > > protected void onSubmit(AjaxRequestTarget target, Form
> > form)
> > > {
> > > > >   myForm.processForm();
> > > > > }
> > > > > };
> > > > >
> > > > > The method processForm() in myForm just calls process();
> > > > >
> > > > > But nothing happens, looks like I'm missing something...
> > > > >
> > > > > Thanks,
> > > > > Martin
> > > > >
> > > > >
> > > >
> > > > ---

RE: submit a form from outside of it

2010-01-18 Thread Martin Asenov
Yeah, Jeremy, that's pretty clear. I was saying that I can't know in the parent 
page when the submit button is pressed , so that I can say 
target.addComponent(feed); when feed is in parent page...

BR,
Martin

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Monday, January 18, 2010 6:37 PM
To: users@wicket.apache.org
Subject: Re: submit a form from outside of it

What do you mean - you can't tell which button was pressed?

Just add an onSubmit to the button and inside of it, add your feedback
message.  or call getPage().info("..."), etc.  Then allow the onSubmit of
the form to do its thing.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Jan 18, 2010 at 10:35 AM, Martin Asenov  wrote:

> Thank you both for the replies! After all I put the buttons in myFormPanel.
> But this way I can't know when the submit and cancel buttons are pressed so
> that I can render the feedback that is located in the parent page.
>
> Should I think of some listener?
>
> BR,
> Martin
>
> -Original Message-
> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Sent: Monday, January 18, 2010 6:31 PM
> To: users@wicket.apache.org
> Subject: Re: submit a form from outside of it
>
> Or wrap the outer page in a form so that any nested forms work with your
> out-of-place submit button.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Jan 18, 2010 at 9:43 AM, Alexandru Barbat <
> alexandrubar...@gmail.com
> > wrote:
>
> > I think you have to pass the form to the behavior in some way or you can
> do
> > something like this..but it is ugly in some way :)
> >
> >
> > 1. in the form panel
> >
> >  AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(form,
> > "onchange") {
> >...
> >public void renderHead(IHeaderResponse response) {
> >super.renderHead(response);
> >response.renderJavascript("function submit_my_form(){\n" +
> > getEventHandler().toString() + "\n}", "submit_my_form");
> >}
> >};
> >
> > form.add(behave);
> >
> >
> > ...
> >
> > 2. anywhere in the page
> >
> > and your button will look like this:
> >
> > 
> >
> >
> >
> >
> > On Mon, Jan 18, 2010 at 12:22 PM, Martin Asenov 
> wrote:
> >
> > > Hi, Alexandru, thanks for the quick reply.
> > >
> > > I get
> > >
> > > java.lang.IllegalStateException: form was not specified in the
> > constructor
> > > and cannot be found in the hierarchy of the component this behavior is
> > > attached to
> > >
> > > the form is located in the same page and displayed, but it's actually
> > > placed within a panel that is a child of the page. :-(
> > >
> > > BR,
> > >
> > > -Original Message-
> > > From: Alexandru Barbat [mailto:alexandrubar...@gmail.com]
> > > Sent: Monday, January 18, 2010 11:26 AM
> > > To: users@wicket.apache.org
> > > Subject: Re: submit a form from outside of it
> > >
> > > Hi,
> > >
> > > Try this:
> > >
> > > AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
> > > "onclick") {
> > >protected void onSubmit(AjaxRequestTarget target) {
> > >//do what you have to do
> > >}
> > >
> > >
> > >};
> > >
> > >
> > > Button submitButton = new Button("submitButton");
> > >
> > > submitButton.add(behave);
> > >
> > > ...
> > >
> > > Alexandru
> > >
> > > 2010/1/18 Martin Asenov 
> > >
> > > > Hello, everyone!
> > > >
> > > > I have a form that has validation and so on, but the main difference
> to
> > > > ordinary forms is that my form does not contain it's submit button.
> > It's
> > > > located in a parent, in my case a web page.
> > > >
> > > > I'm wondering how can I force the form submitting from the page. The
> > code
> > > > is
> > > >
> > > > submitButton = new AjaxButton("submit_button) {
> > > > protected void onSubmit(AjaxRequestTarget target, Form
> form)
> > {
> > > >   myForm.processForm();
> > > > }
> > > > };
> > > >
> > > > The method processForm() in myForm just calls process();
> > > >
> > > > But nothing happens, looks like I'm missing something...
> > > >
> > > > Thanks,
> > > > Martin
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: submit a form from outside of it

2010-01-18 Thread Jeremy Thomerson
What do you mean - you can't tell which button was pressed?

Just add an onSubmit to the button and inside of it, add your feedback
message.  or call getPage().info("..."), etc.  Then allow the onSubmit of
the form to do its thing.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Jan 18, 2010 at 10:35 AM, Martin Asenov  wrote:

> Thank you both for the replies! After all I put the buttons in myFormPanel.
> But this way I can't know when the submit and cancel buttons are pressed so
> that I can render the feedback that is located in the parent page.
>
> Should I think of some listener?
>
> BR,
> Martin
>
> -Original Message-
> From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
> Sent: Monday, January 18, 2010 6:31 PM
> To: users@wicket.apache.org
> Subject: Re: submit a form from outside of it
>
> Or wrap the outer page in a form so that any nested forms work with your
> out-of-place submit button.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Mon, Jan 18, 2010 at 9:43 AM, Alexandru Barbat <
> alexandrubar...@gmail.com
> > wrote:
>
> > I think you have to pass the form to the behavior in some way or you can
> do
> > something like this..but it is ugly in some way :)
> >
> >
> > 1. in the form panel
> >
> >  AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(form,
> > "onchange") {
> >...
> >public void renderHead(IHeaderResponse response) {
> >super.renderHead(response);
> >response.renderJavascript("function submit_my_form(){\n" +
> > getEventHandler().toString() + "\n}", "submit_my_form");
> >}
> >};
> >
> > form.add(behave);
> >
> >
> > ...
> >
> > 2. anywhere in the page
> >
> > and your button will look like this:
> >
> > 
> >
> >
> >
> >
> > On Mon, Jan 18, 2010 at 12:22 PM, Martin Asenov 
> wrote:
> >
> > > Hi, Alexandru, thanks for the quick reply.
> > >
> > > I get
> > >
> > > java.lang.IllegalStateException: form was not specified in the
> > constructor
> > > and cannot be found in the hierarchy of the component this behavior is
> > > attached to
> > >
> > > the form is located in the same page and displayed, but it's actually
> > > placed within a panel that is a child of the page. :-(
> > >
> > > BR,
> > >
> > > -Original Message-
> > > From: Alexandru Barbat [mailto:alexandrubar...@gmail.com]
> > > Sent: Monday, January 18, 2010 11:26 AM
> > > To: users@wicket.apache.org
> > > Subject: Re: submit a form from outside of it
> > >
> > > Hi,
> > >
> > > Try this:
> > >
> > > AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
> > > "onclick") {
> > >protected void onSubmit(AjaxRequestTarget target) {
> > >//do what you have to do
> > >}
> > >
> > >
> > >};
> > >
> > >
> > > Button submitButton = new Button("submitButton");
> > >
> > > submitButton.add(behave);
> > >
> > > ...
> > >
> > > Alexandru
> > >
> > > 2010/1/18 Martin Asenov 
> > >
> > > > Hello, everyone!
> > > >
> > > > I have a form that has validation and so on, but the main difference
> to
> > > > ordinary forms is that my form does not contain it's submit button.
> > It's
> > > > located in a parent, in my case a web page.
> > > >
> > > > I'm wondering how can I force the form submitting from the page. The
> > code
> > > > is
> > > >
> > > > submitButton = new AjaxButton("submit_button) {
> > > > protected void onSubmit(AjaxRequestTarget target, Form
> form)
> > {
> > > >   myForm.processForm();
> > > > }
> > > > };
> > > >
> > > > The method processForm() in myForm just calls process();
> > > >
> > > > But nothing happens, looks like I'm missing something...
> > > >
> > > > Thanks,
> > > > Martin
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: PageLink deprecated

2010-01-18 Thread Jeroen Steenbeeke
Because neither has a getPageClass() method?

2010/1/18 Igor Vaynberg :
> well, if the functionality can be accomplished using either
> BookmarkablePageLink or Link, why do we need yet another way to do it?
>
> -igor
>
> On Sun, Jan 17, 2010 at 11:44 PM, Jeroen Steenbeeke
>  wrote:
>> Guys, no need to keep explaining what's wrong with passing a Page in
>> the constructor, we understand that!
>>
>> Forget about that filthy 3rd constructor, I know it's wrong and I
>> never used it anyway. That wasn't what my question was about.
>>
>> There are two more constructors:
>>
>> PageLink(String, Class)
>> PageLink(String, IPageLink)
>>
>> Both of these do not replicate the dangerous behavior illustrated in
>> this thread so far. I understand that we can easily create our own
>> implementation that simulates the behavior we want. I just wanted to
>> understand the reasoning for removing the whole class when only one of
>> the constructors is dangerous. From what Martijn Dashorst just told
>> me, it was a case of "seeing as we already have Link and
>> BookmarkablePageLink, we figured you could just use those instead".
>>
>> This is also the source of miscommunication so far. The Javadoc simply
>> states what you should use instead, but does not explicitly state why.
>> The assumption is that any behavior you can achieve with the
>> PageLink/IPageLink combination can also be done with a simple Link.
>> This does not take into account the use of the Page Identity for
>> security checks however (mainly for determining link visibility,
>> which, frankly, does not need an actual instance of the page in
>> question), which brings us back to Emond's original point.
>>
>> On the other hand, one could argue that the only use for the page
>> identity is for security purposes, and it would therefore be more at
>> home in a specialized class in wicket-security.
>>
>> --
>> Jeroen Steenbeeke
>> www.fortuityframework.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Jeroen Steenbeeke
www.fortuityframework.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: submit a form from outside of it

2010-01-18 Thread Martin Asenov
Thank you both for the replies! After all I put the buttons in myFormPanel. But 
this way I can't know when the submit and cancel buttons are pressed so that I 
can render the feedback that is located in the parent page.

Should I think of some listener?

BR,
Martin

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Monday, January 18, 2010 6:31 PM
To: users@wicket.apache.org
Subject: Re: submit a form from outside of it

Or wrap the outer page in a form so that any nested forms work with your
out-of-place submit button.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Jan 18, 2010 at 9:43 AM, Alexandru Barbat  wrote:

> I think you have to pass the form to the behavior in some way or you can do
> something like this..but it is ugly in some way :)
>
>
> 1. in the form panel
>
>  AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(form,
> "onchange") {
>...
>public void renderHead(IHeaderResponse response) {
>super.renderHead(response);
>response.renderJavascript("function submit_my_form(){\n" +
> getEventHandler().toString() + "\n}", "submit_my_form");
>}
>};
>
> form.add(behave);
>
>
> ...
>
> 2. anywhere in the page
>
> and your button will look like this:
>
> 
>
>
>
>
> On Mon, Jan 18, 2010 at 12:22 PM, Martin Asenov  wrote:
>
> > Hi, Alexandru, thanks for the quick reply.
> >
> > I get
> >
> > java.lang.IllegalStateException: form was not specified in the
> constructor
> > and cannot be found in the hierarchy of the component this behavior is
> > attached to
> >
> > the form is located in the same page and displayed, but it's actually
> > placed within a panel that is a child of the page. :-(
> >
> > BR,
> >
> > -Original Message-
> > From: Alexandru Barbat [mailto:alexandrubar...@gmail.com]
> > Sent: Monday, January 18, 2010 11:26 AM
> > To: users@wicket.apache.org
> > Subject: Re: submit a form from outside of it
> >
> > Hi,
> >
> > Try this:
> >
> > AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
> > "onclick") {
> >protected void onSubmit(AjaxRequestTarget target) {
> >//do what you have to do
> >}
> >
> >
> >};
> >
> >
> > Button submitButton = new Button("submitButton");
> >
> > submitButton.add(behave);
> >
> > ...
> >
> > Alexandru
> >
> > 2010/1/18 Martin Asenov 
> >
> > > Hello, everyone!
> > >
> > > I have a form that has validation and so on, but the main difference to
> > > ordinary forms is that my form does not contain it's submit button.
> It's
> > > located in a parent, in my case a web page.
> > >
> > > I'm wondering how can I force the form submitting from the page. The
> code
> > > is
> > >
> > > submitButton = new AjaxButton("submit_button) {
> > > protected void onSubmit(AjaxRequestTarget target, Form form)
> {
> > >   myForm.processForm();
> > > }
> > > };
> > >
> > > The method processForm() in myForm just calls process();
> > >
> > > But nothing happens, looks like I'm missing something...
> > >
> > > Thanks,
> > > Martin
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: submit a form from outside of it

2010-01-18 Thread Jeremy Thomerson
Or wrap the outer page in a form so that any nested forms work with your
out-of-place submit button.

--
Jeremy Thomerson
http://www.wickettraining.com



On Mon, Jan 18, 2010 at 9:43 AM, Alexandru Barbat  wrote:

> I think you have to pass the form to the behavior in some way or you can do
> something like this..but it is ugly in some way :)
>
>
> 1. in the form panel
>
>  AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(form,
> "onchange") {
>...
>public void renderHead(IHeaderResponse response) {
>super.renderHead(response);
>response.renderJavascript("function submit_my_form(){\n" +
> getEventHandler().toString() + "\n}", "submit_my_form");
>}
>};
>
> form.add(behave);
>
>
> ...
>
> 2. anywhere in the page
>
> and your button will look like this:
>
> 
>
>
>
>
> On Mon, Jan 18, 2010 at 12:22 PM, Martin Asenov  wrote:
>
> > Hi, Alexandru, thanks for the quick reply.
> >
> > I get
> >
> > java.lang.IllegalStateException: form was not specified in the
> constructor
> > and cannot be found in the hierarchy of the component this behavior is
> > attached to
> >
> > the form is located in the same page and displayed, but it's actually
> > placed within a panel that is a child of the page. :-(
> >
> > BR,
> >
> > -Original Message-
> > From: Alexandru Barbat [mailto:alexandrubar...@gmail.com]
> > Sent: Monday, January 18, 2010 11:26 AM
> > To: users@wicket.apache.org
> > Subject: Re: submit a form from outside of it
> >
> > Hi,
> >
> > Try this:
> >
> > AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
> > "onclick") {
> >protected void onSubmit(AjaxRequestTarget target) {
> >//do what you have to do
> >}
> >
> >
> >};
> >
> >
> > Button submitButton = new Button("submitButton");
> >
> > submitButton.add(behave);
> >
> > ...
> >
> > Alexandru
> >
> > 2010/1/18 Martin Asenov 
> >
> > > Hello, everyone!
> > >
> > > I have a form that has validation and so on, but the main difference to
> > > ordinary forms is that my form does not contain it's submit button.
> It's
> > > located in a parent, in my case a web page.
> > >
> > > I'm wondering how can I force the form submitting from the page. The
> code
> > > is
> > >
> > > submitButton = new AjaxButton("submit_button) {
> > > protected void onSubmit(AjaxRequestTarget target, Form form)
> {
> > >   myForm.processForm();
> > > }
> > > };
> > >
> > > The method processForm() in myForm just calls process();
> > >
> > > But nothing happens, looks like I'm missing something...
> > >
> > > Thanks,
> > > Martin
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>


Re: CryptedUrlWebRequestCodingStrategy + WebRequestCodingStrategy = resource URLs are not encrypted (bug?).

2010-01-18 Thread Igor Vaynberg
the original design goal of the crypted strategy was to only encrypt
what the user sees in the url bar. since they never see resource urls
there was no reason to encrypt those.

re fqns, you can add class aliases into SharedResources to hide those.

-igor

2010/1/18 Sergejs Olefirs :
> Hi,
>
> I started using Wicket rather recently. As part of our security
> considerations, we do not want immediately expose the underlying
> framework(s) we are using, so we went ahead with URL encryption. We used
> standard approach as described in examples:
>
> @Override
> protected IRequestCycleProcessor newRequestCycleProcessor() {
>
> return new WebRequestCycleProcessor(){
>  protected IRequestCodingStrategy newRequestCodingStrategy(){
>        return new CryptedUrlWebRequestCodingStrategy(new
> WebRequestCodingStrategy());
>       }
> };
>
> }
>
>
> Unfortunately I later discovered that this approach doesn't encrypt resource
> URLs, e.g. from:
> CSSPackageResource.getHeaderContribution(..);
> or
> link.add(new Image("logoImage"));
>
> What's worse such resource references include FQN of related classes.
>
>
> After some investigation I found out that the problem is that
> CryptedUrlWebRequestCodingStrategy only encrypts arguments string of the URL
> and WebRequestCodingStrategy encodes resource references as path rather than
> as argument.
>
> I was able to get around this by subclassing WebRequestCodingStrategy and
> overriding methods:
> addResourceParameters(..);
> encode(RequestCycle requestCycle, ISharedResourceRequestTarget
> requestTarget);
> to use arguments rather than path as resource reference.
>
>
> However I'm unsure as to original reasoning behind original
> CryptedUrlWebRequestCodingStrategy and WebRequestCodingStrategy. Is the
> resource behaviour simply a bug? Or is it there for some reason that is
> going to bite me down the road if I use my own 'fix'?
>
>
> Best regards,
> Sergey
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: PageLink deprecated

2010-01-18 Thread Igor Vaynberg
well, if the functionality can be accomplished using either
BookmarkablePageLink or Link, why do we need yet another way to do it?

-igor

On Sun, Jan 17, 2010 at 11:44 PM, Jeroen Steenbeeke
 wrote:
> Guys, no need to keep explaining what's wrong with passing a Page in
> the constructor, we understand that!
>
> Forget about that filthy 3rd constructor, I know it's wrong and I
> never used it anyway. That wasn't what my question was about.
>
> There are two more constructors:
>
> PageLink(String, Class)
> PageLink(String, IPageLink)
>
> Both of these do not replicate the dangerous behavior illustrated in
> this thread so far. I understand that we can easily create our own
> implementation that simulates the behavior we want. I just wanted to
> understand the reasoning for removing the whole class when only one of
> the constructors is dangerous. From what Martijn Dashorst just told
> me, it was a case of "seeing as we already have Link and
> BookmarkablePageLink, we figured you could just use those instead".
>
> This is also the source of miscommunication so far. The Javadoc simply
> states what you should use instead, but does not explicitly state why.
> The assumption is that any behavior you can achieve with the
> PageLink/IPageLink combination can also be done with a simple Link.
> This does not take into account the use of the Page Identity for
> security checks however (mainly for determining link visibility,
> which, frankly, does not need an actual instance of the page in
> question), which brings us back to Emond's original point.
>
> On the other hand, one could argue that the only use for the page
> identity is for security purposes, and it would therefore be more at
> home in a specialized class in wicket-security.
>
> --
> Jeroen Steenbeeke
> www.fortuityframework.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: wicketstuff push, publishing event in a page2 and component installed with channel listener in page1

2010-01-18 Thread Rodolfo Hansen
On Fri, Jan 15, 2010 at 5:24 AM, vineet semwal
wrote:

>
> Sorry ,a little late ..
> push is a great project,thanks for your efforts.
>
> i am a little confused,
> 1)does the time out only happens after a remove event is published or apart
> from this, there is another
> timeout  which happens when server is finished pushing into the client?
>

Here are the configuration options for the Jetty implementation of cometd.
You can change the connection timeout value
to notice disconects sooner (at the cost of ineffiency)
http://cometd.org/documentation/cometd-java/server/configuration

You can check the bayeux  specificition for the details. (
http://svn.cometd.com/trunk/bayeux/bayeux.html)




>
> 2)i see some problems when using more than one listener on one component, i
> tried
> reproducing the problem by a little tinkering in your example ,
> currently the example in the quickstart i am attaching has two listeners on
> different
> components ,you can reproduce the problem by adding listeners to the same
> component.
>  a event in one channel is caught by channel listener meant for another
> channel.
>

Great, I'll look into this.

>
>
> thanks again ..
>
>
>
> On Sat, Dec 26, 2009 at 11:15 PM, Rodolfo Hansen  wrote:
>
>> Regarding remove listeners:
>>
>> Most browsers fail to report the remove event.
>> Only firefox reports removal immediately, all other browsers depend on the
>> timeout for a comet reconnect to notice and fire the remove event; you may
>> need to lower the timeout for the cometd connections.
>>
>>
>> Also,can i install more than one channel listener on a component?
>> Never tried it, but there should be no problem, can you write a quickstart
>> with your use cases, so I can flesh any bugs out?
>>
>>
>> On Thu, Dec 24, 2009 at 10:03 AM, vineet semwal
>> wrote:
>>
>> > Hellos,
>> > recently i started using wicketstuff push ,i have few doubts as
>> following
>> > ..
>> > i have a situation where i need to publish a event in page 2 and add the
>> > channel listener in page 1 .
>> > for eg. a sign out event published in page 2 which i do using a remove
>> > listener.
>> >
>> > Also,can i install more than one channel listener on a component?
>> >
>> > --
>> > regards,
>> > Vineet Semwal
>> >
>>
>>
>>
>> --
>> Rodolfo Hansen
>> CTO, KindleIT Software Development
>> Email: rhan...@kindleit.net
>> Mobile: +1 (809) 860-6669
>>
>
>
>
> --
> regards,
> Vineet Semwal
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Rodolfo Hansen
CTO, KindleIT Software Development
Email: rhan...@kindleit.net
Mobile: +1 (809) 860-6669


Re: Heap space issue

2010-01-18 Thread Martijn Dashorst
Use jmap -histo  or a memory profiler (yourkit) or visualvm to
look at the heap. It also helps to use jstat -gc  1000 in cases
when you have low heap availability before killing your darlings. It
might not be a memory leak but possibly a connection pool running out
of connections.

Any number of programming errors can lead to memory leaks, including
exceptions. Without actual profiling you won't be able to find the
leaks.

Martijn

On Mon, Jan 18, 2010 at 4:14 PM, Frank Silbermann
 wrote:
> I am monitoring a Wicket 1.4.5 application running on Tomcat 6.0 which
> accesses a SQL Server 2000 database.  Periodically the application
> becomes unresponsive due to a lack of heap space, and I have to bounce
> Tomcat.  I'm trying to figure out what sort of errors could cause this
> to happen.
>
> Any suggestions?
>
> I've looked in the Tomcat error logs, but the only errors I see prior to
> the out-of-heapspace error are a small number of SQL errors that result
> from bad input data.  The Wicket application handles these errors by
> switching the user to a standard error page.  I suppose it's a bad
> architecture to rely on SQL errors reported by the database rather than
> checking the data, but does this result in a memory leak?
>
> Frank Silbermann
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.4 increases type safety for web applications
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: submit a form from outside of it

2010-01-18 Thread Alexandru Barbat
I think you have to pass the form to the behavior in some way or you can do
something like this..but it is ugly in some way :)


1. in the form panel

 AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(form,
"onchange") {
...
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.renderJavascript("function submit_my_form(){\n" +
getEventHandler().toString() + "\n}", "submit_my_form");
}
};

form.add(behave);


...

2. anywhere in the page

and your button will look like this:






On Mon, Jan 18, 2010 at 12:22 PM, Martin Asenov  wrote:

> Hi, Alexandru, thanks for the quick reply.
>
> I get
>
> java.lang.IllegalStateException: form was not specified in the constructor
> and cannot be found in the hierarchy of the component this behavior is
> attached to
>
> the form is located in the same page and displayed, but it's actually
> placed within a panel that is a child of the page. :-(
>
> BR,
>
> -Original Message-
> From: Alexandru Barbat [mailto:alexandrubar...@gmail.com]
> Sent: Monday, January 18, 2010 11:26 AM
> To: users@wicket.apache.org
> Subject: Re: submit a form from outside of it
>
> Hi,
>
> Try this:
>
> AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
> "onclick") {
>protected void onSubmit(AjaxRequestTarget target) {
>//do what you have to do
>}
>
>
>};
>
>
> Button submitButton = new Button("submitButton");
>
> submitButton.add(behave);
>
> ...
>
> Alexandru
>
> 2010/1/18 Martin Asenov 
>
> > Hello, everyone!
> >
> > I have a form that has validation and so on, but the main difference to
> > ordinary forms is that my form does not contain it's submit button. It's
> > located in a parent, in my case a web page.
> >
> > I'm wondering how can I force the form submitting from the page. The code
> > is
> >
> > submitButton = new AjaxButton("submit_button) {
> > protected void onSubmit(AjaxRequestTarget target, Form form) {
> >   myForm.processForm();
> > }
> > };
> >
> > The method processForm() in myForm just calls process();
> >
> > But nothing happens, looks like I'm missing something...
> >
> > Thanks,
> > Martin
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Heap space issue

2010-01-18 Thread Frank Silbermann
I am monitoring a Wicket 1.4.5 application running on Tomcat 6.0 which
accesses a SQL Server 2000 database.  Periodically the application
becomes unresponsive due to a lack of heap space, and I have to bounce
Tomcat.  I'm trying to figure out what sort of errors could cause this
to happen.

Any suggestions?

I've looked in the Tomcat error logs, but the only errors I see prior to
the out-of-heapspace error are a small number of SQL errors that result
from bad input data.  The Wicket application handles these errors by
switching the user to a standard error page.  I suppose it's a bad
architecture to rely on SQL errors reported by the database rather than
checking the data, but does this result in a memory leak?

Frank Silbermann

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: final in MarkupContainer#add(Component...) method

2010-01-18 Thread Pedro Santos
> And if I may to try and adjust the course of this discussion a bit -- the
> issue with repeaters is not the only argument against final add(..)
method.
> As I mentioned in passing, there's also issue of Page inheritance where
> subclasses with  cannot use add(..) method if parent Page
has
>  nested into some other tag with wicket:id -- leading to
the
> very similar issues. I'm sure there can be other examples as well.

This thread already get discussed in somewhere, and and custom
addComponentOnChild(...) is an good option.

> So perhaps add(..) method doesn't need to be final after all? Or would it
> break something else that I don't know about? If someone could explain
> reasons behind add(..) being final it would be most appreciated -- that
> might change my opinion on the whole subject.

There is no api break, IMO it is an good framework frozen spot, since
situation on link[1] are avoided.

[1]
http://markmail.org/search/?q=list:org.apache.wicket.users+from:"Pedro+Santos"+override+date:200910+ajax#query:list%3Aorg.apache.wicket.users%20from%3A%22Pedro%20Santos%22%20override%20date%3A200910%20ajax+page:1+mid:u5uemowe7tqujn3o+state:results

On Mon, Jan 18, 2010 at 12:15 PM, Sergejs Olefirs
wrote:

>
> Thanks again for your reply.
>
> On the one hand, I agree with you, adding custom 'addComponent' method does
> make the mechanics of the code more clear.
>
> On the other hand, in practice (we used such methods for a couple of
> weeks),
> it results in the situations in application code where you sometimes have
> to
> use add(..) method and sometimes addComponent(..) method (and in case of
> addComponent(..) method, add(..) method is also available, so no
> compilation
> errors there). It invariably led to people forgetting to use
> addComponent(..) instead of add(..) and thus application crashing/behaving
> incorrectly at runtime. This was extremely annoying -- hence our decision
> to
> un-finalize add(..) method.
>
> On the yet another hand, OO programming kind of implies that objects are
> supposed to hide their implementation details, so even disregarding my
> previous usability comment, I'm not sure I agree that addComponent(..) is
> better than overridden add(..) method from the philosophical point of view.
>
>
> And if I may to try and adjust the course of this discussion a bit -- the
> issue with repeaters is not the only argument against final add(..) method.
> As I mentioned in passing, there's also issue of Page inheritance where
> subclasses with  cannot use add(..) method if parent Page
> has
>  nested into some other tag with wicket:id -- leading to
> the
> very similar issues. I'm sure there can be other examples as well.
>
>
> So perhaps add(..) method doesn't need to be final after all? Or would it
> break something else that I don't know about? If someone could explain
> reasons behind add(..) being final it would be most appreciated -- that
> might change my opinion on the whole subject.
>
>
> Best regards,
> Sergey
>
>
>
> Pedro H. O. dos Santos wrote:
> >
> > If you has some rules for your component, like wrap components, make more
> > sense you extend RepeatingView, create the addComponentAfterWrapHim
> > method,
> > that delegate the call to add method after your customization is made.
> You
> > gain plainness by make clean that this component add method is special.
> >
> > On Mon, Jan 18, 2010 at 10:52 AM, Sergejs Olefirs
> > wrote:
> >>
> >> This kind of brings us back to original question -- why is
> >> MarkupContainer.add(..) method final? Maybe it's something that needs to
> >> be
> >> changed (or alternatively mechanism provided for hooking into this
> >> method)?
> >>
> >>
> >> For our own purposes I already adjusted this method to be non-final (but
> >> that means that upgrading Wicket version is going to be slightly more
> >> problematic).
> >>
> >> Declaring it non-final resolved the RepeaterView (actually our custom
> >> component with slightly adjusted functionality) cleanly.
> >>
> >> It also resolved the issue with page inheritance. As it stands right now
> >> (in
> >> out-of-the-box Wicket), if  is inside of any other tag
> >> with
> >> wicket-id, then children pages can no longer use add(..) method directly
> >> (as
> >> it would then add components in the wrong place in the hierarchy and
> page
> >> rendering will crash). With 'final' gone, it is a simple matter to
> >> override
> >> add(..) in the parent page so that it would add components properly --
> >> thus
> >> children need not be aware of the parent innards.
> >
> --
> View this message in context:
> http://old.nabble.com/final-in-MarkupContainer-add%28Component...%29-method-tp27161187p27211055.html
> Sent from the Wicket - User mailing list archive at Nabble

Re: final in MarkupContainer#add(Component...) method

2010-01-18 Thread Sergejs Olefirs

Thanks again for your reply.

On the one hand, I agree with you, adding custom 'addComponent' method does
make the mechanics of the code more clear.

On the other hand, in practice (we used such methods for a couple of weeks),
it results in the situations in application code where you sometimes have to
use add(..) method and sometimes addComponent(..) method (and in case of
addComponent(..) method, add(..) method is also available, so no compilation
errors there). It invariably led to people forgetting to use
addComponent(..) instead of add(..) and thus application crashing/behaving
incorrectly at runtime. This was extremely annoying -- hence our decision to
un-finalize add(..) method.

On the yet another hand, OO programming kind of implies that objects are
supposed to hide their implementation details, so even disregarding my
previous usability comment, I'm not sure I agree that addComponent(..) is
better than overridden add(..) method from the philosophical point of view.


And if I may to try and adjust the course of this discussion a bit -- the
issue with repeaters is not the only argument against final add(..) method.
As I mentioned in passing, there's also issue of Page inheritance where
subclasses with  cannot use add(..) method if parent Page has
 nested into some other tag with wicket:id -- leading to the
very similar issues. I'm sure there can be other examples as well.


So perhaps add(..) method doesn't need to be final after all? Or would it
break something else that I don't know about? If someone could explain
reasons behind add(..) being final it would be most appreciated -- that
might change my opinion on the whole subject.


Best regards,
Sergey



Pedro H. O. dos Santos wrote:
> 
> If you has some rules for your component, like wrap components, make more
> sense you extend RepeatingView, create the addComponentAfterWrapHim
> method,
> that delegate the call to add method after your customization is made. You
> gain plainness by make clean that this component add method is special.
> 
> On Mon, Jan 18, 2010 at 10:52 AM, Sergejs Olefirs
> wrote:
>>
>> This kind of brings us back to original question -- why is
>> MarkupContainer.add(..) method final? Maybe it's something that needs to
>> be
>> changed (or alternatively mechanism provided for hooking into this
>> method)?
>>
>>
>> For our own purposes I already adjusted this method to be non-final (but
>> that means that upgrading Wicket version is going to be slightly more
>> problematic).
>>
>> Declaring it non-final resolved the RepeaterView (actually our custom
>> component with slightly adjusted functionality) cleanly.
>>
>> It also resolved the issue with page inheritance. As it stands right now
>> (in
>> out-of-the-box Wicket), if  is inside of any other tag
>> with
>> wicket-id, then children pages can no longer use add(..) method directly
>> (as
>> it would then add components in the wrong place in the hierarchy and page
>> rendering will crash). With 'final' gone, it is a simple matter to
>> override
>> add(..) in the parent page so that it would add components properly --
>> thus
>> children need not be aware of the parent innards.
> 
-- 
View this message in context: 
http://old.nabble.com/final-in-MarkupContainer-add%28Component...%29-method-tp27161187p27211055.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: submit a form from outside of it

2010-01-18 Thread Martin Asenov
it's not working... The problem probably is that the form has it's own 
generated markup id and the button looks for the form with markup id from the 
one that comes in the AjaxButton's constructor as an argument. Because I have:

submitButton = new AjaxButton("submit_button", formPanel.getForm()) {
protected void onSubmit(ART target) {
do smth
}
}

and because I display different panels with different forms ( especially their 
markupId ) it can't find the current one by it's markup id. I just can't think 
of a workaround to solve this.

Please, if someone has a better idea, it would be great to share it...

Best Regards,
Martin 

-Original Message-
From: Martin Asenov [mailto:mase...@velti.com] 
Sent: Monday, January 18, 2010 3:33 PM
To: users@wicket.apache.org
Subject: RE: submit a form from outside of it

Yes, Bert, it's accessible. The way you proposed comes up with:

ERROR: Wicket.Ajax.Call.submitFormById: Trying to submit form with id 'form49a' 
that is not in document.

in the ajax debug. But the form is in the document. Probably it has dynamic 
markup id and I should try making it persistent.

Thanks,

-Original Message-
From: Bert [mailto:taser...@gmail.com] 
Sent: Monday, January 18, 2010 2:17 PM
To: users@wicket.apache.org
Subject: Re: submit a form from outside of it

I 'm not sure i completely understand your requirement, but the
AjaxButton too has a constructor
with a Form as parameter. Would it be possible to access the form when
creating the button?

Bert

On Mon, Jan 18, 2010 at 13:11, Martin Asenov  wrote:
> Thanks Bert, but I use a button... I need to have the button in the page, 
> because it does the same for any form. I want to have code re-usage.  But 
> however my abstract MyFormPanel does not have relevant markup, so I can't 
> include the buttons there, it would be nice, but I can not. I just want to 
> avoid having the very same buttons and markup in every subclass of 
> MyFormPanel...
>
> Can anyone please give further assist?

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: final in MarkupContainer#add(Component...) method

2010-01-18 Thread Marat Radchenko
2010/1/14 Ilya German :
> Hello!
>
> We're struggling with working around the final modifier for the 
> MarkupContainer#add(Component ...) method.
> We have the following scenario:
> 1. We'd like to use a repeater to add some components to the form.
> 2. We'd like these components to work with CompoundPropertyModel, thus we 
> need these to have meaningful wicket ids
> 3. We'd like not to find ourselves backstabbed by the non-numeric ids in the 
> RepeatingView's children.
>
> This brings us to a suggested "wrapping" of the children in 
> WebMarkupContainers, but we'd like to hide it to get rid of the
>
> webmarkupcontainer item=new webmarkupcontainer(rv.newchildid());
>
> part. To do this, it seems logical to extend the RepeatingView overriding the 
> add() method to be wrapping every component, however the add() method is 
> final :(
>
> Could anyone suggest some other way to resolve this situation? Or, perhaps, 
> it could be acceptable to "officially" remove the final modifier from the 
> add() method?
>
> Thanks in advance!
>
> Ilya German.

1. You can use PropertyModel and numeric ids isn't a problem
2. You can wait for resolution on
https://issues.apache.org/jira/browse/WICKET-2684 and (if it gets
fixed) use non-numeric child ids in RepeatingView.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: final in MarkupContainer#add(Component...) method

2010-01-18 Thread Marat Radchenko
> About the ids with digits for repeater, override the onBeforeRender method
> and remove that validation if you need/want.
Impossible. I just filed https://issues.apache.org/jira/browse/WICKET-2684

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: final in MarkupContainer#add(Component...) method

2010-01-18 Thread Pedro Santos
About the lenient form component, I thought that you are having trouble
adding text fields to your form (for example), since they validate the
markup tag (nothing to do with add modifier). As you are adding this kind of
component dynamically, you can't write on development time on your markup,
the correct tag.
About the ids with digits for repeater, override the onBeforeRender method
and remove that validation if you need/want.
If you has some rules for your component, like wrap components, make more
sense you extend RepeatingView, create the addComponentAfterWrapHim method,
that delegate the call to add method after your customization is made. You
gain plainness by make clean that this component add method is special.

On Mon, Jan 18, 2010 at 10:52 AM, Sergejs Olefirs
wrote:

>
> Hi,
>
> since I work with Ilya on this project, I'd like to continue this topic as
> it is something I'm keenly interested in.
>
> First of all, thanks for your reply, Pedro.
>
> However I must admit I don't understand your suggestion about lenient form
> components. How is that supposed to work? And at any rate wouldn't it be
> too
> much work (rewriting each component) for something that could be easily
> achieved with minimal code if only the add(..) method wasn't final?
>
> Your comment about RepeatingView seems incorrect (according to my
> experience). As soon as you have something that is not numerical as a child
> ID, the component complains loudly in logs (see
> AbstractRepeater.onBeforeRender()). I also saw post by Igor somewhere where
> he stated that numeric IDs were used for some purpose (hence the warning).
>
>
> This kind of brings us back to original question -- why is
> MarkupContainer.add(..) method final? Maybe it's something that needs to be
> changed (or alternatively mechanism provided for hooking into this method)?
>
>
> For our own purposes I already adjusted this method to be non-final (but
> that means that upgrading Wicket version is going to be slightly more
> problematic).
>
> Declaring it non-final resolved the RepeaterView (actually our custom
> component with slightly adjusted functionality) cleanly.
>
> It also resolved the issue with page inheritance. As it stands right now
> (in
> out-of-the-box Wicket), if  is inside of any other tag with
> wicket-id, then children pages can no longer use add(..) method directly
> (as
> it would then add components in the wrong place in the hierarchy and page
> rendering will crash). With 'final' gone, it is a simple matter to override
> add(..) in the parent page so that it would add components properly -- thus
> children need not be aware of the parent innards.
>
> Best regards,
> Sergey
>
>
>
> Pedro H. O. dos Santos wrote:
> >
> >>>This brings us to a suggested "wrapping" of the children in
> WebMarkupContainers
> > This is not the only option you have, you can use lenient form components
> > like:
> > public class LenientTextField extends TextField
> > {
> > @Override
> > protected void onComponentTag(final ComponentTag tag)
> > {
> > tag.setName("input");
> > tag.put("type", "text");
> > super.onComponentTag(tag);
> > }
> > }
> > so you have an text field that you can your for any tag you place on your
> > template.
> >
> > About the meaningful wicket ids, you doesn't need to call
> rv.newchildid(),
> > only make sure to don't repeat the ids.
> >
> > 2010/1/14 Ilya German 
> >> This brings us to a suggested "wrapping" of the children in
> >> WebMarkupContainers, but we'd like to hide it to get rid of the
> >>
> >> webmarkupcontainer item=new webmarkupcontainer(rv.newchildid());
> >>
> >> part. To do this, it seems logical to extend the RepeatingView
> overriding
> >> the add() method to be wrapping every component, however the add()
> method
> >> is
> >> final :(
> >>
> >> Could anyone suggest some other way to resolve this situation? Or,
> >> perhaps,
> >> it could be acceptable to "officially" remove the final modifier from
> the
> >> add() method?
> >>
> >> Thanks in advance!
> >>
> >> Ilya German.
> >
> >
> >
> >
> > --
> > Pedro Henrique Oliveira dos Santos
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/final-in-MarkupContainer-add%28Component...%29-method-tp27161187p27210046.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


RE: submit a form from outside of it

2010-01-18 Thread Martin Asenov
Yes, Bert, it's accessible. The way you proposed comes up with:

ERROR: Wicket.Ajax.Call.submitFormById: Trying to submit form with id 'form49a' 
that is not in document.

in the ajax debug. But the form is in the document. Probably it has dynamic 
markup id and I should try making it persistent.

Thanks,

-Original Message-
From: Bert [mailto:taser...@gmail.com] 
Sent: Monday, January 18, 2010 2:17 PM
To: users@wicket.apache.org
Subject: Re: submit a form from outside of it

I 'm not sure i completely understand your requirement, but the
AjaxButton too has a constructor
with a Form as parameter. Would it be possible to access the form when
creating the button?

Bert

On Mon, Jan 18, 2010 at 13:11, Martin Asenov  wrote:
> Thanks Bert, but I use a button... I need to have the button in the page, 
> because it does the same for any form. I want to have code re-usage.  But 
> however my abstract MyFormPanel does not have relevant markup, so I can't 
> include the buttons there, it would be nice, but I can not. I just want to 
> avoid having the very same buttons and markup in every subclass of 
> MyFormPanel...
>
> Can anyone please give further assist?

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Close window javascript

2010-01-18 Thread Muro Copenhagen
Hi,

Thanks Sefan...that helped me on the way...

It's working now...

Best Regards
Muro

On Mon, Jan 18, 2010 at 1:03 PM, Stefan Droog  wrote:

> See
>
> ModalWindow.close(final AjaxRequestTarget target)
>
> S
>
> -Original Message-
> From: Muro Copenhagen [mailto:copenha...@gmail.com]
> Sent: Monday, January 18, 2010 11:12 AM
> To: users@wicket.apache.org
> Subject: Close window javascript
>
> Hi,
>
> I'm trying to close a popup window after the user has submitted a message.
>
> I'm using a javascript to close the window but without any luck.
>
> Can anyone see what goes wrong?
>
> This is the AjaxSubmitLink that should submit the message and close the
> window:
>
>AjaxSubmitLink submit = new AjaxSubmitLink("submitLink") {
>
>@Override
>public void onSubmit(AjaxRequestTarget target, Form form) {
>if (log.isDebugEnabled()) {
>log.debug("Saveing comment" + comment);
>}
>target.addComponent(response.setVisible(true));
>target.addComponent(this.setVisible(false));
>caseCommentService.create(...);
>
>this.getPage().add(new
> AbstractAjaxTimerBehavior(Duration.milliseconds(3000)) {
>
>protected void onTimer(final AjaxRequestTarget target) {
>stop();
>target.prependJavascript("window.close();");
>}
>});
>}
>};
>myForm.add(submit);
>
> What i'm trying to achieve is to show a
> message(response.setVisible(true))..) in three seconds before closing the
> window.
>
> But something it does not seem to work.
>
> Best Regards
> Muro
>
> The information contained in this communication is confidential, intended
> solely for the use of the individual or entity to whom it is addressed and
> may be legally privileged and protected by professional secrecy. Access to
> this message by anyone else is unauthorized. If you are not the intended
> recipient, any disclosure, copying, or distribution of the message, or any
> action or omission taken by you in reliance on it is prohibited and may be
> unlawful. Please immediately contact the sender if you have received this
> message in error. This email does not constitute any commitment from Cordys
> Holding BV or any of its subsidiaries except when expressly agreed in a
> written agreement between the intended recipient and Cordys Holding BV or
> its subsidiaries. Cordys is neither liable for the proper and complete
> transmission of the information contained in this communication nor for any
> delay in its receipt. Cordys does not guarantee that the integrity of this
> communication has been maintained nor that the communication is free of
> viruses, interceptions or interference. If you are not the intended
> recipient of this communication please return the communication to the
> sender and delete and destroy all copies.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


list view

2010-01-18 Thread chinedu efoagui
Hello,

I have a table that stores menutabs. In the list of tabs are main tabs
On the page there are main tabs and subtabs that would appear if the
tab that is click in the active one
for example "home", "applications","admin".
there could be subtabs under "applications" menu such as "leave", "loans" etc.
there if "applications" menu is clicked and become the active tab
/page. i would like leave, loans tabs shown underneath it.

I have written something but the problem is when the subtabs do not show
i do not know if my approach is correct or maybe there is a better way
of achieveing the same thing.


 menuListView=new ListView("menulist",menulist){
  @Override
protected void populateItem(ListItem item) {
 final   AuthTabs menuitem = (AuthTabs)item.getModelObject();
  // BookmarkablePageLink link =new
BookmarkablePageLink("link",PortalReflection.getClass(menuitem.getUrl()));
AjaxFallbackLink link =new AjaxFallbackLink ("link") {
  /*  Link link =new Link ("link") {
   @Override
   public void onClick() {



childreanList=getMenuList(menuitem.getTabid());
 getChildListView( childreanList);
 datatableContainer.replace(childListView);
//this navigates the page to the page class
 setResponsePage(PortalReflection.getClass(menuitem.getUrl()));
}*/

@Override
public void onClick(AjaxRequestTarget target) {
   // setClicked(true);
System.out.println("menuitem.getTabid() is:"+menuitem.getTabid());
childreanList=getMenuList(menuitem.getTabid());
add(new AttributeModifier("class", true, new Model("hover")));
target.addComponent(this);
//this navigates the page to the page class
  setResponsePage(PortalReflection.getClass(menuitem.getUrl()));

  }
};

/*
link.add(new AttributeModifier("class", true, new
LoadableDetachableModel() {

 private static final long serialVersionUID = 1L;
@Override

public final Object load() {

if(clicked ){
clicked=false;
return "hover";
}
else {
return "";
}
}
}));
 * */
link.setOutputMarkupId(true);
//link.add(new MenuLinkVisualBehavior("onclick", link));
link.add(new Label("caption", menuitem.getTabname()));

item.add(link);
 }};
  menuListView.setOutputMarkupId(true);
add(menuListView);

}
public ListView getChildListView(List childlist){

childListView=new ListView("childmenulist",childlist){

  @Override
protected void populateItem(ListItem item) {
   final   AuthTabs menuitem = (AuthTabs)item.getModelObject();
   BookmarkablePageLink zalink =new
BookmarkablePageLink("childlink",PortalReflection.getClass(menuitem.getUrl()));
zalink.add(new Label("childcaption", menuitem.getTabname()));
}
 };

childListView.setOutputMarkupId(true);
  return childListView;
}


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: final in MarkupContainer#add(Component...) method

2010-01-18 Thread Sergejs Olefirs

Hi,

since I work with Ilya on this project, I'd like to continue this topic as
it is something I'm keenly interested in.

First of all, thanks for your reply, Pedro.

However I must admit I don't understand your suggestion about lenient form
components. How is that supposed to work? And at any rate wouldn't it be too
much work (rewriting each component) for something that could be easily
achieved with minimal code if only the add(..) method wasn't final?

Your comment about RepeatingView seems incorrect (according to my
experience). As soon as you have something that is not numerical as a child
ID, the component complains loudly in logs (see
AbstractRepeater.onBeforeRender()). I also saw post by Igor somewhere where
he stated that numeric IDs were used for some purpose (hence the warning).


This kind of brings us back to original question -- why is
MarkupContainer.add(..) method final? Maybe it's something that needs to be
changed (or alternatively mechanism provided for hooking into this method)?


For our own purposes I already adjusted this method to be non-final (but
that means that upgrading Wicket version is going to be slightly more
problematic).

Declaring it non-final resolved the RepeaterView (actually our custom
component with slightly adjusted functionality) cleanly. 

It also resolved the issue with page inheritance. As it stands right now (in
out-of-the-box Wicket), if  is inside of any other tag with
wicket-id, then children pages can no longer use add(..) method directly (as
it would then add components in the wrong place in the hierarchy and page
rendering will crash). With 'final' gone, it is a simple matter to override
add(..) in the parent page so that it would add components properly -- thus
children need not be aware of the parent innards.

Best regards,
Sergey



Pedro H. O. dos Santos wrote:
> 
>>>This brings us to a suggested "wrapping" of the children in
WebMarkupContainers
> This is not the only option you have, you can use lenient form components
> like:
> public class LenientTextField extends TextField
> {
> @Override
> protected void onComponentTag(final ComponentTag tag)
> {
> tag.setName("input");
> tag.put("type", "text");
> super.onComponentTag(tag);
> }
> }
> so you have an text field that you can your for any tag you place on your
> template.
> 
> About the meaningful wicket ids, you doesn't need to call rv.newchildid(),
> only make sure to don't repeat the ids.
> 
> 2010/1/14 Ilya German 
>> This brings us to a suggested "wrapping" of the children in
>> WebMarkupContainers, but we'd like to hide it to get rid of the
>>
>> webmarkupcontainer item=new webmarkupcontainer(rv.newchildid());
>>
>> part. To do this, it seems logical to extend the RepeatingView overriding
>> the add() method to be wrapping every component, however the add() method
>> is
>> final :(
>>
>> Could anyone suggest some other way to resolve this situation? Or,
>> perhaps,
>> it could be acceptable to "officially" remove the final modifier from the
>> add() method?
>>
>> Thanks in advance!
>>
>> Ilya German.
> 
> 
> 
> 
> -- 
> Pedro Henrique Oliveira dos Santos
> 
> 

-- 
View this message in context: 
http://old.nabble.com/final-in-MarkupContainer-add%28Component...%29-method-tp27161187p27210046.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: submit a form from outside of it

2010-01-18 Thread Bert
I 'm not sure i completely understand your requirement, but the
AjaxButton too has a constructor
with a Form as parameter. Would it be possible to access the form when
creating the button?

Bert

On Mon, Jan 18, 2010 at 13:11, Martin Asenov  wrote:
> Thanks Bert, but I use a button... I need to have the button in the page, 
> because it does the same for any form. I want to have code re-usage.  But 
> however my abstract MyFormPanel does not have relevant markup, so I can't 
> include the buttons there, it would be nice, but I can not. I just want to 
> avoid having the very same buttons and markup in every subclass of 
> MyFormPanel...
>
> Can anyone please give further assist?

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: submit a form from outside of it

2010-01-18 Thread Martin Asenov
Thanks Bert, but I use a button... I need to have the button in the page, 
because it does the same for any form. I want to have code re-usage.  But 
however my abstract MyFormPanel does not have relevant markup, so I can't 
include the buttons there, it would be nice, but I can not. I just want to 
avoid having the very same buttons and markup in every subclass of 
MyFormPanel...

Can anyone please give further assist? 

Thank you,
Martin

-Original Message-
From: Bert [mailto:taser...@gmail.com] 
Sent: Monday, January 18, 2010 12:38 PM
To: users@wicket.apache.org
Subject: Re: submit a form from outside of it

Not sure here, but the AjaxSubmitLink has an constructor that lets you
pass in the form it should work on.

Bert

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



CryptedUrlWebRequestCodingStrategy + WebRequestCodingStrategy = resource URLs are not encrypted (bug?).

2010-01-18 Thread Sergejs Olefirs

Hi,

I started using Wicket rather recently. As part of our security 
considerations, we do not want immediately expose the underlying 
framework(s) we are using, so we went ahead with URL encryption. We used 
standard approach as described in examples:


@Override
protected IRequestCycleProcessor newRequestCycleProcessor() {

return new WebRequestCycleProcessor(){
  protected IRequestCodingStrategy newRequestCodingStrategy(){
return new CryptedUrlWebRequestCodingStrategy(new 
WebRequestCodingStrategy());

   }
};

}


Unfortunately I later discovered that this approach doesn't encrypt resource 
URLs, e.g. from:

CSSPackageResource.getHeaderContribution(..);
or
link.add(new Image("logoImage"));

What's worse such resource references include FQN of related classes.


After some investigation I found out that the problem is that 
CryptedUrlWebRequestCodingStrategy only encrypts arguments string of the URL 
and WebRequestCodingStrategy encodes resource references as path rather than 
as argument.


I was able to get around this by subclassing WebRequestCodingStrategy and 
overriding methods:

addResourceParameters(..);
encode(RequestCycle requestCycle, ISharedResourceRequestTarget 
requestTarget);

to use arguments rather than path as resource reference.


However I'm unsure as to original reasoning behind original 
CryptedUrlWebRequestCodingStrategy and WebRequestCodingStrategy. Is the 
resource behaviour simply a bug? Or is it there for some reason that is 
going to bite me down the road if I use my own 'fix'?



Best regards,
Sergey 



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Close window javascript

2010-01-18 Thread Stefan Droog
See

ModalWindow.close(final AjaxRequestTarget target)

S

-Original Message-
From: Muro Copenhagen [mailto:copenha...@gmail.com]
Sent: Monday, January 18, 2010 11:12 AM
To: users@wicket.apache.org
Subject: Close window javascript

Hi,

I'm trying to close a popup window after the user has submitted a message.

I'm using a javascript to close the window but without any luck.

Can anyone see what goes wrong?

This is the AjaxSubmitLink that should submit the message and close the
window:

AjaxSubmitLink submit = new AjaxSubmitLink("submitLink") {

@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
if (log.isDebugEnabled()) {
log.debug("Saveing comment" + comment);
}
target.addComponent(response.setVisible(true));
target.addComponent(this.setVisible(false));
caseCommentService.create(...);

this.getPage().add(new
AbstractAjaxTimerBehavior(Duration.milliseconds(3000)) {

protected void onTimer(final AjaxRequestTarget target) {
stop();
target.prependJavascript("window.close();");
}
});
}
};
myForm.add(submit);

What i'm trying to achieve is to show a
message(response.setVisible(true))..) in three seconds before closing the
window.

But something it does not seem to work.

Best Regards
Muro

The information contained in this communication is confidential, intended 
solely for the use of the individual or entity to whom it is addressed and may 
be legally privileged and protected by professional secrecy. Access to this 
message by anyone else is unauthorized. If you are not the intended recipient, 
any disclosure, copying, or distribution of the message, or any action or 
omission taken by you in reliance on it is prohibited and may be unlawful. 
Please immediately contact the sender if you have received this message in 
error. This email does not constitute any commitment from Cordys Holding BV or 
any of its subsidiaries except when expressly agreed in a written agreement 
between the intended recipient and Cordys Holding BV or its subsidiaries. 
Cordys is neither liable for the proper and complete transmission of the 
information contained in this communication nor for any delay in its receipt. 
Cordys does not guarantee that the integrity of this communication has been 
maintained nor that the communication is free of viruses, interceptions or 
interference. If you are not the intended recipient of this communication 
please return the communication to the sender and delete and destroy all copies.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Tree table with check box

2010-01-18 Thread prati

Hey it worked,i wanted checkbox in other column
Above apparoach works perfectly.
Thanks


prati wrote:
> 
> Hi Peter,
> 
> Many thanks for your reply.My problem is exactly same as second one
> discussed in the post.
> I need checkbox in other column .
> 
> Code is
> TreeTable.html
> 
>   
> 
>   
>   
> TreeTable.java
> 
> public TreeTablePage()
>   {
> 
>   IColumn columns[] = new IColumn[] { col1(), col2() };
>   
>   tree = new TreeTable("treeTable", createTreeModel(), columns);
>   tree.getTreeState().setAllowSelectMultiple(true);
> 
> 
> 
>   add(tree);
>   tree.getTreeState().collapseAll();
>   }
> 
> 
> 
>   private PropertyTreeColumn col1() {
>   return new PropertyTreeColumn(new 
>   ColumnLocation(Alignment.MIDDLE, 5,
>   Unit.PROPORTIONAL), "Check", 
> "userObject.name");
>   }
> 
>   private PropertyTreeColumn col2() {
>   return new PropertyTreeColumn(new 
> ColumnLocation(Alignment.LEFT, 
>   7, Unit.EM), "L2",
>   "userObject.name") {
>   
>   
>   @Override
>   public Component newCell(MarkupContainer parent, String 
> id, TreeNode
> node, int level) {
>   DefaultMutableTreeNode n = 
> (DefaultMutableTreeNode) node;
>   CheckBoxPanel boxPanel = new 
> CheckBoxPanel("mypanel");
>   return boxPanel;
>   }
>   };
>   }
> 
> I am getting no getter methods defined for ModelBean.
> 
> Am i doing it in a right way particularly HTML
> Thanks
> Prati
> 
> aldaris wrote:
>> 
>> Hi,
>> 
>> check out wicket-tree (http://code.google.com/p/wicket-tree/) and see 
>> the example app, I think it will solve your problem.
>> 
>> Regards,
>> Peter
>> 
>> prati írta:
>>> 
>>> Hi,
>>> 
>>> I am also stuck in similar problem.If you can share your code snippets
>>> of
>>> how u did that will be of great help.
>>> Thanks
>>> 
>>> Pratibha
>>> 
>>> vela wrote:
 Hello again,

 The links and nodes are added in the TreeFragment class. But the
 TreeFragment is a private inner class in Treetable, could you tell how
 to
 use the TreeFragment to acheive this functionality
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Tree-table-with-check-box-tp26080852p27209139.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Tree table with check box

2010-01-18 Thread prati

Hi Peter,

Many thanks for your reply.My problem is exactly same as second one
discussed in the post.
I need checkbox in other column .

Code is
TreeTable.html

  

  
  
TreeTable.java

public TreeTablePage()
{

IColumn columns[] = new IColumn[] { col1(), col2() };

tree = new TreeTable("treeTable", createTreeModel(), columns);
tree.getTreeState().setAllowSelectMultiple(true);



add(tree);
tree.getTreeState().collapseAll();
}



private PropertyTreeColumn col1() {
return new PropertyTreeColumn(new 
ColumnLocation(Alignment.MIDDLE, 5,
Unit.PROPORTIONAL), "Check", 
"userObject.name");
}

private PropertyTreeColumn col2() {
return new PropertyTreeColumn(new 
ColumnLocation(Alignment.LEFT, 
7, Unit.EM), "L2",
"userObject.name") {


@Override
public Component newCell(MarkupContainer parent, String 
id, TreeNode
node, int level) {
DefaultMutableTreeNode n = 
(DefaultMutableTreeNode) node;
CheckBoxPanel boxPanel = new 
CheckBoxPanel("mypanel");
return boxPanel;
}
};
}

I am getting no getter methods defined for ModelBean.

Am i doing it in a right way particularly HTML
Thanks
Prati

aldaris wrote:
> 
> Hi,
> 
> check out wicket-tree (http://code.google.com/p/wicket-tree/) and see 
> the example app, I think it will solve your problem.
> 
> Regards,
> Peter
> 
> prati írta:
>> 
>> Hi,
>> 
>> I am also stuck in similar problem.If you can share your code snippets of
>> how u did that will be of great help.
>> Thanks
>> 
>> Pratibha
>> 
>> vela wrote:
>>> Hello again,
>>>
>>> The links and nodes are added in the TreeFragment class. But the
>>> TreeFragment is a private inner class in Treetable, could you tell how
>>> to
>>> use the TreeFragment to acheive this functionality
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Tree-table-with-check-box-tp26080852p27208990.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: submit a form from outside of it

2010-01-18 Thread Bert
Not sure here, but the AjaxSubmitLink has an constructor that lets you
pass in the form it should work on.

Bert

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketExtensions DataTable : Creating a Links using Model value?

2010-01-18 Thread Ernesto Reinaldo Barreiro
A somewhat similar question was asked just a couple of days ago [1] and,
probably, has been asked and answered many times before on this list.

Ernesto

References

[1]
http://old.nabble.com/How-to-get-a-cell-work-as-a-link-in-AjaxFallbackDefaultDataTable-td27161378.html

On Mon, Jan 18, 2010 at 7:24 AM, Ashika Umanga Umagiliya <
auma...@biggjapan.com> wrote:

> Greetings,
>
> I was going through WicketExtensions DataTable source and I was wondering
> how to create a hyperlink using PropertyColumn.
>
> In docs it says:
>
> columns[0] = new PropertyColumn(new Model("Family Id"), "familyId");
>
> What I want to do is,
> 1) create a Link using the field value "familyId",and directing to another
> page which display SubFamilies related to
> selected 'familyId'
> 2) create a Link which direct to another website . eg:
> http://www.ncbi.org/family?id=$familyid
>
>
> My domain model is as:
>
> One 'Family' has many 'SubFamily' objects.
>
>
>
>
> ||
>


Re: WicketExtensions : DataTable : Sending 'id's between web pages?

2010-01-18 Thread Bert
In the onClick() handler of your link, you can call setResponsePage()
with either the id in question, or pass in the full object:

add(new Link("showSubFamily"){
 private static final long serialVersionUID = 1L;
 @Override
 public void onClick() {
 setResponsePage(new SubFamilyPage(id)); // or:
setResponsePage(new SubFamilyPage(family));
 }
 });


Of course, the SubFamilyPage needs a constructor that accepts the used
parameter.

Hope that helped.

Bert

On Mon, Jan 18, 2010 at 10:58, Ashika Umanga Umagiliya
 wrote:
> My Domain model has 'Family' which has many 'SubFamily' objects.
>
> I managed to display the 'Family' information using a DataTable in
> 'FamilyPage'.
> Now I want to do is,when user clicks on a 'Family Id' the 'SubFamilyPage'
> should open and display relavant subfamilies in a datatable.
> I want to know how this events work together , I am wondering whether I have
> to use HTTP parameters like in JSP pages.
>
> Sorry for my ignorant , I am quite a newbie to Wicket.
>
> Regards.
>
> FamilyPage                 SubFamilesPage
>
> |FamiliesTable|          |SubFamilesTable|
> |_|          |___|
> | FamilidId 1 |->| sub families  |
> | FamilidId 1 |          | belong to id 1|
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Escaping variable declaration/resolution in properties files

2010-01-18 Thread Joseph Pachod

kirillkh wrote:

VariableInterpolator.java says:
"$" is the escape char. Thus "$${text}" can be used to escape it (ignore
interpretation).
  

Thanks a lot, it works fine.

--
Joseph Pachod
IT

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 310
F  + 49 761 3 85 59 550
E  joseph.pac...@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter www.signin.thomas-daily.de für die kostenfreien TD 
Morning News, eine  Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer 
Mailbox.

Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 
Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des 
Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet 
redakt...@thomas-daily.de.

To receive the free TD News International - a selection of the day's top issues 
delivered to your mail box every day - please register at 
www.signin.thomas-daily.de

Please note: Information received for our TD News International after 4 p.m. will be given priority for publication the following day. The daily editorial deadline is 8:30 a.m. You can reach our editorial staff at redakt...@thomas-daily.de. 



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: submit a form from outside of it

2010-01-18 Thread Martin Asenov
Hi, Alexandru, thanks for the quick reply.

I get 

java.lang.IllegalStateException: form was not specified in the constructor and 
cannot be found in the hierarchy of the component this behavior is attached to

the form is located in the same page and displayed, but it's actually placed 
within a panel that is a child of the page. :-(

BR,

-Original Message-
From: Alexandru Barbat [mailto:alexandrubar...@gmail.com] 
Sent: Monday, January 18, 2010 11:26 AM
To: users@wicket.apache.org
Subject: Re: submit a form from outside of it

Hi,

Try this:

AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
"onclick") {
protected void onSubmit(AjaxRequestTarget target) {
//do what you have to do
}


};


Button submitButton = new Button("submitButton");

submitButton.add(behave);

...

Alexandru

2010/1/18 Martin Asenov 

> Hello, everyone!
>
> I have a form that has validation and so on, but the main difference to
> ordinary forms is that my form does not contain it's submit button. It's
> located in a parent, in my case a web page.
>
> I'm wondering how can I force the form submitting from the page. The code
> is
>
> submitButton = new AjaxButton("submit_button) {
> protected void onSubmit(AjaxRequestTarget target, Form form) {
>   myForm.processForm();
> }
> };
>
> The method processForm() in myForm just calls process();
>
> But nothing happens, looks like I'm missing something...
>
> Thanks,
> Martin
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Close window javascript

2010-01-18 Thread Muro Copenhagen
Hi,

I'm trying to close a popup window after the user has submitted a message.

I'm using a javascript to close the window but without any luck.

Can anyone see what goes wrong?

This is the AjaxSubmitLink that should submit the message and close the
window:

AjaxSubmitLink submit = new AjaxSubmitLink("submitLink") {

@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
if (log.isDebugEnabled()) {
log.debug("Saveing comment" + comment);
}
target.addComponent(response.setVisible(true));
target.addComponent(this.setVisible(false));
caseCommentService.create(...);

this.getPage().add(new
AbstractAjaxTimerBehavior(Duration.milliseconds(3000)) {

protected void onTimer(final AjaxRequestTarget target) {
stop();
target.prependJavascript("window.close();");
}
});
}
};
myForm.add(submit);

What i'm trying to achieve is to show a
message(response.setVisible(true))..) in three seconds before closing the
window.

But something it does not seem to work.

Best Regards
Muro


Re: PageLink deprecated

2010-01-18 Thread Emond Papegaaij
I totally agree with Jeroen. The 3rd constructor is dangerous and should be 
removed. The other two, however, are lazy and create the page in the onClick 
(provided that the IPageLink interface is implemented correctly). Of course, 
it is possible to copy PageLink and IPageLink to wicket-security, but that 
would be a large API-incompatible change, for which I see no compelling 
reason.

Emond

On Monday 18 January 2010 08:44:28 Jeroen Steenbeeke wrote:
> Guys, no need to keep explaining what's wrong with passing a Page in
> the constructor, we understand that!
> 
> Forget about that filthy 3rd constructor, I know it's wrong and I
> never used it anyway. That wasn't what my question was about.
> 
> There are two more constructors:
> 
> PageLink(String, Class)
> PageLink(String, IPageLink)
> 
> Both of these do not replicate the dangerous behavior illustrated in
> this thread so far. I understand that we can easily create our own
> implementation that simulates the behavior we want. I just wanted to
> understand the reasoning for removing the whole class when only one of
> the constructors is dangerous. From what Martijn Dashorst just told
> me, it was a case of "seeing as we already have Link and
> BookmarkablePageLink, we figured you could just use those instead".
> 
> This is also the source of miscommunication so far. The Javadoc simply
> states what you should use instead, but does not explicitly state why.
> The assumption is that any behavior you can achieve with the
> PageLink/IPageLink combination can also be done with a simple Link.
> This does not take into account the use of the Page Identity for
> security checks however (mainly for determining link visibility,
> which, frankly, does not need an actual instance of the page in
> question), which brings us back to Emond's original point.
> 
> On the other hand, one could argue that the only use for the page
> identity is for security purposes, and it would therefore be more at
> home in a specialized class in wicket-security.
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



WicketExtensions : DataTable : Sending 'id's between web pages?

2010-01-18 Thread Ashika Umanga Umagiliya

My Domain model has 'Family' which has many 'SubFamily' objects.

I managed to display the 'Family' information using a DataTable in 
'FamilyPage'.
Now I want to do is,when user clicks on a 'Family Id' the 
'SubFamilyPage' should open and display relavant subfamilies in a datatable.
I want to know how this events work together , I am wondering whether I 
have to use HTTP parameters like in JSP pages.


Sorry for my ignorant , I am quite a newbie to Wicket.

Regards.

FamilyPage SubFamilesPage

|FamiliesTable|  |SubFamilesTable|
|_|  |___|
| FamilidId 1 |->| sub families  |
| FamilidId 1 |  | belong to id 1|


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Escaping variable declaration/resolution in properties files

2010-01-18 Thread kirillkh
VariableInterpolator.java says:
"$" is the escape char. Thus "$${text}" can be used to escape it (ignore
interpretation).

On Mon, Jan 18, 2010 at 10:46 AM, Joseph Pachod  wrote:

> Hi
>
> I would like to add some text containing ${variable} in a XML properties
> file, for an error message. This text of a variable declaration should be
> rendered as it is.
>
> However, wicket always tries to resolve this variable, and thus I get this
> exception :
> WicketMessage: Exception 'java.lang.IllegalArgumentException: Value of
> variable [[_variable]] could not be resolved while interpolating [[Input
> cannot contains text like ${_variable}]]' occurred during validation
> foo.steps.VariablesNotAcceptedValidator on component
> 1:generalForm:generalAttributes.jobName
>
> Is there a clean way to avoid it ?
>
> thanks in advance
>
> --
> Joseph Pachod
> IT
>
> THOMAS DAILY GmbH
> Adlerstraße 19
> 79098 Freiburg
> Deutschland
> T  + 49 761 3 85 59 310
> F  + 49 761 3 85 59 550
> E  joseph.pac...@thomas-daily.de
> www.thomas-daily.de
>
> Geschäftsführer/Managing Directors:
> Wendy Thomas, Susanne Larbig
> Handelsregister Freiburg i.Br., HRB 3947
>
> Registrieren Sie sich unter www.signin.thomas-daily.de für die
> kostenfreien TD Morning News, eine  Auswahl aktueller Themen des Tages
> morgens um 9:00 in Ihrer Mailbox.
>
> Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um
> 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00
> Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion
> lautet redakt...@thomas-daily.de.
>
> To receive the free TD News International - a selection of the day's top
> issues delivered to your mail box every day - please register at
> www.signin.thomas-daily.de
>
> Please note: Information received for our TD News International after 4
> p.m. will be given priority for publication the following day. The daily
> editorial deadline is 8:30 a.m. You can reach our editorial staff at
> redakt...@thomas-daily.de.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: submit a form from outside of it

2010-01-18 Thread Alexandru Barbat
Hi,

Try this:

AjaxFormSubmitBehavior behave = new AjaxFormSubmitBehavior(myForm,
"onclick") {
protected void onSubmit(AjaxRequestTarget target) {
//do what you have to do
}


};


Button submitButton = new Button("submitButton");

submitButton.add(behave);

...

Alexandru

2010/1/18 Martin Asenov 

> Hello, everyone!
>
> I have a form that has validation and so on, but the main difference to
> ordinary forms is that my form does not contain it's submit button. It's
> located in a parent, in my case a web page.
>
> I'm wondering how can I force the form submitting from the page. The code
> is
>
> submitButton = new AjaxButton("submit_button) {
> protected void onSubmit(AjaxRequestTarget target, Form form) {
>   myForm.processForm();
> }
> };
>
> The method processForm() in myForm just calls process();
>
> But nothing happens, looks like I'm missing something...
>
> Thanks,
> Martin
>
>


submit a form from outside of it

2010-01-18 Thread Martin Asenov
Hello, everyone!

I have a form that has validation and so on, but the main difference to 
ordinary forms is that my form does not contain it's submit button. It's 
located in a parent, in my case a web page.

I'm wondering how can I force the form submitting from the page. The code is

submitButton = new AjaxButton("submit_button) {
 protected void onSubmit(AjaxRequestTarget target, Form form) {
   myForm.processForm();
 }
};

The method processForm() in myForm just calls process();

But nothing happens, looks like I'm missing something...

Thanks,
Martin



Escaping variable declaration/resolution in properties files

2010-01-18 Thread Joseph Pachod

Hi

I would like to add some text containing ${variable} in a XML properties 
file, for an error message. This text of a variable declaration should 
be rendered as it is.


However, wicket always tries to resolve this variable, and thus I get 
this exception :
WicketMessage: Exception 'java.lang.IllegalArgumentException: Value of 
variable [[_variable]] could not be resolved while interpolating [[Input 
cannot contains text like ${_variable}]]' occurred during validation 
foo.steps.VariablesNotAcceptedValidator on component 
1:generalForm:generalAttributes.jobName


Is there a clean way to avoid it ?

thanks in advance

--
Joseph Pachod
IT

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 310
F  + 49 761 3 85 59 550
E  joseph.pac...@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter www.signin.thomas-daily.de für die kostenfreien TD 
Morning News, eine  Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer 
Mailbox.

Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 
Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des 
Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet 
redakt...@thomas-daily.de.

To receive the free TD News International - a selection of the day's top issues 
delivered to your mail box every day - please register at 
www.signin.thomas-daily.de

Please note: Information received for our TD News International after 4 p.m. will be given priority for publication the following day. The daily editorial deadline is 8:30 a.m. You can reach our editorial staff at redakt...@thomas-daily.de. 



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Ajax unable to perform markup update

2010-01-18 Thread Martin Asenov
Thanks namesake :)

I just put the formPanel in a webmarkupcontainer and updated the container. And 
it works fine. Setting the markup id didn't work for me due to unknown reasons. 
Anyway, you helped a lot! Thanks! :)

Regards,

Martin

-Original Message-
From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
Sent: Monday, January 18, 2010 9:55 AM
To: users@wicket.apache.org
Subject: Re: Ajax unable to perform markup update

Or even better.. ajax-update the parent panel not the child panel.

**
Martin

2010/1/18 Martin Makundi :
> Hi!
>
> If the markupid number changes then ofcourse.. you should maybe call :
>
> newPanel.setMarkupid(oldPanel.getMarkupId()); when ajax updating
>
> **
> Martin
>
> 2010/1/18 Martin Asenov :
>> Hello, everyone! Although I've managed to handle such errors so far, I am 
>> unable to deal with this one...
>>
>> I've got an abstract class MyFormPanel that extends Panel and calls 
>> super("form_panel");
>>
>> Because I've got different form panels, i.e. ContactFormPanel, 
>> GroupFormPanel, etc. I'm trying to replace the panels according to the 
>> user's actions. So... here's a small snippet of the replacement:
>>
>>
>> MyFormPanel temp = new ContactFormPanel(new Contact());
>> temp.setOutputMarkupId(true);
>> formPanel.replaceWith(temp);
>> formPanel = temp;
>>
>> formPanel.setVisible(true);
>> target.addComponent(formPanel);
>>
>> Note: formPanel is my initially created MyFormPanel, that has got 
>> setOutputPlaceHolderTag(true); and starts invisible.
>>
>> The first replacement is performed properly, but when a 'new group' button 
>> is hit for instance and I do the replacement in the very same manner, Ajax 
>> says unable to update markup - couldn't find component with id 
>> "form_panel_some_number".
>>
>> I just can't figure out why this occurs. If someone gives a hint I would be 
>> grateful.
>>
>> Thank you in advance,
>>
>> Martin
>>
>> -Original Message-
>> From: Eyal Golan [mailto:egola...@gmail.com]
>> Sent: Monday, January 18, 2010 8:48 AM
>> To: users@wicket.apache.org
>> Subject: Re: WicketExtensions DataTable : Creating a Links using Model value?
>>
>> You can either override PropertyColumn's populateItem method, and add to the
>> cell the link you want.
>> Or you can use AbstractColumn.
>>
>> Eyal Golan
>> egola...@gmail.com
>>
>> Visit: http://jvdrums.sourceforge.net/
>> LinkedIn: http://www.linkedin.com/in/egolan74
>>
>> P  Save a tree. Please don't print this e-mail unless it's really necessary
>>
>>
>> On Mon, Jan 18, 2010 at 8:24 AM, Ashika Umanga Umagiliya <
>> auma...@biggjapan.com> wrote:
>>
>>> Greetings,
>>>
>>> I was going through WicketExtensions DataTable source and I was wondering
>>> how to create a hyperlink using PropertyColumn.
>>>
>>> In docs it says:
>>>
>>> columns[0] = new PropertyColumn(new Model("Family Id"), "familyId");
>>>
>>> What I want to do is,
>>> 1) create a Link using the field value "familyId",and directing to another
>>> page which display SubFamilies related to
>>> selected 'familyId'
>>> 2) create a Link which direct to another website . eg:
>>> http://www.ncbi.org/family?id=$familyid
>>>
>>>
>>> My domain model is as:
>>>
>>> One 'Family' has many 'SubFamily' objects.
>>>
>>>
>>>
>>>
>>> ||
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org