Re: Partial

2019-04-24 Thread Sibgha Nazir
I make the call like this

@Override

*public* *void* renderHead(IHeaderResponse response)

{

*super*.renderHead(response);



Optional target = RequestCycle.*get*
().find(AjaxRequestTarget.*class*);


*if* (!target.equals(Optional.*empty*()))

renderChart(target.get());

}

On Wed, Apr 24, 2019 at 7:00 PM Martin Grigorov 
wrote:

> Hi,
>
> On Wed, Apr 24, 2019 at 5:08 PM Sibgha Nazir  wrote:
>
> > Hello wicket developer,
> >
> > I am facing the following exception on re-rendering a wicket panel using
> > the code
> >
> >
> >
> >   iPartialPageRequestHandler.add(chartPanel);
> >
>
> In which method of your code do you make that call ?
> How do you get a reference to iPartialPageRequestHandler? Is it passed as a
> parameter to the method by Wicket or do you look it up by using
> RequestCycle.find(Class) ?
>
>
> >
> > java.lang.IllegalStateException: A partial update of the page is being
> > rendered, component [ChartPanel [Component id = chart-container]] can no
> > longer be added
> >
> > It renders it perfectly the first time. But I want to call this again and
> > again when user clicks refresh button. What does this mean?
> >
> > Best Regards,
> > Sibgha Nazir
> >
>


Re: Partial

2019-04-24 Thread Sibgha Nazir
In renderChart there is a line updating the chart panel like this

PartialPageRequestHandler.add(chartPanel);

On Wed, Apr 24, 2019 at 8:06 PM Sibgha Nazir  wrote:

> I make the call like this
>
> @Override
>
> *public* *void* renderHead(IHeaderResponse response)
>
> {
>
> *super*.renderHead(response);
>
>
>
> Optional target = RequestCycle.*get*
> ().find(AjaxRequestTarget.*class*);
>
>
> *if* (!target.equals(Optional.*empty*()))
>
> renderChart(target.get());
>
> }
>
> On Wed, Apr 24, 2019 at 7:00 PM Martin Grigorov 
> wrote:
>
>> Hi,
>>
>> On Wed, Apr 24, 2019 at 5:08 PM Sibgha Nazir  wrote:
>>
>> > Hello wicket developer,
>> >
>> > I am facing the following exception on re-rendering a wicket panel using
>> > the code
>> >
>> >
>> >
>> >   iPartialPageRequestHandler.add(chartPanel);
>> >
>>
>> In which method of your code do you make that call ?
>> How do you get a reference to iPartialPageRequestHandler? Is it passed as
>> a
>> parameter to the method by Wicket or do you look it up by using
>> RequestCycle.find(Class) ?
>>
>>
>> >
>> > java.lang.IllegalStateException: A partial update of the page is being
>> > rendered, component [ChartPanel [Component id = chart-container]] can no
>> > longer be added
>> >
>> > It renders it perfectly the first time. But I want to call this again
>> and
>> > again when user clicks refresh button. What does this mean?
>> >
>> > Best Regards,
>> > Sibgha Nazir
>> >
>>
>


Re: Downport WICKET-6639 to Wicket 7

2019-04-24 Thread Martin Grigorov
Done!
https://issues.apache.org/jira/browse/WICKET-6639?focusedCommentId=16825375&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16825375

On Tue, Apr 23, 2019 at 3:36 PM ssamarin  wrote:

> Hello,
>
> Would appreciate if you put
> https://issues.apache.org/jira/browse/WICKET-6639 on Wicket 7 as well.
>
> Thanks, Stepan.
>
> --
> 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: Partial

2019-04-24 Thread Martin Grigorov
Hi,

On Wed, Apr 24, 2019 at 5:08 PM Sibgha Nazir  wrote:

> Hello wicket developer,
>
> I am facing the following exception on re-rendering a wicket panel using
> the code
>
>
>
>   iPartialPageRequestHandler.add(chartPanel);
>

In which method of your code do you make that call ?
How do you get a reference to iPartialPageRequestHandler? Is it passed as a
parameter to the method by Wicket or do you look it up by using
RequestCycle.find(Class) ?


>
> java.lang.IllegalStateException: A partial update of the page is being
> rendered, component [ChartPanel [Component id = chart-container]] can no
> longer be added
>
> It renders it perfectly the first time. But I want to call this again and
> again when user clicks refresh button. What does this mean?
>
> Best Regards,
> Sibgha Nazir
>


Re: setHeaderResponseDecorator and setGatherExtendedBrowserInfo(true)

2019-04-24 Thread Martin Grigorov
On Wed, Apr 24, 2019 at 3:48 PM Olivier Dutrieux <
olivier.dutri...@pasteur.fr> wrote:

> Hello,
>
> I have define on application.init() the setHeaderResponseDecorator (to
> deferred all javascript to the end of the page) and set
> setGatherExtendedBrowserInfo to true to retrieve some informations from
> browser.
>
> The problem is when the BrowserInfoPage is render no js is add to the page
> because the BrowserInfoPage  doesn't have the component
> HeaderResponseContainer to deferred the js.


> How can I solve this problem ?
>

You can provide your own version of BrowserInfoPage by overriding
WebSession#newBrowserInfoPage():
https://github.com/apache/wicket/blob/bd4c0c786aa810765d9e7f12a62a6fed56db2c62/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebSession.java#L109


>
> Duto
>
> -
> Duto
> --
> 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: setHeaderResponseDecorator and setGatherExtendedBrowserInfo(true)

2019-04-24 Thread Francois Meillet
In the application.init() add the following line :

getResourceBundles().add(YourApplication.class, new 
JavaScriptResourceReference(BrowserInfoForm.class, "wicket-browser-info.js"));

YourApplication.class is the {@linkplain ResourceReference#getScope() scope} of 
your bundle

François




> Le 24 avr. 2019 à 15:37, Olivier Dutrieux  a 
> écrit :
> 
> Hello,
> 
> I have define on application.init() the setHeaderResponseDecorator (to
> deferred all javascript to the end of the page) and set
> setGatherExtendedBrowserInfo to true to retrieve some informations from
> browser.
> 
> The problem is when the BrowserInfoPage is render no js is add to the page
> because the BrowserInfoPage  doesn't have the component
> HeaderResponseContainer to deferred the js.
> 
> How can I solve this problem ?
> 
> Duto
> 
> -
> Duto
> --
> 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
> 


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



Partial

2019-04-24 Thread Sibgha Nazir
Hello wicket developer,

I am facing the following exception on re-rendering a wicket panel using
the code



  iPartialPageRequestHandler.add(chartPanel);

java.lang.IllegalStateException: A partial update of the page is being
rendered, component [ChartPanel [Component id = chart-container]] can no
longer be added

It renders it perfectly the first time. But I want to call this again and
again when user clicks refresh button. What does this mean?

Best Regards,
Sibgha Nazir


setHeaderResponseDecorator and setGatherExtendedBrowserInfo(true)

2019-04-24 Thread Olivier Dutrieux
Hello,

I have define on application.init() the setHeaderResponseDecorator (to
deferred all javascript to the end of the page) and set
setGatherExtendedBrowserInfo to true to retrieve some informations from
browser.

The problem is when the BrowserInfoPage is render no js is add to the page
because the BrowserInfoPage  doesn't have the component
HeaderResponseContainer to deferred the js.

How can I solve this problem ?

Duto

-
Duto
--
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: [8.3] Nested Forms within a table?

2019-04-24 Thread Sven Meier
 
 
Hi Nino,
 

 
I've taken the liberty of improving this with WICKET-6658:
 
No need to let Form enforce a  -tag when it's changed into a div 
afterwards (in case of nested forms).
 

 
Have fun
 
Sven
 

 

 
 

 
 
 
 
 
>  
> On 24.04.2019 at 08:45,wrote:
>  
>  
>  normally I would agree.. But when our designer gives us the html, and there 
> are tables in it we need to change that stuff.. I do not like the idea that 
> the web framework forces you to change markup so that it can work.. One thing 
> are to teach the devs that there are some quirks with the web framework 
> (thats completely expected). But to have to teach the designer about a web 
> framework so they can avoid the quirky parts seems wrong. Its not part of 
> Wickets statement anyhow.  >  Just Java  &  HTML  >   >  Leverage what you 
> know about Java or your favourite HTML editor to write  >  Wicket 
> applications. With pure Java code and HTML markup Wicket is the  >  go-to web 
> framework for purists.  >  /rant off :) On Wed, Apr 24, 2019 at 8:24 AM Maxim 
> Solodovnik wrote:  >  if something "look like a duck, walk like a duck and 
> sound like a duck" -  >  it is duck :)  >  CSS table are tables, but with no 
> HTML '' tags :)  >   >  On Wed, 24 Apr 2019 at 13:22, nino martinez wael  <   
> >  nino.martinez.
w...@gmail.com>  wrote:  >   >   >  if its CSS its not a table right?  >   >   
>   >   >   >   >   >  On Wed, Apr 24, 2019 at 7:25 AM Maxim Solodovnik  >   >  
wrote:  >   >   >   >   >  Actually you can :)  >   >   >  But you need CSS 
tables for this :)  >   >   >   >   >   >  On Wed, 24 Apr 2019 at 11:53, nino 
martinez wael  <   >   >   >  nino.martinez.w...@gmail.com>  wrote:  >   >   >  
 >   >   >   >  I agree with Maxim, but I do not know the side effects, im 
going to  >  try  >   >   >   >  it.. As it is now (out of the box), we cannot 
have nested forms in  >   >  tables  >   >   >   >  (for example on form per ) 
without breaking html.  >   >   >   >   >   >   >   >  -Nino  >   >   >   >   > 
  >   >   >  On Wed, Apr 24, 2019 at 3:24 AM Maxim Solodovnik  <   >  
solomax...@gmail.com  >   >   >   >   >   >   >  wrote:  >   >   >   >   >   >  
 >   >   >  I would say we can create overridable method so users can specify  
>   >  which  >   >   >   >  tag  >   >   >   >   >  to use  > 
  >   >   >   >  it will help with ``  >   >   >   >   >   >   >   >   >   >  
On Wed, 24 Apr 2019 at 01:39, Sven Meier wrote:  >   >   >   >   >   >   >   >  
 >   >   >  Hi,  >   >   >   >   >   >   >   >   >   >   >   >  I think we 
could improve nested Forms so that only 
>  
>  tags  >  are  >   >   >   >   >   >  turned into a 
>  
> , but anything else stays as it is.  >   >   >   >   >   >   >   >   >   >   
> >   >  WDYT?  >   >   >   >   >   >  Sven  >   >   >   >   >   >   >   >   >  
>  >   >   >  Am 23.04.19 um 10:01 schrieb nino martinez wael:  >   >   >   >   
> >   >   >  Hi  >   >   >   >   >   >   >   >   >   >   >   >   >   >  When 
> nesting forms, the form tag are changed to an div and it  >  is  >   >   >  
> hard  >   >   >   >   >   >  coded:  >   >   >   >   >   >   >  
> org/apache/wicket/markup/html/form/Form.java:1597  >   >   >   >   >   >   >  
> ...  >   >   >   >   >   >   >   >   >   >   >   >   >   >  
> tag.setName("div");  >   >   >   >   >   >   >   >   >   >   >   >   >   >  
> ...  >   >   >   >   >   >   >   >   >   >   >   >   >   >  If only I could 
> change the tag to be tr, it would produce valid  >   >   >  html.  >   >   >  
>  >   >  Are  >   >   >   >   >   >   >  it deliberate to be hardcoded?  >   > 
>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >  
> -
  >   >   >   >   >   >  To 
unsubscribe, e-mail: users-unsubscr...@wicket.apache.org  >   >   >   >   >   > 
 For additional commands, e-mail: users-h...@wicket.apache.org  >   >   >   >   
>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >  --  >   
>   >   >   >  WBR  >   >   >   >   >  Maxim aka solomax  >   >   >   >   >   > 
  >   >   >   >   >   >   >   >   >   >   >  --  >   >   >   >  Best regards / 
Med venlig hilsen  >   >   >   >  Nino Martinez  >   >   >   >   >   >   >   >  
 >   >   >   >   >  --  >   >   >  WBR  >   >   >  Maxim aka solomax  >   >   > 
  >   >   >   >   >   >  --  >   >  Best regards / Med venlig hilsen  >   >  
Nino Martinez  >   >   >   >   >  --  >  WBR  >  Maxim aka solomax  >  -- Best 
regards / Med venlig hilsen Nino Martinez
>  
>  
>  
>  
>
>  
>  
>  
>
>  
>  
>  
>  
 
 
 

Re: Untouching pages in Wicket 9

2019-04-24 Thread Sven Meier
 
 
Hi,
 

 
thanks for the reference to the issue.
 

 
I'd wish Wicket wouldn't have to touch every page by default as described in 
WICKET-5933.
 

 
Seems we'll have to restore the untouched feature in Wicket 9.
 

 
Many thanks for your valuable input
 
Sven
 
 
 

 
 
 
 
 
>  
> On 23.04.2019 at 14:09,wrote:
>  
>  
>  Hi Sven, I have some types of ajax behavior callback (timers, lazy-loading) 
> that do not really touch the page and I want to avoid serialization. It's 
> basically the same use case as the original ticket: 
> https://issues.apache.org/jira/browse/WICKET-5933 It would be great if we had 
> some mechanism to mark a request as "non-touching" in Wicket 9. Either via 
> "getPageManager().untouch()" or some other mechanism. Best, Thomas On Tue, 
> Apr 23, 2019 at 1:44 PM Sven Meier wrote:  >   >   >  Hi Thomas,  >   >   >   
> >  you're right, that method is no longer available.  >   >   >   >  What do 
> you use it for? Do you want to throw away the current page  >  changes, but 
> still keep an older state in the persistent page store?  >   >   >   >  
> Thanks  >   >  Sven  >   >   >   >   >   >   >   >   >   >   >   >   >  On 
> 22.04.2019 at 19:19, wrote:  >   >   >   >   >   >  Hi all, What is the 
> equivalent of the following line in Wicket 9?  >  
> Session.get().getPageManager().untouch(content.getPage()) There i
s only  >  `removePage` now, but it doesn't do the same thing as far as I can 
see. Is  >  it still possible to untouch pages in ajax requests so they won't 
be  >  serialized again? Best, Thomas  >   >   >  
>