Re: ComponentRenderer

2013-11-27 Thread Martin Grigorov
Hi,


On Wed, Nov 27, 2013 at 2:57 AM, Colin Rogers <
colin.rog...@objectconsulting.com.au> wrote:

> Wicketeers,
>
> I have a problem when using ComponentRenderer in an actual live cycle. I
> assume it's not actually intended for this use, and hence the errors, but
> if I explain the issue, maybe someone can suggest an alternative or a
> workaround.
>
> So... we have a set of 'pages' in a pageflow that update the main panel of
> a page with each button click - effectively a Wizard - but using our own
> component, rather than the standard one. Each step is updated via Ajax.
>
> Our requirement - as odd as it is, is... we have a bunch of steps. We then
> eventually have a 'summary step'. For this step, we need to take a copy of
> the HTML, and render it to PDF, so in the next step, we can download a PDF
> version of the summary. The rendering of HTML to PDF is all fine, and
> saving as a resource - that all fine, too.
>
> Basically - the error we end up with is an Ajax error - where the XML
> response is malformed. A fresh copy of the component/panel is returned,
> plus a second  tag that has a random page redirect. It's this
> second ajax response that is ultimately the issue.
>
> We've tried adding code to onConfigure(), onBeforeRender() or
> onAfterRender() - we've also been cloneing the object (via WicketObjects) -
> with extra code not to repeat the method, etc.
>
> I assume, because ComponentRenderer still uses the current 'live' response
> object, that two responses are being given, and the browser is then
> confused.
>

Your assumption is not correct.
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/core/util/string/ComponentRenderer.java?source=c#L59
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/core/util/string/ComponentRenderer.java?source=c#L93
For both #renderPage() and #renderComponent() Wicket creates a temporary
Response object for the rendering.

There must be another issue.


>
> Is there anyway to either work round the issues above - using dummy
> requests, or is there another way to get the generated HTML via page cache
> or something else? I'm really open to any ideas! :)
>
> Cheers,
> Col.
>
>
>
>
> EMAIL DISCLAIMER This email message and its attachments are confidential
> and may also contain copyright or privileged material. If you are not the
> intended recipient, you may not forward the email or disclose or use the
> information contained in it. If you have received this email message in
> error, please advise the sender immediately by replying to this email and
> delete the message and any associated attachments. Any views, opinions,
> conclusions, advice or statements expressed in this email message are those
> of the individual sender and should not be relied upon as the considered
> view, opinion, conclusions, advice or statement of this company except
> where the sender expressly, and with authority, states them to be the
> considered view, opinion, conclusions, advice or statement of this company.
> Every care is taken but we recommend that you scan any attachments for
> viruses.
>


Re: Problem with inmethod grid if double quotes are in strings

2013-11-27 Thread PDiefent
Hi Martin,
while the WicketStuff team seems to be too busy to look at this issue I
recognized that also AjaxFallBackLinks won't work if the model contains an
attribute of the type String with a value containing double quotes. I guess
that there are some more errors in the wicket code handling such strings.
Is it possible for you to have a look at this problem.
Thanks, Peter



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-inmethod-grid-if-double-quotes-are-in-strings-tp4660141p4662691.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 with SVG Rendering with Wicket 6.5.0

2013-11-27 Thread SUBRA
Hi all,

In my project i am using svg drawing for show some information.When i using
wicket 1.4 everything goes well, I switches from 1.4 to 6.5 i am getting
problem with rendering svg drawing on ajax call.Problem with SVG Element
namespace. All my  elements are disappears after ajax call .Wicket 6.5
uses jquery internally for rendering svg element but jquery does not support
svg elements. Is there any solution for this problem. My SVG Drawing
rendering normally in wicket 1.4.Please solve this problem.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-SVG-Rendering-with-Wicket-6-5-0-tp4662692.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 with inmethod grid if double quotes are in strings

2013-11-27 Thread Martin Grigorov
Hi Peter,

WicketStuff is community based effort.
Everyone improves the code he cares about.
At different time different people care about different projects :-)

At the moment I don't use InMethod Grid in any project so I have no time to
help you.
I will gladly review and merge any Pull Request though.

Also it will help if you provide a test case or a quickstart application
that shows the problem.


On Wed, Nov 27, 2013 at 2:41 PM, PDiefent  wrote:

> Hi Martin,
> while the WicketStuff team seems to be too busy to look at this issue I
> recognized that also AjaxFallBackLinks won't work if the model contains an
> attribute of the type String with a value containing double quotes. I guess
> that there are some more errors in the wicket code handling such strings.
> Is it possible for you to have a look at this problem.
> Thanks, Peter
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Problem-with-inmethod-grid-if-double-quotes-are-in-strings-tp4660141p4662691.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 with SVG Rendering with Wicket 6.5.0

2013-11-27 Thread Martin Grigorov
Hi,

We will need more information to be able to solve the problem.
Please create a quickstart application and attach it to a ticket in Jira.


On Wed, Nov 27, 2013 at 2:53 PM, SUBRA  wrote:

> Hi all,
>
> In my project i am using svg drawing for show some information.When i using
> wicket 1.4 everything goes well, I switches from 1.4 to 6.5 i am getting
> problem with rendering svg drawing on ajax call.Problem with SVG Element
> namespace. All my  elements are disappears after ajax call .Wicket 6.5
> uses jquery internally for rendering svg element but jquery does not
> support
> svg elements. Is there any solution for this problem. My SVG Drawing
> rendering normally in wicket 1.4.Please solve this problem.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Problem-with-SVG-Rendering-with-Wicket-6-5-0-tp4662692.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 with SVG Rendering with Wicket 6.5.0

2013-11-27 Thread SUBRA
Sorry i didn't have any idea on quick start and jira. My Problem is my
drawing is loading with all svg elements normally. when i make an ajax call
from wicket i  rendering the svg panel again , second time after ajax call i
didn't the elements which are displayed by  tag.

Suppose:
SVGPanel.java this is my Panel 

i am add AbstractDefaultAjaxBehavior to my panel.

In ajax behaviour respond method After made a ajax, i call 
target.add(SVGPanel.this);

my drawing is loadded  uncompletely, I miss the elements in svg drawing
which are displayed by  tag



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-SVG-Rendering-with-Wicket-6-5-0-tp4662692p4662695.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



How to handle dependent properties with FormComponents

2013-11-27 Thread Edgar Merino
Hello, I have a class that defines 2 properties that depend on each 
other (start and end dates). Currently, I have to provide getters and 
setters for this properties and then call a validator method inside 
Form#onValidateModelObjects(). It would be preferable to just provide 
the getters and a single method to set and validate the 2 dependent 
properties.


Is there a way to accomplish this?
Thanks in advance.
Edgar Merino

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



Re: How to handle dependent properties with FormComponents

2013-11-27 Thread Martin Grigorov
Hi,

See AbstractFormValidator.
Use any of the provided implementations of this class as inspiration.


On Thu, Nov 28, 2013 at 9:48 AM, Edgar Merino  wrote:

> Hello, I have a class that defines 2 properties that depend on each other
> (start and end dates). Currently, I have to provide getters and setters for
> this properties and then call a validator method inside
> Form#onValidateModelObjects(). It would be preferable to just provide the
> getters and a single method to set and validate the 2 dependent properties.
>
> Is there a way to accomplish this?
> Thanks in advance.
> Edgar Merino
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>