WG: Re: Infinite Redirect Loop when using a Link

2017-03-29 Thread rene . hartwig
Hi,

I found the cause. This is happening because of the redirect I am making 
with the 'ConstraintSecurityHandler' together with the same name for the 
session cookie in both applications.
When using a separate session name for both applications everything is 
working fine.



Mit freundlichen Grüßen / Best regards,
René Hartwig
Team Leader Software Development

Mail:   rene.hart...@cryptshare.com
Phone:  +49 761 38913 0
Fax:+49 761 38913 115
Web:www.cryptshare.com
Befine Solutions AG - The Cryptshare company
Werthmannstr. 15
79098 Freiburg
Germany
__

Are your attachments too large or confidential for common e-mail?
Get to know Cryptshare! 
__

Interested in news and updates or you just like Cryptshare? Follow us!
Newsletter  |  Linkedin  l  XING  l  Twitter  l  Youtube l  Facebook  |  
RSS  l  Google+ 
__
Register Court Freiburg HRB 6144, Board of Management: Mark Forrest, 
Dominik Lehr, Chairman of the Supervisor Board: Thilo Braun
- Forwarded by René Hartwig/befine/DE on 29.03.2017 13:51 -

From:   Martin Grigorov 
To: "users@wicket.apache.org" 
Date:   28.03.2017 13:57
Subject:Re: Infinite Redirect Loop when using a Link



Hi,

Put a breakpoint in WebPageRenderer#respond() or/and #redirectTo() and see
what is the current url and what is the target url.
Do you use HttpsMapper? If YES then play with
org.apache.wicket.protocol.https.HttpsConfig#setPreferStateful(boolean) 
and
see whether it helps.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 28, 2017 at 1:50 PM,  wrote:

> Hi,
>
> I am using Wicket 7.6.0 with two Web Applications:
>
> Admin Interface on HTTPS  Port 8080 using a SignInPanel
> User Interface on HTTP Port 80
>
> Now I have a very strange behavior - here is how I can reproduce it:
> Delete all browser cookies
> Visit the Admin Interface
> Visit the User Interface (Using the same browser tab)
>
> --> An infinite redirect loop happens. The source of this problem is a
> Link on the page returning 'false' for #getStatelessHint().
>
> This is everything I have found out so far. Unfortunately I have not 
been
> able to reproduce this behavior in a quickstart project. Do you have an
> idea what might be causing this?
> I found this issue related to a recent redirect-issue, but I do not 
think
> that it has something to do with my problem, especially because it 
should
> be fixed in this Wicket version already.
>
>
>
> Mit freundlichen Grüßen / Best regards,
> René Hartwig
> Team Leader Software Development
>
> Mail:   rene.hart...@cryptshare.com
> Phone:  +49 761 38913 0
> Fax:+49 761 38913 115
> Web:www.cryptshare.com
> Befine Solutions AG - The Cryptshare company
> Werthmannstr. 15
> 79098 Freiburg
> Germany
> 
> __
>
> Are your attachments too large or confidential for common e-mail?
> Get to know Cryptshare!
> 
> __
>
> Interested in news and updates or you just like Cryptshare? Follow us!
> Newsletter  |  Linkedin  l  XING  l  Twitter  l  Youtube l  Facebook  |
> RSS  l  Google+
> 
> __
> Register Court Freiburg HRB 6144, Board of Management: Mark Forrest,
> Dominik Lehr, Chairman of the Supervisor Board: Thilo Braun


Re: Infinite Redirect Loop when using a Link

2017-03-28 Thread rene . hartwig
Hi,

it is always toggling between  and ?0:


I am not using an HttpsMapper, however I am making an automated redirect 
on the Admin Interface from HTTP Port 9090 to HTTPS Port 8080 using a 
Jetty 'ConstraintSecurityHandler'. When not making this redirect, the 
problem does not happen.


Mit freundlichen Grüßen / Best regards,
René Hartwig
Team Leader Software Development

Mail:   rene.hart...@cryptshare.com
Phone:  +49 761 38913 0
Fax:+49 761 38913 115
Web:www.cryptshare.com
Befine Solutions AG - The Cryptshare company
Werthmannstr. 15
79098 Freiburg
Germany
__

Are your attachments too large or confidential for common e-mail?
Get to know Cryptshare! 
__

Interested in news and updates or you just like Cryptshare? Follow us!
Newsletter  |  Linkedin  l  XING  l  Twitter  l  Youtube l  Facebook  |  
RSS  l  Google+ 
__
Register Court Freiburg HRB 6144, Board of Management: Mark Forrest, 
Dominik Lehr, Chairman of the Supervisor Board: Thilo Braun



From:   Martin Grigorov 
To: "users@wicket.apache.org" 
Date:   28.03.2017 13:57
Subject:Re: Infinite Redirect Loop when using a Link



Hi,

Put a breakpoint in WebPageRenderer#respond() or/and #redirectTo() and see
what is the current url and what is the target url.
Do you use HttpsMapper? If YES then play with
org.apache.wicket.protocol.https.HttpsConfig#setPreferStateful(boolean) 
and
see whether it helps.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 28, 2017 at 1:50 PM,  wrote:

> Hi,
>
> I am using Wicket 7.6.0 with two Web Applications:
>
> Admin Interface on HTTPS  Port 8080 using a SignInPanel
> User Interface on HTTP Port 80
>
> Now I have a very strange behavior - here is how I can reproduce it:
> Delete all browser cookies
> Visit the Admin Interface
> Visit the User Interface (Using the same browser tab)
>
> --> An infinite redirect loop happens. The source of this problem is a
> Link on the page returning 'false' for #getStatelessHint().
>
> This is everything I have found out so far. Unfortunately I have not 
been
> able to reproduce this behavior in a quickstart project. Do you have an
> idea what might be causing this?
> I found this issue related to a recent redirect-issue, but I do not 
think
> that it has something to do with my problem, especially because it 
should
> be fixed in this Wicket version already.
>
>
>
> Mit freundlichen Grüßen / Best regards,
> René Hartwig
> Team Leader Software Development
>
> Mail:   rene.hart...@cryptshare.com
> Phone:  +49 761 38913 0
> Fax:+49 761 38913 115
> Web:www.cryptshare.com
> Befine Solutions AG - The Cryptshare company
> Werthmannstr. 15
> 79098 Freiburg
> Germany
> 
> __
>
> Are your attachments too large or confidential for common e-mail?
> Get to know Cryptshare!
> 
> __
>
> Interested in news and updates or you just like Cryptshare? Follow us!
> Newsletter  |  Linkedin  l  XING  l  Twitter  l  Youtube l  Facebook  |
> RSS  l  Google+
> 
> __
> Register Court Freiburg HRB 6144, Board of Management: Mark Forrest,
> Dominik Lehr, Chairman of the Supervisor Board: Thilo Braun



Infinite Redirect Loop when using a Link

2017-03-28 Thread rene . hartwig
Hi,

I am using Wicket 7.6.0 with two Web Applications:

Admin Interface on HTTPS  Port 8080 using a SignInPanel
User Interface on HTTP Port 80

Now I have a very strange behavior - here is how I can reproduce it:
Delete all browser cookies
Visit the Admin Interface
Visit the User Interface (Using the same browser tab)

--> An infinite redirect loop happens. The source of this problem is a 
Link on the page returning 'false' for #getStatelessHint().

This is everything I have found out so far. Unfortunately I have not been 
able to reproduce this behavior in a quickstart project. Do you have an 
idea what might be causing this?
I found this issue related to a recent redirect-issue, but I do not think 
that it has something to do with my problem, especially because it should 
be fixed in this Wicket version already.



Mit freundlichen Grüßen / Best regards,
René Hartwig
Team Leader Software Development

Mail:   rene.hart...@cryptshare.com
Phone:  +49 761 38913 0
Fax:+49 761 38913 115
Web:www.cryptshare.com
Befine Solutions AG - The Cryptshare company
Werthmannstr. 15
79098 Freiburg
Germany
__

Are your attachments too large or confidential for common e-mail?
Get to know Cryptshare! 
__

Interested in news and updates or you just like Cryptshare? Follow us!
Newsletter  |  Linkedin  l  XING  l  Twitter  l  Youtube l  Facebook  |  
RSS  l  Google+ 
__
Register Court Freiburg HRB 6144, Board of Management: Mark Forrest, 
Dominik Lehr, Chairman of the Supervisor Board: Thilo Braun

StatelessForm: Cannot login

2012-02-09 Thread rene
Hello,

I have a strange problem with StatelessForms in combination with login in:
On my MainPage are two stateless forms. One for registration and one for the
login (registration isn't implemented yet). When I try to log in, Wicket
creates a new User() and saves it in the Session (I made this like it's
explained in Wicket in Action). A System.out.print(user created) in the
constructor of User confirms that. Everything seems to be ok. But when the
main page reloads, I am still logged out. 
And: When I change from StatelessForm to Form, everything works perfectly.
Something else might be important: When I request a page that requries
authorization and I'm not logged in, i'm being redirected to /login. There
is the same LoginPanel (with StatelessForm) as on the main page - and the
login works! But when I directly open /login it's the same as on the main
page and I can't login.
I also noticed that the login works (with StatelessForm) when I open a page
that requires authorization, then press the back button (back to main page)
and there try to log in.

The question is now, what am I doing worng? I can't find the problem in my
code, I have been trying a lot to find out what's worng but everything seems
to be correct. I couldn't find anything in the mailing list / on the web, I
searched a lot.

At the end I attached code from LoginPanel.java, WiaSession.java and
WicketApplication.java.

Thank you very much for your help!
(And sorry if there are one or two missspelled words - I don't speak english
natively.)


René

LoginPanel.java:
public class LoginPanel extends Panel {

public LoginPanel(String id) {
super(id);
add(new LoginForm(login));
}

private class LoginForm extends StatelessForm {

private String username;
private String password;

public LoginForm(String id) {
super(id);

setModel(new CompoundPropertyModel(this));
add(new TextField(username));
add(new PasswordTextField(password));
}

@Override
public final void onSubmit() {
if (tryToLogIn()) {
if (!continueToOriginalDestination()) {
setResponsePage(getApplication().getHomePage());
}
}
}

private boolean tryToLogIn() {
if (username != null  password != null) {
User user = Database.findUser(username);
if (user != null) {
if (user.comparePasswords(password)) {
WiaSession.get().setUser(user);
return true;
}
}
}
return false;
}
}
}

WiaSession.java:
public final class WiaSession extends WebSession {

private User user;

public WiaSession(Request request) {
super(request);
}

public static WiaSession get() {
return (WiaSession) Session.get();
}

public static boolean isLoggedIn() {
return WiaSession.get().isAuthenticated();
}

public boolean isAuthenticated() {
return (user != null);
}

public final synchronized User getUser() {
return user;
}

public final synchronized void setUser(User user) {
this.user = user;
}
}

WicketApplication.java, newSession overwritten:
@Override
public final Session newSession(Request request, Response response) {
return new WiaSession(request);
}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/StatelessForm-Cannot-login-tp4373476p4373476.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: best way to add tooltips in wicket

2011-07-13 Thread Rene Peters
Hi there,

I am trying to use mootips with mixed success. I've added it to a label on
my page but when I run it I get an alert box saying Unable to get the value
of the property 'msDropDown': object is null or undefined.

It seams like a javacript error but I really have no idea about the how and
why. Googling didn't help much either. Does anyone has an idea about what is
wrong?

Kind regards,

René

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/best-way-to-add-tooltips-in-wicket-tp1882871p3666143.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: Could not resolve class: my.domain.favicon.ico

2011-04-25 Thread Rene Stolle
Hey Igor,

this sounds logically, but what is the solution. One cannot create a
class favicon.ico
cause of the dot, and even if, how to place your own favicon in this case??

Rene

PS: I am loving 1.5!

On Wed, Apr 13, 2011 at 7:35 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 you mounted the package on root, which means when the browser requests
 /favicon.ico wicket will think that the browser is asking for a wicket
 page named my.domain.favicon.ico and will try to instantiate a class
 with that name, thus the error. it should ultimately result in a 404
 sent to the browser.

 -igor

 On Wed, Apr 13, 2011 at 2:51 AM, Christian Grobmeier
 grobme...@gmail.com wrote:
 mountPackage() will mount all *Page* classes in the same package as the page
 used for the mount
 but it doesn't do anything else, i.e. it doesn't handle components or models
 or ...

 OK, I have imagined that. But it seems mountPackage does also mount the 
 forms.
 If I mountPackage everything the LoginForm is available.

 If I do mountPage my LoginForm is not available after I submit (same
 package as LoginPage). Which does not make sense to me:
 ComponentNotFoundException: Could not find component 'loginForm' on
 page 'class de.mydomain.HomePage

 The HomePage does not have this component at all.

 Even when I do:
 mountPage(HomePage)
 mountPackage(LoginPage)

 it changes.
 Only when i mountPackage everything it seems to work.

 Btw, HomePage is in the root folder, while LoginPage is in a subfolder.



 mountPage() mounts just a single page without any knowledge about other
 pages, panels, models ...

 On Wed, Apr 13, 2011 at 11:19 AM, Christian Grobmeier
 grobme...@gmail.comwrote:

  do you really need mountPackage() ?
  I guess you actually need #mountPage()
  I find mountPackage(/, HomePage.class); as the culprit

 if I use only mountPage it leads to the situation of some components not
 found.
 My structure is like following:

 /HomePage.class
 /App.class
 /pages/login/LoginPage.class
 /pages/login/LoginForm.class
 /pages/login/LoginEntities.class
 /pages/login/LoginBusinessLogic.class
 /pages/login/LoginPage.html
 ...

 The docs told me I could mount a whole package. As subfolders are not
 mounted, I thougth this would work.

 However, if I only use mountPage, the missing css error is gone. But
 then I am puzzled about mountPackage

 It seems I should restructure my app... is there a recommended way?



 
  On Wed, Apr 13, 2011 at 11:07 AM, Christian Grobmeier
  grobme...@gmail.comwrote:
 
   can you paste your MyApp#init() ?
 
  Sure:
 
   @Override
     public void init() {
         super.init();
         getComponentInstantiationListeners().add(
                 new SpringComponentInjector(this));
         mountPackage(/, HomePage.class);
         mountPackage(/feedback, FeedbackPage.class);
         mountPackage(/login, LoginPage.class);
         mountPackage(/test, TestPage.class);
         this.getMarkupSettings().setStripWicketTags(true);
         loadProperties();
         initSecurity();
     }
 
  loadProperties load a property file from web-inf as the name suggests
  initSecurity is setting an
 getSecuritySettings().setauthorizationStrategy()
  - guess the latter two methods have nothing to do with my problem
 
  Cheers
 
  -
  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 http://jweekend.com/
 



 --
 http://www.grobmeier.de

 -
 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 http://jweekend.com/




 --
 http://www.grobmeier.de

 -
 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



CompoundPropertyModel and Image

2011-04-23 Thread Rene Stolle
Hi there,

I have a rather simple problem, but could find a solution yet. I wanna
combine text and an image in ONE model. The image is defined by a
ContextRelativeResource. It works all as assumed, except for the
image. Here the whole thing:

public class Team extends WebPage
{
public static class TeamMember implements Serializable
{
final String name;
final Integer age;
final ContextRelativeResource picture;
//  final PackageResource picture;

public TeamMember (final String name, final Integer age, String 
pic)
{
this.name = name;
this.age = age;
this.picture = new ContextRelativeResource (image/ + 
pic);
}
}

public Team ()
{
CompoundPropertyModelTeamMember tm = new
CompoundPropertyModelTeamMember (reneTm) ;
setDefaultModel (tm) ;

add (new Label (name));  // works with string
add (new Label (age));   // works with Integer

add (new Image (picture)); // DOESNT WORK??

//  Image image = new Image (picture, tm.getObject ().picture);
//image.getDefaultModelObject () == NULL  

}
}

For the completeness, here the markup:

table border=1
tr
td
span wicket:id=name/span
/td
td
img src=# alt= wicket:id=picture
/td
td
span wicket:id=age/span
/td
/tr
/table

It seems, that Image doesnt use the CompoundPropertyModel which I set
as the default model. If I would use Label instead of Image, the
correct ContextRelativeResource will be retrieved from the model.

What did I do wrong, or how to combine text and image in one Model??

Regards,
Rene

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



Unable to change label of FileUploadField

2009-11-11 Thread Rene Peters

Hello,

 

I developed a component (a Panel containing a Form) for uploading a file.

 

It works fine but it I would like to change the label of the button and the 
text displayed next to the button.

 

The text it displays by default is choose file on the button and the text 
displayed next to the button when no file has been chosen yet is no file 
chosen (when a file has been chosen it displays the filename of the file 
chosen).

 

I tried using setLabel() on the FileUploadField but it didn't work. Neither did 
overriding the getLabel() method. I haven't been able to find any information 
on how to achieve this. I have no idea how I could chang the default text next 
to the FileUploadField either.

 

Any suggestions are very welcome.

 

Regards,

 

René
  
_
Het laatste nieuws, shownieuws en voetbalnieuws op MSN.nl
http://nl.msn.com/