Re: link within modal window should reload parent page

2011-04-08 Thread Alexander Morozov
1. use AjaxLink

AjaxLink redirectLink = new AjaxLink(...) {
  
  public void onClick(AjaxRequestTarget target) {
ModalWindow.closeCurrent(target);
target.appendJavascript("window.location='" + urlFor(AnotherPage.class)
+ "'");
  } 

};

2. or embed javascipt to base page:
  



-
--
http://www.linkedin.com/in/amorozov
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3438009.html
Sent from the Users forum 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: Ajax header-contribution omits IE conditional comments

2011-04-08 Thread Martin Grigorov
It seems they are not related.
The previous bug was applicable only to 1.5.x.

On Sat, Apr 9, 2011 at 2:34 AM, Michael O'Cleirigh <
michael.ocleir...@rivulet.ca> wrote:

> Hi Russell,
>
> There was an issue posted on something like this earlier this week about
> this but for 1.5-RC3.
>
> In one of the replies it mentioned this issue:
>
> https://issues.apache.org/jira/browse/WICKET-3420
>
> I think its likely that your issue is related.
>
> See the original thread here:
> http://apache-wicket.1842946.n4.nabble.com/WICKET-1-5-RC-3-BUG-WITH-CONDITIONAL-COMMENTS-td3425644.html
>
> Regards,
>
> Mike
>
>
>
>
>
>  All,
>>
>> I am working on a behavior which contributes IE-specific stylesheets,
>> using conditional comments. The implementation that we have works for normal
>> page loading, but not for AJAX requests. I think this may be an oversight in
>> the wicket ajax client-side code?
>>
>> I created a JIRA issue with quickstart. I would appreciate it if someone
>> could take a look:
>>
>> https://issues.apache.org/jira/browse/WICKET-3605
>>
>> Thanks, guys,
>> 
>>
>> RUSSELL E. MORRISEY
>> Programmer Analyst Professional
>> Mission Solutions Engineering, LLC
>>
>> | russell.morri...@missionse.com | www.missionse.com<
>> http://www.missionse.com/>
>> 304 West Route 38, Moorestown, NJ 08057-3212
>>
>>
>> 
>> This is a PRIVATE message. If you are not the intended recipient, please
>> delete without copying and kindly advise us by e-mail of the mistake in
>> delivery.
>> NOTE: Regardless of content, this e-mail shall not operate to bind MSE to
>> any order or other contract unless pursuant to explicit written agreement or
>> government initiative expressly permitting the use of e-mail for such
>> purpose.
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Ajax header-contribution omits IE conditional comments

2011-04-08 Thread Michael O'Cleirigh

Hi Russell,

There was an issue posted on something like this earlier this week about 
this but for 1.5-RC3.


In one of the replies it mentioned this issue:

https://issues.apache.org/jira/browse/WICKET-3420

I think its likely that your issue is related.

See the original thread here: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-1-5-RC-3-BUG-WITH-CONDITIONAL-COMMENTS-td3425644.html

Regards,

Mike





All,

I am working on a behavior which contributes IE-specific stylesheets, using 
conditional comments. The implementation that we have works for normal page 
loading, but not for AJAX requests. I think this may be an oversight in the 
wicket ajax client-side code?

I created a JIRA issue with quickstart. I would appreciate it if someone could 
take a look:

https://issues.apache.org/jira/browse/WICKET-3605

Thanks, guys,


RUSSELL E. MORRISEY
Programmer Analyst Professional
Mission Solutions Engineering, LLC

| russell.morri...@missionse.com | www.missionse.com
304 West Route 38, Moorestown, NJ 08057-3212



This is a PRIVATE message. If you are not the intended recipient, please delete 
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
order or other contract unless pursuant to explicit written agreement or 
government initiative expressly permitting the use of e-mail for such purpose.




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



Ajax header-contribution omits IE conditional comments

2011-04-08 Thread Russell Morrisey
All,

I am working on a behavior which contributes IE-specific stylesheets, using 
conditional comments. The implementation that we have works for normal page 
loading, but not for AJAX requests. I think this may be an oversight in the 
wicket ajax client-side code?

I created a JIRA issue with quickstart. I would appreciate it if someone could 
take a look:

https://issues.apache.org/jira/browse/WICKET-3605

Thanks, guys,


RUSSELL E. MORRISEY
Programmer Analyst Professional
Mission Solutions Engineering, LLC

| russell.morri...@missionse.com | www.missionse.com
304 West Route 38, Moorestown, NJ 08057-3212



This is a PRIVATE message. If you are not the intended recipient, please delete 
without copying and kindly advise us by e-mail of the mistake in delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind MSE to any 
order or other contract unless pursuant to explicit written agreement or 
government initiative expressly permitting the use of e-mail for such purpose.


link within modal window should reload parent page

2011-04-08 Thread hrbaer
Hi all,

at the moment I have a modal window with a link in it.
If I click the link (it's a BookmarkablePageLink) the new page get's loaded
within the modal window. But what I want to achieve is that the modal window
get's closed and the parent page get's redirected to the new page.

How can I achieve that?
Thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3437508.html
Sent from the Users forum 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: wicket datatable to excel

2011-04-08 Thread Jered Myers
I haven't used Apache POI, so that may be the way to go.  For my exports 
I use JExcel (http://jexcelapi.sourceforge.net/resources/faq/).  With 
JExcel you will need to loop through the cells in you data table and 
create the Excel cells to match.  There is example code in the FAQ I linked.


On 4/8/2011 6:55 AM, Rafał Krupiński wrote:

On Thu, Apr 7, 2011 at 16:40, henry  wrote:

Hi guys,

please i need a code to export my dataTable values into an excel format on
click of a button.

Any help will do.

Use Apache POI to create excel file/stream and IResourceListener to
hook it to Wicket.

Next time research on your own and ask more specific questions ;-).



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



Re: Fwd: wicket 1.5-rc2 and aggregate jar for osgi

2011-04-08 Thread Eike Kettner
Hi Daniele,

I might have not understood your concern well enough... But here is what I
do: I deploy a really small war file (without any deps of course) into the
osgi container (I use felix...). There is another bundle from pax,
called pax-web-extender, that "listens" for war files coming into the
container and will then register them on the embedded jetty instance.

I use the following pax bundles:
* org.ops4j.pax.web.pax-web-extender-war  
* org.ops4j.pax.web.pax-web-jetty-bundle
* org.ops4j.pax.web.pax-web-jsp   (might be superfluous)

Then I use the felix-bundle plugin to create a MANIFEST.MF for my war
file. It looks like that:


  
org.apache.felix
maven-bundle-plugin

  
bundle-manifest
process-classes

  manifest

  


  
jar
war
bundle
  
  
<_include>-osgi.bnd
  

  
  
org.apache.maven.plugins
maven-war-plugin

  

  ${project.build.outputDirectory}/META-INF/MANIFEST.MF

  

  

 
There are some more instructions in the "osgi.bnd" file. You could have
written them directly in the  section of the bundle plugin:

  Bundle-Classpath: ., WEB-INF/classes
  Web-ContextPath: mywebapp
  DynamicImport-Package: *
  Webapp-Context: mywebapp

This creates a MANIFEST with Import-Package statements for all your
dependencies - they are not included in the war file. The war file has
no /lib folder, just WEB-INF/classes and META-INF/ are there. The bundle
classpath is extended to include the classes in WEB-INF/classes. I
use the scope "provided" for all dependencies. 

When the war file is deployed to the osgi container, the pax bundles
from above will make it available to jetty.

In my case the war file contains a simple wicket application that itself
listens for other bundles to finally create content. So its just a few
bytes and I can reload/redeploy the "content bundles" without affecting
the whole application.

Regards
Eike

On [Wed, 06.04.2011 23:09], Daniele Dellafiore wrote:
>  yes the idea is not to have the huber jar, it's all about this, is the main
> feature :)
> some guys in the felix maling list suggested me that's actually possible and
> supported, it's called WAB, that's a war without /lib (a partially reverse
> recursive achronim for A Better War)
> 
> http://old.nabble.com/A-better-life%3A-quick-webapp-deploy-to31334158.html
> 
> I'll go for that tomorrow.
> 
> On Wed, Apr 6, 2011 at 4:27 PM, Martin Grigorov wrote:
> 
> > I'm not an OSGi user but here is what I'll do.
> >
> > 1) create a new Maven project with packaging type 'pom'
> > 2) combine all wicket jars in one (uber-jar)
> >  there are several approaches here:
> > 1) maven-shade-plugin
> > 2) the way we did it in RC1 with maven-dependency-plugin: see
> >
> > http://repo2.maven.org/maven2/org/apache/wicket/wicket/1.5-RC1/wicket-1.5-RC1.pom
> >
> > Here check that works with simple Wicket app (e.g. the quickstart).
> >
> > Creating one big jar with all dependendies is against OSGi idea. The goal
> > is
> > to be able to replace dependencies without restarting, e.g. upgrade the
> > service layer without undeploying the presentation.
> > But if you still want to do it:  start adding more dependencies to be
> > packed
> > in the uber jar (spring, hibernate)
> >
> > About WicketFilter:
> > - you can use embedded Jetty or Guice Filter
> > and org.apache.wicket.protocol.http.WicketFilter.FILTER_MAPPING_PARAM (I
> > explained this earlier today in another thread)
> > - OSGi 4.1+ has the notion of enterprise OSGi and you can use plain OSGi
> > gymnastics to do that (I have no experience at all in this)
> >
> 
> 
> 
> 
> 
> --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com 
> >

-- 
email: e...@eknet.org   https://www.eknet.org  pgp: 481161A0

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



Re: wicket datatable to excel

2011-04-08 Thread Rafał Krupiński
On Thu, Apr 7, 2011 at 16:40, henry  wrote:
> Hi guys,
>
> please i need a code to export my dataTable values into an excel format on
> click of a button.
>
> Any help will do.

Use Apache POI to create excel file/stream and IResourceListener to
hook it to Wicket.

Next time research on your own and ask more specific questions ;-).

-- 
Pozdrawiam / Best Regards
Rafal Krupinski

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



Git workflow tip for WIcketstuff

2011-04-08 Thread Bruno Borges
http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html

Seems
to be a good idea to squash commits into one single commit, before merging a
feature branch to master.

Except when there are API changes on Wicket core that needs to be tracked on
single commits. Michael O'Cleirigh talked about this on a previous
post
.


Cheers,

Bruno Borges
www.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
 - Francois de La Rochefoucauld


Re: Caching Streamed Images on browser

2011-04-08 Thread Arjun Dhar
Got it!

As per ETag specs in Firefox Docs,:

The "Last-Modified" response header can be used as a weak validator.  It is
considered weak because it only has 1-second resolution. 
If the "Last-Modified" header is present in a response, then the client can
issue an "If-Modified-Since" request header to validate the cached document.

When a validation request is made, the server can either ignore the
validation request and response with a normal 200 OK, or it can return 304
Not Modified to instruct the browser to use its cached copy. 
The 304 response can also include headers that update the expiration time of
the cached document.


Setting 'Last-Modified' did the trick for me.

thanks

-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Caching-Streamed-Images-on-browser-tp3389269p3436099.html
Sent from the Users forum 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: Caching Streamed Images on browser

2011-04-08 Thread Arjun Dhar
Hey, thanks for the response ... though i think there is more to it.
When I look at the header of a normal image in web context, he server
returns 302 (NO MODIFIED).

Despite me changing the HTTP cache controls, a "HTTP/1.1 200 OK" still makes
the browser stream the image from the server. Using HTTP live Headers i
ensured the HTTP headers match that of normal image Ditto. This (200 vs 302)
is the only noticeable difference. Am unable to force a 302 for some reason
(...am looking at that)


Any ideas?

Will some sort of UrlCodingStrategy to avoid params in my URL trick the
browser and tomcat server in thinking its a genuine image resource?
like : /my/synthetic/image/image1.jpg instead of Download?image=image1.jpg.

Any ideas?




-
Don't take life too seriously, your'e not getting out it alive anyway!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Caching-Streamed-Images-on-browser-tp3389269p3436023.html
Sent from the Users forum 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



Redirect back to wicket page problem

2011-04-08 Thread harrytalky
I am having a populate details link on my page which redirects to linkedin
site to authorize user and fetch his information back to wicket page. What
is happening right now is when user click continue on linkedin site to move
back to the our site then a pin is sent to the page. Using this pin we fetch
a authorization token but the problem is in case of IE  the page's
constructor is called twice and by then the token gets expired.
 I have debugged a lot but not able to find why constructor is
being called twice in case of IE.

I am using wicket 1.4.16, jdk1.6.24 and tomcat6

Please help. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-back-to-wicket-page-problem-tp3433517p3433517.html
Sent from the Users forum 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: Redirect back to wicket page problem

2011-04-08 Thread harrytalky
Using Tamper data plugin i found during first hit the page header contains
the following script:


if (window.name=='' || (window.name.indexOf('wicket') > -1 &&
window.name!='wicket-wicket:Default')) {
window.location="../con/prof.html/?oauth_token=e8b44a83-480f-4cf3-97cb-6dd162269c90&oauth_verifier=44646&wicket:PageMapName=wicket-16"
+ (window.location.hash != null ? window.location.hash : ""); }


is this the reason for the second hit?

Please provide any help, i m stuck to this from past 3 days.

Thanks in advance :)




Martin Grigorov-4 wrote:
> 
> check forin your page markup.
> this would cause a second request to the page itself
> 
> there is a IResponseFilter in Wicket for this problem:
> EmptySrcAttributeCheckFilter
> it is enabled only in DEV mode in newer versions
> 
> On Thu, Apr 7, 2011 at 12:18 PM, harrytalky 
> wrote:
> 
>> I am having a populate details link on my page which redirects to
>> linkedin
>> site to authorize user and fetch his information back to wicket page.
>> What
>> is happening right now is when user click continue on linkedin site to
>> move
>> back to the our site then a pin is sent to the page. Using this pin we
>> fetch
>> a authorization token but the problem is in case of IE  the page's
>> constructor is called twice and by then the token gets expired.
>> I have debugged a lot but not able to find why constructor is
>> being called twice in case of IE.
>>
>> I am using wicket 1.4.16, jdk1.6.24 and tomcat6
>>
>> Please help.
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Redirect-back-to-wicket-page-problem-tp3432947p3432947.html
>> Sent from the Users forum 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
>>
>>
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com ;
> 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-back-to-wicket-page-problem-tp3433517p3435562.html
Sent from the Users forum 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



wicket datatable to excel

2011-04-08 Thread henry
Hi guys,

please i need a code to export my dataTable values into an excel format on
click of a button.

Any help will do.

Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-datatable-to-excel-tp3433610p3433610.html
Sent from the Users forum 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: Redirect back to wicket page problem

2011-04-08 Thread harrytalky
Thanx for reply but non of static resource markup has empty src.

One thing i would like to mention here that It's generating different-2 src
string for static resources.

On first hit  ../js/abc.js

On second hit ../../js/abc.js

This is happening in IE8 but IE7 and firefox, it works in the first hit
itself.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-back-to-wicket-page-problem-tp3433517p3433707.html
Sent from the Users forum 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: Stateless form throws Unexpected RuntimeException

2011-04-08 Thread Martin Grigorov
Better use only a constructor with PageParameters or chain them as I
suggested you already.

new MyPage() {
  this(new PageParameters());
}

new MyPage(PageParameters params) {
  super(params);

  .. here do your logic
}

On Fri, Apr 8, 2011 at 10:37 AM, Juansoft  wrote:

> Thanks for your replie Martin.
>
> Really if submitting the form the parameter constructor is called. I tried
> to delete this constructor (parameter) and the page actually only have one
> constructor (without parameter) and runs...
>
> I don't understand how page run without the parameter constructor in
> stateless page.
>
> When the page have this constructor it's called and runtime exceptions
> ocurrs, and if parameter constructor is deleted page works?
>
> With this works fine:
>
> public final class Test extends WebPage {
>public Test () {
>super ();
>
> StatelessForm Form = new StatelessForm("formData"){
>
>  public void onSubmit() {
>  System.out.println("Enter");}
>};
>
>
>add(Form);
>
>   this.setStatelessHint(true);
>}
>
>//Parameter constructor deleted!!
>  }
>
> -
> Another "wicket" newbie programmer
> 
> Wicket en Español -
>
> http://aprendiendowicket.wordpress.com
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Stateless-form-throws-Unexpected-RuntimeException-tp3434187p3435643.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Stateless form throws Unexpected RuntimeException

2011-04-08 Thread Juansoft
Thanks for your replie Martin.

Really if submitting the form the parameter constructor is called. I tried
to delete this constructor (parameter) and the page actually only have one
constructor (without parameter) and runs...

I don't understand how page run without the parameter constructor in
stateless page.

When the page have this constructor it's called and runtime exceptions
ocurrs, and if parameter constructor is deleted page works?

With this works fine:

public final class Test extends WebPage {
public Test () {
super ();

 StatelessForm Form = new StatelessForm("formData"){

  public void onSubmit() {
  System.out.println("Enter");}
};


add(Form);

   this.setStatelessHint(true);
}

   //Parameter constructor deleted!!
 } 

-
Another "wicket" newbie programmer

Wicket en Español - 

http://aprendiendowicket.wordpress.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Stateless-form-throws-Unexpected-RuntimeException-tp3434187p3435643.html
Sent from the Users forum 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