Re: How to suppress WicketSerializationException using ListView

2012-03-05 Thread vineet semwal
use loadabledetachablemodel and it should load a list of your
unserialiable entities that will poupulate your listview



On Mon, Mar 5, 2012 at 3:39 PM, Behrooz Nobakht  wrote:
> Hello,
>
> I'm using a ListView<*S*> in which S is not "serializable" but it is not
> either kept in the page data structure. So, every time the page is
> rendered, I fetch a list of *S* and then construct the ListView. Even in
> this point, I am not really sure if this assumption is correct but I am
> assuming that since no data is kept at the page component level, so there
> is not need for *S* to be serializable. However, I get the following
> exception in which *T extends S*:
>
> 2012-03-05 10:48:55,002 ERROR [http-8080-6] Error serializing object class
> com.my.MyPage [object=[Page class = com.my.MyPage, id = 7, render count =
> 1]] (JavaSerializer.java:94)
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class: com.my.T
> Field hierarchy is:
>  7 [class=com.my.MyPage, path=7]
>    private java.lang.Object org.apache.wicket.MarkupContainer.children
> [class=[Ljava.lang.Object;]
>      java.lang.Object org.apache.wicket.Component.data[9]
> [class=com.my.MyPage$MyListView, path=7:serviceInstances]
>        java.lang.Object org.apache.wicket.Component.data
> [class=org.apache.wicket.model.util.WildcardListModel]
>          private java.lang.Object
> org.apache.wicket.model.util.GenericBaseModel.object
> [class=java.util.ArrayList]
>            private java.lang.Object
> org.apache.wicket.model.util.GenericBaseModel.object[write:1] [class=*
> com.my.T*] *<- field that is not serializable*
>    at
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:386)
>    at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
>    at
> org.apache.wicket.util.io.SerializableChecker.access$500(SerializableChecker.java:65)
>    at
> org.apache.wicket.util.io.SerializableChecker$1InterceptingObjectOutputStream.replaceObject(SerializableChecker.java:525)
>    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1140)
>    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
>    at java.util.ArrayList.writeObject(ArrayList.java:710)
>    at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
>    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>    at java.lang.reflect.Method.invoke(Method.java:601)
>    at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:962)
>    at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
>    at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
>    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
>    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
>    at
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:532)
>    at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
>    at
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:646)
>    at
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:569)
>    at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
>    at
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:646)
>    at
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:569)
>    at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
>    at
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:431)
>    at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
>    at
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:646)
>    at
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:569)
>    at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
>    at
> org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:715)
>    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
>    at
> org.apache.wicket.serialize.java.JavaSerializer$CheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:258)
>    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
>    at
> org.apache.wicket.serialize.java.JavaSerializer.serialize(JavaSerializer.java:77)
>    at
> org.apache.wicket.pageStore.DefaultPageStore.serializePage(DefaultPageStore.java:368)
>    at
> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:146)
>    at
> org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:383)
>    at
> org.apache.wicket.page.RequestAdapte

Re: How to suppress WicketSerializationException using ListView

2012-03-05 Thread Behrooz Nobakht
Thanks, solved the problem.

On Mon, Mar 5, 2012 at 11:14 AM, vineet semwal
wrote:

> use loadabledetachablemodel and it should load a list of your
> unserialiable entities that will poupulate your listview
>
>
>
> On Mon, Mar 5, 2012 at 3:39 PM, Behrooz Nobakht  wrote:
> > Hello,
> >
> > I'm using a ListView<*S*> in which S is not "serializable" but it is not
> > either kept in the page data structure. So, every time the page is
> > rendered, I fetch a list of *S* and then construct the ListView. Even in
> > this point, I am not really sure if this assumption is correct but I am
> > assuming that since no data is kept at the page component level, so there
> > is not need for *S* to be serializable. However, I get the following
> > exception in which *T extends S*:
> >
> > 2012-03-05 10:48:55,002 ERROR [http-8080-6] Error serializing object
> class
> > com.my.MyPage [object=[Page class = com.my.MyPage, id = 7, render count =
> > 1]] (JavaSerializer.java:94)
> >
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> > Unable to serialize class: com.my.T
> > Field hierarchy is:
> >  7 [class=com.my.MyPage, path=7]
> >private java.lang.Object org.apache.wicket.MarkupContainer.children
> > [class=[Ljava.lang.Object;]
> >  java.lang.Object org.apache.wicket.Component.data[9]
> > [class=com.my.MyPage$MyListView, path=7:serviceInstances]
> >java.lang.Object org.apache.wicket.Component.data
> > [class=org.apache.wicket.model.util.WildcardListModel]
> >  private java.lang.Object
> > org.apache.wicket.model.util.GenericBaseModel.object
> > [class=java.util.ArrayList]
> >private java.lang.Object
> > org.apache.wicket.model.util.GenericBaseModel.object[write:1] [class=*
> > com.my.T*] *<- field that is not serializable*
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:386)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.access$500(SerializableChecker.java:65)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker$1InterceptingObjectOutputStream.replaceObject(SerializableChecker.java:525)
> >at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1140)
> >at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
> >at java.util.ArrayList.writeObject(ArrayList.java:710)
> >at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
> >at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >at java.lang.reflect.Method.invoke(Method.java:601)
> >at
> > java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:962)
> >at
> > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
> >at
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
> >at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
> >at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:532)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:646)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:569)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:646)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:569)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:431)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:646)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.internalCheck(SerializableChecker.java:569)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:365)
> >at
> >
> org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:715)
> >at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
> >at
> >
> org.apache.wicket.serialize.java.JavaSerializer$CheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:258)
> >at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
> >at
> >
> org.apache.wicket.serialize.java.JavaSerializer.serialize(JavaSerializer.java:77)
> >at
> >
> org.apache.wicket.pag

Re: Eclipse, Wicket 1.5 and Jrebel

2012-03-05 Thread Jürgen Lind

Hi Christoph, maybe I was a bit too quick in assuming that Jrebel was the 
culprit...
I went back to 1.5.3 an since then, the problem has disappeared. Let's hope it 
stays
that way... Thank you again for the hint.

J.

On 04.03.2012 11:46, Jürgen Lind wrote:


Thanks for the hint, but I do not think that this is the problem. The
resource (HTML file) is locked in the classes directory that is monitored
by jRebel and not in the directory where the WAR-File is located. Anyway, I
will be looking into that...

J.



On 04.03.2012 11:31, Christoph Leiter wrote:

Hi,

do you use 1.5.4 with package resources? There's a bug that causes
locked resources:
https://issues.apache.org/jira/browse/WICKET-4359

Until 1.5.5 is released you can use 1.5.3, which is not affected by this
bug.


Christoph


On 04.03.2012 10:29, Jürgen Lind wrote:

Hi,

I was just wondering if anybody is using the above combination. Since
upgrading to 1.5. I have massive problems in reloading changed HTML
templates as Eclipse sometimes tries to do a full build because of a
locked resource. I am also in contact with the Jrebel guys, I just wanted
to know if somebody else has a similar problem.

J.



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




Mit freundlichen Grüßen,

Jürgen Lind




--
Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



Re: Eclipse, Wicket 1.5 and Jrebel

2012-03-05 Thread Martin Grigorov
Hi Juergen,

You may also test with 1.5-SNAPSHOT to verify that 1.5.5 will work.
Just add this repo temporarily to your pom.xml:



Apache Nexus

https://repository.apache.org/content/repositories/snapshots/

false


true





On Mon, Mar 5, 2012 at 2:16 PM, Jürgen Lind  wrote:
> Hi Christoph, maybe I was a bit too quick in assuming that Jrebel was the
> culprit...
> I went back to 1.5.3 an since then, the problem has disappeared. Let's hope
> it stays
> that way... Thank you again for the hint.
>
> J.
>
>
> On 04.03.2012 11:46, Jürgen Lind wrote:
>>
>>
>> Thanks for the hint, but I do not think that this is the problem. The
>> resource (HTML file) is locked in the classes directory that is monitored
>> by jRebel and not in the directory where the WAR-File is located. Anyway,
>> I
>> will be looking into that...
>>
>> J.
>>
>>
>>
>> On 04.03.2012 11:31, Christoph Leiter wrote:
>>>
>>> Hi,
>>>
>>> do you use 1.5.4 with package resources? There's a bug that causes
>>> locked resources:
>>> https://issues.apache.org/jira/browse/WICKET-4359
>>>
>>> Until 1.5.5 is released you can use 1.5.3, which is not affected by this
>>> bug.
>>>
>>>
>>> Christoph
>>>
>>>
>>> On 04.03.2012 10:29, Jürgen Lind wrote:

 Hi,

 I was just wondering if anybody is using the above combination. Since
 upgrading to 1.5. I have massive problems in reloading changed HTML
 templates as Eclipse sometimes tries to do a full build because of a
 locked resource. I am also in contact with the Jrebel guys, I just
 wanted
 to know if somebody else has a similar problem.

 J.

>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>>
>> Mit freundlichen Grüßen,
>>
>> Jürgen Lind
>>
>
>
> --
> Mit freundlichen Grüßen,
>
> Jürgen Lind
>
> --
> Dr. Jürgen Lind
> iteratec GmbH                Fon: +49 (0)89 614551-44
> Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
> 82008 Unterhaching           Web: www.iteratec.de
>
> Sitz und Registergericht der iteratec GmbH: München HRB 113 519
> Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
>
> -
> 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

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



wiQuery and ivy

2012-03-05 Thread Dirk Forchel
I've a qestion regarding ivy and wiQuery. 
I'd like to use the wiQuery jars (wiquery-core and wiquery-jquery-ui) in the
same way I do with all the Wicket libraries. For example, a configuration
dependency for the Wicket core library in my project ivy.xml is written
like:



This means, ivy is looking for the wicket-core jar in the defined
repositories and downloads the sources jar as well. 
In order to download the wiQuery libs, I've added a URL resolver within my
global ivysettings.xml:



And in my ivy.xml I've added the following lines of code:



This works fine. But I can't download the sources jar, although the sources
jar can be found on the wiquery respository
(https://wiquery.googlecode.com/svn/repo/org/odlabs/wiquery/wiquery-core/1.5.4/)
too. What I miss is the dependency configuration for sources in the pom.xml. 
Can this be added from one of the projects member? Or exists another way to
download the sources jar with ivy?
Thank you.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wiQuery-and-ivy-tp4446057p4446057.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: Eclipse, Wicket 1.5 and Jrebel

2012-03-05 Thread Jürgen Lind

That would imply that I use Maven for my build process - which I don't ;-) Is 
there a plcae
where I can download the entire bundle so that I can give it a try? or doe I 
have to download
the jars separately?


J.


On 05.03.2012 13:40, Martin Grigorov wrote:

Hi Juergen,

You may also test with 1.5-SNAPSHOT to verify that 1.5.5 will work.
Just add this repo temporarily to your pom.xml:



Apache Nexus

https://repository.apache.org/content/repositories/snapshots/

false


true





On Mon, Mar 5, 2012 at 2:16 PM, Jürgen Lind  wrote:

Hi Christoph, maybe I was a bit too quick in assuming that Jrebel was the
culprit...
I went back to 1.5.3 an since then, the problem has disappeared. Let's hope
it stays
that way... Thank you again for the hint.

J.


On 04.03.2012 11:46, Jürgen Lind wrote:



Thanks for the hint, but I do not think that this is the problem. The
resource (HTML file) is locked in the classes directory that is monitored
by jRebel and not in the directory where the WAR-File is located. Anyway,
I
will be looking into that...

J.



On 04.03.2012 11:31, Christoph Leiter wrote:


Hi,

do you use 1.5.4 with package resources? There's a bug that causes
locked resources:
https://issues.apache.org/jira/browse/WICKET-4359

Until 1.5.5 is released you can use 1.5.3, which is not affected by this
bug.


Christoph


On 04.03.2012 10:29, Jürgen Lind wrote:


Hi,

I was just wondering if anybody is using the above combination. Since
upgrading to 1.5. I have massive problems in reloading changed HTML
templates as Eclipse sometimes tries to do a full build because of a
locked resource. I am also in contact with the Jrebel guys, I just
wanted
to know if somebody else has a similar problem.

J.



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




Mit freundlichen Grüßen,

Jürgen Lind




--
Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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








--
Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbHFon: +49 (0)89 614551-44
Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
82008 Unterhaching   Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

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



Re: Eclipse, Wicket 1.5 and Jrebel

2012-03-05 Thread Martin Grigorov
On Mon, Mar 5, 2012 at 3:11 PM, Jürgen Lind  wrote:
> That would imply that I use Maven for my build process - which I don't ;-)
> Is there a plcae
> where I can download the entire bundle so that I can give it a try? or doe I
> have to download
> the jars separately?

Separately.
The bundle is created at release time.

>
>
> J.
>
>
>
> On 05.03.2012 13:40, Martin Grigorov wrote:
>>
>> Hi Juergen,
>>
>> You may also test with 1.5-SNAPSHOT to verify that 1.5.5 will work.
>> Just add this repo temporarily to your pom.xml:
>>
>> 
>>                
>>                        Apache Nexus
>>
>>  https://repository.apache.org/content/repositories/snapshots/
>>                        
>>                                false
>>                        
>>                        
>>                                true
>>                        
>>                
>>        
>>
>>
>> On Mon, Mar 5, 2012 at 2:16 PM, Jürgen Lind
>>  wrote:
>>>
>>> Hi Christoph, maybe I was a bit too quick in assuming that Jrebel was the
>>> culprit...
>>> I went back to 1.5.3 an since then, the problem has disappeared. Let's
>>> hope
>>> it stays
>>> that way... Thank you again for the hint.
>>>
>>> J.
>>>
>>>
>>> On 04.03.2012 11:46, Jürgen Lind wrote:



 Thanks for the hint, but I do not think that this is the problem. The
 resource (HTML file) is locked in the classes directory that is
 monitored
 by jRebel and not in the directory where the WAR-File is located.
 Anyway,
 I
 will be looking into that...

 J.



 On 04.03.2012 11:31, Christoph Leiter wrote:
>
>
> Hi,
>
> do you use 1.5.4 with package resources? There's a bug that causes
> locked resources:
> https://issues.apache.org/jira/browse/WICKET-4359
>
> Until 1.5.5 is released you can use 1.5.3, which is not affected by
> this
> bug.
>
>
> Christoph
>
>
> On 04.03.2012 10:29, Jürgen Lind wrote:
>>
>>
>> Hi,
>>
>> I was just wondering if anybody is using the above combination. Since
>> upgrading to 1.5. I have massive problems in reloading changed HTML
>> templates as Eclipse sometimes tries to do a full build because of a
>> locked resource. I am also in contact with the Jrebel guys, I just
>> wanted
>> to know if somebody else has a similar problem.
>>
>> J.
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>


 Mit freundlichen Grüßen,

 Jürgen Lind

>>>
>>>
>>> --
>>> Mit freundlichen Grüßen,
>>>
>>> Jürgen Lind
>>>
>>> --
>>> Dr. Jürgen Lind
>>> iteratec GmbH                Fon: +49 (0)89 614551-44
>>> Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
>>> 82008 Unterhaching           Web: www.iteratec.de
>>>
>>> Sitz und Registergericht der iteratec GmbH: München HRB 113 519
>>> Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>>
>>
>
>
> --
> Mit freundlichen Grüßen,
>
> Jürgen Lind
>
> --
> Dr. Jürgen Lind
> iteratec GmbH                Fon: +49 (0)89 614551-44
> Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
> 82008 Unterhaching           Web: www.iteratec.de
>
> Sitz und Registergericht der iteratec GmbH: München HRB 113 519
> Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
>
> -
> 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

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



wicket wizard init

2012-03-05 Thread Gytis
hello, I have such a problem
I develop wizard in which user enters some values in first step fields, then
I need to use those values in a second step in a text. looks like this:

userModel = new CompoundPropertyModel(this);
setDefaultModel(userModel);
WizardModel model = new WizardModel();

model.add(new Step1());
model.add(new Step2());

init();

Step1(){
super("summary","title");

TextField name = new TextField("user.name");
TextField surname = new TextField("user.surname");

Form f1 = new Form("f1");
f1.add(name);
f1.add(surname);
}

Step2(){
super("summary2", "title2");

agreementText = getAgreementText();
Label textArea = new Label("text", agreementText);
textArea.setEscapeModelStrings(false);

Form f2= new Form("f2");
f2.add(textArea);
}

 private String getAgreementText() {
getTextFromDataBase();
replace(#clientName, userModel.bind("user.name");
replace(#clientSurname, userModel.bind("user.surname");
}

So, as you can see, I cannot get text anywhere else, but DB, and have to
insert those values from first step to this text, but I get NullPointer
Exception, because wizard sets all values before rendering first step.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-wizard-init-tp4446076p4446076.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: 404 on resource

2012-03-05 Thread Douglas Ferguson
How does wicket 1.5 reference resources that are inside the class path from the 
browser? 


Douglas


On Mar 5, 2012, at 1:55 AM, Martin Grigorov wrote:

> Hi,
> 
> On Mon, Mar 5, 2012 at 6:05 AM, Douglas Ferguson  wrote:
>> Does wicket 1.5 still use the resource urls?
>> 
>> I'm getting a 404 on this
>> 
>> resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator.gif
> 
> This url is generated by Wicket 1.4.x. AFAIK you upgrade your app to
> 1.5 where this URL is not handled by Wicket and thus no one knows how
> to process it.
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.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



Re: 404 on resource

2012-03-05 Thread Martin Grigorov
On Mon, Mar 5, 2012 at 4:50 PM, Douglas Ferguson  wrote:
> How does wicket 1.5 reference resources that are inside the class path from 
> the browser?

The url looks like: /wicket/resource/com.example.MyPage/myResource.css

>
>
> Douglas
>
>
> On Mar 5, 2012, at 1:55 AM, Martin Grigorov wrote:
>
>> Hi,
>>
>> On Mon, Mar 5, 2012 at 6:05 AM, Douglas Ferguson  wrote:
>>> Does wicket 1.5 still use the resource urls?
>>>
>>> I'm getting a 404 on this
>>>
>>> resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator.gif
>>
>> This url is generated by Wicket 1.4.x. AFAIK you upgrade your app to
>> 1.5 where this URL is not handled by Wicket and thus no one knows how
>> to process it.
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Using IndicatingAjaxLink to export CSV data - is it the 'Wicket Way'?

2012-03-05 Thread Robert Szmurlo

Hello everyone,
this my first post to the list, so I would like to give many thanks to the 
authors and all contributors to the great Apache Wicket project. We silently 
develop a medium sized application for over two years (at the Warsaw University 
of Technology), and usually we have resolved all issues by searching answers on 
this users group or by googling them. This time I would ask you for 
consultation.

My goal is to provide a download link for CSV data which will be generated 
dynamically and during the time consuming generation I would like to show a 
user an indicator. Like the one the IndicatingAjaxLink class do.

My questions are:

1) Is the following source code created the 'wicket way' or I am breaking 
somewhere else opened door?
The 'trick' I have employed, that I am not sure of, is the redirection to the 
AbstractDefaultAjaxBehaviour in the onClick method of the IndicatingAjaxLink.

2) The problem with this code is that, when I click the download link the 
second time the indicator is not revolving. It is being displayed correctly, 
and hidden on time, and the CSV data is exported correctly. The problem is that 
the indicator is not moving.

Thank you for you assitance in advance,
Robert Szmurlo

Java:

public class HomePage extends WebPage {

private AbstractDefaultAjaxBehavior b;
private String data = null;

public HomePage(final PageParameters parameters) {

final ByteArrayResource bar = new ByteArrayResource("text/csv") {
@Override
public byte[] getData(Attributes attributes) {
byte[] bytes = null;
try {
bytes = data.getBytes();
} catch (Exception e) {
e.printStackTrace();
}
return bytes;
}

@Override
protected void configureResponse(ResourceResponse 
response,Attributes attributes) {
super.configureResponse(response, attributes);
response.setFileName("report.csv");
}

};

add( b = new AbstractDefaultAjaxBehavior() {
@Override
protected void respond(AjaxRequestTarget target) {
getRequestCycle().scheduleRequestHandlerAfterCurrent(new 
ResourceRequestHandler(bar, getPageParameters()));
}
});

add( new IndicatingAjaxLink("link") {
@Override
public void onClick(AjaxRequestTarget target) {

prepareData(); // takes some time

if (target != null) {
*target.appendJavaScript("window.location='" + b.getCallbackUrl() + "'");*
}
}
});
}

protected void prepareData() {
// JUST FOR TEST
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
/

// atach data?
data = "No.;Name\n" +
   "1.;John\n" +
   "2.;Mary";
}
}


HTML:


Export CSV





Re: Using IndicatingAjaxLink to export CSV data - is it the 'Wicket Way'?

2012-03-05 Thread Martin Grigorov
Hi,

I'm not sure that this really works.
With your code the Ajax request will end with .csv response, not with
. The indicator may disappear but the .csv data wont be
presented to the user/browser. It will be swallowed in the ajax
response.

I think you need
https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html

On Mon, Mar 5, 2012 at 5:13 PM, Robert Szmurlo  wrote:
> Hello everyone,
> this my first post to the list, so I would like to give many thanks to the
> authors and all contributors to the great Apache Wicket project. We silently
> develop a medium sized application for over two years (at the Warsaw
> University of Technology), and usually we have resolved all issues by
> searching answers on this users group or by googling them. This time I would
> ask you for consultation.
>
> My goal is to provide a download link for CSV data which will be generated
> dynamically and during the time consuming generation I would like to show a
> user an indicator. Like the one the IndicatingAjaxLink class do.
>
> My questions are:
>
> 1) Is the following source code created the 'wicket way' or I am breaking
> somewhere else opened door?
> The 'trick' I have employed, that I am not sure of, is the redirection to
> the AbstractDefaultAjaxBehaviour in the onClick method of the
> IndicatingAjaxLink.
>
> 2) The problem with this code is that, when I click the download link the
> second time the indicator is not revolving. It is being displayed correctly,
> and hidden on time, and the CSV data is exported correctly. The problem is
> that the indicator is not moving.
>
> Thank you for you assitance in advance,
> Robert Szmurlo
>
> Java:
>
> public class HomePage extends WebPage {
>
>    private AbstractDefaultAjaxBehavior b;
>    private String data = null;
>
>    public HomePage(final PageParameters parameters) {
>
>        final ByteArrayResource bar = new ByteArrayResource("text/csv") {
>            @Override
>            public byte[] getData(Attributes attributes) {
>                byte[] bytes = null;
>                try {
>                    bytes = data.getBytes();
>                } catch (Exception e) {
>                    e.printStackTrace();
>                }
>                return bytes;
>            }
>
>            @Override
>            protected void configureResponse(ResourceResponse
> response,Attributes attributes) {
>                super.configureResponse(response, attributes);
>                response.setFileName("report.csv");
>            }
>
>        };
>
>        add( b = new AbstractDefaultAjaxBehavior() {
>            @Override
>            protected void respond(AjaxRequestTarget target) {
>                getRequestCycle().scheduleRequestHandlerAfterCurrent(new
> ResourceRequestHandler(bar, getPageParameters()));
>            }
>        });
>
>        add( new IndicatingAjaxLink("link") {
>            @Override
>            public void onClick(AjaxRequestTarget target) {
>
>                prepareData(); // takes some time
>
>                if (target != null) {
> *target.appendJavaScript("window.location='" + b.getCallbackUrl() + "'");*
>                }
>            }
>        });
>    }
>
>    protected void prepareData() {
>        // JUST FOR TEST
>        try {
>            Thread.sleep(2000);
>        } catch (InterruptedException e) {
>            e.printStackTrace();
>        }
>        /
>
>        // atach data?
>        data = "No.;Name\n" +
>               "1.;John\n" +
>               "2.;Mary";
>    }
> }
>
>
> HTML:
> 
> 
> Export CSV
> 
> 
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Using IndicatingAjaxLink to export CSV data - is it the 'Wicket Way'?

2012-03-05 Thread Robert Szmurlo

Thank you for a super fast response. As far as I can see Meier, Barreiro and 
Deu-Pons applied the same approach
but in a more professional way.

They do:

String  url = getCallbackUrl().toString();
(...)
// the timeout is needed to let Wicket release the channel
target.appendJavaScript("setTimeout(\"window.location.href='" + url +"'\", 
100);");

And I simply do:

 target.appendJavaScript("window.location='" + b.getCallbackUrl() + "'");

They have also set the content disposition to the resource handler:

 handler.setContentDisposition(ContentDisposition.ATTACHMENT);

Anyway, thank you for your answer, the link you have attached: 
https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html
is the answer I was looking for.

Robert



W dniu 2012-03-05 16:26, Martin Grigorov pisze:

Hi,

I'm not sure that this really works.
With your code the Ajax request will end with .csv response, not with
. The indicator may disappear but the .csv data wont be
presented to the user/browser. It will be swallowed in the ajax
response.

I think you need
https://cwiki.apache.org/WICKET/ajax-update-and-file-download-in-one-blow.html

On Mon, Mar 5, 2012 at 5:13 PM, Robert Szmurlo  wrote:

Hello everyone,
this my first post to the list, so I would like to give many thanks to the
authors and all contributors to the great Apache Wicket project. We silently
develop a medium sized application for over two years (at the Warsaw
University of Technology), and usually we have resolved all issues by
searching answers on this users group or by googling them. This time I would
ask you for consultation.

My goal is to provide a download link for CSV data which will be generated
dynamically and during the time consuming generation I would like to show a
user an indicator. Like the one the IndicatingAjaxLink class do.

My questions are:

1) Is the following source code created the 'wicket way' or I am breaking
somewhere else opened door?
The 'trick' I have employed, that I am not sure of, is the redirection to
the AbstractDefaultAjaxBehaviour in the onClick method of the
IndicatingAjaxLink.

2) The problem with this code is that, when I click the download link the
second time the indicator is not revolving. It is being displayed correctly,
and hidden on time, and the CSV data is exported correctly. The problem is
that the indicator is not moving.

Thank you for you assitance in advance,
Robert Szmurlo

Java:

public class HomePage extends WebPage {

private AbstractDefaultAjaxBehavior b;
private String data = null;

public HomePage(final PageParameters parameters) {

final ByteArrayResource bar = new ByteArrayResource("text/csv") {
@Override
public byte[] getData(Attributes attributes) {
byte[] bytes = null;
try {
bytes = data.getBytes();
} catch (Exception e) {
e.printStackTrace();
}
return bytes;
}

@Override
protected void configureResponse(ResourceResponse
response,Attributes attributes) {
super.configureResponse(response, attributes);
response.setFileName("report.csv");
}

};

add( b = new AbstractDefaultAjaxBehavior() {
@Override
protected void respond(AjaxRequestTarget target) {
getRequestCycle().scheduleRequestHandlerAfterCurrent(new
ResourceRequestHandler(bar, getPageParameters()));
}
});

add( new IndicatingAjaxLink("link") {
@Override
public void onClick(AjaxRequestTarget target) {

prepareData(); // takes some time

if (target != null) {
*target.appendJavaScript("window.location='" + b.getCallbackUrl() + "'");*
}
}
});
}

protected void prepareData() {
// JUST FOR TEST
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
/

// atach data?
data = "No.;Name\n" +
   "1.;John\n" +
   "2.;Mary";
}
}


HTML:


Export CSV









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



Securing Resource in Web Context

2012-03-05 Thread Arjun Dhar
Hi,
not sure if this is even a Wicket question; but drawing on the experience of
the community for thoughts.

Scenario : In the Web context, /resources ;is a folder that is
accessible.
Lets say we manage to secure it at the Apache level not to show a blatant
directory listing, however if a resource is requested by path and that
resource exists you really cant block it using any Auth mechanism using
Tomcat ... can you?

One way, i to create a private folder somewhere and stream the resources via
the App Server; however that puts additional strain on the server and
architecture if you want to access those resources quickly and a lot of
them; specially in a hosted environment where you have a shared instance.
(No VPS and no access to Tomcat say)

Not sure if  there is a bridge between Apache & Tomcat say to secure a Web
folder based on some cookie or jsession ids ?!

..Im thinking of creating a REST API, that encrypts urls and for all secured
components in my Auth Strategy, it will generate URL's that point to a API
and contains an encrypted value of the actual resource. the API decrypts the
token and redirects it to the actual resource.

...Now if someone studies the redirects then they an still get to the
resource, but atleast for the average person they will never be able to
access the resource from the browser by seeing its location.
Now is this worth the effort, .. or is there a way to secure a folder in the 
WAR context by some sophisticated mechanism driven by code but communicated
to Apache. ..since the resources can be directly services by Apache .. am
wondering how that would be possible at all.


Just curious

-
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/Securing-Resource-in-Web-Context-tp4446547p4446547.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: Securing Resource in Web Context

2012-03-05 Thread Arjun Dhar
..Just one more thing. I know this question/thought sounds convoluted and
insane but think about it. We develope elaborate Authentication &
Authorization strategies in our code bases and then to secure things at a
Quasi-Network-App level we have to rely on a parallel system. That too
should be unacceptable,.. and hence Im just exploring any insane idea that
helps unify things under one policy as much as possible and makes
penetration more difficult if not impossible.


-
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/Securing-Resource-in-Web-Context-tp4446547p4446585.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: java.lang.IllegalStateException: Can't call write(CharSequence) after write(byte[]) has been called.

2012-03-05 Thread singh13
Hi, thanks for the reply.

I tried that but unfortunately I still get the same error.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/java-lang-IllegalStateException-Can-t-call-write-CharSequence-after-write-byte-has-been-called-tp4416819p4446728.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



Using Wicket with Adobe Forms (FDF)

2012-03-05 Thread eugenebalt
We are using Wicket with Adobe's FDF (PDF-Forms). 

Some of the forms in our Wicket app are regular Wicket forms, but other
forms (or sub-forms) are FDF, embedded as objects in the HTML.

The way FDF works is that the Submit button in the FDF is hard-coded to
point to some Servlet URL. Then in Java, you would write the supporting
Servlet, which reads the request's binary stream and then uses the FDF API
to parse individual fields.

Is there a way to support FDFs in Wicket? We need a clean URL and also a way
to handle the Get/Post at that URL.

Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-Wicket-with-Adobe-Forms-FDF-tp4446987p4446987.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: wicket wizard init

2012-03-05 Thread Andrea Del Bene

Hi,

which line of your code throws  NullPointerException? can you elaborate 
a little more on the purpose of function getAgreementText() ?

hello, I have such a problem
I develop wizard in which user enters some values in first step fields, then
I need to use those values in a second step in a text. looks like this:

userModel = new CompoundPropertyModel(this);
setDefaultModel(userModel);
WizardModel model = new WizardModel();

model.add(new Step1());
model.add(new Step2());

init();

Step1(){
super("summary","title");

TextField name = new TextField("user.name");
TextField surname = new TextField("user.surname");

Form f1 = new Form("f1");
f1.add(name);
f1.add(surname);
}

Step2(){
super("summary2", "title2");

agreementText = getAgreementText();
Label textArea = new Label("text", agreementText);
textArea.setEscapeModelStrings(false);

Form f2= new Form("f2");
f2.add(textArea);
}

  private String getAgreementText() {
getTextFromDataBase();
replace(#clientName, userModel.bind("user.name");
replace(#clientSurname, userModel.bind("user.surname");
}

So, as you can see, I cannot get text anywhere else, but DB, and have to
insert those values from first step to this text, but I get NullPointer
Exception, because wizard sets all values before rendering first step.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-wizard-init-tp4446076p4446076.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



Re: Using Wicket with Adobe Forms (FDF)

2012-03-05 Thread eugenebalt
I guess what I'm asking is, is there a way to support "regular" Servlet URLs
in Wicket?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-Wicket-with-Adobe-Forms-FDF-tp4446987p4447046.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: Using Wicket with Adobe Forms (FDF)

2012-03-05 Thread Pierre Goupil
You can try a BookmarkablePage.



On Mon, Mar 5, 2012 at 7:27 PM, eugenebalt  wrote:

> I guess what I'm asking is, is there a way to support "regular" Servlet
> URLs
> in Wicket?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Using-Wicket-with-Adobe-Forms-FDF-tp4446987p4447046.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
>
>


-- 
Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
assez fort.


Re: Links with old PageID do not work

2012-03-05 Thread Andre Schütz
Hi,

thank you for the answer. I will test this and reply with my results.

I have three questions depending on the test you have mentioned.

(1)
Can you tell me more about this o.a.w.Page? I did not really find
something about it.

(2)
Can you explain me a little bit more in detail, what I should try
to find out with the breakpoint regarding the 'renderCount'. What 
could be the interesting parts regarding 'renderCount'?

(3)
I have my .html files stored in src/main/html, my .properties files in
src/main/resources and modified my pom.xml with:




false
src/main/resources


src/main/html


false
src/main/java

**


**/*.java





false
src/test/java

**


**/*.java




If I start the jetty server, I get a MarkupNotFoundException. After storing the
.html files to the class files in the src/main/java path, it works and only the
properties files are not found.

Can you tell me, how I have to modify the pom.xml that it will find the .html
and the .properties files in their different paths?

Thank you,
Andre


On Mon, 5 Mar 2012 09:49:38 +0200
Martin Grigorov  wrote:

> Hi,
> 
> It sounds to be related to Page#renderCount.
> 'renderCount' is used to prevent using an obsolete version of a page
> instance. I.e. a page with a given page id counts how many times it
> has been rendered. If you have a tab/window which contains an earlier
> version of that page and you click on it then this click should be
> prevented because it will work with stale data.
> In your description I don't see how this may happen. There is
> something more which is not included in your description.
> I recommend you to put a break point in o.a.w.Page and see why
> 'renderCount' changes and another in PageProvider#getPageInstance() to
> see why the requested 'renderCount' is different than the current one.
> 
> 2012/3/4 Andre Schütz :
> > Hello,
> >
> > i have a question about the behavior of links in two tabs.
> >
> > I have an application that I opened in two tabs. In Tab1, I
> > make a submit from Page1 and get Page2. At the same time,
> > I make a submit in Tab2 from Page1 to Page2. The two pages
> > with the name Page2 in the two tabs display the results of
> > a search, depending on the search word in the respective
> > Page1.
> >
> > Finally, I get the following urls:
> >
> > (1) Tab1 makes a submit from Page1 to Page2, url is:
> > localhost:8080/myapp?2&q=word1
> > (2) Tab2 makesa a submit from Page1 to Page2, url is:
> > localhost:8080/myapp?3&q=word2
> >
> > You can see, that the only difference is the search word
> > in q= and the page id which is 2 for Tab1 and 3 for Tab2.
> >
> > My problem is the following:
> > -
> > I have some filter links (not Bookmarkable) on Page2 which you can use to
> > filter the results. If you click on such a link, the PageParameters will
> > be updated and the value of the link will be added to the PageParameters
> > as additional filter.
> >
> > Theses two scenarios are happening:
> >
> > (a)
> > If I click on a filter Link in Tab1, the link does work like expected.
> > The page will be reloaded and gets a new page ID which is bigger than the
> > ID in Tab2. After this reload of the page, the links work as expected.
> >
> > (b)
> > If I click on a filter Link in Tab2 (which already has a higher page ID than
> > Tab1) the links work as expected.
> >
> >
> > To sumarize it:
> >
> > The links do not work on a page that has a smaller Page ID than another
> > tab in the same browser. After the reload of the page by clicking on a
> > link and getting the highest Page ID, the links work as expected.
> >
> > Anybody an idea why that can happen?
> >
> > Thanks in advance,
> > Andre
> >
> > -
> > 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
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


-- 
Andre Schütz 

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



Re: Eclipse, Wicket 1.5 and Jrebel

2012-03-05 Thread Dan Retzlaff
We use 1.5.4. I do get a file locking related popup dialog errors when I
save a modified resource:

> Problems encountered while deleting files.
> Could not delete: [snip]\target\classes\[snip].html.


... but it works anyway, presumably because Wicket loads resources through
the class loader which JRebel redirects to the Eclipse workspace. As
Christian says, this issue affects 1.5.4 only; 1.5.3 and 1.5-SNAPSHOT don't
cause the popup.

The mistake I always make is forgetting to run "mvn jrebel:generate" on my
Wicket project to generate target/classes/rebel.xml. I have a "jrebel"
Maven profile which executes the jrebel plugin, and have this profile
enabled in Eclipse, but it doesn't work. So I just run it manually after a
clean build.

Dan

On Sun, Mar 4, 2012 at 11:03 PM, Jürgen Lind wrote:

> Hi Dan, thanks for your answer, then the problem might lie within my
> setup. One more thing:
> which version of Wicket are you using? Maybe the Packaged Resource Bug
> that was mentioned
> earlier is the culprit...
>
> J.
>
>
> On 05.03.2012 03:55, Dan Retzlaff wrote:
>
>> Jürgen, my coworkers and I use that combination successfully. Good luck.
>>
>> On Sun, Mar 4, 2012 at 1:29 AM, Jürgen Lind**
>> wrote:
>>
>>  Hi,
>>>
>>> I was just wondering if anybody is using the above combination. Since
>>> upgrading to 1.5. I have massive problems in reloading changed HTML
>>> templates as Eclipse sometimes tries to do a full build because of a
>>> locked resource. I am also in contact with the Jrebel guys, I just wanted
>>> to know if somebody else has a similar problem.
>>>
>>> J.
>>>
>>> --
>>> Dr. Jürgen Lind
>>> iteratec GmbHFon: +49 (0)89 614551-44
>>> Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
>>> 82008 Unterhaching   Web: www.iteratec.de
>>>
>>> Sitz und Registergericht der iteratec GmbH: München HRB 113 519
>>> Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
>>>
>>> --**
>>> --**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apa**che.org
>>> 
>>> >
>>>
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>
> --
> Mit freundlichen Grüßen,
>
> Jürgen Lind
>
> --
> Dr. Jürgen Lind
> iteratec GmbHFon: +49 (0)89 614551-44
> Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
> 82008 Unterhaching   Web: www.iteratec.de
>
> Sitz und Registergericht der iteratec GmbH: München HRB 113 519
> Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Re: DataTable and FilterToolbar

2012-03-05 Thread bouroy
I am having same problem with many textfields including TextFilter on
FilterToolBar within a form.

Could you please post your solution?

Many thanks,
 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DataTable-Multiple-Filter-and-OrderSubmittingLink-tp3520329p4446496.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



Adding images dynamicly

2012-03-05 Thread gufi2
Hello,

I want to add dynamicly images/html tag to my wicket page like (add(new
Label("", " )

so how can i add the image after that or how can I add a resourcereference
like (add(new image("...", ResourceReference.).

Wicket always tells me that I have to reference it in the markup. 

Thanks for your help.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Adding-images-dynamicly-tp4447069p4447069.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



Customizing AjaxIndicatorAppender and indicator

2012-03-05 Thread Souni
Hi,

is it posible to make ajax indicator to reserve space even it's not visible?
I tried to overide AjaxIndicatorAppender's onRendered and set span
visibility:hidden instead of default display:none, but it didn't work. I
would like that pressing button would not make button to move left to make
extra space for indicator. Instead I would like reserve that space for
indicator beforehand, so that button wouldn't jump to the left when
indicator becomes visible.

- Jouni

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Customizing-AjaxIndicatorAppender-and-indicator-tp4446266p4446266.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: Adding images dynamicly

2012-03-05 Thread Dan Retzlaff
Have you looked at the Wicket Examples images?
http://wicketstuff.org/wicket/images

On Mon, Mar 5, 2012 at 10:32 AM, gufi2  wrote:

> Hello,
>
> I want to add dynamicly images/html tag to my wicket page like (add(new
> Label("", " )
>
> so how can i add the image after that or how can I add a resourcereference
> like (add(new image("...", ResourceReference.).
>
> Wicket always tells me that I have to reference it in the markup.
>
> Thanks for your help.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Adding-images-dynamicly-tp4447069p4447069.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
>
>


org.apache.wicket.WicketRuntimeException: There is no application attached to current thread

2012-03-05 Thread YK
Hi,

I'm trying to make example using wicket 1.5.4 and spring work but I keep
having this exception: org.apache.wicket.WicketRuntimeException: There is no
application attached to current thread...

My example defines also a servlet filter that is applied just after the
WicketFilter in web.xml.
This filter uses ThreadLocal to set/unset a variable around each
request/response cycle.

I've noticed that if I disable the filter, my example works fine, but I
really need it to to pass a variable via the ThreadLocal: (static final
ThreadLocal> THREAD_OBJECT_CONTEXT = new
ThreadLocal>();)


Any idea about why wicket fails to accept such a filter please?

Is there a workaround please?


Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-There-is-no-application-attached-to-current-thread-tp4447781p4447781.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



Preferred way to unit testing a WizardStep?

2012-03-05 Thread Dan Alvizu
Hi,

I've got a wizard with 5 steps. If I want to test just step four, but do
not want to go through steps 1 through 3 first, how would I do that?

I found this message for wicket 1.4:

http://osdir.com/ml/users-wicket.apache.org/2011-06/msg00498.html

However, startPanel() is deprecated and replaced with
startComponentInPage(). If I use this method, I will get an NPE in
WizardSteps.onInitialize() method:



java.lang.NullPointerException: null
at
org.apache.wicket.extensions.wizard.WizardStep.onInitialize(WizardStep.java:445)
~[wicket-extensions-1.5.4.jar:1.5.4]
 at org.apache.wicket.Component.fireInitialize(Component.java:920)
~[wicket-core-1.5.4.jar:1.5.4]
at org.apache.wicket.MarkupContainer$4.component(MarkupContainer.java:1007)
~[wicket-core-1.5.4.jar:1.5.4]
 at
org.apache.wicket.MarkupContainer$4.component(MarkupContainer.java:1005)
~[wicket-core-1.5.4.jar:1.5.4]
at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:143)
~[wicket-util-1.5.4.jar:1.5.4]
 at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:122)
~[wicket-util-1.5.4.jar:1.5.4]
at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:191)
~[wicket-util-1.5.4.jar:1.5.4]
 at
org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:923)
~[wicket-core-1.5.4.jar:1.5.4]
at
org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:1003)
~[wicket-core-1.5.4.jar:1.5.4]
 at org.apache.wicket.Page.internalPrepareForRender(Page.java:278)
~[wicket-core-1.5.4.jar:1.5.4]
at org.apache.wicket.Component.render(Component.java:2282)
~[wicket-core-1.5.4.jar:1.5.4]
 at org.apache.wicket.Page.renderPage(Page.java:1041)
~[wicket-core-1.5.4.jar:1.5.4]
at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
~[wicket-core-1.5.4.jar:1.5.4]
 at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
~[wicket-core-1.5.4.jar:1.5.4]
at
org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
~[wicket-core-1.5.4.jar:1.5.4]
 at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
~[wicket-core-1.5.4.jar:1.5.4]
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
~[wicket-request-1.5.4.jar:1.5.4]
 at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
[wicket-core-1.5.4.jar:1.5.4]
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
[wicket-core-1.5.4.jar:1.5.4]
 at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
[wicket-core-1.5.4.jar:1.5.4]
at
org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:650)
[wicket-core-1.5.4.jar:1.5.4]
 at
org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:570)
[wicket-core-1.5.4.jar:1.5.4]
at
org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:780)
[wicket-core-1.5.4.jar:1.5.4]
 at
org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:796)
[wicket-core-1.5.4.jar:1.5.4]
at
org.apache.wicket.util.tester.BaseWicketTester.startComponentInPage(BaseWicketTester.java:1400)
[wicket-core-1.5.4.jar:1.5.4]
 at
org.apache.wicket.util.tester.BaseWicketTester.startComponentInPage(BaseWicketTester.java:1336)
[wicket-core-1.5.4.jar:1.5.4]

[...]

Sure enough, in org.apache.wicket.extensions.wizard.WizardStep.java,
there's an attempt to find the Form parent which will not exist:

@Override

protected void onInitialize()

{

 super.onInitialize();


 Form form = findParent(Form.class);

 form.add(formValidatorWrapper); // NPE here, form will be null

}


Is there a preferred way to do this without patching BaseWicketTester?

Thanks,

Dan


Re: org.apache.wicket.WicketRuntimeException: There is no application attached to current thread

2012-03-05 Thread Dan Retzlaff
If your ThreadLocal is needed within Wicket, shouldn't your filter run
*before* WicketFilter?

Does your filter use any Wicket classes that require something in
o.a.w.ThreadContext?

The basic design should work. We use a filter to manage a ThreadLocal
Hibernate Session for open-session-in-view.

On Mon, Mar 5, 2012 at 1:38 PM, YK  wrote:

> Hi,
>
> I'm trying to make example using wicket 1.5.4 and spring work but I keep
> having this exception: org.apache.wicket.WicketRuntimeException: There is
> no
> application attached to current thread...
>
> My example defines also a servlet filter that is applied just after the
> WicketFilter in web.xml.
> This filter uses ThreadLocal to set/unset a variable around each
> request/response cycle.
>
> I've noticed that if I disable the filter, my example works fine, but I
> really need it to to pass a variable via the ThreadLocal: (static final
> ThreadLocal> THREAD_OBJECT_CONTEXT = new
> ThreadLocal>();)
>
>
> Any idea about why wicket fails to accept such a filter please?
>
> Is there a workaround please?
>
>
> Thanks
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-There-is-no-application-attached-to-current-thread-tp4447781p4447781.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
>
>


wicket + not using native wicket-ajax support - ramifications?

2012-03-05 Thread cath & jon
hello!  we are thinking of using a Spring controller to service ajax
requests for our pages built in wicket.  our frontend devs are really
wanting to keep the markup clean and uncorrupted by the injected
wicket-ajax code. i told them i would investigate an alternate way of doing
the ajax conversation.

i wanted to ask if doing the ajax conversation without using the native
wicket ajax support will cause any problems for us.  can we still use our
loadabledetachablemodels?  will we need to mount pages differently?  will
the web request cycle need to be altered to accommodate a different ajax
conversation?  i am assuming that the wicket-ajax isn't too tightly coupled
to the core wicket architecture, but i really can't say for sure.  any
insights into this would be extremely helpful.  thanks!

- jon


wicket + not using native wicket-ajax support - ramifications?

2012-03-05 Thread cath & jon
hello!  we are thinking of using a Spring controller to service ajax
requests for our pages built in wicket.  our frontend devs are really
wanting to keep the markup clean and uncorrupted by the injected
wicket-ajax code. i told them i would investigate an alternate way of doing
the ajax conversation.

i wanted to ask if doing the ajax conversation without using the native
wicket ajax support will cause any problems for us.  can we still use our
loadabledetachablemodels?  will we need to mount pages differently?  will
the web request cycle need to be altered to accommodate a different ajax
conversation?  i am assuming that the wicket-ajax isn't too tightly coupled
to the core wicket architecture, but i really can't say for sure.  any
insights into this would be extremely helpful.  thanks!

- jon


Re: org.apache.wicket.WicketRuntimeException: There is no application attached to current thread

2012-03-05 Thread James Carman
Make sure your filter mapping for your other filter is after the
mapping for wicket filter.

On Mon, Mar 5, 2012 at 5:17 PM, Dan Retzlaff  wrote:
> If your ThreadLocal is needed within Wicket, shouldn't your filter run
> *before* WicketFilter?
>
> Does your filter use any Wicket classes that require something in
> o.a.w.ThreadContext?
>
> The basic design should work. We use a filter to manage a ThreadLocal
> Hibernate Session for open-session-in-view.
>
> On Mon, Mar 5, 2012 at 1:38 PM, YK  wrote:
>
>> Hi,
>>
>> I'm trying to make example using wicket 1.5.4 and spring work but I keep
>> having this exception: org.apache.wicket.WicketRuntimeException: There is
>> no
>> application attached to current thread...
>>
>> My example defines also a servlet filter that is applied just after the
>> WicketFilter in web.xml.
>> This filter uses ThreadLocal to set/unset a variable around each
>> request/response cycle.
>>
>> I've noticed that if I disable the filter, my example works fine, but I
>> really need it to to pass a variable via the ThreadLocal: (static final
>> ThreadLocal> THREAD_OBJECT_CONTEXT = new
>> ThreadLocal>();)
>>
>>
>> Any idea about why wicket fails to accept such a filter please?
>>
>> Is there a workaround please?
>>
>>
>> Thanks
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-There-is-no-application-attached-to-current-thread-tp4447781p4447781.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



Re: wicket + not using the native wicket-ajax support...ramifications?

2012-03-05 Thread Dan Retzlaff
Hi Jon,

Wicket 6, the next major version, includes a major redesign of the
client-side JavaScript which will satisfy your requirements as I understand
them [1]. Event handlers are no longer in DOM attributes.

With 1.5 the way it is, I don't think it makes sense to "use Wicket AJAX"
and not have attribute-based event handlers. If you attach AJAX behaviors
to your components, they'll get the attributes. And the only way to avoid
attaching AJAX behaviors is to not use Wicket's AJAX components and
behaviors.

Dan

[1]  https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax

On Mon, Mar 5, 2012 at 2:33 PM, cath & jon  wrote:

> hello!  we have an enterprise app using apache wicket and its native ajax
> support.  we are thinking of scrapping the wicket-ajax and instead using a
> Spring controller to service ajax requests entirely controlled by our
> frontend devs in JS.   our frontend devs are really wanting to keep the
> markup clean and uncorrupted by the injected wicket-ajax code. i told them
> i would investigate an alternate way of doing the ajax conversation.
>
> i wanted to ask if doing the ajax conversation without using the native
> wicket ajax support will cause any problems for us.  can we still use our
> loadabledetachablemodels?  will we need to mount pages differently?  will
> the web request cycle need to be altered to accommodate a different ajax
> conversation?  i am assuming that the wicket-ajax isn't too tightly coupled
> to the core wicket architecture, but i really can't say for sure.  any
> insights into this would be extremely helpful.  thanks!
>
> - jon
>


Re: Links with old PageID do not work

2012-03-05 Thread Martin Grigorov
2012/3/5 Andre Schütz :
> Hi,
>
> thank you for the answer. I will test this and reply with my results.
>
> I have three questions depending on the test you have mentioned.
>
> (1)
> Can you tell me more about this o.a.w.Page? I did not really find
> something about it.

org.apache.wicket.Page

>
> (2)
> Can you explain me a little bit more in detail, what I should try
> to find out with the breakpoint regarding the 'renderCount'. What
> could be the interesting parts regarding 'renderCount'?

See why renderCount is incremented after the the html generation.

>
> (3)
> I have my .html files stored in src/main/html, my .properties files in
> src/main/resources and modified my pom.xml with:
>
> 
> 
>    
>        false
>        src/main/resources
>    
>    
>        src/main/html
>    
>    
>        false
>        src/main/java
>        
>            **
>        
>        
>            **/*.java
>        
>    
> 
> 
>    
>        false
>        src/test/java
>        
>            **
>        
>        
>            **/*.java
>        
>    
> 
>
> If I start the jetty server, I get a MarkupNotFoundException. After storing 
> the
> .html files to the class files in the src/main/java path, it works and only 
> the
> properties files are not found.
>
> Can you tell me, how I have to modify the pom.xml that it will find the .html
> and the .properties files in their different paths?

I guess you need to reimport the project in your IDE so that it also
knows about these additional source folders

>
> Thank you,
> Andre
>
>
> On Mon, 5 Mar 2012 09:49:38 +0200
> Martin Grigorov  wrote:
>
>> Hi,
>>
>> It sounds to be related to Page#renderCount.
>> 'renderCount' is used to prevent using an obsolete version of a page
>> instance. I.e. a page with a given page id counts how many times it
>> has been rendered. If you have a tab/window which contains an earlier
>> version of that page and you click on it then this click should be
>> prevented because it will work with stale data.
>> In your description I don't see how this may happen. There is
>> something more which is not included in your description.
>> I recommend you to put a break point in o.a.w.Page and see why
>> 'renderCount' changes and another in PageProvider#getPageInstance() to
>> see why the requested 'renderCount' is different than the current one.
>>
>> 2012/3/4 Andre Schütz :
>> > Hello,
>> >
>> > i have a question about the behavior of links in two tabs.
>> >
>> > I have an application that I opened in two tabs. In Tab1, I
>> > make a submit from Page1 and get Page2. At the same time,
>> > I make a submit in Tab2 from Page1 to Page2. The two pages
>> > with the name Page2 in the two tabs display the results of
>> > a search, depending on the search word in the respective
>> > Page1.
>> >
>> > Finally, I get the following urls:
>> >
>> > (1) Tab1 makes a submit from Page1 to Page2, url is:
>> > localhost:8080/myapp?2&q=word1
>> > (2) Tab2 makesa a submit from Page1 to Page2, url is:
>> > localhost:8080/myapp?3&q=word2
>> >
>> > You can see, that the only difference is the search word
>> > in q= and the page id which is 2 for Tab1 and 3 for Tab2.
>> >
>> > My problem is the following:
>> > -
>> > I have some filter links (not Bookmarkable) on Page2 which you can use to
>> > filter the results. If you click on such a link, the PageParameters will
>> > be updated and the value of the link will be added to the PageParameters
>> > as additional filter.
>> >
>> > Theses two scenarios are happening:
>> >
>> > (a)
>> > If I click on a filter Link in Tab1, the link does work like expected.
>> > The page will be reloaded and gets a new page ID which is bigger than the
>> > ID in Tab2. After this reload of the page, the links work as expected.
>> >
>> > (b)
>> > If I click on a filter Link in Tab2 (which already has a higher page ID 
>> > than
>> > Tab1) the links work as expected.
>> >
>> >
>> > To sumarize it:
>> >
>> > The links do not work on a page that has a smaller Page ID than another
>> > tab in the same browser. After the reload of the page by clicking on a
>> > link and getting the highest Page ID, the links work as expected.
>> >
>> > Anybody an idea why that can happen?
>> >
>> > Thanks in advance,
>> > Andre
>> >
>> > -
>> > 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
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
> --
> Andre Schütz 
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e

Channel busy - postponing...

2012-03-05 Thread Arjun Dhar
Hi,
I'm getting a "Channel busy - postponing...".
There are no server errors, nor response delays, .. nor are there any
apparent JavaScript errors.
The problem is consistent across browsers.

Additionally, most of the code (client+server)  being used is re-used in
another project where there are no issues within the same environment. What
could be causing this error?

I do use JQuery; however when I removed jquery the problem persisted. So I
dont know where to start looking.

Whats a good place to debug this?!

-
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/Channel-busy-postponing-tp4448932p4448932.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: wicket wizard init

2012-03-05 Thread Gytis


Andrea Del Bene-3 wrote
> 
> Hi,
> 
> which line of your code throws  NullPointerException? can you elaborate 
> a little more on the purpose of function getAgreementText() ?
> 

 private String getTextFromDataBase() {
agreementText = "AGREEMENT "
+ ""
+ "someText #clientName# #clientSurname#, 
someText"
+ "someMoreAgreementText"
+ "andMore"
+ "End of Agreement"
return agreementText;

private String replace(String replace, String value){
  agreementText= agreementText.replace(replace, value);
return agreementText;

NullPointerException occurs in the line, where program tries to replace
#clientName# with userModel.bind("user.name").

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-wizard-init-tp4446076p4448935.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: Channel busy - postponing...

2012-03-05 Thread Arjun Dhar
I just realized all posts on this matter point to some Jquery or
JavaScript related mischief. 
I had established jquery itself was not the culprit, however .. for the
Dialog I was using jquery-ui plugin. I upgraded the plugin. Seems the copy
of the plugin for this project was messed up in SVN.

A fresh copy fixed the issue.

-
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/Channel-busy-postponing-tp4448932p4448944.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: org.apache.wicket.WicketRuntimeException: There is no application attached to current thread

2012-03-05 Thread Martin Grigorov
Hi,

Wicket will not call the next filter in the chain if the request is
processed by Wicket itself.
I think you should move your logic to IRequestCycleListener
#onBeginRequest/onEndRequest() if you need access to Wicket's TLs.

On Tue, Mar 6, 2012 at 12:55 AM, James Carman
 wrote:
> Make sure your filter mapping for your other filter is after the
> mapping for wicket filter.
>
> On Mon, Mar 5, 2012 at 5:17 PM, Dan Retzlaff  wrote:
>> If your ThreadLocal is needed within Wicket, shouldn't your filter run
>> *before* WicketFilter?
>>
>> Does your filter use any Wicket classes that require something in
>> o.a.w.ThreadContext?
>>
>> The basic design should work. We use a filter to manage a ThreadLocal
>> Hibernate Session for open-session-in-view.
>>
>> On Mon, Mar 5, 2012 at 1:38 PM, YK  wrote:
>>
>>> Hi,
>>>
>>> I'm trying to make example using wicket 1.5.4 and spring work but I keep
>>> having this exception: org.apache.wicket.WicketRuntimeException: There is
>>> no
>>> application attached to current thread...
>>>
>>> My example defines also a servlet filter that is applied just after the
>>> WicketFilter in web.xml.
>>> This filter uses ThreadLocal to set/unset a variable around each
>>> request/response cycle.
>>>
>>> I've noticed that if I disable the filter, my example works fine, but I
>>> really need it to to pass a variable via the ThreadLocal: (static final
>>> ThreadLocal> THREAD_OBJECT_CONTEXT = new
>>> ThreadLocal>();)
>>>
>>>
>>> Any idea about why wicket fails to accept such a filter please?
>>>
>>> Is there a workaround please?
>>>
>>>
>>> Thanks
>>>
>>> --
>>> View this message in context:
>>> http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-WicketRuntimeException-There-is-no-application-attached-to-current-thread-tp4447781p4447781.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Customizing AjaxIndicatorAppender and indicator

2012-03-05 Thread Martin Grigorov
Hi,

See org.apache.wicket.ajax.IAjaxIndicatorAware. With this you can
provide your own indicator which will be shown/hidden before/after the
Ajax request

On Mon, Mar 5, 2012 at 4:20 PM, Souni  wrote:
> Hi,
>
> is it posible to make ajax indicator to reserve space even it's not visible?
> I tried to overide AjaxIndicatorAppender's onRendered and set span
> visibility:hidden instead of default display:none, but it didn't work. I
> would like that pressing button would not make button to move left to make
> extra space for indicator. Instead I would like reserve that space for
> indicator beforehand, so that button wouldn't jump to the left when
> indicator becomes visible.
>
> - Jouni
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Customizing-AjaxIndicatorAppender-and-indicator-tp4446266p4446266.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Using Wicket with Adobe Forms (FDF)

2012-03-05 Thread Martin Grigorov
Hi,

On Mon, Mar 5, 2012 at 8:33 PM, Pierre Goupil  wrote:
> You can try a BookmarkablePage.

Right.
You can override Form#getActionUrl() to return a url to a bookmarkable page.
The only problem is that PageParameters will contain only the GET parameters.
If you need to POST to a page then extract the parameters via
getRequest().getRequestParameters().

>
>
>
> On Mon, Mar 5, 2012 at 7:27 PM, eugenebalt  wrote:
>
>> I guess what I'm asking is, is there a way to support "regular" Servlet
>> URLs
>> in Wicket?
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Using-Wicket-with-Adobe-Forms-FDF-tp4446987p4447046.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
>>
>>
>
>
> --
> Si tu penses que la violence ne résout rien, c'est que tu n'as pas tapé
> assez fort.



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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