I think it would be better to figure this out server-side. Look at the request 
to see if it’s HTTPS, but allow override with a parameter to the mixin.

        /**
         * Set secure to true if https is being used, else set to false. If not 
provided then we set it to the value of
         * Request.isSecure().
         */
        @Parameter(name = "secure", defaultPrefix = BindingConstants.LITERAL)
        private Boolean secure;

        @Inject
        private Request request;

        void afterRender() {

                boolean useHttps = false;

                if (secure == null) {
                        useHttps = request.isSecure();
                }
                else {
                        useHttps = secure;
                }

                String listenerURI = componentResources.createEventLink(event, 
context).toAbsoluteURI(useHttps);

                                …

I’ll update JumpStart soon to do the same.

Geoff

> On 10 Mar 2016, at 2:33 AM, h3ph3st0s <h3ph3s...@gmail.com> wrote:
> 
> Hi!
> 
> In the ZoneUpdate.js I have is it ok that I inserted after this line of code :
> var listenerURIWithValue = this.listenerURI;
> 
> the following :
> listenerURIWithValue=listenerURIWithValue.replace("http","https");
> 
> 
> I mean, using 5.3 and Tapestry (not JQuery ) is this the right approach or is 
> there some other flag that I should switch on in tapestry configuration ?
> 
> If I don't do that ajax call gives "Access Denied" leading to failure on 
> using the form.
> 
> Kind regards,
> Dimitris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

Reply via email to