Re: AjaxClientInfoBehavior - Ajax request:SyntaxError: function statement requires a name

2017-03-13 Thread Martin Grigorov
On Mon, Mar 13, 2017 at 6:11 PM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> found that org.apache.wicket:wicket-core:jar:8.0.0-M4 use
> com.tdunning:json
>
> 
> com.tdunning
> json
> 
>
>
> de.agilecoders.wicket:wicket-bootstrap-extensions:jar:2.0.0-M2 use
> com.google.javascript:closure-compiler:v20130603
>
> 
> com.google.javascript
> closure-compiler
> v20130603
> 
>
> which use org.json:json
>
> 
> org.json
> json
> 20090211
> 
>
>
> Both json projects have the same package structure and the same class
> naming
>

This is a similar problem like the one at
https://issues.apache.org/jira/browse/WICKET-6329

But still this doesn't explain why 8.0.0-SNAPSHOT doesn't have the problem
for you.
Wicket uses org.github.openjson to generate its JS stuff and it has been
fixed just an hour ago.


>
>
> François
>
>
>
> > Le 13 mars 2017 à 15:43, Martin Grigorov  a écrit
> :
> >
> > On Mon, Mar 13, 2017 at 3:23 PM, Francois Meillet <
> > francois.meil...@gmail.com > wrote:
> >
> >> AbstractDefaultAjaxBehavior
> >>
> >> protected final CharSequence renderAjaxAttributes(final Component
> >> component, AjaxRequestAttributes attributes) {
> >>
> >>.../...
> >>
> >>
> >>List dynamicExtraParameters =
> >> attributes.getDynamicExtraParameters();
> >>if (dynamicExtraParameters != null)
> >>{
> >>for (CharSequence dynamicExtraParameter :
> >> dynamicExtraParameters)
> >>{
> >>String func =
> >> String.format(DYNAMIC_PARAMETER_FUNCTION_TEMPLATE,
> dynamicExtraParameter);
> >>
> >>---> 8.0.0-SNAPSHOT func =
> >> function(attrs){return Wicket.BrowserInfo.collect()}
> >>
> >>---> 8.0.0-M4
> >> func =  function(attrs){return Wicket.BrowserInfo.collect()}
> >>
> >>
> >>JSONFunction function = new
> >> JSONFunction(func);
> >>attributesJson.append(
> >> AjaxAttributeName.DYNAMIC_PARAMETER_FUNCTION.jsonName(), function);
> >>
> >>---> 8.0.0-SNAPSHOT
> >> attributesJson.toString() =  {"u":"./.?2-1.0-","dep":[
> function(attrs){return
> >> Wicket.BrowserInfo.collect()}]}
> >>
> >>---> 8.0.0-M4
> >> attributesJson.toString() =  {"u":"./.?2-1.0-","dep":["
> function(attrs){return
> >> Wicket.BrowserInfo.collect()}"]}
> >>
> >
> > I don't see why this works in -SNAPSHOT ...
> > https://github.com/openjson/openjson/blob/master/src/main/
> java/com/github/openjson/JSONObject.java#L327 <
> https://github.com/openjson/openjson/blob/master/src/main/
> java/com/github/openjson/JSONObject.java#L327>
> > doesn't have support for lists/collections yet
> >
> >
> >>}
> >>}
> >>
> >> François
> >>
> >>
> >>
> >>> Le 13 mars 2017 à 11:57, Martin Grigorov  a
> écrit
> >> :
> >>>
> >>> 8.0.0-SNAPSHOT uses https://github.com/openjson/openjson
> >>> But AFAIK the problem is not fixed there. If you have time to debug why
> >> it
> >>> works it would be helpful!
> >>> Mikhail is going to implement the missing #put(String, Collection|Map)
> >>> methods and make a release. Then we will update all branches!
> >>>
> >>> Martin Grigorov
> >>> Wicket Training and Consulting
> >>> https://twitter.com/mtgrigorov
> >>>
> >>> On Mon, Mar 13, 2017 at 11:44 AM, Francois Meillet <
> >>> francois.meil...@gmail.com> wrote:
> >>>
>  Hi Martin,
> 
>  I do not get any error with the 8.0.0-SNAPSHOT
> 
>  François
> 
> 
> 
> > Le 13 mars 2017 à 10:14, Martin Grigorov  a
> >> écrit
>  :
> >
> > Hi Francois,
> >
> > It is strange that it fails when built on Mac only.
> > But the issue looks the same as the one reported by Sebastien.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Mar 13, 2017 at 8:09 AM, Francois Meillet <
> > francois.meil...@gmail.com> wrote:
> >
> >> I forgot to say  : Apache Wicket 8.0.0-M4
> >>
> >> François
> >>
> >>
> >>
> >>
> 
> 
>  -
>  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  users-unsubscr...@wicket.apache.org>
> >> For additional commands, e-mail: 

Re: AjaxClientInfoBehavior - Ajax request:SyntaxError: function statement requires a name

2017-03-13 Thread Francois Meillet
found that org.apache.wicket:wicket-core:jar:8.0.0-M4 use com.tdunning:json


com.tdunning
json



de.agilecoders.wicket:wicket-bootstrap-extensions:jar:2.0.0-M2 use 
com.google.javascript:closure-compiler:v20130603


com.google.javascript
closure-compiler
v20130603


which use org.json:json


org.json
json
20090211



Both json projects have the same package structure and the same class naming


François



> Le 13 mars 2017 à 15:43, Martin Grigorov  a écrit :
> 
> On Mon, Mar 13, 2017 at 3:23 PM, Francois Meillet <
> francois.meil...@gmail.com > wrote:
> 
>> AbstractDefaultAjaxBehavior
>> 
>> protected final CharSequence renderAjaxAttributes(final Component
>> component, AjaxRequestAttributes attributes) {
>> 
>>.../...
>> 
>> 
>>List dynamicExtraParameters =
>> attributes.getDynamicExtraParameters();
>>if (dynamicExtraParameters != null)
>>{
>>for (CharSequence dynamicExtraParameter :
>> dynamicExtraParameters)
>>{
>>String func =
>> String.format(DYNAMIC_PARAMETER_FUNCTION_TEMPLATE, dynamicExtraParameter);
>> 
>>---> 8.0.0-SNAPSHOT func =
>> function(attrs){return Wicket.BrowserInfo.collect()}
>> 
>>---> 8.0.0-M4
>> func =  function(attrs){return Wicket.BrowserInfo.collect()}
>> 
>> 
>>JSONFunction function = new
>> JSONFunction(func);
>>attributesJson.append(
>> AjaxAttributeName.DYNAMIC_PARAMETER_FUNCTION.jsonName(), function);
>> 
>>---> 8.0.0-SNAPSHOT
>> attributesJson.toString() =  {"u":"./.?2-1.0-","dep":[function(attrs){return
>> Wicket.BrowserInfo.collect()}]}
>> 
>>---> 8.0.0-M4
>> attributesJson.toString() =  {"u":"./.?2-1.0-","dep":["function(attrs){return
>> Wicket.BrowserInfo.collect()}"]}
>> 
> 
> I don't see why this works in -SNAPSHOT ...
> https://github.com/openjson/openjson/blob/master/src/main/java/com/github/openjson/JSONObject.java#L327
>  
> 
> doesn't have support for lists/collections yet
> 
> 
>>}
>>}
>> 
>> François
>> 
>> 
>> 
>>> Le 13 mars 2017 à 11:57, Martin Grigorov  a écrit
>> :
>>> 
>>> 8.0.0-SNAPSHOT uses https://github.com/openjson/openjson
>>> But AFAIK the problem is not fixed there. If you have time to debug why
>> it
>>> works it would be helpful!
>>> Mikhail is going to implement the missing #put(String, Collection|Map)
>>> methods and make a release. Then we will update all branches!
>>> 
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>> 
>>> On Mon, Mar 13, 2017 at 11:44 AM, Francois Meillet <
>>> francois.meil...@gmail.com> wrote:
>>> 
 Hi Martin,
 
 I do not get any error with the 8.0.0-SNAPSHOT
 
 François
 
 
 
> Le 13 mars 2017 à 10:14, Martin Grigorov  a
>> écrit
 :
> 
> Hi Francois,
> 
> It is strange that it fails when built on Mac only.
> But the issue looks the same as the one reported by Sebastien.
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Mon, Mar 13, 2017 at 8:09 AM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
> 
>> I forgot to say  : Apache Wicket 8.0.0-M4
>> 
>> François
>> 
>> 
>> 
>> 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
>> 
>> For additional commands, e-mail: users-h...@wicket.apache.org 
>> 


Re: AjaxClientInfoBehavior - Ajax request:SyntaxError: function statement requires a name

2017-03-13 Thread Martin Grigorov
On Mon, Mar 13, 2017 at 3:23 PM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> AbstractDefaultAjaxBehavior
>
> protected final CharSequence renderAjaxAttributes(final Component
> component, AjaxRequestAttributes attributes) {
>
> .../...
>
>
> List dynamicExtraParameters =
> attributes.getDynamicExtraParameters();
> if (dynamicExtraParameters != null)
> {
> for (CharSequence dynamicExtraParameter :
> dynamicExtraParameters)
> {
> String func =
> String.format(DYNAMIC_PARAMETER_FUNCTION_TEMPLATE, dynamicExtraParameter);
>
> ---> 8.0.0-SNAPSHOT func =
> function(attrs){return Wicket.BrowserInfo.collect()}
>
> ---> 8.0.0-M4
>  func =  function(attrs){return Wicket.BrowserInfo.collect()}
>
>
> JSONFunction function = new
> JSONFunction(func);
> attributesJson.append(
> AjaxAttributeName.DYNAMIC_PARAMETER_FUNCTION.jsonName(), function);
>
> ---> 8.0.0-SNAPSHOT
>  attributesJson.toString() =  {"u":"./.?2-1.0-","dep":[function(attrs){return
> Wicket.BrowserInfo.collect()}]}
>
> ---> 8.0.0-M4
>  attributesJson.toString() =  {"u":"./.?2-1.0-","dep":["function(attrs){return
> Wicket.BrowserInfo.collect()}"]}
>

I don't see why this works in -SNAPSHOT ...
https://github.com/openjson/openjson/blob/master/src/main/java/com/github/openjson/JSONObject.java#L327
doesn't have support for lists/collections yet


> }
> }
>
> François
>
>
>
> > Le 13 mars 2017 à 11:57, Martin Grigorov  a écrit
> :
> >
> > 8.0.0-SNAPSHOT uses https://github.com/openjson/openjson
> > But AFAIK the problem is not fixed there. If you have time to debug why
> it
> > works it would be helpful!
> > Mikhail is going to implement the missing #put(String, Collection|Map)
> > methods and make a release. Then we will update all branches!
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Mar 13, 2017 at 11:44 AM, Francois Meillet <
> > francois.meil...@gmail.com> wrote:
> >
> >> Hi Martin,
> >>
> >> I do not get any error with the 8.0.0-SNAPSHOT
> >>
> >> François
> >>
> >>
> >>
> >>> Le 13 mars 2017 à 10:14, Martin Grigorov  a
> écrit
> >> :
> >>>
> >>> Hi Francois,
> >>>
> >>> It is strange that it fails when built on Mac only.
> >>> But the issue looks the same as the one reported by Sebastien.
> >>>
> >>> Martin Grigorov
> >>> Wicket Training and Consulting
> >>> https://twitter.com/mtgrigorov
> >>>
> >>> On Mon, Mar 13, 2017 at 8:09 AM, Francois Meillet <
> >>> francois.meil...@gmail.com> wrote:
> >>>
>  I forgot to say  : Apache Wicket 8.0.0-M4
> 
>  François
> 
> 
> 
> 
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: AjaxClientInfoBehavior - Ajax request:SyntaxError: function statement requires a name

2017-03-13 Thread Francois Meillet
AbstractDefaultAjaxBehavior

protected final CharSequence renderAjaxAttributes(final Component component, 
AjaxRequestAttributes attributes) {

.../...


List dynamicExtraParameters = 
attributes.getDynamicExtraParameters();
if (dynamicExtraParameters != null)
{
for (CharSequence dynamicExtraParameter : 
dynamicExtraParameters)
{
String func = 
String.format(DYNAMIC_PARAMETER_FUNCTION_TEMPLATE, dynamicExtraParameter);

---> 8.0.0-SNAPSHOT func =  
function(attrs){return Wicket.BrowserInfo.collect()}

---> 8.0.0-M4   func =  
function(attrs){return Wicket.BrowserInfo.collect()}


JSONFunction function = new 
JSONFunction(func);

attributesJson.append(AjaxAttributeName.DYNAMIC_PARAMETER_FUNCTION.jsonName(), 
function);

---> 8.0.0-SNAPSHOT 
attributesJson.toString() =  {"u":"./.?2-1.0-","dep":[function(attrs){return 
Wicket.BrowserInfo.collect()}]}

---> 8.0.0-M4   
attributesJson.toString() =  {"u":"./.?2-1.0-","dep":["function(attrs){return 
Wicket.BrowserInfo.collect()}"]}
}
}

François



> Le 13 mars 2017 à 11:57, Martin Grigorov  a écrit :
> 
> 8.0.0-SNAPSHOT uses https://github.com/openjson/openjson
> But AFAIK the problem is not fixed there. If you have time to debug why it
> works it would be helpful!
> Mikhail is going to implement the missing #put(String, Collection|Map)
> methods and make a release. Then we will update all branches!
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Mon, Mar 13, 2017 at 11:44 AM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
> 
>> Hi Martin,
>> 
>> I do not get any error with the 8.0.0-SNAPSHOT
>> 
>> François
>> 
>> 
>> 
>>> Le 13 mars 2017 à 10:14, Martin Grigorov  a écrit
>> :
>>> 
>>> Hi Francois,
>>> 
>>> It is strange that it fails when built on Mac only.
>>> But the issue looks the same as the one reported by Sebastien.
>>> 
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>> 
>>> On Mon, Mar 13, 2017 at 8:09 AM, Francois Meillet <
>>> francois.meil...@gmail.com> wrote:
>>> 
 I forgot to say  : Apache Wicket 8.0.0-M4
 
 François
 
 
 
 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


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



Re: AjaxClientInfoBehavior - Ajax request:SyntaxError: function statement requires a name

2017-03-13 Thread Martin Grigorov
8.0.0-SNAPSHOT uses https://github.com/openjson/openjson
But AFAIK the problem is not fixed there. If you have time to debug why it
works it would be helpful!
Mikhail is going to implement the missing #put(String, Collection|Map)
methods and make a release. Then we will update all branches!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Mar 13, 2017 at 11:44 AM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> Hi Martin,
>
> I do not get any error with the 8.0.0-SNAPSHOT
>
> François
>
>
>
> > Le 13 mars 2017 à 10:14, Martin Grigorov  a écrit
> :
> >
> > Hi Francois,
> >
> > It is strange that it fails when built on Mac only.
> > But the issue looks the same as the one reported by Sebastien.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Mar 13, 2017 at 8:09 AM, Francois Meillet <
> > francois.meil...@gmail.com> wrote:
> >
> >> I forgot to say  : Apache Wicket 8.0.0-M4
> >>
> >> François
> >>
> >>
> >>
> >>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: AjaxClientInfoBehavior - Ajax request:SyntaxError: function statement requires a name

2017-03-13 Thread Francois Meillet
Hi Martin,

I do not get any error with the 8.0.0-SNAPSHOT

François



> Le 13 mars 2017 à 10:14, Martin Grigorov  a écrit :
> 
> Hi Francois,
> 
> It is strange that it fails when built on Mac only.
> But the issue looks the same as the one reported by Sebastien.
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Mon, Mar 13, 2017 at 8:09 AM, Francois Meillet <
> francois.meil...@gmail.com> wrote:
> 
>> I forgot to say  : Apache Wicket 8.0.0-M4
>> 
>> François
>> 
>> 
>> 
>> 


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



Re: AjaxClientInfoBehavior - Ajax request:SyntaxError: function statement requires a name

2017-03-13 Thread Martin Grigorov
Hi Francois,

It is strange that it fails when built on Mac only.
But the issue looks the same as the one reported by Sebastien.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Mar 13, 2017 at 8:09 AM, Francois Meillet <
francois.meil...@gmail.com> wrote:

> I forgot to say  : Apache Wicket 8.0.0-M4
>
> François
>
>
>
>


AjaxClientInfoBehavior - Ajax request:SyntaxError: function statement requires a name

2017-03-13 Thread Francois Meillet
I forgot to say  : Apache Wicket 8.0.0-M4

François





AjaxClientInfoBehavior - Ajax request:SyntaxError: function statement requires a name

2017-03-13 Thread Francois Meillet
Hi,

I add an AjaxClientInfoBehavior to a page.

Sometimes I get an error.
This is very strange and I have no clue.

I have 2 computers, 1 Debian, 1 Osx, within the same network.

If I compile the code on the Osx boxe,
publish the war on a Tomcat instance running on the Osx box or on the Debian box
and I call the page with the AjaxClientInfoBehavior, 
I have the following error (in Wicket Ajax Debug)

ERROR: An error occurred while executing Ajax request:SyntaxError: function 
statement requires a name

The code in the page is

/**/


If I compile the code on the Debian box, 
publish the war on a Tomcat instance running the Debian box
I do not get any error

the code in the page is

/**/


What I see from the javascript generated : when error occurs, double quotes are 
present around the function call.

It's very weird !
Cold it be related to Sebastien'message "8.0.0-M4: org.json has issue with 
List" from Mars the 12 ?

Do you have any advice ?

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