Hi,

I'm also interested on solving this as I will need to implement a
similar use case in a coming application. The main problem I see in
solving it is that on

protected IRequestTarget checkSecureOutgoing(IRequestTarget target) {
....
}

even if you check for ListenerInterfaceRequestTarget  and your Secure form e.g.

if (target instanceof IListenerInterfaceRequestTarget) {
                                        IListenerInterfaceRequestTarget 
interfaceRequestTarget =
(IListenerInterfaceRequestTarget) target;
                                        Component c = 
interfaceRequestTarget.getTarget();
                                        
if(SecureForm.class.isAssignableFrom(c.getClass())) {
                                                SecureForm<?> secureForm = 
(SecureForm<?>)c;
                                                if(secureForm.hasError()) {
                                                        return target;
                                                }
                                        }
                                }

, to return the same target when you have validation errors,
ListenerInterfaceRequestTarget seem to be using logic from
PageRequestTarget

public void respond(RequestCycle requestCycle)
        {
                // Should page be redirected to?
                if (requestCycle.isRedirect())
                {
                        // Redirect to the page
                        requestCycle.redirectTo(page);
                }
                else
                {
                        // Let page render itself
                        page.renderPage();
                }
        }

to redirect to a "new" version of the page and as the request arrives
over HTTPS then you get redirected to the page, showing validation
errors, but over "https". I don't see yet how to switch it to HTTP.

Regards,

Ernesto


On Mon, Oct 25, 2010 at 8:58 AM, sonxurxo <sonxu...@gmail.com> wrote:
>
> Hi all.
> I've been dealing with this and I don't have a working solution yet. The
> problem that my previously posted solution had is that when the form
> validation fails, it falls into an infinite redirect loop.
> Playing with my custom HttpsRequestCycleProcessor all I have achieved is to
> make it redirect to the right page, but "in its HTTPS version", when it
> should be HTTP (remember, HTTPS form embedded in a HTTP page). Or if I point
> my custom HttpsRequestCycleProcessor to redirect it to the HTTP version, it
> falls in that infinite redirect cycle or it loose the form data.
> Any hint? Any idea? How could I override checkSecureIncoming and
> checkSecureOutgoing methods to be aware of those situations? Thank you in
> advance
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/SSL-Links-and-buttons-tp3001634p3009814.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
>
>

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

Reply via email to