ResourceLink with pagerefresh(update)

2010-03-02 Thread Boydens Joeri (OZ)
Hello,

 

I've created an ResourceLink wich shows the user a download window for
the PDF resource. 

 

Now I want the page to be refreshed when the user clicks the link so I
can update the page and show the user he clicked this link.  How would I
do this ?

 

Regards

Joeri

 

 

ResourceLink pdfAanvragenLink = new
ResourceLink("pdfAanvragenLink", new
DynamicWebResource(documentVO.getDocumentNaam() + "_" +
documentVO.getDocumentId() + ".pdf") {

 

 /**

  * serialVersionUID 

  * Aangepast door: C501BBJO op 2-mrt-2010 -
14:29:13

  */

 private static final long
serialVersionUID  = 4564654656L;

 

 /* (non-javadoc)

  * @see
org.apache.wicket.markup.html.WebResource#getCacheDuration()   

  * Aangepast door: C501BBJO op 2-mrt-2010 -
14:44:39

  */

 protected int getCacheDuration() {

   return 30;

 }

  

 /* (non-javadoc)

  * @see
org.apache.wicket.markup.html.DynamicWebResource#getResourceState()   

  * Aangepast door: C501BBJO op 2-mrt-2010 -
14:44:44

  */

 protected ResourceState getResourceState()
{

   return new ResourceState() {

 

 public byte[] getData() {

   return
getPDFAsByteArray();

 }

 

 public String getContentType()
{

   return "application/pdf";

 }

   };

 

 }

 

 

}) ;

 



RE: @RequireHttps with reverse proxy

2010-01-29 Thread Boydens Joeri (OZ)
I've created an issue for it, but how could I solve it for now ?

Any hints/tips where to start ?

Thanks

-Oorspronkelijk bericht-
Van: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Verzonden: vrijdag 29 januari 2010 4:21
Aan: users@wicket.apache.org
Onderwerp: Re: @RequireHttps with reverse proxy

add an rfe to our jira

-igor

On Thu, Jan 28, 2010 at 7:43 AM, Boydens Joeri (OZ)  wrote:
> Hi,
>
>
>
> We have a wicket application running at the following address
> http://myserver.domain.be:8082/myapplication.  When I do add the
> @RequiredHttps annotation to my pages, wicket does a great job
> redirecting my pages to https connection.  I get something like:
>
> https://myserver.domain.be:8443/myapplication/somepage .
>
>
>
> So far so good, but now I have to serve this application behind a
> reverse proxy.  I have apache httpd2 set up with ProxyPass, and I added
> a VirtualHost for my application, something like
> http://myapplication.domain.be (this way port 8082 isn't visible and
> /myapplication context path isn't visible either).
>
>
>
> This is working perfectly for non https pages, but when I go to a https
> pages, I get redirected to the server application address
> (https://myserver.domain.be:8843/myapplication).  This is because the
> SwitchProtocolRequestTarget is building the redirect url based on the
> httpservletrequest.getServerName()...
>
>
>
> Is it possible to extend/override this behavior ?
>
>
>
> Regards
>
> Joeri
>
>
>
>
>
>
>
>
>
>

-
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



@RequireHttps with reverse proxy

2010-01-28 Thread Boydens Joeri (OZ)
Hi,

 

We have a wicket application running at the following address
http://myserver.domain.be:8082/myapplication.  When I do add the
@RequiredHttps annotation to my pages, wicket does a great job
redirecting my pages to https connection.  I get something like:

https://myserver.domain.be:8443/myapplication/somepage .

 

So far so good, but now I have to serve this application behind a
reverse proxy.  I have apache httpd2 set up with ProxyPass, and I added
a VirtualHost for my application, something like
http://myapplication.domain.be (this way port 8082 isn't visible and
/myapplication context path isn't visible either).

 

This is working perfectly for non https pages, but when I go to a https
pages, I get redirected to the server application address
(https://myserver.domain.be:8843/myapplication).  This is because the
SwitchProtocolRequestTarget is building the redirect url based on the
httpservletrequest.getServerName()...

 

Is it possible to extend/override this behavior ?

 

Regards

Joeri

 

 

 

 



RE: Re: + key as alternative for tab key

2009-09-24 Thread Boydens Joeri (OZ)
Daniel,

Great library! 

Thanks for the information

 Joeri Boydens
 OZ Onafhankelijk Ziekenfonds
 Informatica
 050 40 53 09


-Oorspronkelijk bericht-
Van: news [mailto:n...@ger.gmane.org] Namens Daniel Toffetti
Verzonden: woensdag 23 september 2009 20:43
Aan: users@wicket.apache.org
Onderwerp: Re: + key as alternative for tab key

Boydens Joeri (OZ  oz.be> writes:
> How would you do this in an elegant and generic way ?
> 
> Joeri  
> 

Also, take a look at wicketstuff-input-events

Daniel



-
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: wicket menu

2009-09-21 Thread Boydens Joeri (OZ)
Hi Ernesto,

I downloaded your files and it's working fine!  It's indeed very easy to
create such a menu if the javascript exists !

I'll have a look how we can integrate it in our new project!

Thanks
Joeri


Ps: i had problems with the google svn... maybe it's my eclipse settings
but I downloaded the files manually..


-Oorspronkelijk bericht-
Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Verzonden: maandag 21 september 2009 15:08
Aan: users@wicket.apache.org
Onderwerp: Re: wicket menu

Hi Joeri,
I just implemented the menu you mentioned

http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css
_menu_2/

in here

http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
/com/antilia/web/dynamicdrive

If you want to give it a try... get those sources on that package and
mount
the test page

http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
/com/antilia/web/dynamicdrive/test/TestMenu.java

On you application... Feel free to modify the code as you need...

It is so easy to create components in Wicket (moreover, when someone
else
has done the dirty JavaScript work;-)

Best,

Ernesto


<http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/sr
c/com/antilia/web/dynamicdrive>

On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ)
wrote:

> Hi,
>
>
>
> We are changing from Struts to Wicket, in our Struts application we
used
> Struts-Menu.  Now I've searched the wicket mailing list but I couldn't
> find any descent menu.
>
>
>
> Is there a Wicket menu available, where can I find it ? Or should I
> write my own?
>
>
>
> I've seen some code based on YUI, but I can't find that anymore in the
> svn.
>
>
>
> Joeri
>
>

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



+ key as alternative for tab key

2009-09-21 Thread Boydens Joeri (OZ)
Hi,

 

We are rewriting an old fat client application to a more elegant web
application based on Wicket.  In the requirements they state that the
users of the fat client application do all input with the right side of
their keyboard and want to keep it that way.

 

One special requirement is that navigating between fields should be done
with the ' + ' symbol on the right hand keypad instead of the 'tab' key.
When navigating between fields there is also happing validation on the
server side, so an ajax call will be necessary.

 

How would you do this in an elegant and generic way ?

 

Joeri  

 

 

 



RE: wicket menu

2009-09-21 Thread Boydens Joeri (OZ)
Ernesto,

Is there also a up-to-date release for wicket 1.3 ?

Joeri

 Joeri Boydens
 OZ Onafhankelijk Ziekenfonds
 Informatica
 050 40 53 09


-Oorspronkelijk bericht-
Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Verzonden: maandag 21 september 2009 11:23
Aan: users@wicket.apache.org
Onderwerp: Re: wicket menu

>
>
>
>
> I've seen some code based on YUI, but I can't find that anymore in the
> svn.
>
>
>
I think YUI menu is in here.

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/tags/wicke
tstuff-core-1.4.1/yui-parent/

Ernesto

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



RE: wicket menu

2009-09-21 Thread Boydens Joeri (OZ)
Martin,

I'm looking for something like 
http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
 but the items should be generated from Java code.

We also need a different Menu structure depending on the user role.

Joeri


-Oorspronkelijk bericht-
Van: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] 
Verzonden: maandag 21 september 2009 11:06
Aan: users@wicket.apache.org
Onderwerp: Re: wicket menu

Hover menu or just static? If static then it is easy to just change
the html/css of tabbed panel into vertical or horizontal menu.
Probably you can roll a hover too.

**
Martin

2009/9/21 Boydens Joeri (OZ) :
> Hi,
>
>
>
> We are changing from Struts to Wicket, in our Struts application we used
> Struts-Menu.  Now I've searched the wicket mailing list but I couldn't
> find any descent menu.
>
>
>
> Is there a Wicket menu available, where can I find it ? Or should I
> write my own?
>
>
>
> I've seen some code based on YUI, but I can't find that anymore in the
> svn.
>
>
>
> Joeri
>
>

-
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



wicket menu

2009-09-21 Thread Boydens Joeri (OZ)
Hi,

 

We are changing from Struts to Wicket, in our Struts application we used
Struts-Menu.  Now I've searched the wicket mailing list but I couldn't
find any descent menu.

 

Is there a Wicket menu available, where can I find it ? Or should I
write my own?  

 

I've seen some code based on YUI, but I can't find that anymore in the
svn.  

 

Joeri



SimpleAuthorizationStratagy with errormessage fails

2009-05-25 Thread Boydens Joeri (OZ)
Hi all,

 

I have a created a simple authorizationstrategy,

 

   SimplePageAuthorizationStrategy authorizationStrategy = new
SimplePageAuthorizationStrategy(

  OnlineVacationAvailabilityPage.class,
VacationAlreadyRegisteredPage.class) {

  protected boolean isAuthorized()  {

return
(((VacationApplicationSession)Session.get()).getBookingInformation() ==
null);

}

   };

 

 
getSecuritySettings().setAuthorizationStrategy(authorizationStrategy);

 

 

I want the user to visit the OnlineVacationAvailabiltyPage only when
he's authorized (= there's no bookingInformation in the session).  When
a execute the following scenario (it's a bit of a reverse login
scenario, but it should work ;-) :

 

(first visit)

*user enters the OnlineVacationAvailabiltyPage -> isAuthorized returns
true because there is no booking information in the session (= OK)

*users enters information and submits page -> program creates a
bookingInformation object in the session (= OK)

*users clicks back button of the browser -> isAuthorized returns false
because there is a booking information available in the session, the
user is redirected to the VacationAlreadyRegisteredPage (= OK)

 

The above works as it should, but the following scenario doesn't

 

(first visit)

*user enters the OnlineVacationAvailabiltyPage -> isAuthorized returns
true because there is no booking information in the session (= OK)

*users enters informations and submits page -> there is a validation
error in the onSubmit action, error(message) is called and the user
returns to the OnlineVactionAvailabiltyPage (but now it's not a
stateless page anymore because there is an error message shown to the
user) (=OK)

*users enters correct information and submits page -> program creates a
bookingInformation object in the session (=OK)

*users clicks back button of the browser -> the isAhtorized method isn't
called anymore and the user returns to the OnlineAvailibiltyPage ( NOT
OK )

 

I thinks this happens because after the error occurred my page isn't
stateless anymore L

 

Any ideas how to solve this ?

 

Regards,

Joeri

 

 

 



RE: clean way to add visibility constraints

2009-04-01 Thread Boydens Joeri (OZ)

Is there prefered way between the methods below?  

if (condition) {
component.setVisible(false);
}

OR

component {
@Override
public boolean isVisible() {
return !condition;
}

If I use the above I can group my components and set them with the
setVisible method depending on the condition, with the last method I
have to add the the condition to every component.


-Oorspronkelijk bericht-
Van: Daan van Etten [mailto:d...@stuq.nl] 
Verzonden: woensdag 1 april 2009 11:20
Aan: users@wicket.apache.org
Onderwerp: Re: clean way to add visibility constraints

You could write a method that sets the visibility on the relevant  
components.
The Form components have to be visible to that method though (or you  
have to use a visitor).

Regards,

Daan

Op 1 apr 2009, om 08:32 heeft Boydens Joeri (OZ) het volgende  
geschreven:

> Hi,
>
>
>
> I have this page where I have different components that need to be  
> show
> or hidden, depending on the value of some model fields.  I implemented
> this by overriding the isVisible method of the components.  Now I was
> wondering if there is a less verbose way of handling this? (I can't
> group the components because it's not possible in the html markup).
>
>
>
> item.add(new TextField("value") {
>
> public boolean isVisible() {
>
>
> OnlineBookingParametersArticle article =
> (OnlineBookingParametersArticle) getParent().getModel().getObject();
>
>   return
> article.getArticle().getNumberInStock() > 0;
>
> }
>
>   });
>
>
>
>   item.add(new
> Label("article.numberOfArticlesLabel", "Geen beschikbaar") {
>
> public boolean isVisible() {
>
>
> OnlineBookingParametersArticle article =
> (OnlineBookingParametersArticle) getParent().getModel().getObject();
>
>   return
> article.getArticle().getNumberInStock() <= 0;
>
> }
>
>   });
>
>
>
>   item.add(new
> Label("article.description"));
>
>
>
>   item.add(new
> WebMarkupContainer("participantInfo") {
>
> public boolean
> isVisible() {
>
>
> OnlineBookingParametersArticle   article =
> (OnlineBookingParametersArticle) getParent().getModel().getObject();
>
>   return
> article.getArticle().getNumberInStock() > 0;
>
> }
>
>   }
>
>   .add(new
> Label("article.numberOfRequiredParticipants"))
>
>   .add(new
> Label("article.maximumNumberOfParticipants")));
>
>
>
>
>
>   item.add(new Link("contactLink"){
>
> @Override
>
> public void onClick(){
>
>   //TODO : go to correct
> page
>
> }
>
> @Override
>
> public boolean isVisible() {
>
>
> OnlineBookingParametersArticle article =
> (OnlineBookingParametersArticle) getParent().getModel().getObject();
>
>   return
> article.getArticle().getNumberInStock() <= 0;
>
> }
>
>   });
>
>
>
>
>


-
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



clean way to add visibility constraints

2009-03-31 Thread Boydens Joeri (OZ)
Hi,

 

I have this page where I have different components that need to be show
or hidden, depending on the value of some model fields.  I implemented
this by overriding the isVisible method of the components.  Now I was
wondering if there is a less verbose way of handling this? (I can't
group the components because it's not possible in the html markup).  

 

item.add(new TextField("value") {

 public boolean isVisible() {

 
OnlineBookingParametersArticle article =
(OnlineBookingParametersArticle) getParent().getModel().getObject();

   return
article.getArticle().getNumberInStock() > 0;

 }

   });

   

   item.add(new
Label("article.numberOfArticlesLabel", "Geen beschikbaar") {

 public boolean isVisible() {

 
OnlineBookingParametersArticle article =
(OnlineBookingParametersArticle) getParent().getModel().getObject();

   return
article.getArticle().getNumberInStock() <= 0;

 }

   });

   

   item.add(new
Label("article.description"));

 

   item.add(new
WebMarkupContainer("participantInfo") {

 public boolean
isVisible() {

 
OnlineBookingParametersArticle   article =
(OnlineBookingParametersArticle) getParent().getModel().getObject();

   return
article.getArticle().getNumberInStock() > 0;

 }

   }

   .add(new
Label("article.numberOfRequiredParticipants"))

   .add(new
Label("article.maximumNumberOfParticipants")));  

 

   

   item.add(new Link("contactLink"){

 @Override

 public void onClick(){

   //TODO : go to correct
page

 }

 @Override

 public boolean isVisible() {

 
OnlineBookingParametersArticle article =
(OnlineBookingParametersArticle) getParent().getModel().getObject();

   return
article.getArticle().getNumberInStock() <= 0;

 }

   });