Re: HTTPS to HTTP invalidates Session

2016-01-12 Thread Martin Grigorov
On Wed, Jan 13, 2016 at 2:48 AM, Arjun Dhar  wrote:

> Thanks for the reply Martin.
>
> Notes:
> 1. Encoding JSESSIONID in the URL, did not fix the issue for me. Though,
> I'll explore this more, maybe something in my environment preventing the
> JSESSIONID from URL determining the session.
>
> 2. Question >> Got the code for HTTPS and  redirect to pages that need to
> be
> secured over HTTPS (though opposite usecase for this thread). Though , I've
> wondered why the extra effort when in web.xml one can mark URL patterns as
> Secured and even setup Apache rewrite rules to do the same with more ease.
> Any particular reason the Wicket developers thought it necessary to provide
> this?
>

No idea.
I have never used any of those in my applications.


>
> thanks a ton.
>
> -
> Software documentation is like sex: when it is good, it is very, very
> good; and when it is bad, it is still better than nothing!
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/HTTPS-to-HTTP-results-in-PageExpiredException-tp4673262p4673280.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
>
>


Access log & CryptoMapper

2016-01-12 Thread Rakesh A
Hi,

Without CryptoMapper enabled, we can check URLs accessed and their HTTP
status in access logs of tomcat or any other server. But if we enable
CryptoMapper, access logs will have encrypted URLs in server access logs,
and would be difficult to identify which URL resulted a break.

Is there any possibility to have logging (with plain URLs) similar to access
log with CryptoMapper enabled?

To be more exact, with our situation. We've our error handling done in
RequestCycleListener#onException(), method, is there any possibility to log
decypted URL from here, which we can use to track the issue.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Access-log-CryptoMapper-tp4673267.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



Conflicting warnings about location of wicket.properties in Wicket 7

2016-01-12 Thread jchappelle
I have a dashboard library that we use at our company. It has an Initializer.
The wicket.properties file is stored in the same package as the rest of the
code, not in a META-INF folder. After upgrading to Wicket 7 I started
noticing the following warning:

//wicket.properties location is deprecated. Please move the file to
/META-INF/wicket/ folder and give it a name that matches your packages'
name, e.g. com.example.myapp.properties/

So I thought, no problem, I'll just follow the instructions in the well
written message and move the properties file and rename it. I renamed the
file to com.redi.wicket.dashboard.properties and moved it to META-INF/wicket
folder. Now I get the following warning:

//META-INF/wicket/*.properties doesn't work in OSGi and single-jar
environments and is not supported anymore! Please see
https://issues.apache.org/jira/browse/WICKET-5997 for more details and
report an issue for the library that still uses it./

I looked at WICKET-5997, WICKET-6030 AND WICKET-5713 and tried to piece
together what I was supposed to do.

I've noticed in the Application class there are deprecated methods regarding
this and one, collectWicketProperties, that will be removed in 7.3.0. So I'd
like to get this fixed while it is fresh on my mind and not have it bite me
down the road when I upgrade.

So where do I put my initializer properties file and what do I name it?

Thanks




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conflicting-warnings-about-location-of-wicket-properties-in-Wicket-7-tp4673269.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: Checking/Dechecking a checkbox multiple choice

2016-01-12 Thread Martin Grigorov
https://sirsaula.wordpress.com/2016/01/11/wicket-using-checkboxmultiplechoice/

I guess this means you managed to make it working for your application!
Good!

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

On Mon, Jan 11, 2016 at 10:12 PM, Martin Grigorov 
wrote:

>
> JobAdvStates state1 = new JobAdvStates();
> JobAdvStates state2 = new JobAdvStates();
> JobAdvStates state3 = new JobAdvStates();
>
> List selected = new ArrayList<>();
> selected.add(state1);
> selected.add(state3);
> ListModel model = new ListModel(selected);
>
>
> List allPossible = new ArrayList<>();
> allPossible.add(state1);
> allPossible.add(state2);
> allPossible.add(state3);
>
> new CheckBoxMultipleChoice(id, model, allPossible)
>
>
> Make sure JobAdvStates has good impl of #equals()
>
> On Mon, Jan 11, 2016 at 9:24 PM, smoothe19 
> wrote:
>
>> Can you display an example?
>>
>>  I essentially want to be able to have some of the checkboxes checked
>> (based
>> on a boolean in database) when displayed on the screne
>> 
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Checking-Dechecking-a-checkbox-multiple-choice-tp4673251p4673257.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: Conflicting warnings about location of wicket.properties in Wicket 7

2016-01-12 Thread jchappelle
I'm adding my own answer in hopes that it helps someone in the future. 

I figured it out by looking at the code for org.apache.wicket.Application.
Here the developers mention that you should use the ServiceLoader class for
Initializers. https://issues.apache.org/jira/browse/WICKET-5997. I noticed
the Application.initInitializers method and saw the ServiceLoader class they
were talking about.

So I read up on the java.util.ServiceLoader class and it states the
following:

A service provider is identified by placing a provider-configuration file in
the resource directory META-INF/services. The file's name is the
fully-qualified binary name of the service's type. The file contains a list
of fully-qualified binary names of concrete provider classes, one per line.

So I created a META-INF/services folder and put a text file named
org.apache.wicket.IInitializer and inside the file I put the fully qualified
class name of my IInitializer implementation.

The warning went away and my Initializer was called on application startup
which is exactly what I wanted.

NOTE: If you are migrating from using wicket.properties make sure to take
out the "initializer=" part of the file. The new way is not a properties
file so it doesn't have key value pairs. It only has fully qualified class
names separated by new lines. See the java.util.ServiceLocator documentation
if you need more details.

Also if you are using maven, the META-INF/services folder will go in
src/main/resources.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conflicting-warnings-about-location-of-wicket-properties-in-Wicket-7-tp4673269p4673270.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: HTTPS to HTTP invalidates Session

2016-01-12 Thread Arjun Dhar
Thanks for the reply Martin.

Notes:
1. Encoding JSESSIONID in the URL, did not fix the issue for me. Though,
I'll explore this more, maybe something in my environment preventing the
JSESSIONID from URL determining the session.

2. Question >> Got the code for HTTPS and  redirect to pages that need to be
secured over HTTPS (though opposite usecase for this thread). Though , I've
wondered why the extra effort when in web.xml one can mark URL patterns as
Secured and even setup Apache rewrite rules to do the same with more ease.
Any particular reason the Wicket developers thought it necessary to provide
this?

thanks a ton.

-
Software documentation is like sex: when it is good, it is very, very good; and 
when it is bad, it is still better than nothing!
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/HTTPS-to-HTTP-results-in-PageExpiredException-tp4673262p4673280.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: Exception handling in AutoCompleteTextField

2016-01-12 Thread Rakesh A
Hi,

After looking into ajax code a bit, I see that 'Ajax-Location' header is not
considered for autocomplete response.
I created a PR (https://github.com/apache/wicket/pull/156) with a small
change to ajax JavaScript.

Regards,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-handling-in-AutoCompleteTextField-tp4673192p4673272.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: Conflicting warnings about location of wicket.properties in Wicket 7

2016-01-12 Thread Martin Grigorov
Hi,

Sorry for the misleading first warning messages!
We have to change them to mention /META-INF/services/... directly.

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

On Tue, Jan 12, 2016 at 4:40 PM, jchappelle  wrote:

> I'm adding my own answer in hopes that it helps someone in the future.
>
> I figured it out by looking at the code for org.apache.wicket.Application.
> Here the developers mention that you should use the ServiceLoader class for
> Initializers. https://issues.apache.org/jira/browse/WICKET-5997. I noticed
> the Application.initInitializers method and saw the ServiceLoader class
> they
> were talking about.
>
> So I read up on the java.util.ServiceLoader class and it states the
> following:
>
> A service provider is identified by placing a provider-configuration file
> in
> the resource directory META-INF/services. The file's name is the
> fully-qualified binary name of the service's type. The file contains a list
> of fully-qualified binary names of concrete provider classes, one per line.
>
> So I created a META-INF/services folder and put a text file named
> org.apache.wicket.IInitializer and inside the file I put the fully
> qualified
> class name of my IInitializer implementation.
>
> The warning went away and my Initializer was called on application startup
> which is exactly what I wanted.
>
> NOTE: If you are migrating from using wicket.properties make sure to take
> out the "initializer=" part of the file. The new way is not a properties
> file so it doesn't have key value pairs. It only has fully qualified class
> names separated by new lines. See the java.util.ServiceLocator
> documentation
> if you need more details.
>
> Also if you are using maven, the META-INF/services folder will go in
> src/main/resources.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Conflicting-warnings-about-location-of-wicket-properties-in-Wicket-7-tp4673269p4673270.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: Conflicting warnings about location of wicket.properties in Wicket 7

2016-01-12 Thread jchappelle
Thank you Martin!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Conflicting-warnings-about-location-of-wicket-properties-in-Wicket-7-tp4673269p4673277.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: Checking/Dechecking a checkbox multiple choice

2016-01-12 Thread smoothe19
Yes I ended up having to do the below.. basically where i initialize the
variables for storing the values selected pre-select some based on if it was
already toggled in the database


private ArrayList evDecisionsSelect;
private ArrayList mpDecisionsSelect;

evDecisionsSelect = new ArrayList(
evSelectors);
mpDecisionsSelect = new ArrayList(mpSelectors);

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Checking-Dechecking-a-checkbox-multiple-choice-tp4673251p4673278.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