Re: Custom AJAX component...

2010-08-15 Thread Ernesto Reinaldo Barreiro
Erik,

Grid component [1] does something similar to what you are asking for:

-Grid is created via JavaScript
-Grid ask back to server for some XML containing the data to render
and generate the grids contents.

The trick I use to render XML back to the server is creating a div
that will  stream back the contents as XML. See classes [1] and [2]
for details.

Regards,

Ernesto

References.

1-http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/jqgrid/src/main/java/com/wiquery/plugins/jqgrid/component/Grid.java
2-http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/jqgrid/src/main/java/com/wiquery/plugins/jqgrid/component/DocumentResourceListener.java

On Sat, Aug 14, 2010 at 10:59 PM, Erik Brakkee erik.brak...@gmail.com wrote:
 Hi,


 I would like to write an component that will retrieve page-specific
 information using AJAX from the javascript running in the browser and
 interpret it itself instead of having wicket rendering the content.

 This approach is slightly different from the usual behavior as in those
 cases a wicket component renders its own content again and the page is
 updated with the new content of the component. In this case however, I would
 like to return an XML document which is interpreted by the javascript
 directly, where the XML document is page specific.

 How can I achieve such a scenario? Any examples somewhere? Is there a
 specific Component type or behavior I should use?

 Cheers
  Erik


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



Re: Custom AJAX component...

2010-08-15 Thread Ernesto Reinaldo Barreiro
and you can see the grid at work here

http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage=:com.wiquery.plugins.demo.GridPage

Ernesto

On Sun, Aug 15, 2010 at 8:07 AM, Ernesto Reinaldo Barreiro
reier...@gmail.com wrote:
 Erik,

 Grid component [1] does something similar to what you are asking for:

 -Grid is created via JavaScript
 -Grid ask back to server for some XML containing the data to render
 and generate the grids contents.

 The trick I use to render XML back to the server is creating a div
 that will  stream back the contents as XML. See classes [1] and [2]
 for details.

 Regards,

 Ernesto

 References.

 1-http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/jqgrid/src/main/java/com/wiquery/plugins/jqgrid/component/Grid.java
 2-http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/jqgrid/src/main/java/com/wiquery/plugins/jqgrid/component/DocumentResourceListener.java

 On Sat, Aug 14, 2010 at 10:59 PM, Erik Brakkee erik.brak...@gmail.com wrote:
 Hi,


 I would like to write an component that will retrieve page-specific
 information using AJAX from the javascript running in the browser and
 interpret it itself instead of having wicket rendering the content.

 This approach is slightly different from the usual behavior as in those
 cases a wicket component renders its own content again and the page is
 updated with the new content of the component. In this case however, I would
 like to return an XML document which is interpreted by the javascript
 directly, where the XML document is page specific.

 How can I achieve such a scenario? Any examples somewhere? Is there a
 specific Component type or behavior I should use?

 Cheers
  Erik



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



Re: Wicket 1.5-M1 migration experiences

2010-08-15 Thread Martin Grigorov
See my comments inline.

2010/8/12 Major Péter majorpe...@sch.bme.hu

 Hi,

 I've just tried to move our application to Wicket 1.5-M1, and I've faced
 with the following problems:
 * new HeaderContributor(new IHeaderContributor() {...} isn't working
 anymore, the constructor is gone.

 HeaderContributor is removed now in 1.5.

 After looking into JavaDoc I've find out that HeaderContributor.forCss
 and other methods are deprecated in 1.4.9, but not in 1.5-M1, so wtf?

Component and IBehavior implement IHeaderContributor and too add js/css
you'll need to override renderHead(IHeaderResponse)


 * PageParameters#getAsLong and other helper methods are missing, instead
 we have PageParameters#getNamedParameter()#toLong and etc.

 There are Indexed Parameters and Named Parameters, what's the difference?
 based on the JavaDoc I would thought indexed parameter is like
 '/show/id/1' and named is 'show?id=1'
 if this is true, why isn't there simply a
 getParameterIDon'tCareAboutTheTypeOfIt function, if I want to support
 both of them?

Johan described it already earlier.
Also
see org.apache.wicket.request.Request: getPostParameters(),
getQueryParameters()
and getRequestParameters()


 The deprecated PageParameters constructors are lacking JavaDoc
 deprecation note, or it could be a bit enhanced at least.

 * AjaxButton now has onError function, which needs to be implemented
 * IBehavior#unbind

 * In MyApplication I've had a method like this:
 @Override
public RequestCycle newRequestCycle(Request request, Response
 response) {
if
 (!Configuration.getEnvironment().equals(Environment.PRODUCTION)) {
return super.newRequestCycle(request, response);
} else {
return new WebRequestCycle(this, (WebRequest) request,
 (WebResponse) response) {

@Override
public Page onRuntimeException(Page page,
 RuntimeException ex) {
if (ex instanceof PageExpiredException) {
return new PageExpiredError();
}
return new InternalServerError(page, ex);
}
};
}
}

 now newRequestCycle is gone, we have createRequestCycle, which is final
 and it uses RequestCycleProvider. so changing this to

 setRequestCycleProvider(new IRequestCycleProvider() {

@Override
public RequestCycle get(RequestCycleContext context) {
if
 (!Configuration.getEnvironment().equals(Environment.PRODUCTION)) {
return new RequestCycle(context);
} else {
return new RequestCycle(context) {

@Override
protected IRequestHandler
 handleException(Exception e) {
//etc
}
};
}
}
});

 should have the same behavior, or??

Will work, but better extend
org.apache.wicket.Application.newExceptionMapper().


 Also I couldn't find a substitute for this:

 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/protocol/http/WebApplication.html#mount(java.lang.String,%20org.apache.wicket.util.lang.PackageName)
 and also for HybridUrlCodingStrategy. Or is hybrid even needed anymore?
 Where can I find out more about these new requestmapper stuff? (Please
 don't say in wicket-examples, I'm looking for a doc, like
 https://cwiki.apache.org/confluence/display/WICKET/URL+Coding+Strategies )

 Indeed it seems we missed this mapper.I'll create a ticket for it and I'll
see what I can do with such docu.


 Thanks

 Regards,
 Peter

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




How to get submitting component in onError()?

2010-08-15 Thread bht
Hi,

In a form with two submit buttons, a result must be calculated in
onError(), using the value of a FormComponent and depending on which
of the submit buttons was pressed.

I found that findSubmittingButton() and getDefaultButton() return null
in onError().

What to do?

Many thanks,

Bernard


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



Swapping a wicket rendered tag for an alternate tag or text

2010-08-15 Thread Michael Brinkman
My apologies if this has been answered a thousand times before but I haven't
been able to find anything in searching, so your thoughts would be
appreciated.

I have a very simple scenario where I have an anchor tag associated with a
wicket link that wraps a static image like this:

a wicket:id=myLinkLink Text/a

In some cases, I would like to swap this anchor tag and it's body with a
nbsp; since it's in a table.  So I've used setEnabled(false) on the
associated Link instance to cause the anchor tag to be swapped with a span
and then I overrode the onComponentTagBody method on the Link like so:

protected void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
{
//Only render the body if the link is enabled
if (this.isEnabled())
{
super.onComponentTagBody(markupStream, openTag);
}
else
{
//Write out a space and then move to the
matching close tag of the original link.  Even though
//the open tag has been renamed to span by
being disabled, the framework will take care of renaming the
//close tag as well.
getResponse().write(nbsp;);
markupStream.skipToMatchingCloseTag(openTag);
}
}

So what comes out is a little more verbose than just a non breaking space:

spannbsp;/span

Any thoughts on a better approach to this would be appreciated. I'm really
interested in this because I find it to be a generally useful thing to know
how to do and I suspect there's probably already a simpler way to swap a
wicket rendered tag for something else that I just don't know about.

Thanks,

-Michael


Re: Swapping a wicket rendered tag for an alternate tag or text

2010-08-15 Thread Uwe Schäfer

On 08/15/2010 03:40 PM, Michael Brinkman wrote:


In some cases, I would like to swap this anchor tag and it's body with a
nbsp; since it's in a table.


to get rid of the span-tag, see

setRenderBodyOnly(true);

cu uwe

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



Re: Swapping a wicket rendered tag for an alternate tag or text

2010-08-15 Thread gmail
You just add both the link and the text to your page with setVisible(false).
Then setVisible(true) on the one you want to show.

Regards,
kjarbr

 


On 15.08.10 15.40, Michael Brinkman michael.brink...@gmail.com wrote:

 My apologies if this has been answered a thousand times before but I haven't
 been able to find anything in searching, so your thoughts would be
 appreciated.
 
 I have a very simple scenario where I have an anchor tag associated with a
 wicket link that wraps a static image like this:
 
 a wicket:id=myLinkLink Text/a
 
 In some cases, I would like to swap this anchor tag and it's body with a
 nbsp; since it's in a table.  So I've used setEnabled(false) on the
 associated Link instance to cause the anchor tag to be swapped with a span
 and then I overrode the onComponentTagBody method on the Link like so:
 
 protected void onComponentTagBody(MarkupStream markupStream,
 ComponentTag openTag)
 {
 //Only render the body if the link is enabled
 if (this.isEnabled())
 {
 super.onComponentTagBody(markupStream, openTag);
 }
 else
 {
 //Write out a space and then move to the
 matching close tag of the original link.  Even though
 //the open tag has been renamed to span by
 being disabled, the framework will take care of renaming the
 //close tag as well.
 getResponse().write(nbsp;);
 markupStream.skipToMatchingCloseTag(openTag);
 }
 }
 
 So what comes out is a little more verbose than just a non breaking space:
 
 spannbsp;/span
 
 Any thoughts on a better approach to this would be appreciated. I'm really
 interested in this because I find it to be a generally useful thing to know
 how to do and I suspect there's probably already a simpler way to swap a
 wicket rendered tag for something else that I just don't know about.
 
 Thanks,
 
 -Michael



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



Request for Feature: NoopAjaxRequestTarget

2010-08-15 Thread Don Ferguson
When using AjaxRequestTarget, one always has to check for null, as in:

if (target != null) {
target.addComponent(...);
}

or suffer the consequences of an NPE at deployment time for users who don't 
have javascript enabled. 

It would make life easier if Wicket just supplied a no-op AjaxRequestTarget 
into the onClick() method, rather than null.  Then the code wouldn't need to 
check for null;  the AjaxRequestTarget would always be instantiated.  And if 
the code really needs to know whether it's dealing with an Ajax request, it can 
do an instanceof, as in:

if (! target instanceof NoopAjaxRequestTarget) {

}

Thoughts?

-Don


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



Re: Request for Feature: NoopAjaxRequestTarget

2010-08-15 Thread James Carman
How does the ajax logic get executed if the client doesn't have
Javascript enabled?

On Sun, Aug 15, 2010 at 10:23 AM, Don Ferguson don.fergu...@gmail.com wrote:
 When using AjaxRequestTarget, one always has to check for null, as in:

 if (target != null) {
        target.addComponent(...);
 }

 or suffer the consequences of an NPE at deployment time for users who don't 
 have javascript enabled.

 It would make life easier if Wicket just supplied a no-op AjaxRequestTarget 
 into the onClick() method, rather than null.  Then the code wouldn't need to 
 check for null;  the AjaxRequestTarget would always be instantiated.  And if 
 the code really needs to know whether it's dealing with an Ajax request, it 
 can do an instanceof, as in:

 if (! target instanceof NoopAjaxRequestTarget) {
        
 }

 Thoughts?

        -Don


 -
 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: How to get submitting component in onError()?

2010-08-15 Thread James Carman
From the looks of the code for findSubmittingButton(), it shouldn't
matter whether you're in onError() or onSubmit().  What does
findSubmittingButton() return in onSubmit()?

On Sun, Aug 15, 2010 at 6:59 AM,  b...@actrix.gen.nz wrote:
 Hi,

 In a form with two submit buttons, a result must be calculated in
 onError(), using the value of a FormComponent and depending on which
 of the submit buttons was pressed.

 I found that findSubmittingButton() and getDefaultButton() return null
 in onError().

 What to do?

 Many thanks,

 Bernard


 -
 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: Request for Feature: NoopAjaxRequestTarget

2010-08-15 Thread Don Ferguson
In the case of AjaxFallbackLink (and maybe this is the only case where this 
really applies), the whole page is going to be re-rendered if javascript is not 
supported.  So adding components to the target is superfluous.

On Aug 15, 2010, at 7:44 AM, James Carman wrote:

 How does the ajax logic get executed if the client doesn't have
 Javascript enabled?
 
 On Sun, Aug 15, 2010 at 10:23 AM, Don Ferguson don.fergu...@gmail.com wrote:
 When using AjaxRequestTarget, one always has to check for null, as in:
 
 if (target != null) {
target.addComponent(...);
 }
 
 or suffer the consequences of an NPE at deployment time for users who don't 
 have javascript enabled.
 
 It would make life easier if Wicket just supplied a no-op AjaxRequestTarget 
 into the onClick() method, rather than null.  Then the code wouldn't need to 
 check for null;  the AjaxRequestTarget would always be instantiated.  And if 
 the code really needs to know whether it's dealing with an Ajax request, it 
 can do an instanceof, as in:
 
 if (! target instanceof NoopAjaxRequestTarget) {

 }
 
 Thoughts?
 
-Don
 
 
 -
 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: Request for Feature: NoopAjaxRequestTarget

2010-08-15 Thread James Carman
A.  I've never encountered the fallback stuff, since my client's
browsers always support JS.  A null object would probably be better
for this case.  Good idea.

On Sun, Aug 15, 2010 at 11:39 AM, Don Ferguson don.fergu...@gmail.com wrote:
 In the case of AjaxFallbackLink (and maybe this is the only case where this 
 really applies), the whole page is going to be re-rendered if javascript is 
 not supported.  So adding components to the target is superfluous.

 On Aug 15, 2010, at 7:44 AM, James Carman wrote:

 How does the ajax logic get executed if the client doesn't have
 Javascript enabled?

 On Sun, Aug 15, 2010 at 10:23 AM, Don Ferguson don.fergu...@gmail.com 
 wrote:
 When using AjaxRequestTarget, one always has to check for null, as in:

 if (target != null) {
        target.addComponent(...);
 }

 or suffer the consequences of an NPE at deployment time for users who don't 
 have javascript enabled.

 It would make life easier if Wicket just supplied a no-op AjaxRequestTarget 
 into the onClick() method, rather than null.  Then the code wouldn't need 
 to check for null;  the AjaxRequestTarget would always be instantiated.  
 And if the code really needs to know whether it's dealing with an Ajax 
 request, it can do an instanceof, as in:

 if (! target instanceof NoopAjaxRequestTarget) {
        
 }

 Thoughts?

        -Don


 -
 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



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



Re: NoSuchMethodError with custom authorization

2010-08-15 Thread Anton

The problem was in missing dependence:

   dependency
   groupIdorg.apache.wicket/groupId
   artifactIdwicket-auth-roles/artifactId
   version${wicket.version}/version
   /dependency

Hello List,

I'm trying to implement custom authorization, but I get this error 
[1]. Relevant part of code [2] isn't spectacular.

wicket.version1.4.9/wicket.version
JRE: java-6-sun-1.6.0.10

I've googled for this exception, but without any success.

[1] http://pastebin.com/V292Vm7e
[2] http://pastebin.com/BiBQFsGs

Best Regards,

Anton




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



Re: Request for Feature: NoopAjaxRequestTarget

2010-08-15 Thread Jeremy Thomerson
File it as a JIRA. don't include there's part about instanceof checks;
rather, a method should be added that returns a boolean.

However, I'm not sure even then we could accept this since it would break so
many existing applications' logic.

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors

On Aug 15, 2010 10:51 AM, James Carman ja...@carmanconsulting.com wrote:

A.  I've never encountered the fallback stuff, since my client's
browsers always support JS.  A null object would probably be better
for this case.  Good idea.


On Sun, Aug 15, 2010 at 11:39 AM, Don Ferguson don.fergu...@gmail.com
wrote:
 In the case of Aja...


Is WicketFilter.checkCharacterEncoding() safe?

2010-08-15 Thread Harald Wellmann
I'm not sure if this is severe or not, but I think there's a gap in the 
implicit assumptions underlying WicketFilter.checkCharacterEncoding():

It seems the author's intention was to guarantee a postcondition of

servletRequest.getCharacterEncoding() != null,

but this postcondition does not hold in all cases.

I ran into this issue after upgrading my Glassfish app server from 3.0.1 to 
3.1-b12, containing a newer release of Weld which causes the problem to appear. 
After this upgrade, my log was full of warnings of the following type:

WARN  o.apache.catalina.connector.Request - PWC4011: Unable to set request 
character encoding to UTF-8 from context /xxx, because request parameters have 
already been read, or ServletRequest.getReader() has already been called

Setting a couple of breakpoints revealed that Weld registers a 
ServletRequestListener and calls request.getParameter() in that listener. By 
specification, this listener gets called before all servlet filters, including 
WicketFilter, and again by specification, the invocation of 
servlet.request.setCharacterEncoding() from WicketFilter has no effect, since a 
request parameter has already been read by the WeldListener.

So it there are other parts of Wicket relying on the request character encoding 
to be non-null, then this looks like a bug to me. Otherwise, if Wicket handles 
a null character encoding gracefully, then checkCharacterEncoding() is 
redundant, because it cannot be guaranteed to have any effect.

Regards,

Harald

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



Re: Request for Feature: NoopAjaxRequestTarget

2010-08-15 Thread Don Ferguson
OK, filed as: https://issues.apache.org/jira/browse/WICKET-2991

I am sensitive to the possibility of breaking existing code.  I suppose the 
null check is most commonly used to determine whether or not to add components 
to the target, and this change would not break that use case, but no doubt 
there are other scenarios that I'm not considering.

On Aug 15, 2010, at 9:29 AM, Jeremy Thomerson wrote:

 File it as a JIRA. don't include there's part about instanceof checks;
 rather, a method should be added that returns a boolean.
 
 However, I'm not sure even then we could accept this since it would break so
 many existing applications' logic.
 
 Jeremy Thomerson
 http://wickettraining.com
 -- sent from my smart phone, so please excuse spelling, formatting, or
 compiler errors
 
 On Aug 15, 2010 10:51 AM, James Carman ja...@carmanconsulting.com wrote:
 
 A.  I've never encountered the fallback stuff, since my client's
 browsers always support JS.  A null object would probably be better
 for this case.  Good idea.
 
 
 On Sun, Aug 15, 2010 at 11:39 AM, Don Ferguson don.fergu...@gmail.com
 wrote:
 In the case of Aja...


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



Re: Request for Feature: NoopAjaxRequestTarget

2010-08-15 Thread Jeremy Thomerson
It would break them, as == null would now return false where it previously
was true.

Jeremy Thomerson
http://wickettraining.com
-- sent from my smart phone, so please excuse spelling, formatting, or
compiler errors

On Aug 15, 2010 12:12 PM, Don Ferguson don.fergu...@gmail.com wrote:

OK, filed as: https://issues.apache.org/jira/browse/WICKET-2991

I am sensitive to the possibility of breaking existing code.  I suppose the
null check is most commonly used to determine whether or not to add
components to the target, and this change would not break that use case, but
no doubt there are other scenarios that I'm not considering.


On Aug 15, 2010, at 9:29 AM, Jeremy Thomerson wrote:

 File it as a JIRA. don't include there's pa...

-
To unsubscribe, e-mail: users-...


Re: Request for Feature: NoopAjaxRequestTarget

2010-08-15 Thread Martin Grigorov
On Sun, Aug 15, 2010 at 7:20 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 It would break them, as == null would now return false where it previously
 was true.

Not exactly.
It will be true but it will be no-op, so the end behavior is the same.
This is possible even now. In our application we have a custom
AjaxRequestTarget that overrides addComponent(Component...) and does
nothing.
But we use it in our custom components, not in AjaxFallback** ones.
The other two add** methods in AJT are final so our class is a bit not
consistent, but we are aware of that.


 Jeremy Thomerson
 http://wickettraining.com
 -- sent from my smart phone, so please excuse spelling, formatting, or
 compiler errors

 On Aug 15, 2010 12:12 PM, Don Ferguson don.fergu...@gmail.com wrote:

 OK, filed as: https://issues.apache.org/jira/browse/WICKET-2991

 I am sensitive to the possibility of breaking existing code.  I suppose the
 null check is most commonly used to determine whether or not to add
 components to the target, and this change would not break that use case,
 but
 no doubt there are other scenarios that I'm not considering.


 On Aug 15, 2010, at 9:29 AM, Jeremy Thomerson wrote:

  File it as a JIRA. don't include there's pa...

 -
 To unsubscribe, e-mail: users-...



Re: Custom AJAX component...

2010-08-15 Thread Erik Brakkee
Thanks very much for the examples, I will have a look at them.


On Sun, Aug 15, 2010 at 8:09 AM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 and you can see the grid at work here


 http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage=:com.wiquery.plugins.demo.GridPage

 Ernesto

 On Sun, Aug 15, 2010 at 8:07 AM, Ernesto Reinaldo Barreiro
 reier...@gmail.com wrote:
  Erik,
 
  Grid component [1] does something similar to what you are asking for:
 
  -Grid is created via JavaScript
  -Grid ask back to server for some XML containing the data to render
  and generate the grids contents.
 
  The trick I use to render XML back to the server is creating a div
  that will  stream back the contents as XML. See classes [1] and [2]
  for details.
 
  Regards,
 
  Ernesto
 
  References.
 
  1-
 http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/jqgrid/src/main/java/com/wiquery/plugins/jqgrid/component/Grid.java
  2-
 http://code.google.com/p/wiquery-plugins/source/browse/trunk/wiquery-plugins/jqgrid/src/main/java/com/wiquery/plugins/jqgrid/component/DocumentResourceListener.java
 
  On Sat, Aug 14, 2010 at 10:59 PM, Erik Brakkee erik.brak...@gmail.com
 wrote:
  Hi,
 
 
  I would like to write an component that will retrieve page-specific
  information using AJAX from the javascript running in the browser and
  interpret it itself instead of having wicket rendering the content.
 
  This approach is slightly different from the usual behavior as in those
  cases a wicket component renders its own content again and the page is
  updated with the new content of the component. In this case however, I
 would
  like to return an XML document which is interpreted by the javascript
  directly, where the XML document is page specific.
 
  How can I achieve such a scenario? Any examples somewhere? Is there a
  specific Component type or behavior I should use?
 
  Cheers
   Erik
 
 

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




1.5M JSR 286 support

2010-08-15 Thread dgh1

I read the following:

Although the standard release of JSR-286 better supported common web
development frameworks like JSF, Spring, Struts and WebWork, it is not
supported by Wicket 1.4. After co-operative talks with Jonathan Locke and
Ate Douma, Componence decided to contribute the JSR-286 bridge to the Wicket
community. 


and

After 2 months of work Antony Stubbs has submitted the final patch for 
WICKET-1620  . The patch is now awaiting Ate Douma's review. With this patch
Wicket will also support the new features of the Portal 2.0 specification
like events, shared render parameters and resource serving.

so what I am asking is did this make it into 1.5M,  specially the events to
send between portlets

Thanks Much for response

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5M-JSR-286-support-tp2326204p2326204.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: 1.5M JSR 286 support

2010-08-15 Thread Martin Grigorov
The support for portlets was removed from Wicket 1.5 this weekend and part
of it is moved to wicketstuff svn repository.
We decided to do this because there is no much support for this part of the
framework. None of the active core developers use portlets and it seems
there are not many users out there.
Search in mail archives from the last week for the discussion.

On Sun, Aug 15, 2010 at 10:15 PM, dgh1 dale.her...@osi.com wrote:


 I read the following:

 Although the standard release of JSR-286 better supported common web
 development frameworks like JSF, Spring, Struts and WebWork, it is not
 supported by Wicket 1.4. After co-operative talks with Jonathan Locke and
 Ate Douma, Componence decided to contribute the JSR-286 bridge to the
 Wicket
 community.


 and

 After 2 months of work Antony Stubbs has submitted the final patch for
 WICKET-1620  . The patch is now awaiting Ate Douma's review. With this
 patch
 Wicket will also support the new features of the Portal 2.0 specification
 like events, shared render parameters and resource serving.

 so what I am asking is did this make it into 1.5M,  specially the events to
 send between portlets

 Thanks Much for response

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/1-5M-JSR-286-support-tp2326204p2326204.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: How to get submitting component in onError()?

2010-08-15 Thread bht
Hi James,

Thank you very much for your reply.

It didn't work because the form was submitted with input type=image,
and I did not add an ImageButton for it.

Things would be a little easier if there was an overridable onClick()
method for submitting components not this Where was I type of back
to front logic.

When using an ImageButton, one is forced to store the image as
resource in the Java package structure which is another complication
because web designers want to control such images in the web
directory.

Many thanks,

Bernard


On Sun, 15 Aug 2010 10:47:58 -0400, you wrote:

From the looks of the code for findSubmittingButton(), it shouldn't
matter whether you're in onError() or onSubmit().  What does
findSubmittingButton() return in onSubmit()?

On Sun, Aug 15, 2010 at 6:59 AM,  b...@actrix.gen.nz wrote:
 Hi,

 In a form with two submit buttons, a result must be calculated in
 onError(), using the value of a FormComponent and depending on which
 of the submit buttons was pressed.

 I found that findSubmittingButton() and getDefaultButton() return null
 in onError().

 What to do?

 Many thanks,

 Bernard


 -
 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



jsessionid in URLs of non-versioned Pages

2010-08-15 Thread bht
Hi,

I use panel replacement on setVersioned(false) pages in combination
with HybridUrlCodingStrategy and the default
IRequestCycleSettings.REDIRECT_TO_BUFFER so that users stay on the
same page and cannot see previos versions when pressing the back
button. That is because all pages have the same URL.

With the first request the servlet container
doesn't know you have cookie support. So it will append the
jsessionid to the URL.

After that with the second request it sees the cookie coming in and
then it doesn't append the jsessionid anymore.

This is then creating two pages in browser history one with jsessionid
and one without it which is causing me a headache:

If on subsequent requests, the user presses the back button and
re-submits, then the submit hits the only last version of the
non-versioned page which lacks the (replaced) form to submit to and
the page crashes.

Any ideas would be highly appreciated.

Regards,

Bernard

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



wicket drag n drop

2010-08-15 Thread Josh Kamau
Hi

Which is the best drag and drop library for use with wicket?

kind regards.
Josh


Re: wicket drag n drop

2010-08-15 Thread Ernesto Reinaldo Barreiro
There was a very lengthy thread about that same topic not so long ago...

http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-td1881857.html

Ernesto

On Mon, Aug 16, 2010 at 6:50 AM, Josh Kamau joshnet2...@gmail.com wrote:
 Hi

 Which is the best drag and drop library for use with wicket?

 kind regards.
 Josh


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



Re: How to add Scroll to tabpanel

2010-08-15 Thread vineetsemwal

don't add them in wicket:panel/

-
vineet semwal
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-add-Scroll-to-tabpanel-tp2324822p2326413.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