Re: Single sign on (SSO) for two WicketApplication

2012-05-10 Thread jensiator
Thanks you everyone. A thank you Arjun for you detailed thoughts. I will see
what CAS can do together with our restservices. The wicket applications is
two 'clients' that talks with the same server through rest.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Single-sign-on-SSO-for-two-WicketApplication-tp4620516p4625265.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: Setting a button press on hitting the enter key from the keyboard

2012-05-10 Thread srinivas59924
addItemTextBoxField.add(new AbstractBehavior(){ 
  
  private static final long serialVersionUID = 1L; 
   @Override
public void 
onComponentTag(org.apache.wicket.Component
component,ComponentTag tag) {
 tag.put("onkeydown","if(event.keyCode==13){
document.getElementById('"+searchButtion.getMarkupId()+"').click();return
false;}"); 
}
  }); 
add(addItemTextBoxField);   

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Setting-a-button-press-on-hitting-the-enter-key-from-the-keyboard-tp1874539p4622841.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: Customize PagingNavigator

2012-05-10 Thread sudeivas
Works now. Thanks

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Customize-PagingNavigator-tp4624405p4624655.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: Customize PagingNavigator

2012-05-10 Thread vineet semwal
sorry :)

override newnavigation in pagingnavigator like below ,

protected PagingNavigation newNavigation(String id,
IPageable pageable, IPagingLabelProvider labelProvider) {
PagingNavigation nv= super.newNavigation(id, pageable,
labelProvider);
nv.setViewSize(customsize);
return nv;
}

On Fri, May 11, 2012 at 1:40 AM, sudeivas  wrote:
> navigator.getPagingNavigation() returns null.
>
> Am I missing something?
>
> -Suresh
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Customize-PagingNavigator-tp4624405p4624504.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
>



-- 
thank you,

regards,
Vineet Semwal

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



Re: Customize PagingNavigator

2012-05-10 Thread sudeivas
navigator.getPagingNavigation() returns null. 

Am I missing something?

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Customize-PagingNavigator-tp4624405p4624504.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: Loadable-detachable model for ListView

2012-05-10 Thread vineet semwal
same same

On Fri, May 11, 2012 at 12:58 AM, sudeivas  wrote:
> Thanks Dan. Final question to you guys,
>
> Option 1:
>       DataView dataview =
>            new DataView("problems",
> new UsersProvider()) {
>            private static final long serialVersionUID = 1L;
>
>            @Override
>            protected void populateItem(final Item item) {
>                item.add(new
> Label("title",*((SerializableWorkflowInstancePartial)
> item.getModelObject()).*getFriendlyName(getLocale())).setRenderBodyOnly(true));
>                item.add(new
> Label("location",(*(SerializableWorkflowInstancePartial)
> item.getModelObject())*.getCreatedLocation()).setRenderBodyOnly(true));
>                item.add(new
> Label("age",*((SerializableWorkflowInstancePartial)
> item.getModelObject())*.getAgeString()).setRenderBodyOnly(true));
>                }
>            }
>        };
>
> Option 2:
>       DataView dataview =
>            new DataView("problems",
> new UsersProvider()) {
>            private static final long serialVersionUID = 1L;
>
>            @Override
>            protected void populateItem(final Item item) {
>                *SerializableWorkflowInstancePartial workflow =
> (SerializableWorkflowInstancePartial) item.getModelObject();*
>                item.add(new
> Label("title",workflow.getFriendlyName(getLocale())).setRenderBodyOnly(true));
>                item.add(new
> Label("location",workflow.getCreatedLocation()).setRenderBodyOnly(true));
>                item.add(new
> Label("age",workflow.getAgeString()).setRenderBodyOnly(true));
>                }
>            }
>        };
>
> Is there any difference between option 1 and 2. Or do I always have to use
> item.getModelObject() for all my components to avoid session storage.
>
> -Suresh
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4624389.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
>



-- 
thank you,

regards,
Vineet Semwal

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



Re: Customize PagingNavigator

2012-05-10 Thread vineet semwal
navigator.getPagingNavigation().setViewSize(size);

On Fri, May 11, 2012 at 1:03 AM, sudeivas  wrote:
> Hello,
>      Currently I am using PaginNavigator along with DataView.
>
>        dataview.setItemsPerPage(10);
>        container.add(dataview); //webmarkup container
>        container.add(new PagingNavigator("navigator", dataview));
>
> For now, there are around 1000 entries in the list. So PagingNavigator
> displays something like this,
>
> "<< < 1 2 3 4 5 6 7 8 9 10 > >>"
>
> But we are having some alignment issues. So we need something like this,
>
> "<< < 1 2 3 4 5 > >>"
>
> Is this possible?
>
> -Suresh
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Customize-PagingNavigator-tp4624405.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
>



-- 
thank you,

regards,
Vineet Semwal

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



Customize PagingNavigator

2012-05-10 Thread sudeivas
Hello,
  Currently I am using PaginNavigator along with DataView. 

dataview.setItemsPerPage(10);
container.add(dataview); //webmarkup container
container.add(new PagingNavigator("navigator", dataview));

For now, there are around 1000 entries in the list. So PagingNavigator
displays something like this,

"<< < 1 2 3 4 5 6 7 8 9 10 > >>"

But we are having some alignment issues. So we need something like this,

"<< < 1 2 3 4 5 > >>" 

Is this possible?

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Customize-PagingNavigator-tp4624405.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: Loadable-detachable model for ListView

2012-05-10 Thread sudeivas
Thanks Dan. Final question to you guys,

Option 1:
   DataView dataview =
new DataView("problems",
new UsersProvider()) {
private static final long serialVersionUID = 1L;

@Override
protected void populateItem(final Item item) {
item.add(new
Label("title",*((SerializableWorkflowInstancePartial)
item.getModelObject()).*getFriendlyName(getLocale())).setRenderBodyOnly(true));
item.add(new
Label("location",(*(SerializableWorkflowInstancePartial)
item.getModelObject())*.getCreatedLocation()).setRenderBodyOnly(true));
item.add(new
Label("age",*((SerializableWorkflowInstancePartial)
item.getModelObject())*.getAgeString()).setRenderBodyOnly(true));
}
}
};

Option 2:
   DataView dataview =
new DataView("problems",
new UsersProvider()) {
private static final long serialVersionUID = 1L;

@Override
protected void populateItem(final Item item) {
*SerializableWorkflowInstancePartial workflow =
(SerializableWorkflowInstancePartial) item.getModelObject();*
item.add(new
Label("title",workflow.getFriendlyName(getLocale())).setRenderBodyOnly(true));
item.add(new
Label("location",workflow.getCreatedLocation()).setRenderBodyOnly(true));
item.add(new
Label("age",workflow.getAgeString()).setRenderBodyOnly(true));
}
}
};

Is there any difference between option 1 and 2. Or do I always have to use
item.getModelObject() for all my components to avoid session storage. 

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4624389.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: Loadable-detachable model for ListView

2012-05-10 Thread Dan Retzlaff
I may have been wrong about that... I can't setup a test app right now, but
I think the default configuration of DataView also discards models on
detach. Sorry for the confusion.

On Thu, May 10, 2012 at 12:06 PM, sudeivas wrote:

> Dan has mentioned "I think
> ListView is better than DataView because it naturally discards its contents
> after the request where data view saves models, keeping your session size
> the same."
>
> So if my list has 1000 entries, will the session store all these values if
> I
> use DataView/IDataProvider and LoadableDetachableModel?
>
> -Suresh
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4624338.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: Loadable-detachable model for ListView

2012-05-10 Thread sudeivas
Dan has mentioned "I think 
ListView is better than DataView because it naturally discards its contents 
after the request where data view saves models, keeping your session size 
the same."

So if my list has 1000 entries, will the session store all these values if I
use DataView/IDataProvider and LoadableDetachableModel?

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4624338.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: Single sign on (SSO) for two WicketApplication

2012-05-10 Thread Dan Alvizu
I'm not sure if it fits your use-case, but my company offers single sign on
as a service:

https://www.pingone.com/

-Dan

On Thu, May 10, 2012 at 11:52 AM, Arjun Dhar  wrote:

> Sir, I rant philosophy let me stop you @ "How could you send/share the
> username password between den in a secure way" ! .. Let me Fast Forward you
> thought what you will face on your own implementation:
>
> ...so heres the deal. Sharing passwords will not achieve anything. Because
> the idea of SSO is to pass the understanding that the user is VALID (not
> the
> process of authentication itself).
> There is no good in the second system knowing the password,  for the
> idea of SSO would be not to have the user use the password at all to enter
> the 2nd system :)
>
> THE MEAT STUFF BEGINS
> -
> Hope we agree on what that means. ... it boils down to basically creating a
> TOKEN. A Token that is recognized across a set of servers that respect the
> TOKEN. This TOKEN is in the form a secure Cookie.
>
> Now, you may think "Ok lets Create a Secure Cookie and we should be good".
> Ah! But there are more concerns. A Secure TOKEN by definition is what is
> accessed via HTTPS, but it does not make it IMMUNE to Hacking attacks like
> "SESSION HIJACKING" (basically I use JavaScript via XSS attack to steal you
> cookies and JSESSIONID). A script on a Browser can access Cookies. There
> are
> HTTP specifications to address this also, but they are server wide
> configurations in Tomcat (Not Request level or Page level imo -- for those
> who disagree. Refer: useHttpOnly @
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html).
>
> You also have to then deal with the Validity of the TOKEN! how long is the
> TOKEN valid for?
> What algorithm do you use to ensure the validity of the Token? If i login
> and Copy the token. And come back later, and use the token without login,
> ... will your custom Algo fail?
>
> AH ! PHILOSOPHY
> -
> ...I think now you are realizing, that beyond communicating PASSWORDS or
> TOKENS there is a bottomless pit. ..and that is why you would choose
> something like CAS.
>
> If you are already thinking SSO, then you 'may' also want to think about
> the
> following:
>
> * Handing RESTful services via the SSO, not just some crude form of
> authenticated session management across machines. As yoou move to Mobile
> services, this will become very apparent. There home cook book solutions
> may
> not fair well
>
> * Integrate with 3rd party IDM (Identity management System) -- Like say
> LDAP
>
> * SAML integration .. ie. you may need your Applications to talk to apps on
> the cloud. And may want to provide seamless access across not just your
> servers but a Cloud like Sales Force
>
> * Also, today its 2 systems .. well they could easily be 3 or more?
>
>
> SUMMARY
> 
> ...Bottom line, your cost for thinking only about the immediate need of 2
> Wicket Systems may be the same or less than using a standard product like
> CAS. Which is free
>
> I'd also support the notion that you should evaluate CAS. Its
> configurations
> are in Spring, and furthermore they have a lot of adapters that are
> injected
> via Spring configs.
> We have overridden the existing plugins for our own custom use. Customizing
> Plugins on a Standard SSO is way fruitful than writing a SSO custom
> solution
> from scratch.
>
> ..I did that many years ago and its not worth it sir!
>
> -
> 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/Single-sign-on-SSO-for-two-WicketApplication-tp4620516p4624131.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: Loadable-detachable model for ListView

2012-05-10 Thread Igor Vaynberg
which objects get stored in session?

-igor

On Thu, May 10, 2012 at 11:30 AM, sudeivas  wrote:
> Hello Igor & Dan,
>          Can you please answer the question regarding storing objects in
> Session for DataView?
> Why does it store objects in Session since we are using LDM?
>
> -Suresh
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4624239.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: Loadable-detachable model for ListView

2012-05-10 Thread sudeivas
Hello Igor & Dan,
  Can you please answer the question regarding storing objects in
Session for DataView? 
Why does it store objects in Session since we are using LDM?

-Suresh

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4624239.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: Single sign on (SSO) for two WicketApplication

2012-05-10 Thread Arjun Dhar
Sir, I rant philosophy let me stop you @ "How could you send/share the
username password between den in a secure way" ! .. Let me Fast Forward you
thought what you will face on your own implementation:

...so heres the deal. Sharing passwords will not achieve anything. Because
the idea of SSO is to pass the understanding that the user is VALID (not the
process of authentication itself).
There is no good in the second system knowing the password,  for the
idea of SSO would be not to have the user use the password at all to enter
the 2nd system :)

THE MEAT STUFF BEGINS
-
Hope we agree on what that means. ... it boils down to basically creating a
TOKEN. A Token that is recognized across a set of servers that respect the
TOKEN. This TOKEN is in the form a secure Cookie.

Now, you may think "Ok lets Create a Secure Cookie and we should be good".
Ah! But there are more concerns. A Secure TOKEN by definition is what is
accessed via HTTPS, but it does not make it IMMUNE to Hacking attacks like
"SESSION HIJACKING" (basically I use JavaScript via XSS attack to steal you
cookies and JSESSIONID). A script on a Browser can access Cookies. There are
HTTP specifications to address this also, but they are server wide
configurations in Tomcat (Not Request level or Page level imo -- for those
who disagree. Refer: useHttpOnly @
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html).

You also have to then deal with the Validity of the TOKEN! how long is the
TOKEN valid for?
What algorithm do you use to ensure the validity of the Token? If i login
and Copy the token. And come back later, and use the token without login,
... will your custom Algo fail?

AH ! PHILOSOPHY
-
...I think now you are realizing, that beyond communicating PASSWORDS or
TOKENS there is a bottomless pit. ..and that is why you would choose
something like CAS.

If you are already thinking SSO, then you 'may' also want to think about the
following:

* Handing RESTful services via the SSO, not just some crude form of
authenticated session management across machines. As yoou move to Mobile
services, this will become very apparent. There home cook book solutions may
not fair well

* Integrate with 3rd party IDM (Identity management System) -- Like say LDAP

* SAML integration .. ie. you may need your Applications to talk to apps on
the cloud. And may want to provide seamless access across not just your
servers but a Cloud like Sales Force

* Also, today its 2 systems .. well they could easily be 3 or more?


SUMMARY

...Bottom line, your cost for thinking only about the immediate need of 2
Wicket Systems may be the same or less than using a standard product like
CAS. Which is free 

I'd also support the notion that you should evaluate CAS. Its configurations
are in Spring, and furthermore they have a lot of adapters that are injected
via Spring configs. 
We have overridden the existing plugins for our own custom use. Customizing
Plugins on a Standard SSO is way fruitful than writing a SSO custom solution
from scratch.

..I did that many years ago and its not worth it sir!

-
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/Single-sign-on-SSO-for-two-WicketApplication-tp4620516p4624131.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



Invalid URL generated when jsessionid is present

2012-05-10 Thread Guillaume Smet
Hi,

Under certain circumstances when we navigate on our Wicket site,
Wicket generates the following URL for a bookmarkable page link:
/mount/point/.;jsessionid=C94BC23C58FD2972B34E5DE145C076BB

The dot before the ;jsessionid= makes the mount point not recognized by Wicket.

The problem is when I click on a link pointing to the exact same page
I'm visiting.

Any idea on how to fix it?

Thanks.

-- 
Guillaume

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



Re: Single sign on (SSO) for two WicketApplication

2012-05-10 Thread Dan Retzlaff
Jens, I describe some details of our homegrown "application handoff"
solution here:
http://mail-archives.apache.org/mod_mbox/wicket-users/201202.mbox/%3ccac-l2fym4txq7733aeuvfdnustlte_nbsix2zojvytqkoga...@mail.gmail.com%3E


On Thu, May 10, 2012 at 4:02 AM, jensiator  wrote:

> What about if I say that its only wicket applications? Can we narrow it
> down
> even more then?
> In both apps have a link to each other so the end user can toggle between
> them. If these link's are external links. How could you send/share the
> username password between den in a secure way? Https of course but I don't
> have a clue when it comes to coding. Never worked with this.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Single-sign-on-SSO-for-two-WicketApplication-tp4620516p4623142.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: Single sign on (SSO) for two WicketApplication

2012-05-10 Thread Igor Vaynberg
look at sso solutions such as CAS[1]. see how they work, and either
use it directly, or implement your own variant if that suits you
better.

[1] http://www.jasig.org/cas

-igor

On Thu, May 10, 2012 at 4:02 AM, jensiator  wrote:
> What about if I say that its only wicket applications? Can we narrow it down
> even more then?
> In both apps have a link to each other so the end user can toggle between
> them. If these link's are external links. How could you send/share the
> username password between den in a secure way? Https of course but I don't
> have a clue when it comes to coding. Never worked with this.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Single-sign-on-SSO-for-two-WicketApplication-tp4620516p4623142.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: Force child component enabled

2012-05-10 Thread Jürgen Lind

Hi Martin,

I have created a quickstart and filed an issue (WICKET-4551). Thank you for 
your help.

J.

On 10.05.2012 10:17, Martin Grigorov wrote:

Hi,

I'd say that it is by design.
Component#canCallListenerInterface(Method) has been added recently
because a user wanted its image to be shown in a disabled panel.
File a ticket with a quickstart with the code from your earlier mail
and I'll try to find what is the problem.


On Thu, May 10, 2012 at 10:16 AM, Jürgen Lind  wrote:

Since no further replies to this issue came up, the question remains whether
this is "works as
design" or a bug. Should I file an issue on this? And could maybe one of the
developers explain
why the Component#isEnabledInhierarchy is final? After reading some core
code, I would guess that
maybe overriding that method could achieve the intended behavior...

J.


On 09.05.2012 16:36, Jürgen Lind wrote:


Ok, I stripped down everything to a very basic setup that should work
according to Martins
suggestions and the wicket documentation. Any ideas why
canCallListenerInterface is never called
here?

J.

import java.lang.reflect.Method;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;


public class SandboxPage extends WebPage {

public SandboxPage() {
  WebMarkupContainer container = new WebMarkupContainer("container") {
@Override
public boolean isEnabled() {
  return false;
}
  };
  AjaxLinklink = new AjaxLink("link") {
@Override
protected boolean isLinkEnabled() {
  System.out.println(" le");
  return true;
}

@Override
public boolean canCallListenerInterface(Method method) {
  System.out.println(" cc");
  return true;
}

@Override
public boolean isEnabled() {
  System.out.println(" ie");
  return true;
}

@Override
public void onClick(AjaxRequestTarget target) {
  System.out.println("clicked...");
}
  };

  container.add(link);
  this.add(container);
}
}



  
Click me!
  



On 09.05.2012 14:29, Jürgen Lind wrote:


Hi Martin,

thanks for the hint, unfortunatly, it does not work :-( I've been looking
through the relevant
code and the approach seems right, however at some point, the returned
values seem to be ignored
and the link is still disabled (i.e. the onclick-handler is not
rendered)... I will have to
investigate further...

J.

On 09.05.2012 13:05, Martin Grigorov wrote:


Hi,

I think it is possible to do that for links.
You'll need to override
org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and
org.apache.wicket.Component#canCallListenerInterface(Method)

The first is needed to not render the link as disabled. The second is
needed to be able to actually execute the links logic.

The second method is added in 1.5.x.

On Wed, May 9, 2012 at 1:47 PM, Jürgen Lind
  wrote:


Hi Martin,

that was my initial approach. However, I would like the collapsible
panels
to keep their
state between form submits, therefore I would need some sort of
Javascript
state management
or I would simply use ajax links for that purpose. Which is what I
would
prefer... A later
post already mentioned that this wont be too easy, so maybe I will have
to
go back to JS...

J.


On 09.05.2012 11:16, Martin Grigorov wrote:



Hi,

Why don't use plain Javascript for this. It will be faster because it
wont make roundtrip to the server and wont be disabled as a Wicket
component ?

On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind
wrote:



Hi,

I have a little problem in my application and maybe someone has an
idea
how
to solve it:
I have a complex form that is structured using a custom collapsible
AJAX-panel to show/hide
certain parts of the form. Now, if a user does not have the write
permission
for the form, the
form is disabled and therefore all input elements as well (which is
good).
However, for
obvious reaons, I would like the collapsible panels to remain
enabled.
How
could I achieve
this? I have already tried to have the ajax-link for the panel to
always
return true from
isEnabled, but that seems to be overriden by the parent component.
Any
ideas
where to look?

Cheers,

Jürgen


-
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










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

Re: Add components dynamically to a list view

2012-05-10 Thread James Carman
Are you looking to auto-generate some kind of "editor"?  If so, you
should check out Wicketopia.  That's what it does!  If it doesn't work
exactly for your needs, perhaps you can borrow from it or just shoot
an email to the mailing list and we'll (or "I'll") take a look.

On Thu, May 10, 2012 at 10:37 AM, cristic83  wrote:
> Hi guys,
>
> I have the following scenario to implement and I couldn't devise my own
> solution or find anywhere on the internet something that could help me, so I
> thought to give it a try on this mailing list. So here it goes the issue
> that I have:
>
> I want to add to a list view different components dynamically. E.g.,
> depending on the listItem model, I want to add an input field or a select
> box to my list view. And I also want to use the CompoundPropertyModel for
> these components added dynamically.
>
> What I did until now was something like this: in the populateItem method of
> the listView I set the model of the listItem to be a compound propertymodel
> like this:
>
> listItem.setModel(new
> CompoundPropertyModel(fieldDescriptorListItem.getModel()));
>
> Then, I added a Label to the listItem like this: listItem.add(new
> Label("name")); //the model has a name property -this works
>
> The model class has a type property which tells me what type of component I
> should display: input or select and a String property which is used to hold
> the value entered/selected by the user.
>
> Now, I want to add input or select fields dynamically based on the model
> type property. In order to do that, the only solution I could find was to
> create a panel for each type of field I wanted to add, e.g. TextFieldPanel
> or DropDownBoxPanel. Then I added that panel to the listView. This is not
> good for me, because this way I cannot bind the value entered by the user to
> the model using the compound property model, since I have an intermediary
> panel. Is there a way I could avoid wrapping the components in this
> intermediary panel? I found this link:
> https://cwiki.apache.org/WICKET/page-with-dynamic-components.html suggesting
> to use the wicket:container tag but I could not make it work.
>
> Do you have any ideas on how this can be accomplished?
>
> Thanks in advance,
> Cristi
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Add-components-dynamically-to-a-list-view-tp4623678.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: Web app slow after migrating from WebSphere 6.1 to Tomcat 7

2012-05-10 Thread shetc
Hi James --
Apache was originally part of the test setup but the results were so bad
that we decided to remove it
in order to eliminate it as a factor.

BTW, I forgot to mention we are using Tomcat 7, JRE 6, Rehat Linux

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Web-app-slow-after-migrating-from-WebSphere-6-1-to-Tomcat-7-tp4623666p4623680.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



Add components dynamically to a list view

2012-05-10 Thread cristic83
Hi guys,

I have the following scenario to implement and I couldn't devise my own
solution or find anywhere on the internet something that could help me, so I
thought to give it a try on this mailing list. So here it goes the issue
that I have:

I want to add to a list view different components dynamically. E.g.,
depending on the listItem model, I want to add an input field or a select
box to my list view. And I also want to use the CompoundPropertyModel for
these components added dynamically. 

What I did until now was something like this: in the populateItem method of
the listView I set the model of the listItem to be a compound propertymodel
like this: 

listItem.setModel(new
CompoundPropertyModel(fieldDescriptorListItem.getModel()));

Then, I added a Label to the listItem like this: listItem.add(new
Label("name")); //the model has a name property -this works

The model class has a type property which tells me what type of component I
should display: input or select and a String property which is used to hold
the value entered/selected by the user.

Now, I want to add input or select fields dynamically based on the model
type property. In order to do that, the only solution I could find was to
create a panel for each type of field I wanted to add, e.g. TextFieldPanel
or DropDownBoxPanel. Then I added that panel to the listView. This is not
good for me, because this way I cannot bind the value entered by the user to
the model using the compound property model, since I have an intermediary
panel. Is there a way I could avoid wrapping the components in this
intermediary panel? I found this link:
https://cwiki.apache.org/WICKET/page-with-dynamic-components.html suggesting
to use the wicket:container tag but I could not make it work. 

Do you have any ideas on how this can be accomplished?

Thanks in advance,
Cristi



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Add-components-dynamically-to-a-list-view-tp4623678.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: Web app slow after migrating from WebSphere 6.1 to Tomcat 7

2012-05-10 Thread James Carman
Have you tried fronting Tomcat with Apache?

On Thu, May 10, 2012 at 10:30 AM, shetc  wrote:
> Hi All,
>
> Not sure that this is really a Wicket question but I am having trouble
> finding answers elsewhere.
>
> I have a production Wicket-based app that runs just fine in WebSphere 6.1. I
> am trying to move this
> app to Tomcat 7. Performance testing has revealed significantly (and
> unacceptable) slower page
> response time for Tomcat. I have pinpointed the problem to the resources
> being served including *.js, *.css
> and bitmaps, of which there aren't really that many. If I strip these
> resources out of the app then it
> runs very fast so I know it's not about Wicket/Spring/Hibernate etc. I tried
> making a plain HTML page,
> copying the resources to the usual WebContent area of the web app, and
> referring to those resources in the
> page -- this page is also really slow in performance testing.
>
> The Tomcat instance is sitting on beefy hardware, has significant amount of
> memory and threads
> allocated to it. Is there something I have missed when setting up Tomcat?
>
> BTW, this is an older app using Wicket 1.3.7.
>
> Thanks,
> Steve
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Web-app-slow-after-migrating-from-WebSphere-6-1-to-Tomcat-7-tp4623666.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



Web app slow after migrating from WebSphere 6.1 to Tomcat 7

2012-05-10 Thread shetc
Hi All,

Not sure that this is really a Wicket question but I am having trouble
finding answers elsewhere.

I have a production Wicket-based app that runs just fine in WebSphere 6.1. I
am trying to move this
app to Tomcat 7. Performance testing has revealed significantly (and
unacceptable) slower page
response time for Tomcat. I have pinpointed the problem to the resources
being served including *.js, *.css 
and bitmaps, of which there aren't really that many. If I strip these
resources out of the app then it
runs very fast so I know it's not about Wicket/Spring/Hibernate etc. I tried
making a plain HTML page,
copying the resources to the usual WebContent area of the web app, and
referring to those resources in the
page -- this page is also really slow in performance testing. 

The Tomcat instance is sitting on beefy hardware, has significant amount of
memory and threads
allocated to it. Is there something I have missed when setting up Tomcat?

BTW, this is an older app using Wicket 1.3.7.

Thanks,
Steve

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Web-app-slow-after-migrating-from-WebSphere-6-1-to-Tomcat-7-tp4623666.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: running visural wicket with wicket 1.5

2012-05-10 Thread Paul Szulc
thank you!!!

no I feel kinda dumb...

On Thu, May 10, 2012 at 3:51 PM, Martin Grigorov wrote:

> app.getHeaderContributorListenerCollection().add(new IHeaderContributor() {
>  @Override public void renderHead(IHeaderResponse response) {
>response.renderJavaScriptReference(new JQueryResourceReference());
>  }
> })
>
> On Thu, May 10, 2012 at 4:37 PM, Paul Szulc  wrote:
> > Ok, for some of you very simple question but even with this
> >
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-HeaderContribution
> > I
> > can not get Visural Wicket running on Wicket 1.5.6
> >
> > For Wicket 1.4 I was doing something like this
> >
> > public class Application extends WebApplication {
> >
> >public Application() {
> >
>  addRenderHeadListener(JavascriptPackageResource.getHeaderContribution(new
> > JQueryResourceReference()));
> >}
> >
> >
> > and hurray visural-with was up and running. What should I do in 1.5 to
> use
> > it without pain? :)
> >
> >
> > Paul Szulc
>
>
>
> --
> 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
>
>


-- 
Best regards,
Paul Szulc

http://www.paulszulc.com


Re: running visural wicket with wicket 1.5

2012-05-10 Thread Martin Grigorov
app.getHeaderContributorListenerCollection().add(new IHeaderContributor() {
  @Override public void renderHead(IHeaderResponse response) {
response.renderJavaScriptReference(new JQueryResourceReference());
  }
})

On Thu, May 10, 2012 at 4:37 PM, Paul Szulc  wrote:
> Ok, for some of you very simple question but even with this
> https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-HeaderContribution
> I
> can not get Visural Wicket running on Wicket 1.5.6
>
> For Wicket 1.4 I was doing something like this
>
> public class Application extends WebApplication {
>
>    public Application() {
>        
> addRenderHeadListener(JavascriptPackageResource.getHeaderContribution(new
> JQueryResourceReference()));
>    }
>
>
> and hurray visural-with was up and running. What should I do in 1.5 to use
> it without pain? :)
>
>
> Paul Szulc



-- 
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



running visural wicket with wicket 1.5

2012-05-10 Thread Paul Szulc
Ok, for some of you very simple question but even with this
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+1.5#MigrationtoWicket1.5-HeaderContribution
I
can not get Visural Wicket running on Wicket 1.5.6

For Wicket 1.4 I was doing something like this

public class Application extends WebApplication {

public Application() {

addRenderHeadListener(JavascriptPackageResource.getHeaderContribution(new
JQueryResourceReference()));
}


and hurray visural-with was up and running. What should I do in 1.5 to use
it without pain? :)


Paul Szulc


Re: TableComponentAsXlsHandler Problem

2012-05-10 Thread khanshan
MArtin, 
Let me summarize problem,
I want to post an excel file which is populated dynamiclally from database
after on click of a link.

I dont want to use TableComponentAsXlsHandler coz I dont want to load all
data to a Listarraycomponent, coz I have to export huge number of rows such
as 100.000 records in excel. That is why I generate excell file
successfully, with POI and I post file successfully. BUT I have problem
while opening excell file after its download on clicnt side. It doesnt open.
I gives error. I think I have problem below there.

byte[] bai = null; 
bai = workbooksample.getBytes();
ByteArrayResource byteArrayResource = new
ByteArrayResource("application/vnd.ms-excel", bai, "a.xls");
RequestCycle.get().scheduleRequestHandlerAfterCurrent(new
ResourceRequestHandler(byteArrayResource,null));

inside of excell file there is no mistake, it writes successfully on file.
But I just have problem while opening excell file on first click. It gives
error as "corrupted file".

I guess I am clear.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4623444.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: Field with OnChangeAjaxBehavior Not updating.

2012-05-10 Thread jensiator
In the AjaxLink you change the model and I think your model becomes out of
sync with the formcomponent.  I think the formcomponent don't know which
value it should use. The one the end user typed or the model that has
changed. Sometimes it helps to think about when you want the model to be
update. I personally thinks one should try to update the models as little as
possibly with ajax. I think the most web users expect the data to be updated
when the form is submitted. Not on events like unblur and onchange. But you
can't always avoid it. 
One way of doing it could be to let the Ajaxlink only update the text value
in the textfield. The textfield will not be set to the model until you
submit. You would need to introduce a ordinary form submit button.
And you would need to divide the Textfields model from what the AjaxLink is
changing. 
You will always need to add the textfields to you AjaxRequestTarget art.
But as I see it you got two choices here. 
1. In the Ajaxlink onclick you do your db work and set some property in the
model. The textfield is not binded to the same property. Instead you
override the Textfields onComponentTag method and
pTag.put("value",fromDBWith.toString()). ( toString is not enough you should
use a converter her, Look below )
2.  I would probably try to put the dbcall in the onComponentTag of the
textfield. The reason for this is because it would be great to have the
textfield component in charge for what it will display. If you got
cooworkes, would they look in the AjaxLink if the Textfield was not working
as expected? You would need to do some checks if the AjaxLink have been
clicked then I guess. 

Anyone else got something on this? It depends a little from case to case. I
have created a Behavior for this instead of overriding oncomponenttag.

And about
 @Override public  IConverter getConverter(Class ctype) {
if (BigDecimal.class.isAssignableFrom(ctype)) { 
MoneyConverter mc = new MoneyConverter(false, false); 

I suggest you change the default BigdecimalConverter on application level
instead. in wicket 1.4. you override newConverterLocator in the Application. 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Field-with-OnChangeAjaxBehavior-Not-updating-tp4608156p4623294.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: refresh page from an AjaxLink or OnChangeAjaxBehavior

2012-05-10 Thread jensiator
Do you really need to call this?
setResponse(currentPage.getClass(), currentPage.getPageParameters()); 

If its just some components on the same page that will be affected by the
dropdown change, the above solution feels unnecessary. If you use ajax or
javascript the page don't need to be updated in a ordinary. request 

You could just update the component/components on the page that my be
affected by the dropdown change. You can do this by adding these components
to the AjaxRequestTarget.
If you add a AjaxFormComponentUpdatingBehavior on the dropdown, and a model
to the page, you would even update the model with the dropdown value. Any
components that you have added to the AjaxRequestTarget would then render.
In these affected components you can either override onComponentTag or
--TagBody to change it rendered values. I prefer to give the components a
specialized model. 
in wicket 1.5 you can do it even decoupled. 

If I not completely off target I can give you some code examples..



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/refresh-page-from-an-AjaxLink-or-OnChangeAjaxBehavior-tp4614698p4623193.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: Two YUI DatePickers - use first date as basis for second date

2012-05-10 Thread Martin Grigorov
Hi,

You can update the second DatePicker with Ajax or just clientside
after the user makes a selection on the first.
Check YUI docs to see what exactly you need to do.

On Thu, May 10, 2012 at 12:43 PM, Vishal Popat
 wrote:
> Hi,
>
> I have two YUI DatePickers where the date selected from the first DatePicker 
> is the starting date (+1) for the second DatePicker.
> I would ideally like to disable the dates prior to the first date as well.
> The scenario is like checkin and checkout dates for hotels.
>
> I cannot work out how to hook into the YUI javascript after the page has 
> already loaded- assuming that is the best way to solve the problem.
>
> Any help would be appreciated.
>
> Regards
> Vishal
> -
> 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: Single sign on (SSO) for two WicketApplication

2012-05-10 Thread jensiator
What about if I say that its only wicket applications? Can we narrow it down
even more then?
In both apps have a link to each other so the end user can toggle between
them. If these link's are external links. How could you send/share the
username password between den in a secure way? Https of course but I don't
have a clue when it comes to coding. Never worked with this. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Single-sign-on-SSO-for-two-WicketApplication-tp4620516p4623142.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: wiquery, wicket 1.5.6 and wicket authroles

2012-05-10 Thread Stefan Moises

Hi,

yes, invalidateNow() gets called and it seems to go into all the session 
cleanup/remove stuff that comes after that...
but somehow, I get to the homepage in the end and I'm still (again?) 
logged in :O
But only if WiQuery is involved... although I didn't see any WiQuery 
related call while stepping through the debug session :(

Any more ideas?

Best,
Stefan

Am 10.05.2012 10:58, schrieb Martin Grigorov:

On Thu, May 10, 2012 at 11:48 AM, Stefan Moises  wrote:

Hi,

hm, that's weird... if I set the response page I get redirected to the home
page, but I am NOT logged out... even if ...logout() and ...invalidate()
seem to get called... ?
No error, no exception, no nothing...

Any ideas?

Put a breakpoint in Session#detach() and see whether #invalidateNow()
is executed.


Thanks,
Stefan

Am 10.05.2012 10:34, schrieb Martin Grigorov:


Hi,

On Thu, May 10, 2012 at 11:31 AM, Stefan Moises
  wrote:

Hi there,

I have integrated WiQuery 1.5.5 in Wicket 1.5.6 and I am using Wicket
Authroles for a login functionality (combined with Apache Shiro) for more
complex rights/rules.
Everything works fine, but when I try to logout using my Signout page, I
get
an infinite redirect loop in the browser (too many redirects, stating a
302
HTTP error) ... if I remove WiQuery, everything is working fine again and
I
can properly logout.
Now I have no idea where to even start to identify the problem...

My Signout page really doesn't do much:
public class GlSignoutPage extends GlBasePage {
public GlSignoutPage(PageParameters parameters) {
super(parameters);
SecurityUtils.getSubject().logout();
getSession().invalidate();

try with adding here:
setResponsePage(getApplication().getHomePage());


}
}

The Signin page, however, is working... so it shouldn't be a problem that
there is no valid session yet or something like that...

Now my questions are:
1. does anybody use WiQuery with Authroles (or maybe even Shiro)
2. is there any known incompatibility between WiQuery 1.5.5 and Wicket
1.5.6? If so, when will WiQuery 1.5.6. be released?
3. does anybody have any clues what the problem may be?

Thanks a lot,
Stefan

--
Mit den besten Grüßen aus Nürnberg,
Stefan Moises

***
Stefan Moises
Senior Softwareentwickler
Leiter Modulentwicklung

shoptimax GmbH
Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-0
Fax:  0911/25566-29
moi...@shoptimax.de
http://www.shoptimax.de
***



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




--
Mit den besten Grüßen aus Nürnberg,
Stefan Moises

***
Stefan Moises
Senior Softwareentwickler
Leiter Modulentwicklung

shoptimax GmbH
Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-0
Fax:  0911/25566-29
moi...@shoptimax.de
http://www.shoptimax.de
***



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






--
Mit den besten Grüßen aus Nürnberg,
Stefan Moises

***
Stefan Moises
Senior Softwareentwickler
Leiter Modulentwicklung

shoptimax GmbH
Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-0
Fax:  0911/25566-29
moi...@shoptimax.de
http://www.shoptimax.de
***



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



Two YUI DatePickers - use first date as basis for second date

2012-05-10 Thread Vishal Popat
Hi,

I have two YUI DatePickers where the date selected from the first DatePicker is 
the starting date (+1) for the second DatePicker.
I would ideally like to disable the dates prior to the first date as well.
The scenario is like checkin and checkout dates for hotels.

I cannot work out how to hook into the YUI javascript after the page has 
already loaded- assuming that is the best way to solve the problem.

Any help would be appreciated.

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



Re: wiquery, wicket 1.5.6 and wicket authroles

2012-05-10 Thread Martin Grigorov
On Thu, May 10, 2012 at 11:48 AM, Stefan Moises  wrote:
> Hi,
>
> hm, that's weird... if I set the response page I get redirected to the home
> page, but I am NOT logged out... even if ...logout() and ...invalidate()
> seem to get called... ?
> No error, no exception, no nothing...
>
> Any ideas?

Put a breakpoint in Session#detach() and see whether #invalidateNow()
is executed.

>
> Thanks,
> Stefan
>
> Am 10.05.2012 10:34, schrieb Martin Grigorov:
>
>> Hi,
>>
>> On Thu, May 10, 2012 at 11:31 AM, Stefan Moises
>>  wrote:
>>>
>>> Hi there,
>>>
>>> I have integrated WiQuery 1.5.5 in Wicket 1.5.6 and I am using Wicket
>>> Authroles for a login functionality (combined with Apache Shiro) for more
>>> complex rights/rules.
>>> Everything works fine, but when I try to logout using my Signout page, I
>>> get
>>> an infinite redirect loop in the browser (too many redirects, stating a
>>> 302
>>> HTTP error) ... if I remove WiQuery, everything is working fine again and
>>> I
>>> can properly logout.
>>> Now I have no idea where to even start to identify the problem...
>>>
>>> My Signout page really doesn't do much:
>>> public class GlSignoutPage extends GlBasePage {
>>>    public GlSignoutPage(PageParameters parameters) {
>>>        super(parameters);
>>>        SecurityUtils.getSubject().logout();
>>>        getSession().invalidate();
>>
>> try with adding here:
>> setResponsePage(getApplication().getHomePage());
>>
>>>    }
>>> }
>>>
>>> The Signin page, however, is working... so it shouldn't be a problem that
>>> there is no valid session yet or something like that...
>>>
>>> Now my questions are:
>>> 1. does anybody use WiQuery with Authroles (or maybe even Shiro)
>>> 2. is there any known incompatibility between WiQuery 1.5.5 and Wicket
>>> 1.5.6? If so, when will WiQuery 1.5.6. be released?
>>> 3. does anybody have any clues what the problem may be?
>>>
>>> Thanks a lot,
>>> Stefan
>>>
>>> --
>>> Mit den besten Grüßen aus Nürnberg,
>>> Stefan Moises
>>>
>>> ***
>>> Stefan Moises
>>> Senior Softwareentwickler
>>> Leiter Modulentwicklung
>>>
>>> shoptimax GmbH
>>> Guntherstraße 45 a
>>> 90461 Nürnberg
>>> Amtsgericht Nürnberg HRB 21703
>>> GF Friedrich Schreieck
>>>
>>> Tel.: 0911/25566-0
>>> Fax:  0911/25566-29
>>> moi...@shoptimax.de
>>> http://www.shoptimax.de
>>> ***
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>>
>
> --
> Mit den besten Grüßen aus Nürnberg,
> Stefan Moises
>
> ***
> Stefan Moises
> Senior Softwareentwickler
> Leiter Modulentwicklung
>
> shoptimax GmbH
> Guntherstraße 45 a
> 90461 Nürnberg
> Amtsgericht Nürnberg HRB 21703
> GF Friedrich Schreieck
>
> Tel.: 0911/25566-0
> Fax:  0911/25566-29
> moi...@shoptimax.de
> http://www.shoptimax.de
> ***
>
>
>
> -
> 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: wiquery, wicket 1.5.6 and wicket authroles

2012-05-10 Thread Stefan Moises

Hi,

hm, that's weird... if I set the response page I get redirected to the 
home page, but I am NOT logged out... even if ...logout() and 
...invalidate() seem to get called... ?

No error, no exception, no nothing...

Any ideas?

Thanks,
Stefan

Am 10.05.2012 10:34, schrieb Martin Grigorov:

Hi,

On Thu, May 10, 2012 at 11:31 AM, Stefan Moises  wrote:

Hi there,

I have integrated WiQuery 1.5.5 in Wicket 1.5.6 and I am using Wicket
Authroles for a login functionality (combined with Apache Shiro) for more
complex rights/rules.
Everything works fine, but when I try to logout using my Signout page, I get
an infinite redirect loop in the browser (too many redirects, stating a 302
HTTP error) ... if I remove WiQuery, everything is working fine again and I
can properly logout.
Now I have no idea where to even start to identify the problem...

My Signout page really doesn't do much:
public class GlSignoutPage extends GlBasePage {
public GlSignoutPage(PageParameters parameters) {
super(parameters);
SecurityUtils.getSubject().logout();
getSession().invalidate();

try with adding here:
setResponsePage(getApplication().getHomePage());


}
}

The Signin page, however, is working... so it shouldn't be a problem that
there is no valid session yet or something like that...

Now my questions are:
1. does anybody use WiQuery with Authroles (or maybe even Shiro)
2. is there any known incompatibility between WiQuery 1.5.5 and Wicket
1.5.6? If so, when will WiQuery 1.5.6. be released?
3. does anybody have any clues what the problem may be?

Thanks a lot,
Stefan

--
Mit den besten Grüßen aus Nürnberg,
Stefan Moises

***
Stefan Moises
Senior Softwareentwickler
Leiter Modulentwicklung

shoptimax GmbH
Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-0
Fax:  0911/25566-29
moi...@shoptimax.de
http://www.shoptimax.de
***



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






--
Mit den besten Grüßen aus Nürnberg,
Stefan Moises

***
Stefan Moises
Senior Softwareentwickler
Leiter Modulentwicklung

shoptimax GmbH
Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-0
Fax:  0911/25566-29
moi...@shoptimax.de
http://www.shoptimax.de
***



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



Re: Wicket Examples

2012-05-10 Thread Martin Grigorov
I've undeployed wicket-examples-1.3.x, brix-demo,
wicket-contrib-examples (1.2.x).
Let's see whether it will behave better now.

On Tue, May 8, 2012 at 3:18 PM, Korbinian Bachl - privat
 wrote:
> Hi,
>
> some hints:
>
> Make sure the jvm the server is running in is started with (I assume JRE 1.6
> -> 1.6.0_32):
>
> -server
> -XX:+UseConcMarkSweepGC
> -XX:+CMSPermGenSweepingEnabled
> -XX:+CMSClassUnloadingEnabled
>
> Also make sure permGen is specified big enough, e.g:
> -XX:MaxPermSize=384m
>
>
> Also, I wouldn't recommend to restart the tomcat too often, else you'll
> loose the goodies of the HotSpot VM;
>
> Best
>
>
>
> Am 08.05.12 11:59, schrieb Martin Grigorov:
>
>> I can see it now ...
>> Maybe it is because I uploaded the examples for 6.x, 1.5.x, 1.4.x,
>> inmethod-grid and Brix at it.
>> I'm not sure how much this machine can handle ...
>> I'll undeploy Brix and some old wicket-contrib examples.
>>
>> On Tue, May 8, 2012 at 12:43 PM, Fergal Keating
>>   wrote:
>>>
>>> I got a PermGen space error on that URL.
>>>
>>> javax.servlet.ServletException: Filter execution threw an exception
>>>
>>> *root cause*
>>>
>>> java.lang.OutOfMemoryError: PermGen space
>>>
>>>
>>> On 8 May 2012 08:31, Martin Grigorov  wrote:
>>>


 http://www.wicket-library.com/wicket-examples/repeater/wicket/bookmarkable/org.apache.wicket.examples.repeater.FormPage
 works OK for me

 On Tue, May 8, 2012 at 12:43 AM, Corbin, James
 wrote:
>
> The wicket examples (www.wicket-library.com/wicket-examples/) seems to

 be having issues.
>
>
> I select the Contacts Editor option under the repeaters section and I

 get a permgen error.
>
>
> Is this site working properly?  I assume the URL above is appropriate?
>
> J.D.




 --
 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


>>>
>>>
>>> --
>>> Fergal Keating
>>> IT Senior Engineer
>>> ---
>>> e. fergal.keat...@directski.com
>>> p. NA
>>> w. www.directski.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: wiquery, wicket 1.5.6 and wicket authroles

2012-05-10 Thread Martin Grigorov
Hi,

On Thu, May 10, 2012 at 11:31 AM, Stefan Moises  wrote:
> Hi there,
>
> I have integrated WiQuery 1.5.5 in Wicket 1.5.6 and I am using Wicket
> Authroles for a login functionality (combined with Apache Shiro) for more
> complex rights/rules.
> Everything works fine, but when I try to logout using my Signout page, I get
> an infinite redirect loop in the browser (too many redirects, stating a 302
> HTTP error) ... if I remove WiQuery, everything is working fine again and I
> can properly logout.
> Now I have no idea where to even start to identify the problem...
>
> My Signout page really doesn't do much:
> public class GlSignoutPage extends GlBasePage {
>    public GlSignoutPage(PageParameters parameters) {
>        super(parameters);
>        SecurityUtils.getSubject().logout();
>        getSession().invalidate();

try with adding here:
setResponsePage(getApplication().getHomePage());

>    }
> }
>
> The Signin page, however, is working... so it shouldn't be a problem that
> there is no valid session yet or something like that...
>
> Now my questions are:
> 1. does anybody use WiQuery with Authroles (or maybe even Shiro)
> 2. is there any known incompatibility between WiQuery 1.5.5 and Wicket
> 1.5.6? If so, when will WiQuery 1.5.6. be released?
> 3. does anybody have any clues what the problem may be?
>
> Thanks a lot,
> Stefan
>
> --
> Mit den besten Grüßen aus Nürnberg,
> Stefan Moises
>
> ***
> Stefan Moises
> Senior Softwareentwickler
> Leiter Modulentwicklung
>
> shoptimax GmbH
> Guntherstraße 45 a
> 90461 Nürnberg
> Amtsgericht Nürnberg HRB 21703
> GF Friedrich Schreieck
>
> Tel.: 0911/25566-0
> Fax:  0911/25566-29
> moi...@shoptimax.de
> http://www.shoptimax.de
> ***
>
>
>
> -
> 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, wicket 1.5.6 and wicket authroles

2012-05-10 Thread Stefan Moises

Hi there,

I have integrated WiQuery 1.5.5 in Wicket 1.5.6 and I am using Wicket 
Authroles for a login functionality (combined with Apache Shiro) for 
more complex rights/rules.
Everything works fine, but when I try to logout using my Signout page, I 
get an infinite redirect loop in the browser (too many redirects, 
stating a 302 HTTP error) ... if I remove WiQuery, everything is working 
fine again and I can properly logout.

Now I have no idea where to even start to identify the problem...

My Signout page really doesn't do much:
public class GlSignoutPage extends GlBasePage {
public GlSignoutPage(PageParameters parameters) {
super(parameters);
SecurityUtils.getSubject().logout();
getSession().invalidate();
}
}

The Signin page, however, is working... so it shouldn't be a problem 
that there is no valid session yet or something like that...


Now my questions are:
1. does anybody use WiQuery with Authroles (or maybe even Shiro)
2. is there any known incompatibility between WiQuery 1.5.5 and Wicket 
1.5.6? If so, when will WiQuery 1.5.6. be released?

3. does anybody have any clues what the problem may be?

Thanks a lot,
Stefan

--
Mit den besten Grüßen aus Nürnberg,
Stefan Moises

***
Stefan Moises
Senior Softwareentwickler
Leiter Modulentwicklung

shoptimax GmbH
Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-0
Fax:  0911/25566-29
moi...@shoptimax.de
http://www.shoptimax.de
***



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



Re: TableComponentAsXlsHandler Problem

2012-05-10 Thread Martin Grigorov
On Thu, May 10, 2012 at 11:19 AM, khanshan  wrote:
> So Mr Grigorev,
> Byte array causes problem?

What kind of problem ?
Please be more specific.

The example at 
https://github.com/wicketstuff/core/blob/master/jdk-1.6-parent/wicket-poi-parent/wicket-poi-examples/src/main/java/org/wicketstuff/poi/ListViewFormComponentReuseManagerPage.java
works.
Check what you are doing wrong.

> is there an alternative way to respond workbook ? of converting it to file,
> or sth else?
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4622835.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: How to remove submit button in org.apache.wicket.datetime.markup.html.form.DateTextField

2012-05-10 Thread Martin Grigorov
Hi,

What submit button do you mean ?
DateTextField is a simple , DatePicker is a Behavior ...

On Thu, May 10, 2012 at 10:37 AM, nickey  wrote:
> Hi,
>
> I am using DateTextField and DatePicker in my application, but I need to
> remove submit button from DateTextField as its redundant, any ides?
>
> Regards,
>
> Nikola.
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/How-to-remove-submit-button-in-org-apache-wicket-datetime-markup-html-form-DateTextField-tp4622741.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: TableComponentAsXlsHandler Problem

2012-05-10 Thread khanshan
So Mr Grigorev, 
Byte array causes problem? 
is there an alternative way to respond workbook ? of converting it to file,
or sth else?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4622835.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: Force child component enabled

2012-05-10 Thread Martin Grigorov
Hi,

I'd say that it is by design.
Component#canCallListenerInterface(Method) has been added recently
because a user wanted its image to be shown in a disabled panel.
File a ticket with a quickstart with the code from your earlier mail
and I'll try to find what is the problem.


On Thu, May 10, 2012 at 10:16 AM, Jürgen Lind  wrote:
> Since no further replies to this issue came up, the question remains whether
> this is "works as
> design" or a bug. Should I file an issue on this? And could maybe one of the
> developers explain
> why the Component#isEnabledInhierarchy is final? After reading some core
> code, I would guess that
> maybe overriding that method could achieve the intended behavior...
>
> J.
>
>
> On 09.05.2012 16:36, Jürgen Lind wrote:
>>
>> Ok, I stripped down everything to a very basic setup that should work
>> according to Martins
>> suggestions and the wicket documentation. Any ideas why
>> canCallListenerInterface is never called
>> here?
>>
>> J.
>>
>> import java.lang.reflect.Method;
>>
>> import org.apache.wicket.ajax.AjaxRequestTarget;
>> import org.apache.wicket.ajax.markup.html.AjaxLink;
>> import org.apache.wicket.markup.html.WebMarkupContainer;
>> import org.apache.wicket.markup.html.WebPage;
>>
>>
>> public class SandboxPage extends WebPage {
>>
>>    public SandboxPage() {
>>      WebMarkupContainer container = new WebMarkupContainer("container") {
>>        @Override
>>        public boolean isEnabled() {
>>          return false;
>>        }
>>      };
>>      AjaxLink  link = new AjaxLink("link") {
>>        @Override
>>        protected boolean isLinkEnabled() {
>>          System.out.println(" le");
>>          return true;
>>        }
>>
>>        @Override
>>        public boolean canCallListenerInterface(Method method) {
>>          System.out.println(" cc");
>>          return true;
>>        }
>>
>>        @Override
>>        public boolean isEnabled() {
>>          System.out.println(" ie");
>>          return true;
>>        }
>>
>>        @Override
>>        public void onClick(AjaxRequestTarget target) {
>>          System.out.println("clicked...");
>>        }
>>      };
>>
>>      container.add(link);
>>      this.add(container);
>>    }
>> }
>>
>> 
>> 
>>      
>>        Click me!
>>      
>> 
>>
>>
>> On 09.05.2012 14:29, Jürgen Lind wrote:
>>>
>>> Hi Martin,
>>>
>>> thanks for the hint, unfortunatly, it does not work :-( I've been looking
>>> through the relevant
>>> code and the approach seems right, however at some point, the returned
>>> values seem to be ignored
>>> and the link is still disabled (i.e. the onclick-handler is not
>>> rendered)... I will have to
>>> investigate further...
>>>
>>> J.
>>>
>>> On 09.05.2012 13:05, Martin Grigorov wrote:

 Hi,

 I think it is possible to do that for links.
 You'll need to override
 org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and
 org.apache.wicket.Component#canCallListenerInterface(Method)

 The first is needed to not render the link as disabled. The second is
 needed to be able to actually execute the links logic.

 The second method is added in 1.5.x.

 On Wed, May 9, 2012 at 1:47 PM, Jürgen Lind
  wrote:
>
> Hi Martin,
>
> that was my initial approach. However, I would like the collapsible
> panels
> to keep their
> state between form submits, therefore I would need some sort of
> Javascript
> state management
> or I would simply use ajax links for that purpose. Which is what I
> would
> prefer... A later
> post already mentioned that this wont be too easy, so maybe I will have
> to
> go back to JS...
>
> J.
>
>
> On 09.05.2012 11:16, Martin Grigorov wrote:
>>
>>
>> Hi,
>>
>> Why don't use plain Javascript for this. It will be faster because it
>> wont make roundtrip to the server and wont be disabled as a Wicket
>> component ?
>>
>> On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind
>> wrote:
>>>
>>>
>>> Hi,
>>>
>>> I have a little problem in my application and maybe someone has an
>>> idea
>>> how
>>> to solve it:
>>> I have a complex form that is structured using a custom collapsible
>>> AJAX-panel to show/hide
>>> certain parts of the form. Now, if a user does not have the write
>>> permission
>>> for the form, the
>>> form is disabled and therefore all input elements as well (which is
>>> good).
>>> However, for
>>> obvious reaons, I would like the collapsible panels to remain
>>> enabled.
>>> How
>>> could I achieve
>>> this? I have already tried to have the ajax-link for the panel to
>>> always
>>> return true from
>>> isEnabled, but that seems to be overriden by the parent component.
>>> Any
>>> ideas
>>> where to look?
>>>
>>> Cheers,
>>>
>>> Jürgen
>>>
>>>
>>> 

Re: SwingTree to WicketTree + Drag Drop + Different Objects

2012-05-10 Thread Sven Meier
You just implement ITreeProvider, the tree implementation doesn't care 
about the generics parameter. 
You'll have do an instanceof check in some places though.

Regards
Sven

ttboy_01  schrieb:

>Hi Sven,
>
>I already have seen the examples of wicket tree but I don't know how to
>solve the problem with the different classes / types within the tree. Could
>you give me a hint for this problem?
>
>The structure is simple:
>
>// these are my roots
>class X {
> private Set y;
>}
>// these are my nodes
>class Y {
> private String foo;
>}
>
>Erik
>
>--
>View this message in context: 
>http://apache-wicket.1842946.n4.nabble.com/SwingTree-to-WicketTree-Drag-Drop-Different-Objects-tp4620927p4622725.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: Loadable-detachable model for ListView

2012-05-10 Thread heapifyman
by examples page I meant:
http://www.wicket-library.com/wicket-examples/repeater/


2012/5/10 heapifyman 

> The examples page does not seem to be working:
> HTTP Status 500 -
> --
>
> *type* Exception report
>
> *message***
>
> *description* *The server encountered an internal error () that prevented
> it from fulfilling this request.*
>
> *exception*
>
> javax.servlet.ServletException: Filter execution threw an exception
>
> *root cause*
>
> java.lang.OutOfMemoryError: PermGen space
>
> *note* *The full stack trace of the root cause is available in the Apache
> Tomcat/6.0.29 logs.*
>
>
>
>
> 2012/5/10 Igor Vaynberg 
>
>> use PagingNavigator. there are examples here:
>>
>> http://www.wicket-library.com/wicket-examples/repeater/
>>
>> -igor
>>
>> On Wed, May 9, 2012 at 4:11 PM, sudeivas 
>> wrote:
>> > Thanks Igor for the response.
>> >
>> > If I use dataview.setItemsPerPage(50), then my Data View loads only the
>> > first 50 entries. But how can I trigger or ask the data view to load the
>> > next 50 entries when we scroll down the list or when we reach the end
>> of the
>> > list?
>> >
>> > -Suresh
>> >
>> > --
>> > View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622091.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: Loadable-detachable model for ListView

2012-05-10 Thread heapifyman
The examples page does not seem to be working:
HTTP Status 500 -
--

*type* Exception report

*message***

*description* *The server encountered an internal error () that prevented
it from fulfilling this request.*

*exception*

javax.servlet.ServletException: Filter execution threw an exception

*root cause*

java.lang.OutOfMemoryError: PermGen space

*note* *The full stack trace of the root cause is available in the Apache
Tomcat/6.0.29 logs.*




2012/5/10 Igor Vaynberg 

> use PagingNavigator. there are examples here:
>
> http://www.wicket-library.com/wicket-examples/repeater/
>
> -igor
>
> On Wed, May 9, 2012 at 4:11 PM, sudeivas 
> wrote:
> > Thanks Igor for the response.
> >
> > If I use dataview.setItemsPerPage(50), then my Data View loads only the
> > first 50 entries. But how can I trigger or ask the data view to load the
> > next 50 entries when we scroll down the list or when we reach the end of
> the
> > list?
> >
> > -Suresh
> >
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622091.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 6.0.0-beta1: RangeValidator Issue (NPE)

2012-05-10 Thread Sebastien
Argh! It is because I had to reset my jira password in the meantime! :)
I commented mine to say it's a duplicate...

Thanks,
Sebastien.

On Thu, May 10, 2012 at 9:54 AM, Thomas Götz  wrote:

> Lol, first! Mine has WICKET-4548 ;)
>
>   -Tom
>
>
> On 10.05.2012 at 09:50 Sebastien wrote:
>
> > Hi Martin,
> >
> > Here we are: https://issues.apache.org/jira/browse/WICKET-4549
> >
> > Sebastien.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

2012-05-10 Thread Thomas Götz
Lol, first! Mine has WICKET-4548 ;)

   -Tom


On 10.05.2012 at 09:50 Sebastien wrote:

> Hi Martin,
> 
> Here we are: https://issues.apache.org/jira/browse/WICKET-4549
> 
> Sebastien.


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



Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

2012-05-10 Thread Thomas Götz
My bad: https://issues.apache.org/jira/browse/WICKET-4548

   -Tom


On 10.05.2012 at 09:38 Martin Grigorov wrote:

> Guys,
> 
> Please use Jira for bug reports.
> 
> On Thu, May 10, 2012 at 9:28 AM, Thomas Götz  wrote:
>> I can confirm this, see this quickstart: 
>> http://decoded.de/wicket-quickstart.zip
>> The NPE only occurs if there is a FeedbackPanel on the page. If you take it 
>> out -> no exception. Besides, there is no WARN log if you are missing a 
>> FeedbackPanel and there are messages to be rendered, bug or feature?!
>> 
>> Cheers,
>>   -Tom
>> 
>> 
>> On 09.05.2012 at 22:49 Sebastien wrote:
>> 
>>> Hi wicket's team,
>>> 
>>> While using the following code:
>>> 
>>>final TextField input = new TextField("input",
>>> new Model(15), Integer.class);
>>>input.add(new RangeValidator(0, 200));
>>>form.add(input);
>>> 
>>> I've got a NPE with wicket6.0.0-beta1, when I submit the form with a value
>>> not inside the validator's bounds. (ie, 500).
>>> I tested in a simple quickstart to be sure... It is ok with 1.5.6 and crash
>>> with 6.0.0-beta1
>>> 
>>> java.lang.NullPointerException
>>> at 
>>> org.apache.wicket.markup.html.form.ValidationErrorFeedback.toString(ValidationErrorFeedback.java:83)
>>> at 
>>> org.apache.wicket.markup.html.panel.FeedbackPanel.newMessageDisplayComponent(FeedbackPanel.java:338)
>>> at 
>>> org.apache.wicket.markup.html.panel.FeedbackPanel$MessageListView.populateItem(FeedbackPanel.java:117)
>>> at 
>>> org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
>>> at 
>>> org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:116)
>>> 
>>> Thus, just fyi, it is not documented in the migration guide what's happened
>>> to the NumberValidator... I did not find it, so I did not test another
>>> validator such as MaximumValidator...
>>> 
>>> Best regards,
>>> Sebastien
>> 
>> 
>> -
>> 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
> 


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



Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

2012-05-10 Thread Sebastien
Hi Martin,

Here we are: https://issues.apache.org/jira/browse/WICKET-4549

Sebastien.

On Thu, May 10, 2012 at 9:38 AM, Martin Grigorov wrote:

> Guys,
>
> Please use Jira for bug reports.
>
> On Thu, May 10, 2012 at 9:28 AM, Thomas Götz  wrote:
> > I can confirm this, see this quickstart:
> http://decoded.de/wicket-quickstart.zip
> > The NPE only occurs if there is a FeedbackPanel on the page. If you take
> it out -> no exception. Besides, there is no WARN log if you are missing a
> FeedbackPanel and there are messages to be rendered, bug or feature?!
> >
> > Cheers,
> >   -Tom
> >
> >
> > On 09.05.2012 at 22:49 Sebastien wrote:
> >
> >> Hi wicket's team,
> >>
> >> While using the following code:
> >>
> >>final TextField input = new TextField("input",
> >> new Model(15), Integer.class);
> >>input.add(new RangeValidator(0, 200));
> >>form.add(input);
> >>
> >> I've got a NPE with wicket6.0.0-beta1, when I submit the form with a
> value
> >> not inside the validator's bounds. (ie, 500).
> >> I tested in a simple quickstart to be sure... It is ok with 1.5.6 and
> crash
> >> with 6.0.0-beta1
> >>
> >> java.lang.NullPointerException
> >> at
> org.apache.wicket.markup.html.form.ValidationErrorFeedback.toString(ValidationErrorFeedback.java:83)
> >> at
> org.apache.wicket.markup.html.panel.FeedbackPanel.newMessageDisplayComponent(FeedbackPanel.java:338)
> >> at
> org.apache.wicket.markup.html.panel.FeedbackPanel$MessageListView.populateItem(FeedbackPanel.java:117)
> >> at
> org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
> >> at
> org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:116)
> >>
> >> Thus, just fyi, it is not documented in the migration guide what's
> happened
> >> to the NumberValidator... I did not find it, so I did not test another
> >> validator such as MaximumValidator...
> >>
> >> Best regards,
> >> Sebastien
> >
> >
> > -
> > 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: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

2012-05-10 Thread Martin Grigorov
Guys,

Please use Jira for bug reports.

On Thu, May 10, 2012 at 9:28 AM, Thomas Götz  wrote:
> I can confirm this, see this quickstart: 
> http://decoded.de/wicket-quickstart.zip
> The NPE only occurs if there is a FeedbackPanel on the page. If you take it 
> out -> no exception. Besides, there is no WARN log if you are missing a 
> FeedbackPanel and there are messages to be rendered, bug or feature?!
>
> Cheers,
>   -Tom
>
>
> On 09.05.2012 at 22:49 Sebastien wrote:
>
>> Hi wicket's team,
>>
>> While using the following code:
>>
>>        final TextField input = new TextField("input",
>> new Model(15), Integer.class);
>>        input.add(new RangeValidator(0, 200));
>>        form.add(input);
>>
>> I've got a NPE with wicket6.0.0-beta1, when I submit the form with a value
>> not inside the validator's bounds. (ie, 500).
>> I tested in a simple quickstart to be sure... It is ok with 1.5.6 and crash
>> with 6.0.0-beta1
>>
>> java.lang.NullPointerException
>>     at 
>> org.apache.wicket.markup.html.form.ValidationErrorFeedback.toString(ValidationErrorFeedback.java:83)
>>     at 
>> org.apache.wicket.markup.html.panel.FeedbackPanel.newMessageDisplayComponent(FeedbackPanel.java:338)
>>     at 
>> org.apache.wicket.markup.html.panel.FeedbackPanel$MessageListView.populateItem(FeedbackPanel.java:117)
>>     at 
>> org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
>>     at 
>> org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:116)
>>
>> Thus, just fyi, it is not documented in the migration guide what's happened
>> to the NumberValidator... I did not find it, so I did not test another
>> validator such as MaximumValidator...
>>
>> Best regards,
>> Sebastien
>
>
> -
> 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



How to remove submit button in org.apache.wicket.datetime.markup.html.form.DateTextField

2012-05-10 Thread nickey
Hi,

I am using DateTextField and DatePicker in my application, but I need to
remove submit button from DateTextField as its redundant, any ides?

Regards,

Nikola.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-remove-submit-button-in-org-apache-wicket-datetime-markup-html-form-DateTextField-tp4622741.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: SwingTree to WicketTree + Drag Drop + Different Objects

2012-05-10 Thread ttboy_01
Hi Sven,

I already have seen the examples of wicket tree but I don't know how to
solve the problem with the different classes / types within the tree. Could
you give me a hint for this problem?

The structure is simple:

// these are my roots
class X {
 private Set y;
}
// these are my nodes
class Y {
 private String foo;
}

Erik

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/SwingTree-to-WicketTree-Drag-Drop-Different-Objects-tp4620927p4622725.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: Force child component enabled

2012-05-10 Thread Jürgen Lind

Since no further replies to this issue came up, the question remains whether this is 
"works as
design" or a bug. Should I file an issue on this? And could maybe one of the 
developers explain
why the Component#isEnabledInhierarchy is final? After reading some core code, 
I would guess that
maybe overriding that method could achieve the intended behavior...

J.

On 09.05.2012 16:36, Jürgen Lind wrote:

Ok, I stripped down everything to a very basic setup that should work according 
to Martins
suggestions and the wicket documentation. Any ideas why 
canCallListenerInterface is never called
here?

J.

import java.lang.reflect.Method;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;


public class SandboxPage extends WebPage {

public SandboxPage() {
  WebMarkupContainer container = new WebMarkupContainer("container") {
@Override
public boolean isEnabled() {
  return false;
}
  };
  AjaxLink  link = new AjaxLink("link") {
@Override
protected boolean isLinkEnabled() {
  System.out.println(" le");
  return true;
}

@Override
public boolean canCallListenerInterface(Method method) {
  System.out.println(" cc");
  return true;
}

@Override
public boolean isEnabled() {
  System.out.println(" ie");
  return true;
}

@Override
public void onClick(AjaxRequestTarget target) {
  System.out.println("clicked...");
}
  };

  container.add(link);
  this.add(container);
}
}



  
Click me!
  



On 09.05.2012 14:29, Jürgen Lind wrote:

Hi Martin,

thanks for the hint, unfortunatly, it does not work :-( I've been looking 
through the relevant
code and the approach seems right, however at some point, the returned values 
seem to be ignored
and the link is still disabled (i.e. the onclick-handler is not rendered)... I 
will have to
investigate further...

J.

On 09.05.2012 13:05, Martin Grigorov wrote:

Hi,

I think it is possible to do that for links.
You'll need to override
org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and
org.apache.wicket.Component#canCallListenerInterface(Method)

The first is needed to not render the link as disabled. The second is
needed to be able to actually execute the links logic.

The second method is added in 1.5.x.

On Wed, May 9, 2012 at 1:47 PM, Jürgen Lind  wrote:

Hi Martin,

that was my initial approach. However, I would like the collapsible panels
to keep their
state between form submits, therefore I would need some sort of Javascript
state management
or I would simply use ajax links for that purpose. Which is what I would
prefer... A later
post already mentioned that this wont be too easy, so maybe I will have to
go back to JS...

J.


On 09.05.2012 11:16, Martin Grigorov wrote:


Hi,

Why don't use plain Javascript for this. It will be faster because it
wont make roundtrip to the server and wont be disabled as a Wicket
component ?

On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind
wrote:


Hi,

I have a little problem in my application and maybe someone has an idea
how
to solve it:
I have a complex form that is structured using a custom collapsible
AJAX-panel to show/hide
certain parts of the form. Now, if a user does not have the write
permission
for the form, the
form is disabled and therefore all input elements as well (which is
good).
However, for
obvious reaons, I would like the collapsible panels to remain enabled.
How
could I achieve
this? I have already tried to have the ajax-link for the panel to always
return true from
isEnabled, but that seems to be overriden by the parent component. Any
ideas
where to look?

Cheers,

Jürgen


-
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










-
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.