Re: Eclipse-IDE Plugin "Wicket Bench" not existing (any more)?

2012-03-25 Thread Jeroen Steenbeeke
You could try Qwickie:

http://code.google.com/p/qwickie/

2012/3/24 Stefan Lindner :
> It's dead. Someone tried to continue i tat 
> http://sourceforge.net/projects/stump/ but no release is available.
>
> -Ursprüngliche Nachricht-
> Von: Ben Stover [mailto:bxsto...@yahoo.co.uk]
> Gesendet: Samstag, 24. März 2012 01:32
> An: Wicket Users
> Betreff: Eclipse-IDE Plugin "Wicket Bench" not existing (any more)?
>
> When I go to page
>
> http://wicket.apache.org/learn/ides.html
>
> and click on "Wicket Bench" link for Eclipse then this link goes to nowhere.
>
> Is this project out of date/closed?
>
> Ben
>
>
>
>
>
>
>
> -
> 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
>



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Access current request in IAuthorizationStrategy

2012-03-25 Thread Jürgen Lind

Thanks, I've been looking through some classes to find such a method but I 
missed on that one...

J.


On 26.03.2012 08:33, Igor Vaynberg wrote:

RequestCycle.get()

-igor

On Sun, Mar 25, 2012 at 11:14 PM, Jürgen Lind  wrote:

Hi,

I need a way to decide wether a certain page can be opend based on the URL it 
was called with. Therefore, I need
access to the current request in the 'isInstantiationAuthorized' method of 
IAuthorizationStrategy. Is there a way to
get access to the current request there?

Thanks,

J.
-
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...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Access current request in IAuthorizationStrategy

2012-03-25 Thread Igor Vaynberg
RequestCycle.get()

-igor

On Sun, Mar 25, 2012 at 11:14 PM, Jürgen Lind  wrote:
> Hi,
>
> I need a way to decide wether a certain page can be opend based on the URL it 
> was called with. Therefore, I need
> access to the current request in the 'isInstantiationAuthorized' method of 
> IAuthorizationStrategy. Is there a way to
> get access to the current request there?
>
> Thanks,
>
> J.
> -
> 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



Access current request in IAuthorizationStrategy

2012-03-25 Thread Jürgen Lind
Hi,

I need a way to decide wether a certain page can be opend based on the URL it 
was called with. Therefore, I need
access to the current request in the 'isInstantiationAuthorized' method of 
IAuthorizationStrategy. Is there a way to 
get access to the current request there?

Thanks,

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



adding associated text to the close anchor on modal windows

2012-03-25 Thread lukuperman
Hello, I work on a team that supports a web application implemented with
Wicket, and because of accessibility compliance I'm addressing some DQA
findings. It would be nice to have the close anchor of modal windows (top
right corner) having an associated text, for assistive technologies. This
can be achieved changing getMarkup() in modal.js in one of the following
ways:

1) adding a title attribute to the anchor, like in:
" \"#\"  "+

or

2) also support low-vision users, by having the cross image be placed as img
instead of background, and adding an alt attribute, like in:
" \"#\"  \"blah\"  "+

I didn't know if this was already planned. I didn't find discussions about
this in the mail list. Let me know your thoughts. Regards!

Lucas

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/adding-associated-text-to-the-close-anchor-on-modal-windows-tp4504732p4504732.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: BookmarkablePageLink with Label is supported by Wicket?

2012-03-25 Thread Dan Retzlaff
Check out AbstractLink#setBody(IModel).

On Sun, Mar 25, 2012 at 7:07 PM, Paolo  wrote:

> I read on this web site:
>
>
> http://ondra.zizka.cz/stranky/programovani/java/web/wicket/wicket-link-with-label.texy
>
> -
> Wicket does not have exactly a „link with label“ component out of the box.
> Remember Wicket tries to hide the HTTP from you (and is quite good at it).
> It has a Link, which can react to onClick(), and can contain anything (a
> simple  or a whole  with everything inside).
>
> But some people, me included, would like to have a simple link with text,
> to get:
>
> Text
>
> -
> So my question:
> Is it right?
> Wicket really does not have "link with label" component out of the box?
> And in wicket 1.5 or 1.6?
>
> Is the normal solution to use onClick() override Label component?
> Like this code?
>
>add(new Label("linktext", "Click the "+text) {
>@Override
>public void onClick() {
>PageParameters outparams = new PageParameters();
> outparams.add("param", parameter);
>setResponsePage(Index.class, outparams);
>}
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


BookmarkablePageLink with Label is supported by Wicket?

2012-03-25 Thread Paolo
I read on this web site:

http://ondra.zizka.cz/stranky/programovani/java/web/wicket/wicket-link-with-label.texy

-
Wicket does not have exactly a „link with label“ component out of the box.
Remember Wicket tries to hide the HTTP from you (and is quite good at it).
It has a Link, which can react to onClick(), and can contain anything (a simple 
 or a whole  with everything inside).

But some people, me included, would like to have a simple link with text, to 
get:

Text

-
So my question:
Is it right?
Wicket really does not have "link with label" component out of the box?
And in wicket 1.5 or 1.6?

Is the normal solution to use onClick() override Label component?
Like this code?

add(new Label("linktext", "Click the "+text) {
@Override
public void onClick() {
PageParameters outparams = new PageParameters(); 
outparams.add("param", parameter);
setResponsePage(Index.class, outparams);
}  

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



Re: Homepage runs 2 times if I mount it as /

2012-03-25 Thread Paolo
Alle venerdì 23 marzo 2012, Jeff Schneller ha scritto:
> I may be wrong but you don't need to mount the homepage which is why it is 
> being executed twice. 

Yes, ok, you are right.
But the problem was start because I use the "NoVersionMount" to mount homepage 
because I don't like that the url of page have this add:

/;jsessionid=6730E8A6F6FED95C9AC24E7A37F3A35A?0

So, can you suggest a good solution?

--
@Override
protected void init()
{
super.init();
// mountPage("/", HomePage.class);
mount(new NoVersionMount("/", HomePage.class));
mount(new NoVersionMount("watch", V.class))  
}
}

/**
 * Provides a mount strategy that drops the version number from
 * stateful page urls.
 */
class NoVersionMount extends MountedMapper {
public NoVersionMount(String path, Class 
pageClass) {
super(path, pageClass, new PageParametersEncoder());
}

@Override protected void encodePageComponentInfo(Url url, PageComponentInfo 
info)
{
// do nothing so that component info does not get
// rendered in url
}

@Override public Url mapHandler(IRequestHandler
requestHandler)
{
if (requestHandler instanceof ListenerInterfaceRequestHandler) {
return null;
} else {
return super.mapHandler(requestHandler);
}
}
}

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



Re: After upgrading from wicket 1.5.0 to 1.5.1+ we have a simple problem

2012-03-25 Thread Martin Grigorov
On Sun, Mar 25, 2012 at 7:19 PM, Bas Gooren  wrote:
> Hi,
>
> Op 25-3-2012 17:44, schreef Martin Grigorov:
>
>> Hi,
>>
>> On Sat, Mar 24, 2012 at 10:44 PM, Bas Gooren  wrote:
>>>
>>> After more debugging, I learned some new things about wicket.
>>>
>>> It appears that an invisible stateful link makes a page stateful.
>>> The base page for this application contains a username label + logout
>>> link
>>> (stateful), which are in a WebMarkupContainer which is invisible if the
>>> user
>>> is not logged in.
>>> But in the end, even when it is invisble this link makes the entire page
>>> stateful.
>>> When I remove that link wicket no longer performs a redirect to /login?0.
>>>
>>> This leads me to two questions to the devs:
>>>
>>> 1) looking at this usecase, does it make sense that a stateful link which
>>> is
>>> not rendered makes the entire page stateful?
>>
>> This is a good point. I think Wicket's logic to decide whether
>> something is stateful could be improved to ignore invisible and
>> disabled components/behaviors. Those should not be reachable anyway.
>> Please file a ticket.
>
> https://issues.apache.org/jira/browse/WICKET-4468

Thanks!
We will consider it.

>
> I've filed it as an improvement against wicket 1.5.5 since that's what we're
> using.
>
>>
>>> 2) when a stateful page is accessed without a session (/login?0) by a
>>> client
>>> which does not support cookies, we get infinite redirects (/login?0 =>
>>> /login =>  /login?0 =>  /login etc). Is this normal behavior?
>>> This assumes that only cookie-based sessions are allowed.
>>>
>>> Furthermore: (2) was not a problem in 1.5.0 (where /login?0 would not
>>> redirect back to /login if there was no session...). I understand the
>>> need
>>> for the redirect to /login?0, and love that (ajax changes are still
>>> available on back button, fantastic!). But, the redirect back from
>>> /login?0
>>> to /login I don't get, especially when there is no session available.
>>
>> I'll have to debug the application to see what happens exactly. Try to
>> debug it in
>> org.apache.wicket.request.handler.render.WebPageRenderer#respond().
>
> Ok: here's whats happening:
>
> - A request comes in for /login
> - WebPageRenderer:264-266 stores the buffered response in the session and
> redirects to /login?0
> - WebPageRenderer:214 redirects to /login, since that is what the target
> page is mounted at
>
> So because no buffered response is found, the /login?0 url is processed by
> the WebPageRenderer. It checks if the current url is "correct" for the
> current page. If not, it redirects to the correct url.
>
> This can be a major problem when apps have bookmarkable stateful pages which
> are opened by clients which do not support sessions.
>
> I encountered this bug as follows:
> - I have my app in the root context of my tomcat server in eclipse WTP (web
> tools)
> - when I start tomcat through eclipse, WTP checks if the server is running
> by requesting the "/" url
> - Eclipse WTP performs the request with a sessionless client; We also force
> wicket to never include jessionid in the url
> - since this app requires authentication, "/" redirects to "/login"
> - /login was (unexpectedly) stateful, due to a hidden "logout" link
> - Eclipse WTP ended up in an infinite redirect loop, until it decided after
> 30 seconds that tomcat was unable to start and kills the tomcat process
>

What are the values of currentUrl and targetUrl at the top of the
method body at the second request (the redirect) ?
I expect current to be login?0 because this is what is requested.
I also expect the target url to be login?0 because the page is
stateful (thus ?pageId) and is freshly constructed (thus pageId is
again 0).
Is this correct ?
In which if/else clause it goes after that ?

>
>>
>>> Kind regards,
>>>
>>>
>>> Sebastian
>>>
>>> Op 22-3-2012 8:00, schreef Martin Grigorov:

 Hi,


 A hint for debugging: the request to login?0 should be handled by
 org.apache.wicket.core.request.mapper.BufferedResponseMapper not by
 WebPageRenderer. Check why there is no stored response.

 A suggestion: try to make your login page stateless. Otherwise every
 hit to your application will create a new http session. I.e. an
 attacker can cause a denial of service.

 On Thu, Mar 22, 2012 at 12:17 AM, Bas Gooren    wrote:
>
> We have the following simple setup:
>
> BasePage checks if user is logged in, if not (and this is not the
> LoginPage), RestartResponseException(LoginPage.class);
>
> LoginPage extends BasePage; contains a form to login;
>
> The application runs in the root context.
>
> Now on 1.5.0 this works like a charm;
> After upgrading to 1.5.5 we get infinite redirects; testing versions in
> between, we've found that the problem occurs>= 1.5.1;
>
> Here's what debugging shows:
>
> 1) When we hit the root url (homepage), it redirects to /login
>
> 2) When the LoginPage 

Re: inferring locale from URL in 1.5

2012-03-25 Thread Martin Grigorov
wicketstuff.org is the one that is down most of the time.
wicket-library.com is OK, I've never had problems with it.

On Sun, Mar 25, 2012 at 7:39 PM, armhold  wrote:
> Martin,
>
> The wicket-examples site rarely works for me (server under-resourced?) but I
> found the code in the examples section of the Wicket source from git.
>
> LocaleFirstMapper was a huge help; I'm fairly sure I wouldn't have gotten it
> working without that reference, so thank you very much.  Here's what I came
> up with:
>
> https://gist.github.com/2198074

This shows that the new IRequestMapper/IRequestHandler impls are very
flexible :-)

>
> I suspect that stripping the locale from the hostname (vs path segment) is
> not needed, since you were probably doing that in your example so that the
> locale doesn't show up as a parameter to the page. I'm still experimenting
> with it.
>
> Thanks again for your help.

Have fun! :-)

>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/inferring-locale-from-URL-in-1-5-tp4497412p4503485.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: inferring locale from URL in 1.5

2012-03-25 Thread armhold
Martin,

The wicket-examples site rarely works for me (server under-resourced?) but I
found the code in the examples section of the Wicket source from git. 

LocaleFirstMapper was a huge help; I'm fairly sure I wouldn't have gotten it
working without that reference, so thank you very much.  Here's what I came
up with:

https://gist.github.com/2198074

I suspect that stripping the locale from the hostname (vs path segment) is
not needed, since you were probably doing that in your example so that the
locale doesn't show up as a parameter to the page. I'm still experimenting
with it.

Thanks again for your help.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/inferring-locale-from-URL-in-1-5-tp4497412p4503485.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: After upgrading from wicket 1.5.0 to 1.5.1+ we have a simple problem

2012-03-25 Thread Bas Gooren

Hi,

Op 25-3-2012 17:44, schreef Martin Grigorov:

Hi,

On Sat, Mar 24, 2012 at 10:44 PM, Bas Gooren  wrote:

After more debugging, I learned some new things about wicket.

It appears that an invisible stateful link makes a page stateful.
The base page for this application contains a username label + logout link
(stateful), which are in a WebMarkupContainer which is invisible if the user
is not logged in.
But in the end, even when it is invisble this link makes the entire page
stateful.
When I remove that link wicket no longer performs a redirect to /login?0.

This leads me to two questions to the devs:

1) looking at this usecase, does it make sense that a stateful link which is
not rendered makes the entire page stateful?

This is a good point. I think Wicket's logic to decide whether
something is stateful could be improved to ignore invisible and
disabled components/behaviors. Those should not be reachable anyway.
Please file a ticket.

https://issues.apache.org/jira/browse/WICKET-4468

I've filed it as an improvement against wicket 1.5.5 since that's what 
we're using.



2) when a stateful page is accessed without a session (/login?0) by a client
which does not support cookies, we get infinite redirects (/login?0 =>
/login =>  /login?0 =>  /login etc). Is this normal behavior?
This assumes that only cookie-based sessions are allowed.

Furthermore: (2) was not a problem in 1.5.0 (where /login?0 would not
redirect back to /login if there was no session...). I understand the need
for the redirect to /login?0, and love that (ajax changes are still
available on back button, fantastic!). But, the redirect back from /login?0
to /login I don't get, especially when there is no session available.

I'll have to debug the application to see what happens exactly. Try to
debug it in org.apache.wicket.request.handler.render.WebPageRenderer#respond().

Ok: here's whats happening:

- A request comes in for /login
- WebPageRenderer:264-266 stores the buffered response in the session 
and redirects to /login?0
- WebPageRenderer:214 redirects to /login, since that is what the target 
page is mounted at


So because no buffered response is found, the /login?0 url is processed 
by the WebPageRenderer. It checks if the current url is "correct" for 
the current page. If not, it redirects to the correct url.


This can be a major problem when apps have bookmarkable stateful pages 
which are opened by clients which do not support sessions.


I encountered this bug as follows:
- I have my app in the root context of my tomcat server in eclipse WTP 
(web tools)
- when I start tomcat through eclipse, WTP checks if the server is 
running by requesting the "/" url
- Eclipse WTP performs the request with a sessionless client; We also 
force wicket to never include jessionid in the url

- since this app requires authentication, "/" redirects to "/login"
- /login was (unexpectedly) stateful, due to a hidden "logout" link
- Eclipse WTP ended up in an infinite redirect loop, until it decided 
after 30 seconds that tomcat was unable to start and kills the tomcat 
process





Kind regards,


Sebastian

Op 22-3-2012 8:00, schreef Martin Grigorov:

Hi,


A hint for debugging: the request to login?0 should be handled by
org.apache.wicket.core.request.mapper.BufferedResponseMapper not by
WebPageRenderer. Check why there is no stored response.

A suggestion: try to make your login page stateless. Otherwise every
hit to your application will create a new http session. I.e. an
attacker can cause a denial of service.

On Thu, Mar 22, 2012 at 12:17 AM, Bas Goorenwrote:

We have the following simple setup:

BasePage checks if user is logged in, if not (and this is not the
LoginPage), RestartResponseException(LoginPage.class);

LoginPage extends BasePage; contains a form to login;

The application runs in the root context.

Now on 1.5.0 this works like a charm;
After upgrading to 1.5.5 we get infinite redirects; testing versions in
between, we've found that the problem occurs>= 1.5.1;

Here's what debugging shows:

1) When we hit the root url (homepage), it redirects to /login

2) When the LoginPage (mounted at /login) is hit, WebPageRenderer:266
redirects from /login to /login?0
3) When /login?0 is hit, WebPageRenderer:214 redirects from /login?0 to
/login
and this loops back to (2)

I've also learned that this does not occur if we do not run the app in
the
root context, so it appears to have to do with url handling.

Looking at the wicket 1.5.1 changelog I don't see anything that was
changed
to break this.
Before doing more debugging, does anyone have a clue what might cause
this?

Kind regards,

Sebastian

-
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 

Re: java.io.UnsupportedEncodingException: ISO8859_10

2012-03-25 Thread Martin Grigorov
Hi,

Wicket doesn't set any encodings. Either your code sets it via
WebResponse#setContentType("text/html;encoding=blah") or Caucho uses
the default encoding for the machine where it runs. Check with your
system administrator.

On Fri, Mar 23, 2012 at 4:00 PM, andretampold  wrote:
> Hello dear Wicket developers! We have thousands of log lines of
> UnsupportedEncodingException: ISO8859_10. What can be done to elliminate
> this log entry? Stack Trace added. Please help! We are using Wicket 1.4.19.
> Thank you very much in advance for any kind of information/help!
>
> -- STACKTrace from log:
> java.io.UnsupportedEncodingException: ISO8859_10
> at
> com.caucho.vfs.i18n.JDKWriter$OutputStreamEncodingWriter.(JDKWriter.java:112)
> at com.caucho.vfs.i18n.JDKWriter.create(JDKWriter.java:79)
> at com.caucho.vfs.i18n.EncodingWriter.create(EncodingWriter.java:80)
> at com.caucho.vfs.Encoding.getWriteEncoding(Encoding.java:195)
> at
> com.caucho.server.connection.ToByteResponseStream.setEncoding(ToByteResponseStream.java:137)
> at
> com.caucho.server.connection.AbstractHttpResponse.setLocale(AbstractHttpResponse.java:1619)
> at
> org.apache.wicket.protocol.http.BufferedHttpServletResponse.writeTo(BufferedHttpServletResponse.java:549)
> at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:451)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
> at
> com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:87)
> at
> com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:194)
> at
> com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187)
> at
> com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266)
> at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:435)
> at com.caucho.server.port.TcpConnection.run(TcpConnection.java:678)
> at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721)
> at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643)
> at java.lang.Thread.run(Thread.java:662)
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/java-io-UnsupportedEncodingException-ISO8859-10-tp4498915p4498915.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



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

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



Re: Using AbstractResourceStreamWriter in wicket 1.5

2012-03-25 Thread Martin Grigorov
Hi,

I haven't used it personally but I think this class is broken. It
doesn't write directly to the container's response's outputstream, so
whatever you write is buffered. And this is against the said in the
javadoc of org.apache.wicket.core.util.resource.IResourceStreamWriter.
Please file a ticket with a mini quickstart that works in 1.4. We will
port it to 1.5 and fix AbstractResourceStreamWriter.


On Fri, Mar 23, 2012 at 9:22 PM, Douglas Ferguson  wrote:
> Can anybody give me tips on using AbstractResourceStreamWriter in 1.5?
>
> Douglas



-- 
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: ModalWindow accessibility - DIV placeholder not used

2012-03-25 Thread Martin Grigorov
Hi Lucas,

This is how ModalWindow currently works. There is a ticket
(https://issues.apache.org/jira/browse/WICKET-3404) that will make
some changes in the way its html is generated but I'm not sure whether
these changes will help you anyhow.
I'm not an expert in ARIA at all so maybe you can help us making
Wicket components ARIA enabled by default. We can start with
ModalWindow component - explain what should be done, what attributes
should be added, and on which HTML element exactly.


On Sat, Mar 24, 2012 at 8:44 PM, lukuperman  wrote:
> Hello, I inherited an application that uses Apache Wicket 1.4.15. Everything
> works fine, but because of accessibility standards I have to address some
> findings we received from DQA team, which includes missing wai-aria
> attributes around to the modal windows. However I noticed the DIV
> placeholder I define in the markup is not where the modalwindow code ends,
> but rather a new DIV element is created dynamically at the end of the page's
> html. This prevents me from enclosing the modal window's DIV element. I
> would have expected the placeholder to be the place where the modalwindow
> code will reside. Am I getting it wrong? Either way, can anyone suggest me
> how can I enclose a modal window's DIV element?
>
> Thank you!
> Regards.
>
> PS: I do not include source code/error cause im not receiving any. Im just
> wondering about render behavior. Also, I don't think its a code problem
> cause the official modal window example at
> http://www.wicket-library.com/wicket-examples/ajax/modal-window?8 behaves
> the same way.
>
> Lucas
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/ModalWindow-accessibility-DIV-placeholder-not-used-tp4501891p4501891.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: After upgrading from wicket 1.5.0 to 1.5.1+ we have a simple problem

2012-03-25 Thread Martin Grigorov
Hi,

On Sat, Mar 24, 2012 at 10:44 PM, Bas Gooren  wrote:
> After more debugging, I learned some new things about wicket.
>
> It appears that an invisible stateful link makes a page stateful.
> The base page for this application contains a username label + logout link
> (stateful), which are in a WebMarkupContainer which is invisible if the user
> is not logged in.
> But in the end, even when it is invisble this link makes the entire page
> stateful.
> When I remove that link wicket no longer performs a redirect to /login?0.
>
> This leads me to two questions to the devs:
>
> 1) looking at this usecase, does it make sense that a stateful link which is
> not rendered makes the entire page stateful?

This is a good point. I think Wicket's logic to decide whether
something is stateful could be improved to ignore invisible and
disabled components/behaviors. Those should not be reachable anyway.
Please file a ticket.

>
> 2) when a stateful page is accessed without a session (/login?0) by a client
> which does not support cookies, we get infinite redirects (/login?0 =>
> /login => /login?0 => /login etc). Is this normal behavior?
> This assumes that only cookie-based sessions are allowed.
>
> Furthermore: (2) was not a problem in 1.5.0 (where /login?0 would not
> redirect back to /login if there was no session...). I understand the need
> for the redirect to /login?0, and love that (ajax changes are still
> available on back button, fantastic!). But, the redirect back from /login?0
> to /login I don't get, especially when there is no session available.

I'll have to debug the application to see what happens exactly. Try to
debug it in org.apache.wicket.request.handler.render.WebPageRenderer#respond().

>
> Kind regards,
>
>
> Sebastian
>
> Op 22-3-2012 8:00, schreef Martin Grigorov:
>>
>> Hi,
>>
>>
>> A hint for debugging: the request to login?0 should be handled by
>> org.apache.wicket.core.request.mapper.BufferedResponseMapper not by
>> WebPageRenderer. Check why there is no stored response.
>>
>> A suggestion: try to make your login page stateless. Otherwise every
>> hit to your application will create a new http session. I.e. an
>> attacker can cause a denial of service.
>>
>> On Thu, Mar 22, 2012 at 12:17 AM, Bas Gooren  wrote:
>>>
>>> We have the following simple setup:
>>>
>>> BasePage checks if user is logged in, if not (and this is not the
>>> LoginPage), RestartResponseException(LoginPage.class);
>>>
>>> LoginPage extends BasePage; contains a form to login;
>>>
>>> The application runs in the root context.
>>>
>>> Now on 1.5.0 this works like a charm;
>>> After upgrading to 1.5.5 we get infinite redirects; testing versions in
>>> between, we've found that the problem occurs>= 1.5.1;
>>>
>>> Here's what debugging shows:
>>>
>>> 1) When we hit the root url (homepage), it redirects to /login
>>>
>>> 2) When the LoginPage (mounted at /login) is hit, WebPageRenderer:266
>>> redirects from /login to /login?0
>>> 3) When /login?0 is hit, WebPageRenderer:214 redirects from /login?0 to
>>> /login
>>> and this loops back to (2)
>>>
>>> I've also learned that this does not occur if we do not run the app in
>>> the
>>> root context, so it appears to have to do with url handling.
>>>
>>> Looking at the wicket 1.5.1 changelog I don't see anything that was
>>> changed
>>> to break this.
>>> Before doing more debugging, does anyone have a clue what might cause
>>> this?
>>>
>>> Kind regards,
>>>
>>> Sebastian
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



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

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



Re: Mixing Wicket + JQuery + JQueryUI to achieve infinite scroll.

2012-03-25 Thread Martin Grigorov
Hi Mark,

Check that project - https://github.com/reaktor/oegyscroll.
Use it as inspiration if it doesn't fulfill your requirements.

For Ajax in Wicket 6 read
https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax

On Sun, Mar 25, 2012 at 7:14 AM, Mark  wrote:
> Unfortunately I am a beginner to Wicket and looking for for guidance on
> integrating Wicket + JQuery + JQueryUI in a way to achieve infinite scroll.
>
> Ideally I would aim to achieve something like the following url that allows
> you to inject divs that contain both images and text into the page:
> http://masonry.desandro.com/demos/infinite-scroll.html.
>
> Anyone, with any advice on how to achieve this?
>
>
> From what I read Wicket 1.6 will be out soon and using JQuery as it's AJAX
> processor.  Will this change things much?
>
> -- snippet --
> http://apache-wicket.1842946.n4.nabble.com/Roadmap-for-Wicket-6-tt3777610.html#none
>
> 5. Ajax refactoring to use JQuery and provide proper JQuery integration in
> core
>
> 
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Mixing-Wicket-JQuery-JQueryUI-to-achieve-infinite-scroll-tp4502701p4502701.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: HTML frame alternative to visualise external web-page

2012-03-25 Thread Martin Grigorov
Hi Walter,

I have no idea why InlineFrame is designed this way.
I see Sven is @author of it.
@Sven: do you remember why you made it this way - with Wicket Page,
pageClass and ILinkListener ?

@Walter: please create a ticket. I think this can be improved for Wicket 6.

On Sun, Mar 25, 2012 at 10:18 AM, Walter Rugora  wrote:
> Dear Martin,
>
> I got back to your InlineFrame suggestion. I worked a bit on wicket the
> last days and found the posting on the DocumentInlineFrame by Ernesto
> Reinaldo Barreiro. I changed it for my purpose: http://pastebin.ca/2131961
>
> Works great!
> Is there any reason why the Wicket InlineFrame class cannot refer to
> external pages?
>
> Thanks again Martin!
> Walter
>
> On 24/03/12 13:29, Walter Rugora wrote:
>> Thanks Martin,
>>
>> I gave it a go and it works great with static web-pages. Is there a way
>> that the external stylesheets are considered?
>> On another note I tried to use 'include' on dynamic pages as well. Works
>> for some but not for all of them. But I'm unsure what the reason with
>> this is. E.g. the following link creates heaps of trouble.
>> String url=
>> "http://xyzdomain:8080/myService/faces/formViewer.jsp?password=mxZeSdo8Vi4i3Oj316t9ywJZc9U=&userid=buyer&taskid=12.1:A_3";
>> Works fine when directly invoking with a browser, but not in Wicket:
>> add(new Include("include", url);
>> In fact the remote server complains about the missing user id. If I swap
>> the password-value pair with the user-value pair the remote server
>> complains about a missing password.
>> So, I'm wondering if the 'include' command actually cuts off everything
>> after the first key-value pair before sending the request?!
>>
>> Thanks,
>> Walter
>>
>> On 23/03/12 21:52, Martin Grigorov wrote:
>>> Check the examples at http://www.wicket-library.com/wicket-examples/compref/
>>> There you can see them in action and there is a description what they do.
>>>
>>> On Fri, Mar 23, 2012 at 1:40 PM, Walter Rugora  wrote:
 Thanks a lot Martin! Guess it is exactly what I need. Will try it later.
 Would be great to have a reference about the practical usage of all
 those wonderful wicket aspects. Hard to derive it from the class
 description.

 Thanks again,
 Walter

 On 23/03/12 21:08, Martin Grigorov wrote:
> Hi,
>
> Sorry for confusing you :-)
> Indeed org.apache.wicket.markup.html.link.InlineFrame is meant to load
> Wicket pages.
> But org.apache.wicket.markup.html.include.Include can load from external 
> site.
>
> On Fri, Mar 23, 2012 at 12:57 PM, Walter Rugora  wrote:
>> Dear Martin,
>>
>> thanks a lot for your response.
>>
>> I understand how to refer to wicket related pages, but how would I do
>> this for an external web-page? I reckon this is a super basic question
>> ... here is a newbie on the other line ;)
>>
>> Thanks for your help,
>> Stephan
>>
>> On 23/03/12 19:00, Martin Grigorov wrote:
>>> Hi,
>>>
>>> The best way is to use iframe - see InlineFrame component.
>>> You can also try with Include component, but it is more appropriate
>>> for including fragments of html (i.e. without  / 
>>> elements)
>>>
>>> On Fri, Mar 23, 2012 at 8:31 AM, Walter Rugora  wrote:
 Hi there,

 I was wondering if I can avoid HTML frames. In my wicket page I'd like
 to have a section in which external web-page content is displayed.

 If that is possible, can someone please refer to an example?

 Thanks a lot!!
 Walter

 -
 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

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



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

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

Re: Override BrowserInfoPage

2012-03-25 Thread Martin Grigorov
Hi,

Override org.apache.wicket.protocol.http.WebSession#newBrowserInfoPage

On Fri, Mar 23, 2012 at 6:54 PM, Adam Gray  wrote:
> You can provide your own markup for BrowserInfoPage if you place it in the
> correct package within your application
> (org.apache.wicket.markup.html.pages? I believe).  From there you can
> replace the text with a  that you can translate.
>
> On Fri, Mar 23, 2012 at 12:47 PM, sudeivas wrote:
>
>> Hello,
>>      I am using
>> getRequestCycleSettings().setGatherExtendedBrowserInfo(true) to gather the
>> browser information. But I am seeing this hard-coded message
>> "If you see this, it means that both javascript and meta-refresh are not
>> support by your browser configuration. Please click this link to continue
>> to
>> the original destination."
>>
>> This is impossible to read for non-english users and it stays in the page
>> for 5 to 10 seconds sometimes and this is causing some issues when the user
>> clicks on the link. I wish to override to a simple message like
>> 'Loading...'
>> but I am not sure how to override this message.
>>
>> I did search in google but couldn't find any API. Please provide some
>> suggestions.
>>
>> Thanks,
>> Suresh
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Override-BrowserInfoPage-tp4499400p4499400.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: mouseover in wicket

2012-03-25 Thread Pierre Goupil
For wicketstuff, if you look in GitHub, there's a branch for wicket-1.5.5.
It was announced here some time ago.

For Wicket 1.5.4, I don't know, may be you should explore the GIT repo.



On Sun, Mar 25, 2012 at 9:04 AM, Dan12321  wrote:

> Thanks.
>
> I try "jwicket-tooltip", but it seems that it do not work with wicket
> 1.5.4.
>
> Visural wicket works, but I can not use ajax. When I move cursor over same
> element, I would like to call same method, that create tooltip.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/mouseover-in-wicket-tp4501543p4502804.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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


Re: HTML frame alternative to visualise external web-page

2012-03-25 Thread Walter Rugora
Dear Martin,

I got back to your InlineFrame suggestion. I worked a bit on wicket the
last days and found the posting on the DocumentInlineFrame by Ernesto
Reinaldo Barreiro. I changed it for my purpose: http://pastebin.ca/2131961

Works great!
Is there any reason why the Wicket InlineFrame class cannot refer to
external pages?

Thanks again Martin!
Walter

On 24/03/12 13:29, Walter Rugora wrote:
> Thanks Martin,
> 
> I gave it a go and it works great with static web-pages. Is there a way
> that the external stylesheets are considered?
> On another note I tried to use 'include' on dynamic pages as well. Works
> for some but not for all of them. But I'm unsure what the reason with
> this is. E.g. the following link creates heaps of trouble.
> String url=
> "http://xyzdomain:8080/myService/faces/formViewer.jsp?password=mxZeSdo8Vi4i3Oj316t9ywJZc9U=&userid=buyer&taskid=12.1:A_3";
> Works fine when directly invoking with a browser, but not in Wicket:
> add(new Include("include", url);
> In fact the remote server complains about the missing user id. If I swap
> the password-value pair with the user-value pair the remote server
> complains about a missing password.
> So, I'm wondering if the 'include' command actually cuts off everything
> after the first key-value pair before sending the request?!
> 
> Thanks,
> Walter
> 
> On 23/03/12 21:52, Martin Grigorov wrote:
>> Check the examples at http://www.wicket-library.com/wicket-examples/compref/
>> There you can see them in action and there is a description what they do.
>>
>> On Fri, Mar 23, 2012 at 1:40 PM, Walter Rugora  wrote:
>>> Thanks a lot Martin! Guess it is exactly what I need. Will try it later.
>>> Would be great to have a reference about the practical usage of all
>>> those wonderful wicket aspects. Hard to derive it from the class
>>> description.
>>>
>>> Thanks again,
>>> Walter
>>>
>>> On 23/03/12 21:08, Martin Grigorov wrote:
 Hi,

 Sorry for confusing you :-)
 Indeed org.apache.wicket.markup.html.link.InlineFrame is meant to load
 Wicket pages.
 But org.apache.wicket.markup.html.include.Include can load from external 
 site.

 On Fri, Mar 23, 2012 at 12:57 PM, Walter Rugora  wrote:
> Dear Martin,
>
> thanks a lot for your response.
>
> I understand how to refer to wicket related pages, but how would I do
> this for an external web-page? I reckon this is a super basic question
> ... here is a newbie on the other line ;)
>
> Thanks for your help,
> Stephan
>
> On 23/03/12 19:00, Martin Grigorov wrote:
>> Hi,
>>
>> The best way is to use iframe - see InlineFrame component.
>> You can also try with Include component, but it is more appropriate
>> for including fragments of html (i.e. without  / 
>> elements)
>>
>> On Fri, Mar 23, 2012 at 8:31 AM, Walter Rugora  wrote:
>>> Hi there,
>>>
>>> I was wondering if I can avoid HTML frames. In my wicket page I'd like
>>> to have a section in which external web-page content is displayed.
>>>
>>> If that is possible, can someone please refer to an example?
>>>
>>> Thanks a lot!!
>>> Walter
>>>
>>> -
>>> 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
>>>
>>
>>
>>
> 
> -
> 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: mouseover in wicket

2012-03-25 Thread Dan12321
Thanks.

I try "jwicket-tooltip", but it seems that it do not work with wicket 1.5.4.

Visural wicket works, but I can not use ajax. When I move cursor over same
element, I would like to call same method, that create tooltip.

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