Re: Strange behavior of FormComponentBehavior

2014-12-18 Thread Martin Grigorov
Hi,

It looks
like org.apache.wicket.markup.html.form.FormComponent#updateModel() is not
called for the FormComponentPanel.
Usually this happens when there is an error in the validation. But since
#onSubmit() is called then the validation should have been passed,
otherwise #onError() should have been called.

Put a breakpoint at
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java#L913
and see whether it goes down to
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java#L945

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

On Thu, Dec 18, 2014 at 12:14 AM, Andreas Lundblad <
andreas.lundb...@gmail.com> wrote:
>
> I'm experiencing the strangest behavior with a FormComponentPanel.
>
> My custom FormComponentPanel has the following method:
>
> @Override
> protected void convertInput() {
> CountryImpl c = new CountryImpl(countryId,
> name.getConvertedInput(),
> currency.getConvertedInput(),
> flag.getConvertedInput());
> System.err.println("Setting converted input: " + c + " (identity: "
> + System.identityHashCode(c) + ")");
> setConvertedInput(c);
> }
>
> Upon form submission I get the following printout on System.err:
>
> Setting converted input: CountryImpl[id: 53b2c7a0986c5f4527783d16, name:
> Sweden, currency: SEK, flag: ImageImpl[id=543d4328e4b0524ccbf143f8,
> data.length=13452]] (identity: 1113118053)
>
> Which is exactly what I expect. Great. Now to the part I can't explain:
>
> In the Form that encloses this FormComponentPanel, I have the following
> code:
>  (
> @Override
> public void onSubmit() {
> Country country = countryPanel.getModelObject();
>
> System.err.println("country from
> countryPanel.getModelObject(): " + country + " (identity: " +
> System.identityHashCode(country) + ")");
> ...
> }
>
> And upon submit I get the following output:
>
> country from countryPanel.getModelObject(): CountryImpl[id:
> 53b2c7a0986c5f4527783d16, name: Sweden, currency: SEK, flag: ImageRef[id:
> 543d4328e4b0524ccbf143f8]] (identity: 1025123013)
>
> As you can see, the countryPanel.getModelObject() does not match the object
> that I used in setConvertedInput! (By looking at the
> System.identityHashCode one can see that they are not the same object.) Why
> is this? This is how I've always done!
>
> Other (strange) observations:
>
> - If I change one of the text-fields (name or currency) it works as
> expected! I get the same object out from getModelObject as I give to
> setConvertedInput
> - If I instead of countryPanel.getModelObject() do
> countryPanel.getConvertedInput() I get the expected object. (In [1]
> however, it says I should use getModelObject()
>
> I've stepped through the Wicket form processing code but it's really
> complex and I can't determine where it goes wrong. I have other custom
> components (seemingly identical to the CountryPanel) that works as
> expected.
>
> Any suggestions on what may be the issue is welcome. (I would hook you up
> with a minimal test case if I could, but I can't reproduce this when
> writing from scratch. Some detail seems to evade me.)
>
> best regards,
> Andreas Lundblad
>
> [1]
>
> https://cwiki.apache.org/confluence/display/WICKET/Creating+Custom+FormComponentPanel%27s+to+build+valid+objects+using+Wicket%27s+Form+Validation+Logic
>


Re: Strange behavior of FormComponentBehavior

2014-12-18 Thread andrea del bene


Hi Andreas,

what is the type of the model object for "flag" component? I see that 
inside convertInput is a ImageImpl while inside onSubmit is ImageRef

I'm experiencing the strangest behavior with a FormComponentPanel.

My custom FormComponentPanel has the following method:

 @Override
 protected void convertInput() {
 CountryImpl c = new CountryImpl(countryId,
 name.getConvertedInput(),
 currency.getConvertedInput(),
 flag.getConvertedInput());
 System.err.println("Setting converted input: " + c + " (identity: "
+ System.identityHashCode(c) + ")");
 setConvertedInput(c);
 }

Upon form submission I get the following printout on System.err:

Setting converted input: CountryImpl[id: 53b2c7a0986c5f4527783d16, name:
Sweden, currency: SEK, flag: ImageImpl[id=543d4328e4b0524ccbf143f8,
data.length=13452]] (identity: 1113118053)

Which is exactly what I expect. Great. Now to the part I can't explain:

In the Form that encloses this FormComponentPanel, I have the following
code:
  (
 @Override
 public void onSubmit() {
 Country country = countryPanel.getModelObject();

 System.err.println("country from
countryPanel.getModelObject(): " + country + " (identity: " +
System.identityHashCode(country) + ")");
 ...
 }

And upon submit I get the following output:

country from countryPanel.getModelObject(): CountryImpl[id:
53b2c7a0986c5f4527783d16, name: Sweden, currency: SEK, flag: ImageRef[id:
543d4328e4b0524ccbf143f8]] (identity: 1025123013)

As you can see, the countryPanel.getModelObject() does not match the object
that I used in setConvertedInput! (By looking at the
System.identityHashCode one can see that they are not the same object.) Why
is this? This is how I've always done!

Other (strange) observations:

- If I change one of the text-fields (name or currency) it works as
expected! I get the same object out from getModelObject as I give to
setConvertedInput
- If I instead of countryPanel.getModelObject() do
countryPanel.getConvertedInput() I get the expected object. (In [1]
however, it says I should use getModelObject()

I've stepped through the Wicket form processing code but it's really
complex and I can't determine where it goes wrong. I have other custom
components (seemingly identical to the CountryPanel) that works as expected.

Any suggestions on what may be the issue is welcome. (I would hook you up
with a minimal test case if I could, but I can't reproduce this when
writing from scratch. Some detail seems to evade me.)

best regards,
Andreas Lundblad

[1]
https://cwiki.apache.org/confluence/display/WICKET/Creating+Custom+FormComponentPanel%27s+to+build+valid+objects+using+Wicket%27s+Form+Validation+Logic




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



Re: TableTree expand node issue

2014-12-18 Thread Sven Meier

Hi,

after serialization/deserialization of the page, Homepage#ROOT_NODE is 
no longer equal to the node passed to your treeProvider's #hasChildren() 
- thus the expand link is no longer enabled.


There are different solutions to this problem, e.g. implementing #equals 
and #hashcode in HomePage.Item.

Let us know if you need further help on this.

Regards
Sven


On 18.12.2014 06:35, Colin Rogers wrote:

Wicketeers,

I don't know if this is a bug or quirk or something I'm doing wrong, but I have 
an issue with hitting 'expand' nodes on a TableTree when another page has been 
opened.

It seems to occurs when you open a stateful page - our users love multiple 
windows, and open tons of pages using 'open in new window' in the browser, and 
then re-use previous pages.

It triggers an Access Denied error, and the stack trace (at end of email).

I've created a quickstart below that hopefully illustrates the issue.

http://www.tenthart.com/wickettest2.zip

The weird thing is, this doesn't seem to happen on your examples pages for the 
same component, which suggests it's something I'm doing incorrectly. Despite 
that, the quickstart uses the simplest code I can figure...

I hope someone can help, or suggest a work-around or just shed some light on 
the subject. :)

Cheers,
Col.

WARN  - RequestListenerInterface   - behavior not enabled; ignore call. 
Behavior org.apache.wicket.ajax.markup.html.AjaxFallbackLink$1@69ba045 at 
component [AjaxFallbackLink [Component id = junction]]
WARN  - RequestCycleExtra  - 
WARN  - RequestCycleExtra  - Handling the following exception
org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException: 
Behavior rejected interface invocation. Component: [AjaxFallbackLink [Component 
id = junction]] Behavior: 
org.apache.wicket.ajax.markup.html.AjaxFallbackLink$1@69ba045 Listener: 
[RequestListenerInterface name=IBehaviorListener, method=public abstract void 
org.apache.wicket.behavior.IBehaviorListener.onRequest()]
at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:237)
at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
at 
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)

EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.




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



Re: submenu in NavbarDropDownButton

2014-12-18 Thread Martin Grigorov
Hi,

Yes, you can.
But in this case instead of playing with #onComponentTagBody() it would be
better to use an hierarchly like:

Link
  - Image
  - Label

The HTML markup would look like: 



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

On Wed, Dec 17, 2014 at 6:14 PM, Hasan Çelik  wrote:
>
> You're awesome :) thanks a lot, I understand my mistake..In my properties
> file english refers "gb" but in the codes I wrote "en" ...  Martin can I
> add country's flag near the turkish and english button?? only
>
> tr=Turkish
> gb=English
>
>
>
>
>
>
> Web Sitesi : www.ab-hibe.com
> E-mail: hasance...@berkadem.com
> E-mail: i...@ab-hibe.com
> Gsm1: 0 544 640 96 25
> Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
>
> On 17 December 2014 at 16:01, Martin Grigorov 
> wrote:
> >
> > What code do you have at BasePage.java, line 209 ?
> > It calls #getString() with "en" as resource key. And you have no "en" key
> > in YourApplication.properties.
> > Read http://wicket.apache.org/guide/guide/i18n.html about
> > internationalization.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Dec 17, 2014 at 3:54 PM, Hasan Çelik 
> wrote:
> > >
> > > I think, you can not see the images, sorry about that
> > >
> > >
> > > https://unsee.cc/nupibero/
> > >
> > > https://unsee.cc/donebuga/
> > >
> > > https://unsee.cc/bizumaso/
> > >
> > >
> > >
> > >
> > > Web Sitesi : www.ab-hibe.com
> > > E-mail: hasance...@berkadem.com
> > > E-mail: i...@ab-hibe.com
> > > Gsm1: 0 544 640 96 25
> > > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> > >
> > > On 17 December 2014 at 15:12, Martin Grigorov 
> > > wrote:
> > > >
> > > > Try by uploading the images to some web service.
> > > > It seems the mail server removes them ...
> > > >
> > > > Martin Grigorov
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > > On Wed, Dec 17, 2014 at 1:58 PM, Hasan Çelik 
> > > wrote:
> > > > >
> > > > > getCookieUtils() method... ??? Does it make sense now?
> > > > >
> > > > > [image: Inline images 1]
> > > > >
> > > > >
> > > > >
> > > > > Web Sitesi : www.ab-hibe.com
> > > > > E-mail: hasance...@berkadem.com
> > > > > E-mail: i...@ab-hibe.com
> > > > > Gsm1: 0 544 640 96 25
> > > > > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat Ankara
> > > > >
> > > > > On 17 December 2014 at 13:13, Ernesto Reinaldo Barreiro <
> > > > > reier...@gmail.com> wrote:
> > > > >>
> > > > >> images did not make it...
> > > > >>
> > > > >> On Wed, Dec 17, 2014 at 11:11 AM, Hasan Çelik <
> hsnclk1...@gmail.com
> > >
> > > > >> wrote:
> > > > >> >
> > > > >> > there is a compile error on the first image..
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >> > Web Sitesi : www.ab-hibe.com
> > > > >> > E-mail: hasance...@berkadem.com
> > > > >> > E-mail: i...@ab-hibe.com
> > > > >> > Gsm1: 0 544 640 96 25
> > > > >> > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat
> Ankara
> > > > >> >
> > > > >> > On 17 December 2014 at 13:03, Francois Meillet <
> > > > >> francois.meil...@gmail.com
> > > > >> > >
> > > > >> > wrote:
> > > > >> > >
> > > > >> > > What is the error, any stacktrace ?
> > > > >> > >
> > > > >> > > François Meillet
> > > > >> > > Formation Wicket - Développement Wicket
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > >
> > > > >> > > Le 17 déc. 2014 à 11:55, Hasan Çelik  a
> > > > écrit :
> > > > >> > >
> > > > >> > > > Thanks Martin,
> > > > >> > > >
> > > > >> > > > I am newbie for wicket... It may be easy error for you but I
> > > > didn't
> > > > >> > > understand...Why am I getting this error? Which dependencies
> > > should
> > > > I
> > > > >> add
> > > > >> > > in pom.xml ?
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > > If I change the codes like that, I am getting error,
> > > > >> > > > ​
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > >
> > > > >> > > > Web Sitesi : www.ab-hibe.com
> > > > >> > > > E-mail: hasance...@berkadem.com
> > > > >> > > > E-mail: i...@ab-hibe.com
> > > > >> > > > Gsm1: 0 544 640 96 25
> > > > >> > > > Adres : 1271. Sokak 33/14 Sabri Mermutlu İş Merkezi Balgat
> > > Ankara
> > > > >> > > >
> > > > >> > > > On 17 December 2014 at 10:13, Martin Grigorov <
> > > > mgrigo...@apache.org
> > > > >> >
> > > > >> > > wrote:
> > > > >> > > > I guess his code just uses Wicket's CookieUtils class.
> > > > >> > > > See
> > > > >> > > >
> > > > >> > >
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://github.com/apache/isis/blob/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/themepicker/ThemeChooser.java#L94-L105
> > > > >> > > > for example.
> > > > >> > > >
> > > > >> > > > Martin Grigorov
> > > > >> > > > Wicket Training and Consulting
> > > > >> > > > https://twitter.com/mtgrigorov
> > > > >> 

Re: About BasePage's BrandName setting

2014-12-18 Thread Martin Grigorov
Hi,

class BasePage {

  @Override protected void onInitialize() {super.onInitialize();
add(brandLink("brandLink"))}

  protected abstract AbstractLink brandLink(String id);
}

class BasePage1 extend BasePage {
  ...
  protected BookmarkablePageLink brandLink(String id) {return new
BookmarkablePageLink(id, IndexPage.class)}
}

class BasePage2 extend BasePage {
  ...
  protected BookmarkablePageLink brandLink(String id) {return new
BookmarkablePageLink(id, ManagementPage.class)}
}

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

On Wed, Dec 17, 2014 at 11:46 PM, Hasan Çelik  wrote:
>
> Hi,
>
> Normally I have one Base Page, but I want to create more than one..
>
> For example
>
> LoginPage extend BasePage1
> ManagmentPage extend BasePage2
>
> A user login in the website, redirect to ManagementPage... but  when user
> click BrandName,  redirect to LoginPage ...Can I change the brandname for
> other BasePages
>
> For example
>
> In the ManagmentPage brandName link may be/managementPage ,
> In the LoginPage brandName link may be /index
>
> Is there a way to change it ?
>


Title tab in Tabbedpanel

2014-12-18 Thread K
Hi i am workin with tabbedpanel in wicket. i have created a tabbedpanel for
my search page

 

My requirement is to create a tabbedpanel of three tabs with title. i am
using additional tab (Dummytab in this case) to compensiate for the title.
please suggest how to create a title tab.  

Thanks in advance  


-
K
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Title-tab-in-Tabbedpanel-tp4668837.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: Title tab in Tabbedpanel

2014-12-18 Thread Sven Meier

Hi,

use a disabled tab:

http://apache-wicket.1842946.n4.nabble.com/AjaxTabbedPanel-Enable-Disable-Individual-Tab-td4380339.html

Regards
Sven

On 18.12.2014 10:57, K wrote:

Hi i am workin with tabbedpanel in wicket. i have created a tabbedpanel for
my search page



My requirement is to create a tabbedpanel of three tabs with title. i am
using additional tab (Dummytab in this case) to compensiate for the title.
please suggest how to create a title tab.

Thanks in advance


-
K
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Title-tab-in-Tabbedpanel-tp4668837.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



wicket framework and "clickjacking" risk

2014-12-18 Thread lucast
Dear Forum,
I recently ran  metasploit
   on my wicket 6
appilcation and one of the vulnerabilities found was " clickjacking
  "

A quick search on google suggested a couple of solution for Java EE
applications: one from  OWASP
   and one for 
Java Evangelist blog

 
.   
The solutions in those posts, suggest the use of filters. 

I just would like to know if any of you were aware of this issue and how you
went implementing a solution for your wicket application, either just adding
code to the page header or creating filters or any other means.

Thanks in advance,
Lucas


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-framework-and-clickjacking-risk-tp4668840.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



initModel and 'compound' components only

2014-12-18 Thread Sebastien
Hi all,

I often use #initModel in my pages because I find it very convenient in
many usecase...

Actually there is an issue in a certain scenario: let's say #initModel is
supposed to return a CompoundPropertyModel. So I am free to explicitly
*not* provide the model to the component that consume this model, a label
for instance. But, If the page only contains those 'compound' components,
#initModel is never called so the model is never set.

A workaround is to set the model manually:
this.setModel(this.initModel());

Is it a known issue already? (don't have seen)
Quickstart is ready in case...

Thanks & best regards,
Sebastien


Synchonization problems? (Cannot modify component hierarchy after render phase has started)

2014-12-18 Thread Daniel Stoch
Hi,

Is it possible that there is some issue with simultaneous access to a
page by different threads using wicket-atmosphere integration? From
time to time, when system send many server events to page, such error
can occurs - in onConfigure method I call setVisible on some children
components:

org.apache.wicket.WicketRuntimeException: Cannot modify component
hierarchy after render phase has started (page version cant change
then anymore)
at org.apache.wicket.Component.checkHierarchyChange(Component.java:3557)
at org.apache.wicket.Component.addStateChange(Component.java:3486)
at org.apache.wicket.Component.setVisible(Component.java:3173)
at myapp.MyPanel.onConfigure(MyPanel.java:83)
at org.apache.wicket.Component.configure(Component.java:1041)
at org.apache.wicket.Component.internalBeforeRender(Component.java:926)
at org.apache.wicket.Component.beforeRender(Component.java:1003)
at org.apache.wicket.Component.internalPrepareForRender(Component.java:2179)
at org.apache.wicket.Component.render(Component.java:2268)
at 
org.apache.wicket.ajax.XmlAjaxResponse.writeComponent(XmlAjaxResponse.java:128)
at 
org.apache.wicket.ajax.AbstractAjaxResponse.writeComponents(AbstractAjaxResponse.java:218)
at 
org.apache.wicket.ajax.AbstractAjaxResponse.writeTo(AbstractAjaxResponse.java:150)
at 
org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:359)
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97)
at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:417)
at 
org.apache.wicket.atmosphere.EventBus.postToSingleResource(EventBus.java:393)
at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:346)
at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:329)

So it looks that some thread earlier mark this component as rendering?

--
Daniel

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



Re: initModel and 'compound' components only

2014-12-18 Thread Sven Meier

Hi Sebastien,

this topic was discussed before:
When searching parental components for a IComponentInheritedModel, 
#initModel() is skipped to prevent unnecessary creation of intermediate 
models. See the comment on line 3788 ff:


https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/Component.java#L3788

I don't remember a nice solution for this. As it is now, you can't defer 
creation of CompoundPropertyModels until #initModel() is called.


Regards
Sven



On 18.12.2014 16:43, Sebastien wrote:

Hi all,

I often use #initModel in my pages because I find it very convenient in
many usecase...

Actually there is an issue in a certain scenario: let's say #initModel is
supposed to return a CompoundPropertyModel. So I am free to explicitly
*not* provide the model to the component that consume this model, a label
for instance. But, If the page only contains those 'compound' components,
#initModel is never called so the model is never set.

A workaround is to set the model manually:
this.setModel(this.initModel());

Is it a known issue already? (don't have seen)
Quickstart is ready in case...

Thanks & best regards,
Sebastien




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



RE: TableTree expand node issue

2014-12-18 Thread Colin Rogers
Sven,

Thanks - that's really obvious now you mention it - thanks for the heads up, 
and sorry for being stupid. :)

Back to the drawing board :)

Cheers,
Col.

From: Sven Meier [s...@meiers.net]
Sent: 18 December 2014 20:51
To: users@wicket.apache.org
Subject: Re: TableTree expand node issue

Hi,

after serialization/deserialization of the page, Homepage#ROOT_NODE is
no longer equal to the node passed to your treeProvider's #hasChildren()
- thus the expand link is no longer enabled.

There are different solutions to this problem, e.g. implementing #equals
and #hashcode in HomePage.Item.
Let us know if you need further help on this.

Regards
Sven


On 18.12.2014 06:35, Colin Rogers wrote:
> Wicketeers,
>
> I don't know if this is a bug or quirk or something I'm doing wrong, but I 
> have an issue with hitting 'expand' nodes on a TableTree when another page 
> has been opened.
>
> It seems to occurs when you open a stateful page - our users love multiple 
> windows, and open tons of pages using 'open in new window' in the browser, 
> and then re-use previous pages.
>
> It triggers an Access Denied error, and the stack trace (at end of email).
>
> I've created a quickstart below that hopefully illustrates the issue.
>
> http://www.tenthart.com/wickettest2.zip
>
> The weird thing is, this doesn't seem to happen on your examples pages for 
> the same component, which suggests it's something I'm doing incorrectly. 
> Despite that, the quickstart uses the simplest code I can figure...
>
> I hope someone can help, or suggest a work-around or just shed some light on 
> the subject. :)
>
> Cheers,
> Col.
>
> WARN  - RequestListenerInterface   - behavior not enabled; ignore call. 
> Behavior org.apache.wicket.ajax.markup.html.AjaxFallbackLink$1@69ba045 at 
> component [AjaxFallbackLink [Component id = junction]]
> WARN  - RequestCycleExtra  - 
> WARN  - RequestCycleExtra  - Handling the following exception
> org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException: 
> Behavior rejected interface invocation. Component: [AjaxFallbackLink 
> [Component id = junction]] Behavior: 
> org.apache.wicket.ajax.markup.html.AjaxFallbackLink$1@69ba045 Listener: 
> [RequestListenerInterface name=IBehaviorListener, method=public abstract void 
> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
> at 
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:237)
> at 
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
> at 
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
> at 
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
> at 
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> at 
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
> at 
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
> at 
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
> at 
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
> at 
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> at 
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
>
> EMAIL DISCLAIMER This email message and its attachments are confidential and 
> may also contain copyright or privileged material. If you are not the 
> intended recipient, you may not forward the email or disclose or use the 
> information contained in it. If you have received this email message in 
> error, please advise the sender immediately by replying to this email and 
> delete the message and any associated attachments. Any views, opinions, 
> conclusions, advice or statements expressed in this email message are those 
> of the individual sender and should not be relied upon as the considered 
> view, opinion, conclusions, advice or statement of this company except where 
> the sender expressly, and with authority, states them to be the considered 
> view, opinion, conclusions, advice or statement of this company. Every care 
> is taken but we recommend that you scan any attachments for viruses.
>


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

EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have receiv