Re: Accessing the Markup of a Component

2018-06-03 Thread Dirk Forchel
Hallo Sven,
thank your for your answer and for your comprehensive explanation. So we
should be careful not to use these components together unless supported.
Thanks.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Accessing the Markup of a Component

2018-06-01 Thread Dirk Forchel
We have a problem accessing the markup (Component#getMarkup()) of a Panel
while inizializing the panel component. Is it ensured, that
Component#getMarkup() always returns an appropriate markup (markup tag)
during initializion?
As soon as we have a Border component, a TransparentWebMarkupContainer and a
corresponding panel in our component hierarchy, we will not have access to
the markup during initialization. Instead, the value returned is null.

There are no problems during the render phase.

Here's a quickstart which shows the problem with a dummy test panel.
quickstart.zip
  

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: wicket-dnd and link multiple items at once

2018-03-14 Thread Dirk Forchel
Hi Sven,
Thank you fror your answer. I think you have misunderstood the "use case" we
want to achieve.
We don't want to select several items and transfer them at once but rather
select only one item (only one drag source) and drop that item (link
operation) to different drop targets. I think if the user releases the mouse
button on the first drop target, the selection will be lost. However, this
should only happen once the user releases the control key. I hope I could
express myself more clearly.
Many thanks

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



wicket-dnd and link multiple items at once

2018-03-12 Thread Dirk Forchel
Hello,
I've a question regarding the Wicket drag'n'drop library. We're using this
library successfully in order to link items with other items (the only
operation allowed is a LINK operation) between to different panels (or
container). It works quite well and I'm a bit curious about the way how to
support multiple "link" operations at once. Instead of clicking on an item
on the left container and dragging this item to the right container and
releasing the mouse button, I'd like to hold an extra button to support
"multiple" item copy operations.
I could imagine that pressing the "ALT"-key and holding this key could start
a link operation from the left container to the right as long as the "ALT"
key gets pressed. Releasing the this key would stop the whole copy
operation.
I'm not sure whether this would be possible with the current release
(wicket-dnd 0.7.3). For any hint I would be very grateful.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Wicket 8.0.0 - Official Release

2017-11-27 Thread Dirk Forchel
Thank you for you feedback. Then we start on Wicket 8.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Wicket 8.0.0 - Official Release

2017-11-23 Thread Dirk Forchel
Hi everybody, we would like to know whether exists an official release date
for the Wicket 8.x relases. There is only one issue left
(https://issues.apache.org/jira/projects/WICKET/versions/12335589,
https://issues.apache.org/jira/browse/WICKET-6148) at the JIRA. 
The reason is, we have to decide whether we choose Wicket 8 as base for our
next project or stay with Wicket 7.
Thank you very much.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: AW: Nested forms in WizardStep

2017-11-20 Thread Dirk Forchel
Thank you for your hints. I think I go for the last solution but I will have
a glance at the IFormVisitorParticipant though.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Nested forms in WizardStep

2017-11-17 Thread Dirk Forchel
No, I was not searching for a solution how to "disabling nested form
validation" as I was unsure whether it's a proper solution to use nested
forms in a WizardStep. 
To get an impression how the checkout should look like have a look at
http://demo.designing-world.com/bigshop-aa/bigshop/checkout-1.html. 
Exists a best practice solution how to deal with those scenarios? I'm just
curious.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Nested forms in WizardStep

2017-11-16 Thread Dirk Forchel
Currently we use the Wizard/WizardStep classes from wicket-extensions to set
required data for an object (in our case a checkout process with some user
Information, e.g. addresses etc.).
The first step contains a Login form with two "required" input components
for the credentials and a separate "Login" button and a Panel with two ratio
buttons where the user must decide whether to go on without login
(anonymous) or to register a new user account. 
Only the values for the ratio buttons should be triggered by this step with
the "next" button.
The Login itself should be triggered with the additional "login" button
which is not part of the ButtonBar.

As far as I know it's not good to have nested forms. We don't need to have
forms inside our steps actually, since the Wizard itself has a form already.
I've noticed that if the user hits the "next" button, the form validation
for the login form ist triggered as well, but it should not. The form
processing for the login form should actually not part of step, but the
"login container" must be part of the view.

What is the best solution to implement this scenario? I implemented the step
without an additional form component and used an AjaxButton. In
AjaxButton#onSubmit I implemented the authentication stuff.  But further on
I got some problems with updating the current state and how to go on to the
next step.
Also I've noticed, that pressing the "next" button would require some input
for the credentials. So I'm a bit confused now.
I hope, I could express myself clearly.

Could someone give me some hint? Thank you very much.


--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Using AjaxGeolocationBehavior with a "click" event

2017-11-01 Thread Dirk Forchel
Does nobody haven an idea or a hint regarding my question?  
Instead of using the AjaxGeolocationBehavior from the wicketstuff package I
could write my own Behavior, but this is actually not my aim.


--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Using AjaxGeolocationBehavior with a "click" event

2017-10-27 Thread Dirk Forchel
I want to use the HTML Geolocation solution mentioned here
http://apache-wicket.1842946.n4.nabble.com/Gmap-Current-Location-td4677835.html#a4677843.
(org.wicketstuff.html5.geolocation)

Unfortunately, the geolocation is triggered as soon as the MarkupContainer
is rendered. Instead of using this on load of a Page I'd prefer to trigger
the geolocation with "click" event (AjaxEventBehavior). 

What is the preferred way to "trigger" the AjaxGeolocationBehavior from a
"click" event?
Should I use AjaxEventBehavior#updateAjaxAttributes and add my own
AjaxCallListener#onSuccess script?

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Detaching Border with nested body

2017-06-14 Thread Dirk Forchel
I've created a new issue. Please see  WICKET-6399
  .

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Detaching-Border-with-nested-body-tp4678040p4678051.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



Detaching Border with nested body

2017-06-14 Thread Dirk Forchel
myproject2.zip
  
testproject.zip
 
With the latest official Wicket release (7.7.0) both issues  WICKET-6303
   and  WICKET-6306
   should be fixed. I was
curious and used the latest Wicket version with my previous quickstart
versions in order to validate the fix. At the first glance it seems to work,
but after I've tried to access the third example page
(http://localhost:8080/test3.html) again, I've got the following 
WicketRuntimeException:



You can easily try it by yourself if you choose one of both attached
quickstarts (the myproject2.zip demonstrates issue WICKET-6303,
testproject.zip demonstrates WICKET-6306). Both issues relate to some queing
problem with Border components.
Should I rise a new issue? 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Detaching-Border-with-nested-body-tp4678040.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: Cannot modify component hierarchy after render phase has started

2017-01-15 Thread Dirk Forchel
Hello Martin,
okay, it was a misunderstanding. I will file a new issue and attach the
quickstart.
Cheers,
  Dirk

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711p4676766.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: Cannot modify component hierarchy after render phase has started

2017-01-15 Thread Dirk Forchel
Sven Meier wrote
> problem is that TestPanel.onConfigure() is called during render phase 
> only, while in 7.4 it was (correctly) called in #beforeRender() (where 
> hierarchy changes are still allowed).

Hi Sven,
to be honest I didn't get it. Livecycle stages of a component are
"initializing", "rendering" and "removing", where hook methods involved are:

Initialization: /onInitialize/
Rendering (sorted by execution order): /onConfigure/, /onBeforeRender/,
/onRender/, /onComponentTag/, o/nComponentTagBody/, /onAfterRenderChildren/,
/onAfterRender/
Removing: /onRemove/

The /onConfigure/ method is a good point to manage the component states such
as its visibility. This method is called before the render phase starts. I
assume, changing children hierarchy is still allowed. But we're trying to
change the model object of a component, which, in my point of view, is
completely different from changing the children hierarchy
(/isVisibilityAllowed/ or /isEnabledAllowed/ is not called).

The /onBeforeRender/ method is called after the /onConfigure/ method. This
method is called before a component starts its rendering phase and would be
the last chance to change its children hierarchy. But we don't do so.

So why it is not allowed to change the model object of a panel which is a
child of a border component? 
We're doing this in our application at least since Wicket 1.5.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711p4676760.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: Cannot modify component hierarchy after render phase has started

2017-01-13 Thread Dirk Forchel
Hi Sven,
attached you can find a quickstart which demonstrates the problem. I've
added 3 test pages all with a TextField and a Panel with a TextField. For
each component, the model object is set at the onConfigure method. At the
first page both components are added to the page itself. At the second page
both components are added to the border body container of a Border
component. At the third page both components are added to a "Layout"
container (a Border component too). 
With Wicket 7.4.0 all pages are rendered without any problem, with Wicket
7.5.0 the third page isn't.  Instead the following exception is thrown:

org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
after render phase has started (page version cant change then anymore)
 at
org.apache.wicket.Component.checkHierarchyChange(Component.java:3674)
 at org.apache.wicket.Page.dirty(Page.java:271)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332)
 at org.apache.wicket.Page.dirty(Page.java:250)
 at org.apache.wicket.Page.componentModelChanging(Page.java:904)
 at org.apache.wicket.Component.modelChanging(Component.java:2230)
 at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3133)
 at
org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579)
 at
com.mycompany.front.wicket.components.TestPanel.onConfigure(TestPanel.java:30)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711p4676736.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: Cannot modify component hierarchy after render phase has started

2017-01-12 Thread Dirk Forchel
Hi Sven,
could it be that this belongs to
https://issues.apache.org/jira/browse/WICKET-6303? I'm not sure, but after
migrating to Wicket 7.5.0 we've got several errors belonging to this issue.
I'll try to provide a quickstart though.
Thanks,
  Dirk

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711p4676728.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



Cannot modify component hierarchy after render phase has started

2017-01-11 Thread Dirk Forchel
Hi,
I would like to know why we shouldn't change the model object within the
configure phase for Wicket components. We're running our application with
Wicket 7.4 and all works as expected. After migrating to Wicket 7.5 we get
the following exception for different pages, mainly due to modifying the
model object. Could someone explain why this is a bad thing to do?

org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy
after render phase has started (page version cant change then anymore)
 at
org.apache.wicket.Component.checkHierarchyChange(Component.java:3662)
 at org.apache.wicket.Page.dirty(Page.java:271)
 at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:332)
 at org.apache.wicket.Page.dirty(Page.java:250)
 at org.apache.wicket.Page.componentModelChanging(Page.java:904)
 at org.apache.wicket.Component.modelChanging(Component.java:2218)
 at
org.apache.wicket.Component.setDefaultModelObject(Component.java:3121)
 at
org.apache.wicket.markup.html.form.FormComponent.setModelObject(FormComponent.java:1579)
 at
com.mycompany.wicket.components.TestPanel.onConfigure(TestPanel.java:111)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Cannot-modify-component-hierarchy-after-render-phase-has-started-tp4676711.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: Concerns about different render strategies and latency

2016-09-23 Thread Dirk Forchel
The crux of the matter so far was the AjaxBehavior which wasn't stateless. We
will use Wicket 7.4.0 from now on and try to make all relevant pages
stateless.
I found this part of the documentation, which is quite new
https://github.com/apache/wicket/blob/master/wicket-user-guide/src/docs/guide/ajax/ajax_7.gdoc
and a good starting point for refactoring our application.
Thank you Martin. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Concerns-about-different-render-strategies-and-latency-tp4675545p4675556.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



Concerns about different render strategies and latency

2016-09-22 Thread Dirk Forchel
Today, we've had a long discussion at our site about dos and don'ts using
Wicket. And it came up, that the default render strategy REDIRECT_TO_BUFFER
used for Wicket applications might not be the best solution for everyone.
>From a SEO point of view, what's bothering me much more than the additional
parameter (which I could probably handle fine using a canonical tag), is the
fact that every page request immediately responds with a 302-redirect having
the parameter appended. As far as I know, having 302 redirect with every
request, for any URL is a really bad thing not only if you want to have your
pages correctly crawled, indexed and good ranked. But this is not the main
problem as long as we could use the ONE_PASS_RENDER strategy for bots and
crawlers provided with a different WebPageRender. The main problem is the
latency for our web application.
For each web page access, apart from the processing time that is needed on
the server to process the request, there is a delay involved for each
request to reach to the server and a delay for the response. If we use the
REDIRECT_TO_BUFFER strategy this latency is one and a half time greater than
for one request only.
In order to make our web application faster and reduce its latency we must
reduce the number of requests for each webpage. This way, each redirect
after a GET request might not be a good practise. 
I would like to know how what is the best practise or the best render
strategy to use with these requirements in mind. What are flaws or
drawbacks. Thanks.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Concerns-about-different-render-strategies-and-latency-tp4675545.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: wicketstuff-htmlvalidator problem

2016-08-19 Thread Dirk Forchel
You can find the markup below (home.html). The validator itself complains
about the meta tags (line 6 to 14) and after that quits with the mentioned
exception.

home.html
  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicketstuff-htmlvalidator-problem-tp4675331p4675336.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



wicketstuff-htmlvalidator problem

2016-08-18 Thread Dirk Forchel
Hi,
we're trying to use the Wicketstuff Html Validator (see
https://github.com/dashorst/wicket-stuff-markup-validator.) with our Wicket7
project. We've built our application with the lates release of Wicket 7
(7.4.0) and with the latest release of wicketstuff-htmlvalidator (1.11).
By the way, our generated Html markup is not valid, but we get all the time
if we're using the validator the following IllegalStateException. Any idea
how to solve the problem?

ERROR [ValidationReport] Line 6 contains error at 81: value of attribute
"http-equiv" is invalid; must be equal to "content-type", "default-style" or
"refresh"
ERROR [ValidationReport] Line 7 contains error at 73: value of attribute
"http-equiv" is invalid; must be equal to "content-type", "default-style" or
"refresh"
ERROR [ValidationReport] Line 8 contains error at 50: value of attribute
"http-equiv" is invalid; must be equal to "content-type", "default-style" or
"refresh"
ERROR [ValidationReport] Line 9 contains error at 45: value of attribute
"http-equiv" is invalid; must be equal to "content-type", "default-style" or
"refresh"
ERROR [ValidationReport] Line 10 contains error at 51: value of attribute
"http-equiv" is invalid; must be equal to "content-type", "default-style" or
"refresh"
ERROR [ValidationReport] Line 11 contains error at 91: value of attribute
"http-equiv" is invalid; must be equal to "content-type", "default-style" or
"refresh"
ERROR [ValidationReport] Line 12 contains error at 46: value of attribute
"http-equiv" is invalid; must be equal to "content-type", "default-style" or
"refresh"
ERROR [ValidationReport] Line 13 contains error at 68: value of attribute
"http-equiv" is invalid; must be equal to "content-type", "default-style" or
"refresh"
ERROR [ValidationReport] Line 14 contains error at 74: value of attribute
"http-equiv" is invalid; must be equal to "content-type", "default-style" or
"refresh"
ERROR [ValidationReport] Line -1 contains error at -1: report:
  Using the ômetaö element to specify the document-wide default language is
obsolete. Consider specifying the language on the root element instead.
ERROR [HtmlValidationResponseFilter] java.lang.IllegalStateException:
Calling Context.exit without previous Context.enter
java.lang.IllegalStateException: Calling Context.exit without previous
Context.enter
at org.mozilla.javascript.Context.exit(Unknown Source)
at org.mozilla.javascript.Context.exit(Unknown Source)
at org.whattf.datatype.FunctionBody.checkValid(FunctionBody.java:59)
at
org.whattf.datatype.AbstractDatatype.checkValid(AbstractDatatype.java:75)
at
com.thaiopensource.relaxng.pattern.DataDataDerivType.dataDeriv(DataDataDerivType.java:25)
at
com.thaiopensource.relaxng.pattern.PatternMemo.dataDeriv(PatternMemo.java:191)
at
com.thaiopensource.relaxng.pattern.PatternMatcher.matchAttributeValue(PatternMatcher.java:161)
at
com.thaiopensource.relaxng.sax.PatternValidator.startElement(PatternValidator.java:38)
at
com.thaiopensource.xml.sax.ForkContentHandler.startElement(ForkContentHandler.java:43)
at
org.wicketstuff.htmlvalidator.xml.dataattributes.DataAttributeDroppingContentHandlerWrapper.startElement(DataAttributeDroppingContentHandlerWrapper.java:158)
at
org.wicketstuff.htmlvalidator.xml.langattributes.XmlLangAttributeDroppingContentHandlerWrapper.startElement(XmlLangAttributeDroppingContentHandlerWrapper.java:149)
at
nu.validator.htmlparser.sax.SAXStreamer.elementPushed(SAXStreamer.java:141)
at
nu.validator.htmlparser.sax.SAXStreamer.elementPushed(SAXStreamer.java:35)
at
nu.validator.htmlparser.impl.TreeBuilder.push(TreeBuilder.java:3976)
at
nu.validator.htmlparser.impl.TreeBuilder.appendToCurrentNodeAndPushFormattingElementMayFoster(TreeBuilder.java:4558)
at
nu.validator.htmlparser.impl.TreeBuilder.startTag(TreeBuilder.java:1849)
at
nu.validator.htmlparser.impl.Tokenizer.emitCurrentTagToken(Tokenizer.java:1311)
at
nu.validator.htmlparser.impl.Tokenizer.stateLoop(Tokenizer.java:2152)
at
nu.validator.htmlparser.impl.Tokenizer.tokenizeBuffer(Tokenizer.java:1522)
at nu.validator.htmlparser.io.Driver.runStates(Driver.java:317)
at nu.validator.htmlparser.io.Driver.tokenize(Driver.java:217)
at
nu.validator.htmlparser.sax.HtmlParser.tokenize(HtmlParser.java:459)
at nu.validator.htmlparser.sax.HtmlParser.parse(HtmlParser.java:402)
at
org.wicketstuff.htmlvalidator.HtmlValidationResponseFilter.validateMarkup(HtmlValidationResponseFilter.java:226)
at
org.wicketstuff.htmlvalidator.HtmlValidationResponseFilter.filter(HtmlValidationResponseFilter.java:195)
at
org.apache.wicket.protocol.http.BufferedWebResponse$WriteCharSequenceAction.invoke(BufferedWebResponse.java:168)
at
org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:602)
at

Re: Problem migrating to Wicket 7

2016-06-26 Thread Dirk Forchel
Ciao Andrea,
it works! Great! I'll wait until the official release of Wicket 7.4
Dirk

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674963.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: Problem migrating to Wicket 7

2016-06-16 Thread Dirk Forchel
Hi Martin,
I've added a much more simpler test application to show what's not working
(see myproject2.zip below).
On the first page you can see on the right side a TextComponent with a
simple Behavior added to a Page. This Behavior adds some
JavaScriptResourceReference (the jQuery function definition) and an
OnDomReadyHeaderItem (the jQuery function call) to the header. If it works,
the value of the input field is replaced from "test" to "Hello Dude!" and
the input element is highlighted for a short moment.
On the second page you can find the same functionality but added to a Border
component. This works as well as described.
On the third page I've added a TextComponent with the same Behavior but to
the BorderBodyContainer (the content area) of our layout class (a Border
component) which is added to another Border (our layout container). On this
page, the Behavior is NOT working with Wicket 7.3. But the same IS working
with Wicket 6.23. You can easily switch between both versions by changing
the wicket.version in the pom.xml.
I've noticed during my investigation, that the "renderHead" method of the
Behavior class never gets called and I have not glue why! I could imagine,
that one reason could be the fact, that we use two nested Border components.
But the behavior should work with this combination as well, I think.
Could you please have a look at this problem.

Here is the quickstart:  myproject2.zip
  

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674910.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: Problem migrating to Wicket 7

2016-06-08 Thread Dirk Forchel
Hello Martin,
As I've written in my first post, we've noticed a general problem with all
Behavior classes added to Components where the parent component is a Border
component. We are using two nested Borders to create a consistent page
layout for our web application. The "content" components are added to the
2nd BorderBodyContainer. For all Behaviors added to these Components the
"renderHead" method is never called. At the end, all resource references and
all Javascript statements are not rendered anymore.
To simplify this, I've created a quickstart application with a component
hierarchy similiar to our approach (a "layout container", a Border class,
with another Border as layout inside). In addition to the HomePage I've
mounted two test pages with a simple Slider component, one (TestPage.class,
http://localhost:8080/test1.html) with the SlideshowPanel added to a
Border's BodyContainer (this works with Wicket 6 and Wicket 7) and another
page (TestPage2.class, http://localhost:8080/test2.html)) with the same
SlideshowPanel added to our "layout" solution. On this page, the
"renderHead" method of the NMSlideshowBehavior (which is the Behavior added
to the SlideshowPanel) is never called and therefore, the JavaScript library
(JavaScriptHeaderItem with a ResourceReference) and the JavaScript statement
(OnDomReadyHederItem for script) itself get not rendered. I have no idea
why, this works with Wicket 6 but NOT with Wicket 7.
I was able to figure out, that the
ChildFirstHeaderRenderStrategy#renderChildHeaders method never calls
component.internalRenderHead(headerContainer) and I'm wondering why!? This
might be due to some changes made under the hood of Wicket 7.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674864.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: Problem migrating to Wicket 7

2016-06-08 Thread Dirk Forchel
Nabble does. Here it is again ...  myproject.zip
  

PS: By the way, I meant the attachment at my previous post.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674857.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: Problem migrating to Wicket 7

2016-06-07 Thread Dirk Forchel
Does nobody has an idea? There might be some changes between Wicket 6 and
Wicket 7 how HeaderItems are rendered for Behaviors attached to Components.
I guess, that the problem are the two nested Border components. But I don't
feel confident. As stated above, I've attached a quickstart application
inorder to reproduce the problem.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-migrating-to-Wicket-7-tp4674842p4674846.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



Problem migrating to Wicket 7

2016-06-05 Thread Dirk Forchel

Hello Martin,
after migrating our Wicket application from Wicket 6.22 to Wicket 7.3, 
we've noticed, that some Behavior's renderHead method is not called 
anymore. Which means, HeaderItems added to the Response object for 
rendering ResourceReferences and OnDomReady JavaScripts statements are 
not rendered anymore. I have to admit, that our application uses a 
similiar approach to render a consisten page layout like described here 
(https://cwiki.apache.org/confluence/display/WICKET/Consistent+page+layout+using+borders). 
Our components are added to the BorderBodyContainer of a "Layout" Border 
class. I was able to figure out, that the 
ChildFirstHeaderRenderStrategy#renderChildHeaders methods never calls 
component.internalRenderHead(headerContainer) and I'm wondering why. Did 
you have changed something regarding how WebMarkupContainers esp. 
Borders and their associated Behaviors are rendered? Do you have a hint, 
where to focus my investigation?

Thank you very much.
Regards,
   Dirk Forchel

PS: Before creating a quickstart and open an issue I'd like to figure it 
out on myself


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



Re: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2014-08-20 Thread Dirk Forchel
Hi Ernesto,
after a couple of weeks (months) I still haven't found a solution. Any idea?
Thanks for your helping hand.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4667100.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



RenderStrategy REDIRECT_TO_RENDER lets fail Test with startComponentInPage

2014-08-20 Thread Dirk Forchel
Hi,
after I have changed the RenderStrategy from REDIRECT_TO_BUFFER to
REDIRECT_TO_RENDER one of our tests fails. Actually I could not figure out
why the markup is not found although it is created, but the test fails with
a MarkupNotFoundException. I'm wondering why?

Here is the stacktrace:

org.apache.wicket.markup.MarkupNotFoundException: Can not determine Markup.
Component is not yet connected to a parent. [Page class =
org.apache.wicket.util.tester.BaseWicketTester$StartComponentInPage, id = 0,
render count = 1]
at org.apache.wicket.Component.getMarkup(Component.java:749)
at
org.apache.wicket.util.tester.BaseWicketTester$StartComponentInPage.getMarkup(BaseWicketTester.java:1453)
at org.apache.wicket.Component.internalRender(Component.java:2309)
at org.apache.wicket.Component.render(Component.java:2272)
at org.apache.wicket.Page.renderPage(Page.java:1024)
at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:122)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:221)
at
org.apache.wicket.util.tester.BaseWicketTester$LastPageRecordingPageRendererProvider$1.respond(BaseWicketTester.java:2657)
at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:862)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at
org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:654)
at
org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:712)
at
org.apache.wicket.util.tester.BaseWicketTester.processRequest(BaseWicketTester.java:593)
at
org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:818)
at
org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:835)
at
org.apache.wicket.util.tester.BaseWicketTester.startComponentInPage(BaseWicketTester.java:1387)
at
org.apache.wicket.util.tester.BaseWicketTester.startComponentInPage(BaseWicketTester.java:1317)
at org.foo.StatelessTest.testComponents(StatelessTest.java:97)


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RenderStrategy-REDIRECT-TO-RENDER-lets-fail-Test-with-startComponentInPage-tp4667101.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: RenderStrategy REDIRECT_TO_RENDER lets fail Test with startComponentInPage

2014-08-20 Thread Dirk Forchel
Yes I can, the quickstart is already attached (see above).

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RenderStrategy-REDIRECT-TO-RENDER-lets-fail-Test-with-startComponentInPage-tp4667101p4667103.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: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2014-08-20 Thread Dirk Forchel
Thank you Martin. Lovely.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4667115.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: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-11 Thread Dirk Forchel
Did anybody try to run my attached quickstart application and can explain why
the additional LocaleMapper changes the path?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4662335.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: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-08 Thread Dirk Forchel
No, actually not. We've got a complete layout for our web applications from
an external design company and they use this CSS+static image resource thing
quite often. And, as I have mentioned before, we have two Wicket web
applications running in the same container. One of them on the root context
and one of them on e.g. /foo. If I start the application server (Tomcat)
and request the home page of the second application (e.g.
/foo/uk/en/home.html) the first application is initialized too, just to
render the static placeholder image from the web container. I was wondering
why and started to do some investigation. If I would disable the first web
application (remove the servlet from web.xml), all works fine and even the
static image resource from the web container is delivered.
By the way ... I've finished to prepare a quickstart (see uploaded
quickstart.zip file). At the first glance all images were rendered. I've
added an additional mapper (the LocalMapper from the Wicket examples) to
simulate our Country/Language mapping solution and ... oh wonder ... the
second and third images are not rendered!

quickstart.zip
http://apache-wicket.1842946.n4.nabble.com/file/n4662232/quickstart.zip  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4662232.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



Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-07 Thread Dirk Forchel
I mount two different resources almost the same way to figure out how it
works. First of all a context relative resource (the dotclear_tmp.png image
is relative to the context root in my WEB-INF container) and second a
dynamically created image resource (see below). But in my panel the src
attributes of the img-tags are not referenced correctly or at least it does
not works the way I would expect.
I've noticed that I do not have to register the dotclear_tmp.png image the
way I did, because the image is delivered with my web container and can be
resolved by Wicket automatically. Even if I would remove the
SharedResourceReference, the image could be found.
I have to explain, that my WebApplication is mapped to the /foo servlet
path. And I can request the images with the following URLs:

localhost:8080/images/dotclear_tmp.png (the image relative to the context
root in my web container)
localhost:8080/foo/images/dotclear_tmp.png (the mounted image as shared
resource)
localhost:8080/foo/images/dotclear.png (the mounted image as dynamic
resource)

Below my Panel for tests. The first image is shown (I guess this is the
image from the web container). The second image is not shown (the relative
URL does not point to the mounted one) where
the third and fourth src attributes are working. But I guess this is not the
way it should or at least it is not a good idea to include the servlet
context path to the src attribute of the img-tags.
I need an explanation how it could work as expected and how to solve my
problem.



The request to my home page with the following URL
http://localhost:8080/foo/uk/en/home.html
would render the page with the following relative URLs for the  -tag:



In my Application:

ContextRelativeResource resource = new
ContextRelativeResource(/images/dotclear_tmp.png);
// NOTE: an AutoResourceReference is created
getSharedResources().add( dotclear, resource );
// NOTE: SharedResourceReference is just a shortcut to the previous created
AutoResourceReference
mountResource(/images/dotclear_tmp.png, new
SharedResourceReference(dotclear) );

// NOTE: create on the fly an image resource as placeholder
mountResource(/images/dotclear.png, new
PlaceholderImageResourceReference() );


public class PlaceholderImageResourceReference extends ResourceReference 
{
private static final long serialVersionUID = 1L;

public PlaceholderImageResourceReference() 
{
super(placeholderImageResource);
}

@Override
public IResource getResource() 
{
return new PlaceholderImageResource();
}

/**
 * A cached resource which returns back a placeholder image as bytes.
 */
private static class PlaceholderImageResource extends
RenderedDynamicImageResource
{
private static final long serialVersionUID = 1L;

public PlaceholderImageResource()
{
super( 1, 1, png );
setType( BufferedImage.TYPE_INT_ARGB );
}

@Override
protected boolean render( Graphics2D graphics, Attributes 
attributes )
{
graphics.setComposite( 
AlphaComposite.getInstance(AlphaComposite.CLEAR,
0));
graphics.fillRect(0, 0, getWidth(), getHeight() );
return true;
}

@Override
public boolean equals(Object that) 
{
return that instanceof PlaceholderImageResource;
}
}
}




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190.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: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-07 Thread Dirk Forchel
And finally I've added two Image components to the Panel (this works as
expected).

In my Panel.class:

add( new Image(img1, new SharedResourceReference(dotclear) ) );
add( new Image(img2, new PlaceholderImageResourceReference()  ) );

HTML:

Rendered URLs:

In addition we use the placeholder image quite often in different panels to
replace it with different css rules like this (only an example):

.bt_right {
background: url(../images/sprite.png) -200px -30px;
width: 10px;
height:32px;
margin:4px 0 0 0;
}

So even if I could add an appropriate Image component to each panel using
the placeholder image this would blow up the code where it should not. I
hope I could make it clear.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4662196.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: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-07 Thread Dirk Forchel
No comment? No idea? Probably another solution?
Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4662219.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: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-07 Thread Dirk Forchel
Yes, I know this article and based on this one I wrote the
PlaceholderImageResourceReference class. And it works as expected. I mean I
can add this resource reference to each component I want.

Panel:

add( new Image(placeholderImg, new PlaceholderImageResourceReference() )
);

Markup:


But this is not the point. I thought I can add a kind of global resource
with a mount path like:
mountResource(/images/dotclear.png, new
PlaceholderImageResourceReference() );

Where each src-attribute of an img-tag with the src path like
images/dotclear.png is replaced with the image automatically. But it is
not. We have about 10 to 20 Panels with almost the same placeholder image.

But if I add the servlet context path (the application runs with this
servlet context path) to the src-attribute, the image is added!? I don't
understand why?

This is a bit strange to me.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4662221.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: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

2013-11-07 Thread Dirk Forchel
Okay. I know, but their is no need for an additional parameter. I want to
generate always the same image (a 1x1px PNG with a transparent background).
So I don't see the need for a parameter.
But I try to prepare a quickstart.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4662225.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: gmap3 Geocoder and list of locations

2013-10-21 Thread Dirk Forchel
Hi Martin,
there is still an open issue with showing the marker for all stores and an
appropriate info window. Actually I wanna do something like the following
Javascript code but in Java:

// Init a new map
var map = new GMap2(document.getElementById('map'));
map.addControl(new GSmallMapControl());
map.setCenter(new GLatLng(56.87, 14.80), 11);
// Creating a new marker
var marker = new GMarker(new GLatLng(56.87, 14.80))
// Adding a click-event to the marker
GEvent.addListener(marker, 'click', function() {
  // When clicked, open an Info Window
  marker.openInfoWindowHtml('Some text');
});
// Add marker to map
map.addOverlay(marker);

I'm not able to add the click-event to the marker and show the info window
with the store info (see also
https://developers.google.com/maps/documentation/javascript/v2/reference?hl=decsw=1#GMarker).
I'm just able to add click-events to the map itself. How could I do that?
Thank you.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/gmap3-Geocoder-and-list-of-locations-tp4661836p4661889.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: gmap3 Geocoder and list of locations

2013-10-21 Thread Dirk Forchel
Yes, I've already tried this, but unfortunately it was not working. But I
found the problem by myself.

My first try (not working):

GMarker marker = new GMarker(new GMarkerOptions(map, location, click
here));
marker.addListener(GEvent.click, getClickHandler());
map.addOverlay(marker);

My second try (working):

GMarker marker = new GMarker(new GMarkerOptions(map, location, click
here));
map.addOverlay(marker);
// IMPORTANT: first add the marker to the map
marker.addListener(GEvent.click, getClickHandler());

Thank you anyway.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/gmap3-Geocoder-and-list-of-locations-tp4661836p4661893.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



gmap3 Geocoder and list of locations

2013-10-17 Thread Dirk Forchel
Hi,
I'm a newbie to all the Google Maps API stuff and I've noticed that a
wicket-stuff project (gmap3) could help me to show a Google Map with a list
of shops for a known business company. I found an example on this french
page http://www.bebecash.com/Magasins/ which is similar to our  tasks. And I
know it exists a geocode example within the wicket-stuff gmap3 project
which, I think, is a good starting point. 
What would be the prefered way to feed the GeoCoder with the location data?
And what is the right way to hook in my data.
Any hints?
Thanks,
  Dirk



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/gmap3-Geocoder-and-list-of-locations-tp4661836.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: gmap3 Geocoder and list of locations

2013-10-17 Thread Dirk Forchel
Hi Martin,
thanks for your answer. Actually, all of our stores are persistent in our
database. These are about 300 and I think it is a good idea to pre-compute
all the coordinates (GLatLng) with a cronjob. Afterwards I would like to
show only a part of these stores which fit to a certain specific pattern
(e.g. post code or region or whatever). The result list of these stores
taken from the database should be shown. So I think it is a good idea to to
call serverGeocoder.findAddress(address) from the cronjob, store the GLatLng
values in the database along with the address. What do you think?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/gmap3-Geocoder-and-list-of-locations-tp4661836p4661850.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: gmap3 Geocoder and list of locations

2013-10-17 Thread Dirk Forchel
OK, sounds reasonable. Is there a way to return only these stores with their
coordinates (GLatLng) which fit into a special bound. I mean, the user types
in a region or postcode and wants to so only thouse stores which fit into
this bound. How could I perform this?
Thanks in advance.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/gmap3-Geocoder-and-list-of-locations-tp4661836p4661855.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket and microdata

2013-08-30 Thread Dirk Forchel
Martin Grigorov-4 wrote
 Hi,
 
 
 On Thu, Aug 29, 2013 at 3:29 PM, Dirk Forchel lt;

 dirk.forchel@

 gt;wrote:
 
 I'm currently try to add some kind of microdata
 (http://en.wikipedia.org/wiki/Microdata_%28HTML%29) to our project.
 Exists a
 wicketstuff project dealing with this problem?

 
 I'm not aware of such.
 
 
 What is the preferred way to add valueless attributes to HTML tags?
 E.g.
 I
 have to add the following attributes to the body tag:

 
 body id=foo itemscope itemtype=http://scheme.org/WebPage;

 
 /body

 At the base page class I've added a TransparentMarkupContainer the
 following
 way:

 this.body = new TransparentWebMarkupContainer(body);
 this.body.setOutputMarkupId(true);

 HTML:

 
 body wicket:id=body

 wicket:child/
 
 /body

 At a subclass I did:

 getBody().setMarkupId(foo).add( AttributeModifier.append(itemscope,
 AttributeModifier.VALUELESS_ATTRIBUTE_ADD ) ).add(
 AttributeModifier.append(
 itemtype, Model.of( http://scheme.org/WebPage; ) ) );

 Is this the preferred way to add valueless attributes to a tag (I've
 never

 
 Yes. This is the way to tell Wicket to not add a value for the attribute.

Okay. I've never seen this before. That's why I was asking.


Martin Grigorov-4 wrote
 Another way is to add these attributes directly in the markup. No need to
 add Behavior to the components for something that is always true.

Yes, but I prefer the dynamic way. A Component/Page provides some kind of
microdata and implements an interface. The AttributeAppender takes the
information and writes the appropriate attribute at the tag.


Martin Grigorov-4 wrote
 seen this before)? Or is this marker value for internal use only? At
 least
 the generated HTML code looks like intended.
 I would like to know whether there is a kind of general solution to deal
 with microdata, say a bunch of Behavior-classes to add this kind of
 data.

 
 AttributeModifier is a Behavior itself.
 There is no special code in Wicket for microdata. This specification is
 not
 broadly used.

I thought someone has had the same requirements within his project and came
with a general solution for this specification. Okay, fair enough. 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-microdata-tp4661135p4661153.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wicket and microdata

2013-08-29 Thread Dirk Forchel
I'm currently try to add some kind of microdata
(http://en.wikipedia.org/wiki/Microdata_%28HTML%29) to our project. Exists a
wicketstuff project dealing with this problem?
What is the preferred way to add valueless attributes to HTML tags? E.g. I
have to add the following attributes to the body tag:

body id=foo itemscope itemtype=http://scheme.org/WebPage;

/body

At the base page class I've added a TransparentMarkupContainer the following
way:

this.body = new TransparentWebMarkupContainer(body);
this.body.setOutputMarkupId(true);

HTML:

body wicket:id=body
   wicket:child/
/body

At a subclass I did:

getBody().setMarkupId(foo).add( AttributeModifier.append(itemscope,
AttributeModifier.VALUELESS_ATTRIBUTE_ADD ) ).add( AttributeModifier.append(
itemtype, Model.of( http://scheme.org/WebPage; ) ) );

Is this the preferred way to add valueless attributes to a tag (I've never
seen this before)? Or is this marker value for internal use only? At least
the generated HTML code looks like intended.
I would like to know whether there is a kind of general solution to deal
with microdata, say a bunch of Behavior-classes to add this kind of data.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-and-microdata-tp4661135.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: WICKET-5083 and Page.isPageStateless

2013-07-15 Thread Dirk Forchel
So, I've started to figure out which of our components tries to access our
Model in #onInitialize. It ended up that almost every component does. This
means, that I have to re-write all these components which might be very time
consuming. I'm wondering why a request with a redirect has to initialize all
these components before doing the actual redirect. In my opionion this makes
no sense.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-5083-and-Page-isPageStateless-tp4660166p4660267.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: WICKET-5083 and Page.isPageStateless

2013-07-11 Thread Dirk Forchel
We've added a TransactionRequestCycleListener (extends
AbstractRequestCycleListener). This class handles transactions mainly like
this:

@Override
public void onRequestHandlerResolved(final RequestCycle cycle, final
IRequestHandler handler)
{
LOGGER.debug( start transaction --- +
cycle.getRequest().getUrl().toString() + --- );
Main.model.startTransaction(applicationName);
}

@Override
public void onRequestHandlerExecuted(final RequestCycle cycle, final
IRequestHandler handler)
{
if(handler instanceof FooExceptionRequestHandler)
{
LOGGER.warn( rollback transaction --- +
cycle.getRequest().getUrl().toString() + --- );
Main.model.rollbackIfNotCommitted();
}
else
{
if( Main.model.hasCurrentTransaction() )
{
LOGGER.debug( commit transaction --- +
cycle.getRequest().getUrl().toString() + --- );
Main.model.commit();
}
else
{
LOGGER.debug( no transaction to commit --- +
cycle.getRequest().getUrl().toString() + --- );
}
}
}


The Model#currentTransaction() just returns the current transaction for this
thread and looks like:

/**
* Returns the transaction for this model,
* that is bound to the currently running thread.
* @throws IllegalStateException if there is no cope transaction bound to
current thread
 * @see Thread#currentThread()
 */
public Transaction currentTransaction()
{
final Transaction result = transactions.currentIfBound();
if(result==null)
throw new IllegalStateException(there is no transaction bound 
to this
thread, see Model#startTransaction);
return result;
}

We use our own persistence framework to handle transactions to the
underlying database. No magic all about.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-5083-and-Page-isPageStateless-tp4660166p4660220.html
Sent from the Users forum mailing list archive at Nabble.com.

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



WICKET-5083 and Page.isPageStateless

2013-07-09 Thread Dirk Forchel
I've a question regarding this issue
https://issues.apache.org/jira/browse/WICKET-5083 and
Commit:34f43642195058f375d161dbb7cec58b40711423. This commit changed the
behavior of our application (I used git:bisect to pinpoint the changes
made). From this revision on, our application does not behave as expected. 
Requests to the root segment are forwarded to the home page which results in
an exception.
For example:
http://localhost:8080/ results in http://localhost:8080/de/home
We use a LanguageMapper to resolve the language from the request. The
language is a persistent item in our database. Therefore we need a
transaction to the database which is started/committed in a subclass of
AbstractRequestCycleListener (#onRequestHandlerResolved,
onRequestHandlerExecuted).
I assume, that during the redirect all components are initialized allthough
they should not. Am I right or do I miss something? How can I prevent this?

The stacktrace looks similiar to:

WARN [RequestAdapter] An error occurred while checking whether a page is
stateless. Assuming it is stateful.
java.lang.IllegalStateException: there is no transaction bound to this
thread
at org.foo.model.Model.currentTransaction(Model.java:657)
at org.foo.model.Item.getEntity(Item.java:451)
at org.foo.model.Item.getEntity(Item.java:446)
at org.foo.model.FunctionField.get(FunctionField.java:237)
at org.foo.model.Language.getIsoCode(Language.java:948)
at org.foo.wicket.pages.Document.createXHTMLNameSpace(Document.java:166)
at org.foo.wicket.pages.Document.initComponents(Document.java:134)
at org.foo.wicket.pages.Document.onInitialize(Document.java:118)
at
org.foo.wicket.pages.AbstractBasePage.onInitialize(AbstractBasePage.java:85)
at org.foo.wicket.pages.HomePage.onInitialize(HomePage.java:106)
at org.apache.wicket.Component.fireInitialize(Component.java:863)
at
org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:955)
at org.apache.wicket.Page.isPageStateless(Page.java:451)
at
org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:166) 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-5083-and-Page-isPageStateless-tp4660166.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: WICKET-5083 and Page.isPageStateless

2013-07-09 Thread Dirk Forchel
To be honest, I'm a bit confused. I reckon this has to do with the redirect
from http://localhost:8080/ to http://localhost:8080/de/home. If I call de
URL http://localhost:8080/de/home directly all works as expected and no
exception is thrown. By the way my Home page is stateless and bookmarkable.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-5083-and-Page-isPageStateless-tp4660166p4660173.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: WICKET-5083 and Page.isPageStateless

2013-07-09 Thread Dirk Forchel
Unfortunately not. It's not that easy to create a quickstart without using
all the additional stuff we're currently using. I think of our persistence
framework etc. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-5083-and-Page-isPageStateless-tp4660166p4660181.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: WICKET-4500 / WICKET-5140 and RestartResponseAtInterceptPageException.clearOriginalDestination()

2013-06-04 Thread Dirk Forchel
Any idea? Any hint? Or should I add clearInterceptData() to the constructor
of each Page class with authorized access? A short description in source
code would be helpful.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-4500-WICKET-5140-and-RestartResponseAtInterceptPageException-clearOriginalDestination-tp4659205p4659242.html
Sent from the Users forum mailing list archive at Nabble.com.

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



WICKET-4500 / WICKET-5140 and RestartResponseAtInterceptPageException.clearOriginalDestination()

2013-06-03 Thread Dirk Forchel
With the fixed bug of WICKET-5140 the public method
Component#clearOriginalDestination() has been added which uses the private
method RestartResponseAtInterceptPageException.clearOriginalDestination(). 
I have no glue how to use this public method as we use the
AuthenticatedWebApplication from the authroles package where we could
override restartResponseAtSignInPage() but not the final method
onUnauthorizedInstantiation. Actually I would like to clear the
InterceptData before redirecting to the intercept page (LoginPage), but the
onUnauthorizedInstantiation is final. The only solution I can think of, is
to add a new implementation of IUnauthorizedComponentInstantiationListener
to the Application in order to call clearOriginalDestination() on my
unauthorized page instance and to reset the InterceptData.
How about to make this method non-final? Or what is the preffered way of
doing this?





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WICKET-4500-WICKET-5140-and-RestartResponseAtInterceptPageException-clearOriginalDestination-tp4659205.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: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-27 Thread Dirk Forchel
Actually I don't see any reason why to redirect for stateless pages, but
browsing the source code I found that the default WePageRenderer returns
true for
org.apache.wicket.request.handler.render.PageRenderer.enableRedirectForStatelessPage().
Should I override this method as well to disable the redirect? But therfore
I have to provide my own WebPageRenderer in WebApplication.class.
By the way, we have a bunch of AbstractAjaxBehaviors and AjaxLinks in the
component hierarchy which trigger the Page to be stateful. But I don't
have experience with stateless components so I may miss something.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4659041.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: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-26 Thread Dirk Forchel
You mean setStatelessHint(true) should be enough to simulate that it is
stateless (and not setStatelessHint(false)), do you?
Actually we didn't care about whether a page is stateless or not as long as
they are bookmarkable. 
After a while we've noticed, that stateful pages (with the page version id
appended) in connection with our special filter cause the problem with the
endless loop (no HTML session can be created) if the user does not allow
cookies in his browser or if a web crawler wants to index the site. This
problem came up with Wicket 1.5.7 or 1.5.8. After we did a migration to
Wicket 6 (version 6.7.0) the problem was gone and no page version id was
attached to the URLs anymore (as long as no form was submitted) and we
thought all will be fine. But with version 6.8.0 the problem came up again
and we were confused about that.
In summary, does this mean, we pages which should be indexed by web crawlers
can not be stateful?
I've found this discussion from an older thread
http://apache-wicket.1842946.n4.nabble.com/Session-ids-and-search-engine-bots-tc1916506.html#a1916510
with exactly the same problem. And to be honest, I did not expect, that we
have to care about that. This should be handled by the web framework itself.
But from now on we have to keep an eye on whether our pages are stateless or
not.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4659032.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: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-24 Thread Dirk Forchel
I found the solution by myself ...

mvn clean -DskipTests package does the job on my Windows system



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4659009.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: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-24 Thread Dirk Forchel
Hi Martin, I could pinpoint the commit which changed the behavior in our
application:

git.exe bisect bad

34f43642195058f375d161dbb7cec58b40711423 is the first bad commit
commit 34f43642195058f375d161dbb7cec58b40711423
Author: Martin Tzvetanov Grigorov mgrigo...@apache.org
Date:   Fri Apr 19 12:21:04 2013 +0300

WICKET-5083 Page#isPageStateless() may return wrong value

Initialize the page if it is not already when calculating its statefulness

:04 04 fc0a2197290a684ebfe415415f1d425fdf43ee2e
b723f22ec183769483dfdb9d21b4af0e1b8e5ca1 M  wicket-core
Success



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4659016.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: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-24 Thread Dirk Forchel
Here the failure trace:

java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:92)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.junit.Assert.assertTrue(Assert.java:54)
at
org.apache.wicket.markup.html.PackageResourceTest.packageResourceGuard(PackageResourceTest.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4659018.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: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-24 Thread Dirk Forchel
I reckon WICKET-5083 is a bugfix for wrong rendered URLs (stateful pages were
rendered without a page version number) which in our case was correct but
just as a mistake. It seems, that our pages are stateful and therefore get
the page version number (page id ?x) attached. As I described above, in our
project this results in an error (endless loop) if cookies are not allowed
or if a web crawler wants to index the site, because we don't support
session IDs in URLs. 
The only solution I can think of, is to mark these pages as stateless.
What is the correct way to do this? A stateless page must be at least
bookmarkable and no child component should be stateful.
I can remember that the annotation @StatelessComponent in combination with
the StatelessChecker and the method call setStatelessHint(true) was
necessary to mark a page as being stateless. 
Is this still necessary? Or what is the preferred way for doing this?

As a quick hack I've already changed our render strategy from
REDIRECT_TO_BUFFER to REDIRECT_TO_RENDER. In that case no page version id is
attached at all. What could be the flaw for using this render strategy as an
alternative?

Thanks for your helping hand.




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4659021.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



REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-23 Thread Dirk Forchel
For security reasons we've added a filter to our web application which
invalidates session if the session ID is exposed in the URL (disable
JSessionID URL encoding). We only accept HttpSession creation if the user
allows cookies. But this may be a problem for web crawlers (e.g. Google
bot), as they do not use cookies. 
With Wicket 6.7.0 we did not have any problem as no page version has been
added to bookmarkable URLs by default (no redirect) as long as no form
submits occured. Which is sufficient because web crawlers can index the
site. After upgrading to Wicket 6.8.0 the page version number is added for
each bookmarkable page request and we can not display any page if cookies
and Javascript are deactivated in the browser. This results in an endless
loop (The page isn't redirecting properly Firefox has detected that the
server is redirecting the request for this address in a way that will never
complete.). What causes the new behavior? What has been changed? I reckon
this relies to bug https://issues.apache.org/jira/browse/WICKET-5164. The
only solution I can think of, is to change the render strategy to
REDIRECT_TO_RENDER, as we've had the same problem with Wicket 1.5.x. 
Or is there anything else I'm not being aware of?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991.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: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-23 Thread Dirk Forchel
A simple quickstart application running with Wicket 6.8.0 and Jetty and two
mounted pages (stateless?) do not trigger the problem. It might be more
difficult to figure out what causes the redirect. Any hint?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4658993.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: REDIRECT_TO_BUFFER render strategy and Wicket 6.8.0

2013-05-23 Thread Dirk Forchel
Unfortunately I can not build the package. Any help would be appreciated.

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test (default-test) on
project wicket-core: There are test failures.
[ERROR]
[ERROR] Please refer to
C:\projects\wicket\wicket-core\target\surefire-reports for the individual
test results.
[ERROR] - [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-surefire-plugin:2.12.2:test
(default-test) on project wicket-core: There are test failures.

Please refer to C:\projects\wicket\wicket-core\target\surefire-reports for
the individual test results.
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test
failures.

Please refer to C:\projects\wicket\wicket-core\target\surefire-reports for
the individual test results.
at
org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:83)
at
org.apache.maven.plugin.surefire.SurefirePlugin.writeSummary(SurefirePlugin.java:185)
at
org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary(SurefirePlugin.java:159)
at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:626)
at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:587)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
... 19 more



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-render-strategy-and-Wicket-6-8-0-tp4658991p4659004.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: REDIRECT_TO_BUFFER and Url encoding problem with Umlauts

2013-04-10 Thread Dirk Forchel
Seems to be not a problem with Wicket but rather with Tomcat. The requestURI
is not encoded correctly (see below).

target Url: landing/M%C3%A4nner/men.html
redirect_to_buffer targetUrl: landing/M%C3%A4nner/men.html
targetUrl2: landing/M%C3%A4nner/men.html?1
storeBufferedResponse: landing/M%C3%A4nner/men.html?1
redirectTo: landing/M%C3%A4nner/men.html?1
response.sendRedirect: ./men.html?1
encodeRedirectURL: ./men.html?1
encodedRelativeUrl: ./men.html?1
httpServletResponse org.apache.catalina.connector.ResponseFacade
sendRedirect men.html?1
ServletWebRequest for HttpServletRequest
org.apache.catalina.connector.RequestFacade@9d54b17 url=null requestURI
/germanyb2c/de/landing/M%c3%83%c2%a4nner/men.html

Did someone experience similar problems? We're using Tomcat 7.0.29.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-and-Url-encoding-problem-with-Umlauts-tp4657840p4657863.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: REDIRECT_TO_BUFFER and Url encoding problem with Umlauts

2013-04-10 Thread Dirk Forchel
Heureka, I found the solution by myself. I changed the URI encoding in my
server.xml and all works fine:

Connector port=8080 URIEncoding=UTF8/



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-and-Url-encoding-problem-with-Umlauts-tp4657840p4657865.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



REDIRECT_TO_BUFFER and Url encoding problem with Umlauts

2013-04-09 Thread Dirk Forchel
Hi,
I've a problem with my optional parameter and encoded Umlauts.

My example page is mapped with the MountedMapper on
/landing/#{seoString}/${context}, where as seoString is the optional
parameter and context is the required parameter.
Bookmarkable page links are generated with the correct URL, e.g.
../M%C3%A4nner/men.html.
But if I click on this link the generated redirect URL is wrong encoded.

For example:

Request URL=http://localhost:8080/landing/M%C3%A4nner/men.html (302)
Redirect URL=http://localhost:8080/landing/M%c3%83%c2%a4nner/men.html?2
(200)

I think, this has to do with the redirect if I use the REDIRECT_TO_BUFFER
render strategy. If I change to REDIRECT_TO_RENDER the Browser URL is
correct. What or where could be the encoding/decoding problem.

Thank you for your help.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-and-Url-encoding-problem-with-Umlauts-tp4657840.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: REDIRECT_TO_BUFFER and Url encoding problem with Umlauts

2013-04-09 Thread Dirk Forchel
Can give me a hint in which class the encoding for this redirect is done?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/REDIRECT-TO-BUFFER-and-Url-encoding-problem-with-Umlauts-tp4657840p4657844.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: Redirect to Wicket page with 301 Moved Permanently

2013-01-17 Thread Dirk Forchel
Concerning Wicket 1.5/6:

I've mounted a page for example with a mount path like product.html and
with a query string (PageParameter) like product.html?product=1234. This
is my old mounting path which has already been indexed by Google.
The new mounting path for the same page will look different, say
product/product-name/1234.
To forward requests from obsolete links to the new one, I've added a kind of
Redirect Page which does nothing but redirecting to the new Url. The
redirect page is mounted with the old path.

public RedirectPage( final PageParameters parameters, final String url )
{
super(parameters);
throw new RedirectToUrlException( url ,
HttpServletResponse.SC_MOVED_PERMANENTLY );
}

If I would change the mounting path for more than 5 or 10 pages, this kind
of solution could be very annoying.
Is there another way to solve this. I would prefer something like a Map
which holds old and new mounth paths and a kind of Mapper which is
responsible to map obsolete URLs to new ones.
Exists such a solution which I'm not aware of?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655460.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: Redirect to Wicket page with 301 Moved Permanently

2013-01-17 Thread Dirk Forchel
Hm, I already thought about that. But I miss the link between the old mounted
pages and the new pages. I mean I have to mount a pair of page classes
though.

mountPage(product.html, LegacyProductPage.class);
mountPage(product/#{product_name}/${product}, ProductPage.class)

And in the new Mapper would check like (don't know whether this works):

@Override
public final IRequestHandler mapRequest(Request request)
{
   IRequestHandler handler = delegate.mapRequest(request);
   // check whether the request is a legacy URL
   if (isLegacyUrl(request)
  {
  // get the new URL instead
  String url = createRedirectUrl(handler, request);
  handler = createRedirectHandler(url);
   }
   return handler 
}

Just what I have in mind. The new mapper would hold a map with a pair of
legacy and new Page classes. And for each request the mapper would check
whether this request URL is contained in the map. But this means I have to
maintain two places for each pair of legacy and new Page classes. I'm
not sure whether this is a smart solution. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655465.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: Redirect to Wicket page with 301 Moved Permanently

2013-01-17 Thread Dirk Forchel
 You don't need to mountPage(TheLegacyPage) - it wont be used anyway. 

Yes, you are right. There is actually no need to do this. 
But I don't have a glue how to check whether the request URL is an obsolete
one or not AND how to map the old parameters to the new parameters. So I
thought, having both pages and let Wicket do the stuff for me would be a
good starting point.





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655468.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: Redirect to Wicket page with 301 Moved Permanently

2013-01-17 Thread Dirk Forchel
Sounds to complicated. Then I prefer the old fashioned way like this ...
Wicket generates the new Url based on a passed in Product. I don't have to
bother about .html ending and segement sizes and so on ...

mountPage(product.html, LegacyProductPage.class);
mountPage(product/#{product_name}/${product}, ProductPage.class);

public abstract class AbstractRedirectPage extends WebPage
{
public AbstractRedirectPage( final PageParameters parameters, final 
String
url )
{
this( parameters, url, HttpServletResponse.SC_MOVED_PERMANENTLY 
);
}

public AbstractRedirectPage( final PageParameters parameters, final 
String
url, int statusCode )
{
super(parameters);
throw new RedirectToUrlException(toFullUrl( url ), statusCode );
}
}

public class LegacyProductPage extends AbstractRedirectPage
{
public LegacyProductPage( final PageParameters parameters, final Product
product )
{
super(parameters, getProductPageUrl(product));
}

private static String getProductPageUrl( Product product )
{
final PageInfo pageInfo = new ProductPage.PageInfo(product);
return pageInfo.getRelativeUrl();
}
}

public class ProductPage extends WebPage
{
public static class PageInfo
{
final Product product;

public PageInfo( Product product )
{
this.product = product;
}

public String getRelativeUrl()
{
return RequestCycle.get().urlFor( ProductPage.class,
pageParametersForProductPage( product ) ).toString();
}

}

private final Product product;


public ProductPage(final PageParameters pageParameters, final Product
product )
{

}
}



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655470.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: MounterMapper and optional parameters

2013-01-15 Thread Dirk Forchel
Sorry for the Igor, Martin.
Anyway, thank you for your help.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/MounterMapper-and-optional-parameters-tp4655372p4655384.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



MounterMapper and optional parameters

2013-01-14 Thread Dirk Forchel
Hallo,
I'd like to get an hint how to provide the following URLs. What is the
preferred way to improve our existing URLs?
We need search-friendly URLs by naming them with clear keywords.
For example for product pages the current URL looks like:
http://localhost:8080/product.html?product=1234
This should be changed to be:
http://localhost:8080/products/category-name/product-name-1234.html
where the category-name and product-name part are optional. Only the ID
(e.g. 1234) is an essential parameter. 
I know, that the MountedMapper introduced with Wicket 1.5 is smart enough to
handle a mix of supported parameter types
(https://cwiki.apache.org/WICKET/request-mapping.html).
And I assume, that mounting the ProductPage could be the following way:

addPage(/products/${category_name}/${product_name}/#{id},
ProductPage.class)

This uses a named parameter id and an optional named parameters
category_name and product_name.

I assume that the following pattern is not working (I did not try it):

addPage(/products/${category_name}/${product_name}-#{id}.html,
ProductPage.class)

How would I provide such a pattern?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/MounterMapper-and-optional-parameters-tp4655372.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



Button value with escaped Model String

2012-11-06 Thread Dirk Forchel
We have a mutli-language Application where Button values are rendered with
wrong and escaped Strings. Therefore our Button components have a default
Model which property is used to set the value attribute.
For example in French, the default Model String of a specific button is S'
abonner but the rendered value String is S#039; abonner. 

Simplified it looks like this:


Just if I set


the Button value is rendered with the correct value (not escaped).
I think, that the method Button#onComponentTag(ComponentTag) should use
getDefaultModelObject() (which is a String) instead of
getDefaultModelObjectAsString().
Or do I miss something?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Button-value-with-escaped-Model-String-tp4653650.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Using PageReference for a 'back' link

2012-10-23 Thread Dirk Forchel
Here a short example with two Pages (a kind of overview page and a
detailed view page) how it could work:

e.g. in OverviewPage.java:



in DetailedViewPage.java:






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-PageReference-for-a-back-link-tp4653212p4653235.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Using PageReference for a 'back' link

2012-10-23 Thread Dirk Forchel
Sorry, I did not read your question carefully. Yes my suggestion does not
work with BookmarkablePageLinks.
But Martin has given you already the right solution.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-PageReference-for-a-back-link-tp4653212p4653257.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: UrlRenderer renders wrong HTTPS links

2012-10-19 Thread Dirk Forchel
Okay, I'll try out the change in a couple of minutes and give you a feedback.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UrlRenderer-renders-wrong-HTTPS-links-tp4653059p4653100.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: UrlRenderer renders wrong HTTPS links

2012-10-19 Thread Dirk Forchel
Hi Sven,
it works!!! Yep. You safed my day ... almost ;-)
Dirk



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UrlRenderer-renders-wrong-HTTPS-links-tp4653059p4653104.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



UrlRenderer renders wrong HTTPS links

2012-10-18 Thread Dirk Forchel
First of all, sorry for messing up the Core Developer Forum with my question
as well.
By the way, have a look at issue
https://issues.apache.org/jira/browse/WICKET-4776 first.
I've adapted the solution to preserve the port and the protocol in the
UrlRender in our UrlRender subclass and at the first glance it might work.
On my local developer machine running our webapplication on a Tomcat
webserver the generated links to secure pages seem to be correct, e.g.
requesting the Home Page Url http://localhost:8080/home.html now contains
links to secure pages like https://localhost:8443/account.html with correct
Urls.
But running the same application on a Tomcat server with an Apache Http
Server (with an AJP connector and the default ports 80/443) results in wrong
rendered Https links.
The Home Page with the Url http://domainname.com/home.html now contains the
wrong link https://domainname.com:80/account.html.
I reckon the preserved Http port (Http port 80) leads to this problem. I'm
not sure, whether a prober solution would be to check the HTTP header first.
If the HTTP header contains a port, preserve it, otherwise not.

In addition: I could figure out, that on my local machine, the preserved
values for protocol and port are 'https' and '8443' which is correct, but on
the system with the Apache webserver and Tomcat the values are 'https' and
'null'. With these values, the method resolvePort(Url) returns the value for
fallback2, which is '80' and not the right one.
Why is the preserved value 'null'?

@Override
public String renderUrl(final Url url)
{
final String renderedUrl;
if (shouldRenderAsFull(url))
{
if (url.isAbsolute()==false)
{
// relative Url
String relativeUrl = renderRelativeUrl(url);
Url relative = Url.parse(relativeUrl,
url.getCharset());
// intermediate relative url is missing port
and protocol preserve it
// see
https://issues.apache.org/jira/browse/WICKET-4776
LOGGER.debug( Preserve Protocol: {} Port:
{} , url.getProtocol(), url.getPort());
relative.setPort(url.getPort());
relative.setProtocol(url.getProtocol());
renderedUrl = renderFullUrl(relative);
LOGGER.debug( Relative render as full
renderedUrl: {} = {}, url, renderedUrl );
}
else
{
renderedUrl = renderFullUrl(url);
LOGGER.debug( Absolute render as full
renderedUrl: {} = {}, url, renderedUrl );
}
}
else
{
renderedUrl = renderRelativeUrl(url);
LOGGER.debug( Relative renderedUrl: {} = {},url,
renderedUrl );
}
return renderedUrl;
}

@Override
protected Integer resolvePort(final Url url)
{
LOGGER.info( Resolve Port: +url.getPort()+ Base Url:
+getBaseUrl().getPort()+ ClientUrl: +request.getClientUrl().getPort() );
return choose(url.getPort(), getBaseUrl().getPort(),
request.getClientUrl().getPort());
} 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UrlRenderer-renders-wrong-HTTPS-links-tp4653059.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: UrlRenderer renders wrong HTTPS links

2012-10-18 Thread Dirk Forchel
Hallo Sven,
I doubt it. I don't wanna blame the HttpsMapper as the mapping is done in
the usual way as RootRequestMapper:

Application#init()


There is no magic and there were no changes at all. Since we upgraded our
application from Wicket 1.5.5 to Wicket 1.5.8 and/or Wicket 6 (NOTE: we have
the same application on two branches with different Wicket verions) we have
this problem with wrong rendered secure Links. 
As mentioned above, I've adapted your solution to pre-save the protocol and
the port and this solution works on my local developer machine running with
Tomcat on http://localhost:8080/ and https://localhost:8443/ respectively.
But if we deploy this application on another machine with Tomcat and an
Apache WebServer (connected to Tomcat via AJP connector) in front, we got
these wrong rendered links. The request Urls to the Apache WebServer look
like http://mydomain.com/ and https://mydomain.com/. Note: there are no
ports in the requests, needless to say that Tomcat listens on port 80 and
443.

I could figure out, that on the remote machine, the pre-served port value is
'null' and not '443' as it should be. Why?! On my local machine the
pre-served port is '8443'. If the pre-served port value is null, the method
resolvePort(url) returns '80' as resolved port value, which is WRONG!!!



The returned port value in this case is the second fallback (
request.getClientUrl().getPort() ).
Do you have any idea why 'null' is pre-served and not '443'?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/UrlRenderer-renders-wrong-HTTPS-links-tp4653059p4653080.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Using and creating URLs to Bookmarkable Pages without Wicket Application

2012-09-17 Thread Dirk Forchel
Thank you for the hint. I just thought about using the WicketTester to mock
the behavior (RequestCycle) of getting the url for a mounted page.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-and-creating-URLs-to-Bookmarkable-Pages-without-Wicket-Application-tp4652002p4652033.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Using and creating URLs to Bookmarkable Pages without Wicket Application

2012-09-16 Thread Dirk Forchel
No more hints about generating bookmarkable page links with Wicket?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-and-creating-URLs-to-Bookmarkable-Pages-without-Wicket-Application-tp4652002p4652024.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Using and creating URLs to Bookmarkable Pages without Wicket Application

2012-09-14 Thread Dirk Forchel
I'm already familiar with the usual way how to mount bookmarkable pages and
how to handle page parameters. That's not the point. I don't wanna create
the URLs manually, because Wicket does already have the knowledge about all
mounted pages. The URLs might be change in the future (different segments or
whatever) that's why I wanna use an interface and an implementation within
the wicket package to generate the URLs for me. At least if I have a
WebRequest I can already use Wicket to generate the URLs for me (e.g.
RequestCycle.get().urlFor(Class, PageParameters)). But what happens if I
don't have a WebRequest and a RequestCycle (like using jUnit to test Wicket
Components and/or Pages). I think I have to use something like a mocked
RequestCycle. Or do I miss something?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-and-creating-URLs-to-Bookmarkable-Pages-without-Wicket-Application-tp4652002p4652009.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



CSS3, PIE behavior and image resources

2012-06-04 Thread Dirk Forchel
Hi,
we have to use PIE (see  http://css3pie.com/ http://css3pie.com/ ) to make
IE7 and IE8 capable of rendering CSS3 decoration features. We use a shared
resource mount to have an absolute URL in our CSS file (see also 
https://issues.apache.org/jira/browse/WICKET-3046
https://issues.apache.org/jira/browse/WICKET-3046 ).



This works fine. 
But CSS3 allows web designers to specify multiple background images for box
elements, using nothing more than a simple comma-separated list. This works
for e.g. Firefox and IE9 but not for IE7 and IE8. Therefore we want to us
the PIE behavior and the /-pie-background/ attribute.

*There are two main issues related to relative paths in CSS:*

*The beahvior URL*

IE interprets the URL for the behavior property relative to the source HTML
document, rather than relative to the CSS file like every other CSS
property. This makes invoking the PIE behavior inconvenient, because the URL
has to either be:
1. absolute from the domain root (this makes the CSS not easily moveable
between directories) or
2. realtive to the HTML document (this makes the CSS not easily reusable
between different HTML files)
We went for the first solution as our CSS is global for the application.

*URLs in PIE-interpreted CSS properties*

PIE does not parse the CSS stylesheets, it lets IE handle the parsing,
selector querying, cascading, etc. and then simply asks it for the resulting
property values. This means that when PIE gets a property value, it has no
knowledge of the context from which that value originated.
As a result, for properties which contain URL values (such as border-image
or -pie-background), PIE cannot resolve those URLs relative to the CSS file
in which they appear. 

The PIE documentation says: /It resolves them instead relative to the
JavaScript execution context, which is the location of the source HTML
document./.
But as far as I know, in Wicket the image URLs within a CSS resource are
interpreted relative to the resource. And this seems to be our problem
finding image resources.


I fiddled around with this problem a whole day but got no proper solution
(It's not a solution for us to put the CSS file and the images in the web
root container).
Does anybody have a solution for our problem? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS3-PIE-behavior-and-image-resources-tp4649699.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: CSS3, PIE behavior and image resources

2012-06-04 Thread Dirk Forchel
Hi Martin,
actually I don't get it. How should I use
org.apache.wicket.request.UrlRenderer within a CSS file?
At the moment I prepare a quickstart application for our problem. Maybe this
helps to get an impression how it should work.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS3-PIE-behavior-and-image-resources-tp4649699p4649703.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket 1.5.6 duplicates segments in absolute URLs

2012-05-15 Thread Dirk Forchel
I've created issue https://issues.apache.org/jira/browse/WICKET-4561.
Unfortunately I can't attach the quickstart since the JIRA server does
respond with an error message.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634089.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket 1.5.6 duplicates segments in absolute URLs

2012-05-15 Thread Dirk Forchel
Hi Martin,
attached you can find the quickstart application.
Thanks,
   Dirk

Am 15.05.2012 10:39, schrieb Martin Grigorov-4 [via Apache Wicket]:
 Thanks.
 Send it directly to me. I'll attach it when Jira is OK.

 On Tue, May 15, 2012 at 10:34 AM, Dirk Forchel [hidden email] 
 /user/SendEmail.jtp?type=nodenode=4634095i=0 wrote:

  I've created issue https://issues.apache.org/jira/browse/WICKET-4561.
  Unfortunately I can't attach the quickstart since the JIRA server does
  respond with an error message.
 
  --
  View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634089.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=4634095i=1
  For additional commands, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=4634095i=2
 



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

 -
 To unsubscribe, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=4634095i=3
 For additional commands, e-mail: [hidden email] 
 /user/SendEmail.jtp?type=nodenode=4634095i=4



 
 If you reply to this email, your message will be added to the 
 discussion below:
 http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634095.html
  

 To unsubscribe from Wicket 1.5.6 duplicates segments in absolute URLs, 
 click here 
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4632213code=ZGlyay5mb3JjaGVsQGV4ZWRpby5jb218NDYzMjIxM3wxOTkzMTkyMTE4.
 NAML 
 http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
  



-- 
Dirk Forchel
Software Engineer

Telefon +49 (351) 4108-115
Fax +49 (351) 4108-5115
dirk.forc...@exedio.com
www.exedio.com

exedio Gesellschaft für Softwareentwicklung mbH
Buchenstraße 16 B
01097 Dresden
Deutschland

Handelsregister: HRB 22109, Amtsgericht Dresden
Sitz der Gesellschaft: Dresden
Geschäftsführer: Sven-Erik Bornscheuer, Lutz Kirchner, Falk Krause



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634199.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wicket 1.5.6 duplicates segments in absolute URLs

2012-05-14 Thread Dirk Forchel
Since we migrate our application to Wicket 1.5.6 some URLs from
BookmarkablePageLinks have duplicate segements for indicating a Shop and a
Language item from our persistence model. For indicating a Shop and Language
item we use our own ShopMapper and LanguageMapper (subclass of
AbstractComponentMapper). This was working until we migrate to 1.5.6. 
For instance ...

correct URL: host/servlet/shop/en/page
wrong URL: host/servlet/shop/en/shop/en/page

This happens, for example, when the protocol of the linked URL is different
from the current protocol (http/https). So, basically, all links that point
to pages that are annotated with @RequireHttps are wrong.

In our Application class we set the HttpsMapper as RootRequestMapper, e.g.:



Using a debugger, I've tracked down the spot where wrong URL is rendered:


Either it's a bug in Wicket introduced with WICKET-4518 or WICKET-4514 or
there's something wrong with our LanguageMapper and ShopMapper. The
algorithm of these two mappers that add the segment to the URL are called
twice in resolveRelative.
Any idea?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213.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



MarkupNotFoundException for Fragment and TransparentWebMarkupContainer

2012-05-09 Thread Dirk Forchel
Hello,
I've a question regarding Fragements inside a TransparentWebMarkupContainer.
I've a base WebPage with a TransparentWebMarkupContainer to allow subclasses
register CSS classes on the body tag. If I add a Fragment to one of these
subsclasses, the markup of the Fragment is not found. 

BasePage.java

Markup of BasePage.html

My subclass looks like:

Markup of FragmentTestPage.html


Why is it not possible to do this!? And why doesn't find the
FragmentMarkupSourcingStrategy the markup for Fragment testFragment in the
providong markup container (Page class FragmentTestPage)?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.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: MarkupNotFoundException for Fragment and TransparentWebMarkupContainer

2012-05-09 Thread Dirk Forchel
JIRA Issue https://issues.apache.org/jira/browse/WICKET-4545 with quickstart
created.
Thanks for the awkward hint and for the quick hack. I'll use a Panel
instead.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968p4620173.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



JavaScript error wcall is not defined

2012-04-24 Thread Dirk Forchel
Similiar to this wiQuery example 
http://wiquery-plugins-demo.appspot.com/demo/;jsessionid=-bDymblOPJUPu9QqdWv7ug?wicket:bookmarkablePage=:com.wiquery.plugins.demo.TestLinkEffectsPage
http://wiquery-plugins-demo.appspot.com/demo/;jsessionid=-bDymblOPJUPu9QqdWv7ug?wicket:bookmarkablePage=:com.wiquery.plugins.demo.TestLinkEffectsPage
 
I use an AjaxLink with an AjaxCallDecorator to decorate my onClick event.
If I click on the Link, the according currentImage is replaced by another
one. Before the Ajax-Call I wanna fade out the image (using the wiQuery
FadeOut effect). The callback-Function of this Effect is set to the
original Wicket Ajax callback. But this is not working the way I thought.
Instead an JavaScript error is shown in my Firebug console wcall is not
defined.
Does somebody have an idea what's going wrong. Or is there another way to
fade out the image component first before replace it with another image?
Thank you.



Unfortunately the generated script is not correct. 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/JavaScript-error-wcall-is-not-defined-tp4583516p4583516.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



Static images and ResourceMapper in Wicket 1.5

2012-04-19 Thread Dirk Forchel
I'm wondering what is the preferred way to include static image resources to
my web application. Instead of having a directory like images in my root
web container (WEB-INF) with all the static images used in my application it
is advised (so far I can remember) to have a directory next to the
Application class and mount these image resources with the ResourceMapper.

At the moment I refer to images in my root web container from a Panel's
markup file like



This works for me but I wanna go the wicketzed way. If I would use the
ResourceMapper in my Application class I would mount just one image resource
the following way:


What is the preferred way to mount all resources at ones in one directory? 
How can these changes be applied to the corresponding markup files of my
Panels without creating an Image (or ContextImage?) component?
Thanks for your hints.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Static-images-and-ResourceMapper-in-Wicket-1-5-tp4570016p4570016.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Using @font-face css rules

2012-04-18 Thread Dirk Forchel
I have a problem loading my fonts defined in my css file with the @font-face
css rule which allows me to download the fonts from my server.
Initally I define the rules in my css file the following way:



The css-file is references by a CssResourceReference and contributed to the
header with a Behavior:



After loading my sample page with the Behavior, I've got the following
Exception:



Unfortunately, something with the resource mapping is wrong or does it mean,
that the file type is not supported?



The directory structure is like this:

/com/foo/wicket/behavior/css/FontFaceCssHeaderContributor.java
/com/foo/wicket/behavior/css/FontFaceCssResourceReference.java
/com/foo/wicket/behavior/css/font_face.css
/com/foo/wicket/behavior/fonts/sansation_regular-webfont.eot

Does somebody have any idea?
Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-font-face-css-rules-tp4567586p4567586.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Using @font-face css rules

2012-04-18 Thread Dirk Forchel
Thanks. I go for the 2nd approach and it seems to be working except the
access to static packages resources with an unknown file ending. 
What did you mean with 



 The problem is that '..' escapes from the package name.
 See
 org.apache.wicket.settings.def.ResourceSettings#parentFolderPlaceholder
 Replace '..' with whatever you use for parentFolderPlaceholder
 

The parentFolderPlaceholder String is currently set to ::. Does this mean,
if I would replace the .. in my css file with :: this would work as
well?

I assume I have to add some kind of pattern to the PackageResourceGuard
though. As I get the following messages now:



What is the preferred way to do this?
I assume this will solve my problem:





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Using-font-face-css-rules-tp4567586p4567770.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 and ivy

2012-03-07 Thread Dirk Forchel
The sources are just for our IDE (Eclipse) to link these sources to the
binaries.
Because the wiquery repository is maven2 compatible, I've changed the
resolver configuration in my ivysettings.xml to ibiblio:

I assume only this resolver can downoad all jars (sources, docs) from the
repository if this one is maven compatible. 
Using the m2compatible attribute for this resolver, one can benefit from
maven2 repository compatibility. This setting also affects the default place
where the resolver looks for its artifacts to point to the maven2
repository. So setting this attribute to true is sufficient to use maven 2
ibiblio repository.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wiQuery-and-ivy-tp4446057p4452580.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



wiQuery and ivy

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



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



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



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


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wiQuery-and-ivy-tp4446057p4446057.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: The vision of Wicket 6

2012-03-02 Thread Dirk Forchel
Okay. Thank you both for the short explanation. I've got the feeling that
migrating an existing 1.5 project to Wicket 6 will be a pain. But obviously
it will not.
Cheers.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/The-vision-of-Wicket-6-tp4437649p4438216.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



The vision of Wicket 6

2012-03-01 Thread Dirk Forchel
Just a non-technical question. We're using Wicket 1.4.x and 1.5.x in
different projects and we're feeling quite confident (at least me) using
this framework. By the way, it might be not quite easy migrating an existing
wicket 1.4 project to wicket 1.5. But that's not the point. 
I've noticed, that the guys are working on a new wicket version, called
Wicket 6.0. What is the aim of Wicket 6? What is the vision with wicket 6?
Why this major release number? Is Wicket 6 not just a Wicket 2?
Is closer to wicket 1.5 than the version number 6 will 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/The-vision-of-Wicket-6-tp4437642p4437642.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



The vision of Wicket 6

2012-03-01 Thread Dirk Forchel
Just a non-technical question. We're using Wicket 1.4.x and 1.5.x in
different projects and we're feeling quite confident (at least me) using
this framework. By the way, it might be not quite easy migrating an existing
wicket 1.4 project to wicket 1.5. But that's not the point. 
I've noticed, that the guys are working on a new wicket version, called
Wicket 6.0. What is the aim of Wicket 6? What is the vision with wicket 6?
Why this major release number? Is Wicket 6 not just a Wicket 2?
Is not the API closer to wicket 1.5 than the version number 6 will suggest?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/The-vision-of-Wicket-6-tp4437649p4437649.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



AbstractAjaxBehavior and missing unbind(Component) method

2012-02-21 Thread Dirk Forchel
Similar to this topic
(http://apache-wicket.1842946.n4.nabble.com/Possible-AbstractAjaxBehavior-Bug-tp1867734p1867734.html)
I'm running into trouble adding a Behavior to a Component dynamically with
an Ajax request.
I have a test page for jQuery UI Effects similar to this example
(http://jqueryui.com/demos/effect/) 
where AbstractEffect extends AbstractAjaxBehavior. If I wanna replace the
old selected behavior with the new one, previously attached to a
WebMarkupContainer, I get an IllegalStateException thrown at
org.apache.wicket.behavior.AbstractAjaxBehavior.bind(AbstractAjaxBehavior.java:62).
 
I know, the Behavior was not designed with the adding/removing in mind, but
as this issue (https://issues.apache.org/jira/browse/WICKET-713) has been
fixed, it would be quite easy to solve this problem.
I reckon the AbstractAjaxBehavior should just overwrite the unbind(Component
component) method, to set the component the handler is currently bound to to
null. Unfortunately the component attribute is private.
Or do I miss the point and there is another solution I'm currently not aware
of.


Here is the exception thrown:

java.lang.IllegalStateException: this kind of handler cannot be attached to
multiple components; it is already attached to component [ [Component id =
effectContainer]], but component [ [Component id = effectContainer]] wants
to be attached too
 at
org.apache.wicket.behavior.AbstractAjaxBehavior.bind(AbstractAjaxBehavior.java:62)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractAjaxBehavior-and-missing-unbind-Component-method-tp4407049p4407049.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: AbstractAjaxBehavior and missing unbind(Component) method

2012-02-21 Thread Dirk Forchel
I have a static list of pre-configured instances (my Effects). On the
page is a select box (a DropDownChoiceAbstractEffect component) which uses
this list of instances to select an effect. Within the onClick() method of
an additional AjaxLink, the WebMarkupContainer (effectContainer) is
updated and the selected Behavior is added to this one. The old attached
effect is removed.
It would be possible to create every time new instance, but it was
straightforward to me to just use a static list to choose from.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractAjaxBehavior-and-missing-unbind-Component-method-tp4407049p4407159.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



  1   2   >