Re: Enable CORS in Wicket Rest

2017-06-28 Thread Noven
Hi.. All,
Overriding the method onBeforeMethodInvoked works for me :)

Thank you.
  

On Wednesday, June 28, 2017 12:53 PM, Martin Grigorov 
<mgrigo...@apache.org> wrote:
 

 @Andrea,

What about using a IRequestCycleListener that will set the response headers
only if the resolved IRequestHandler is from specific type ?
Is it easy to detect that this is a REST IRequestHandler ?

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

On Tue, Jun 27, 2017 at 7:13 PM, Andrea Del Bene <an.delb...@gmail.com>
wrote:

> you can also override onAfterMethodInvoked in your resource class to set
> the header in a single point of your code.
>
> On 27 Jun 2017 18:25, "Maxim Solodovnik" <solomax...@gmail.com> wrote:
>
> > You can use CORS in Tomcat:
> > https://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#CORS_Filter
> > (Maybe there anything similar in other app servers)
> >
> > Or wicket CSRF filter:
> > https://ci.apache.org/projects/wicket/apidocs/7.x/
> > org/apache/wicket/protocol/http/CsrfPreventionRequestCycleListener.html
> >
> > On Tue, Jun 27, 2017 at 9:23 PM, Noven <noven_...@yahoo.com.invalid>
> > wrote:
> > > Hi, Marcel,
> > > Thank you very much. Your solution works perfectly.
> > >
> > > With this solution, I have to add the header in every method. Do you
> > know how to set it once, and automatically applied to all the rest
> method?
> > >
> > > Thank you.
> > >
> > >
> > >    On Tuesday, June 27, 2017 9:07 PM, Marcel Barbosa Pinto <
> > marcel.po...@gmail.com> wrote:
> > >
> > >
> > >  Hi,
> > >
> > > I think you could use this:
> > >
> > > getCurrentWebResponse().addHeader("Access-Control-Allow-Origin", "
> > http://localhost:8080;);
> > >
> > >
> > > On Tue, Jun 27, 2017 at 8:24 AM, Noven <noven_...@yahoo.com.invalid>
> > wrote:
> > >
> > > Hello,
> > > Does anyone here face an issue about CORS when consuming wicket rest
> > from javascript ajax?
> > >
> > > The sample errors are :
> > >
> > > Cross-Origin Request Blocked: The Same Origin Policy disallows reading
> > the remote resource at http://localhost:8080/api/ statust. (Reason: CORS
> > header ‘Access-Control-Allow-Origin’ missing).
> > > I am looking for solution to set the ‘Access-Control-Allow-Origin’
> value
> > in Wicket Rest.
> > >
> > > In SpringBoot REST, we can set the value like this :
> > >
> > >  @CrossOrigin(origins = "http://localhost:8080;)
> > >    @GetMapping("/greeting")
> > >    public Greeting greeting(@RequestParam( required=false,
> > defaultValue="World") String name) {
> > >        return new Greeting(counter. incrementAndGet(),
> > String.format(template, name));
> > >    }
> > >
> > > I really need this solution, since I have to do it in Wicket way.
> > >
> > > Thank you.
> > >
> > >
> > >
> > >
> > >
> > > --
> > >
> > > Marcel Barbosa Pinto
> > > 55 11 98255 8288
> > >
> > >
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>

   

Re: Enable CORS in Wicket Rest

2017-06-27 Thread Noven
Hi, Marcel,
Thank you very much. Your solution works perfectly. 

With this solution, I have to add the header in every method. Do you know how 
to set it once, and automatically applied to all the rest method? 

Thank you.
 

On Tuesday, June 27, 2017 9:07 PM, Marcel Barbosa Pinto 
<marcel.po...@gmail.com> wrote:
 

 Hi,

I think you could use this:

getCurrentWebResponse().addHeader("Access-Control-Allow-Origin", 
"http://localhost:8080;);


On Tue, Jun 27, 2017 at 8:24 AM, Noven <noven_...@yahoo.com.invalid> wrote:

Hello,
Does anyone here face an issue about CORS when consuming wicket rest from 
javascript ajax?

The sample errors are :

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the 
remote resource at http://localhost:8080/api/ statust. (Reason: CORS header 
‘Access-Control-Allow-Origin’ missing).
I am looking for solution to set the ‘Access-Control-Allow-Origin’ value in 
Wicket Rest.

In SpringBoot REST, we can set the value like this :

  @CrossOrigin(origins = "http://localhost:8080;)
    @GetMapping("/greeting")
    public Greeting greeting(@RequestParam( required=false, 
defaultValue="World") String name) {
        return new Greeting(counter. incrementAndGet(), String.format(template, 
name));
    }

I really need this solution, since I have to do it in Wicket way.

Thank you.





-- 

Marcel Barbosa Pinto
55 11 98255 8288

   

Enable CORS in Wicket Rest

2017-06-27 Thread Noven
Hello,
Does anyone here face an issue about CORS when consuming wicket rest from 
javascript ajax? 

The sample errors are : 

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the 
remote resource at http://localhost:8080/api/statust. (Reason: CORS header 
‘Access-Control-Allow-Origin’ missing).
I am looking for solution to set the ‘Access-Control-Allow-Origin’ value in 
Wicket Rest. 

In SpringBoot REST, we can set the value like this : 

  @CrossOrigin(origins = "http://localhost:8080;)
@GetMapping("/greeting")
public Greeting greeting(@RequestParam(required=false, 
defaultValue="World") String name) {
return new Greeting(counter.incrementAndGet(), String.format(template, 
name));
}

I really need this solution, since I have to do it in Wicket way.

Thank you.



Is it possible to repaint wicket component via javascript?

2014-05-26 Thread Noven
Hi all,

Just want to ask if we can update wicket component via javascript or not. The 
case here is to repaint a datatable

Shadowbox.init({ 
        handleOversize: drag, 
        onClose : function () { 
                //repaint the component here
         } 
}); 



Please advise. Thank you.

Wicket rest and retrofit rest client

2014-05-15 Thread Noven
Hi all,

I am experimenting with retrofit (http://square.github.io/retrofit/) rest 
client and have issue that I can't fix. 

I have a form that on submit will call the wicket-rest service. 

form.add(new AjaxButton(submit) {
            @Override
            protected void onSubmit(final AjaxRequestTarget target, Form? 
form) {
                
getWicketApplication().getPersonService().createPerson((PersonPojo) 
form.getModelObject(), new CallbackPersonPojo() {

                    @Override
                    public void success(PersonPojo t, Response rspns) {
                        info(Success creating person); 
                        
                        target.add(feedback);                 // error from 
here                               
                    }

                    @Override
                    public void failure(RetrofitError re) {
                        error(Error creating person);
                        target.add(feedback);
                    }
                });
            }
        });


I am able to submit the form successfully..  but unable to call the 
target.add(feedback); 

Here is the logs : 

INFO  - PersonForm                 - Success creating person
Exception in thread Retrofit-Idle org.apache.wicket.WicketRuntimeException: 
No RequestCycle is currently set!
at org.apache.wicket.Component.getRequest(Component.java:1818)
at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:318)
at org.apache.wicket.Page.dirty(Page.java:248)
at org.apache.wicket.Page.componentStateChanging(Page.java:937)
at org.apache.wicket.Component.addStateChange(Component.java:3542)
at org.apache.wicket.Component.info(Component.java:2008)
at com.restclient.form.PersonForm$1$1.success(PersonForm.java:62)
at com.restclient.form.PersonForm$1$1.success(PersonForm.java:57)
at retrofit.CallbackRunnable$1.run(CallbackRunnable.java:45)
at retrofit.Utils$SynchronousExecutor.execute(Utils.java:114)
at retrofit.CallbackRunnable.run(CallbackRunnable.java:43)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at retrofit.Platform$Base$2$1.run(Platform.java:94)
at java.lang.Thread.run(Thread.java:744)

I guess there's something I missed here, The RequestCycle. I just don't know 
what to do next.

Please help.

Regards,
Noven

Wicket-rest sample

2014-04-24 Thread Noven
Hi...

Does anyone here have running example with wicket rest that explain using web 
services between 2 application ? 

If yes, please share..

Thank you.

Re: Wicket-rest sample

2014-04-24 Thread Noven
Hi Martin,

I am learning about wicket rest today. But I still confuse about how to serve 
the web service and to consume it. The goal is to have 2 wicket application 
that serve and consume the service. 

If someone here is ever do this, I hope to see the code :)

Regards,
Noven
On Thursday, April 24, 2014 4:23 PM, Martin Grigorov mgrigo...@apache.org 
wrote:
 
Hi,

Please explain better what you want to achieve.

Martin Grigorov
Wicket Training and Consulting



On Thu, Apr 24, 2014 at 10:34 AM, Noven noven_...@yahoo.com wrote:

 Hi...

 Does anyone here have running example with wicket rest that explain using
 web services between 2 application ?

 If yes, please share..

 Thank you.

How to create a crosstab repeater

2013-06-05 Thread Noven
Hi all,

I wonder how to use wicket to repeat things like cross tab (like the one that 
have on jasper report palette).

Example of what I want achieve can be seen here : checkcategoryxtab.png

Thank you.

TestCometdPage doesn't work on wicket push example

2013-05-09 Thread Noven
Hi all,

Did anyone try run the wicket push example? I find the Cometd pushing does not 
work, but the Timer polling based pushing works.

Any idea?

Wicket push alternative

2013-05-06 Thread Noven
Hi all,

Do you know any wicket push technology beside atmosphere and wicket-push 
project? 

I use wicket-push 1.4 and it work good for me. But when migrate to wicket v6.x, 
my code is not applicable anymore. 

I tried atmosphere, but it causes many error I'm not able to fix. 

Many thanks. 

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



Re: Wicket push alternative

2013-05-06 Thread Noven
Hi Martin,

Thank you for your quick response. I will try the 2nd and 3rd option.
For the atmosphere issue, I will try to create the quickstart.

Noven

--- On Mon, 5/6/13, Martin Grigorov mgrigo...@apache.org wrote:

 From: Martin Grigorov mgrigo...@apache.org
 Subject: Re: Wicket push alternative
 To: users@wicket.apache.org users@wicket.apache.org
 Date: Monday, May 6, 2013, 9:41 AM
 HI,
 
 
 On Mon, May 6, 2013 at 9:29 AM, Noven noven_...@yahoo.com
 wrote:
 
  Hi all,
 
  Do you know any wicket push technology beside
 atmosphere and wicket-push
  project?
 
  I use wicket-push 1.4 and it work good for me. But when
 migrate to wicket
  v6.x, my code is not applicable anymore.
 
  I tried atmosphere, but it causes many error I'm not
 able to fix.
 
 
 option 1) create a ticket with a quickstart showing the
 problem with
 Wicket-Atmosphere
 
 option 2) upgrade wicketstuff-push to Wicket 6.x. You can
 ask here for
 specific questions related to the problems you face with the
 upgrade
 
 option 3) use Wicket Native WebSockets. See more about them
 at
 https://cwiki.apache.org/confluence/display/WICKET/Wicket+Native+WebSockets
 http://wicketinaction.com/2012/07/wicket-6-native-websockets/
 
 Demo apps:
 https://github.com/martin-g/blogs/tree/master/wicket6-native-websockets
 https://github.com/martin-g/blogs/tree/master/wicket6-websocket-broadcast
 https://github.com/martin-g/wicket-native-websocket-example
 
 
 
 
 
  Many thanks.
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Martin Grigorov
 Wicket Training  Consulting
 http://jWeekend.com http://jweekend.com/
 

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



Re: Wicket push alternative

2013-05-06 Thread Noven
Thank you Maxim. 

--- On Mon, 5/6/13, Maxim Solodovnik solomax...@gmail.com wrote:

 From: Maxim Solodovnik solomax...@gmail.com
 Subject: Re: Wicket push alternative
 To: users@wicket.apache.org
 Date: Monday, May 6, 2013, 7:36 AM
 I believe you can you
 wicket-websocket's
 
 
 On Mon, May 6, 2013 at 2:29 PM, Noven noven_...@yahoo.com
 wrote:
 
  Hi all,
 
  Do you know any wicket push technology beside
 atmosphere and wicket-push
  project?
 
  I use wicket-push 1.4 and it work good for me. But when
 migrate to wicket
  v6.x, my code is not applicable anymore.
 
  I tried atmosphere, but it causes many error I'm not
 able to fix.
 
  Many thanks.
 
 
 -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 WBR
 Maxim aka solomax
 

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



Atmosphere NPE

2013-05-02 Thread Noven
Hi all,

I have issue with atmosphere, below is the log:

2013-05-01 19:11:32.880602500 INFO  - AtmosphereBehavior         - Resuming the 
streaming response from ip 127.0.0.101:41704
2013-05-01 19:11:32.880714500 INFO  - AtmosphereBehavior         - streaming 
connection dropped from ip 127.0.0.101:41704
2013-05-01 19:11:32.886105500 ERROR - AtmosphereBehavior         - 
2013-05-01 19:11:32.886106500 java.lang.NullPointerException
2013-05-01 19:11:32.886106500     at 
org.apache.wicket.atmosphere.EventBus.get(EventBus.java:87)

Also I found that this issue make my application become unresponsive and cause 
tomcat shut down.  Did anybody ever experiencing this? 

Any help will be appreciated. Thank you.

Below is my web.xml

context-param
        param-namecontextConfigLocation/param-name
        param-valueclasspath:applicationContext.xml/param-value
    /context-param
    listener
        
listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
    /listener
    servlet
        descriptionwicket.admin/description
        servlet-namewicket.admin/servlet-name
        servlet-classorg.atmosphere.cpr.AtmosphereServlet/servlet-class
        init-param
            param-nameapplicationClassName/param-name
            param-valuecom.admin.WicketApplication/param-value
        /init-param
        init-param
            param-nameconfiguration/param-name
            param-valuedeployment/param-value
        /init-param
        init-param
            param-nameorg.atmosphere.useWebSocket/param-name
            param-valuetrue/param-value
        /init-param
        init-param
            param-nameorg.atmosphere.useNative/param-name
            param-valuetrue/param-value
        /init-param
        init-param
            param-nameorg.atmosphere.cpr.sessionSupport/param-name
            param-valuetrue/param-value
        /init-param
        init-param
            param-namefilterMappingUrlPattern/param-name
            param-value/*/param-value
        /init-param
        init-param
            param-nameorg.atmosphere.websocket.WebSocketProtocol/param-name
            
param-valueorg.atmosphere.websocket.protocol.EchoProtocol/param-value
        /init-param
        init-param
            param-nameorg.atmosphere.cpr.broadcastFilterClasses/param-name
            
param-valueorg.apache.wicket.atmosphere.TrackMessageSizeFilter/param-value
        /init-param
        load-on-startup0/load-on-startup
    /servlet       
    
    servlet-mapping
        servlet-namewicket.admin/servlet-name
        url-pattern/*/url-pattern
    /servlet-mapping 

Re: ASK: Updating one wicket page's component from other wicket apps

2013-01-13 Thread Noven
My idea is, first the member's apps have to able to call an admin's wicket 
page, than post it using atmosphere to update the component from Admin's page. 

I just don't know what the best practice to achieve calling a wicket page from 
outside wicket apps. 


Any help or suggestion appreciated. Thanks



 From: Noven noven_...@yahoo.com
To: users@wicket.apache.org users@wicket.apache.org 
Sent: Monday, January 14, 2013 5:53 AM
Subject: ASK: Updating one wicket page's component from other wicket apps 
 
Hi all,

Currently, I am developing 2 separated wicket apps, they are an Admin's web and 
a Member's web. Both shared the same database but run in different tomcat 
container.  

My question is how to achieve below use case: 

On member's web: When a member submit a form, the form will send message to 
update a component (e.g. a datatable) on Admins' page. Or in the form's 
onSubmit method, it will call/ send parameter to the Admin's page. Later at the 
Admin's page it will update it's component base on the parameter. 

I read about web service but have not find a good example on how updating a 
wicket page. 

Thanks,
Noven

Re: ASK: Updating one wicket page's component from other wicket apps

2013-01-13 Thread Noven
Hi Sebastien,

Thank you for your quick reply before :)

Jboss, JMS, MDB are such a new thing for me. I heard them before but just never 
use it in real apps.
I'm considering AjaxSelfUpdatingTimerBehaviour like you've suggested while 
waiting for others reply to this topic. 

Noven




 From: Sebastien seb...@gmail.com
To: users@wicket.apache.org; Noven noven_...@yahoo.com 
Sent: Monday, January 14, 2013 6:24 AM
Subject: Re: ASK: Updating one wicket page's component from other wicket apps
 

Hi,

Well, if you want your 2 webapps communicates live, maybe 
you should consider an application server (JBoss?), JMS for sending the 
message, an MDB (message driven bean) to read the message (admin side) 
and wicket native socket (or wicket atmosphere) to send the message back
 to the admin (and refresh the datatable?)

To be honest, it is 
not so easy. So maybe you can refine your requirements. For instance, 
could the updated information not be stored in the database (as they 
already sharing the same DB) instead of sending a message? Then the 
admin page could read the DB next time the page refreshes (or using a 
AjaxSelfUpdatingTimerBehavior)

Hope this helps (a bit)
Sebastien.


On Mon, Jan 14, 2013 at 12:20 AM, Noven noven_...@yahoo.com wrote:

My idea is, first the member's apps have to able to call an admin's wicket 
page, than post it using atmosphere to update the component from Admin's page.

I just don't know what the best practice to achieve calling a wicket page from 
outside wicket apps.


Any help or suggestion appreciated. Thanks




 From: Noven noven_...@yahoo.com
To: users@wicket.apache.org users@wicket.apache.org
Sent: Monday, January 14, 2013 5:53 AM
Subject: ASK: Updating one wicket page's component from other wicket apps


Hi all,

Currently, I am developing 2 separated wicket apps, they are an Admin's web 
and a Member's web. Both shared the same database but run in different tomcat 
container. 

My question is how to achieve below use case:

On member's web: When a member submit a form, the form will send message to 
update a component (e.g. a datatable) on Admins' page. Or in the form's 
onSubmit method, it will call/ send parameter to the Admin's page. Later at 
the Admin's page it will update it's component base on the parameter.

I read about web service but have not find a good example on how updating a 
wicket page.

Thanks,
Noven

Re: Wicket Atmosphere does not run in Firefox 17

2013-01-08 Thread Noven
Emond,

Thank you for the link. 
Btw didn't you find the quickstart does not work in firefox? 

I will enable WS back and figure it out how to fix in firefox. 

Regards,
Noven





 From: Emond Papegaaij emond.papega...@topicus.nl
To: users@wicket.apache.org; Noven noven_...@yahoo.com 
Sent: Tuesday, January 8, 2013 3:38 PM
Subject: Re: Wicket Atmosphere does not run in Firefox 17
 
Disabling WS will cause atmosphere to fall back on a different protocol, such 
as http streaming or polling. WS is designed to support 2-way communication, 
http is not. These other implementations might not be as reliable or might 
consume more resources. This page contains a nice description of the benefits 
of WS:
http://www.websocket.org/quantum.html

Best regards,
Emond

On Monday 07 January 2013 17:48:34 Noven wrote:
 Emond,
 
 Finally I can make it run in Firefox by disable using websocket in web.xml
 
 
 init-param
             param-nameorg.atmosphere.useWebSocket/param-name
             param-valuefalse/param-value
         /init-param
 
 
 Don't know if there's drawback doing that since it comes as default setting
 in the quickstart.
 
 
 Regards,
 Noven
 
 
 
  From: Emond Papegaaij emond.papega...@gmail.com
 To: users@wicket.apache.org; Noven noven_...@yahoo.com
 Sent: Thursday, December 27, 2012 2:29 PM
 Subject: Re: Wicket Atmosphere does not run in Firefox 17
 
 It seems you hosting provider does not support websockets. For some reason,
 in Chrome the downgrade to 'streaming' works fine, but in Firefox it does
 not. Firefox keeps trying to establish a ws connection, which fails over
 and over again. I think this is a problem in Atmosphere. You could try
 asking this question at their google groups. I've created a ticket
 (WICKET-4946) for passing parameters to atmosphere, which would allow you
 to disable websocket.
 
 Best regards,
 Emond Papegaaij
 
 On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote:
  Hi,
  
  Thank you for your reply before. I did not change anything in firefox. If
  I have to, I can't use this feature.
  I doubt if the problem caused from firefox. When the quickstart deployed
  in my localhost (both tomcat and jetty), it run well in firefox.
  
  
  
 
   From: Andreas Kuhtz andreas.ku...@gmail.com
 
  To: users@wicket.apache.org; Noven noven_...@yahoo.com
  Sent: Monday, December 24, 2012 5:21 PM
  Subject: Re: Wicket Atmosphere does not run in Firefox 17
  
  
  Hi,
  
  Have you configured a proxy in firefox? if so, you may enable the ws://*
  to use the proxy, not only http and https.
  Hope this helps.
  
  Cheers
  
  
  2012/12/24 Noven noven_...@yahoo.com
  
  Hi All,
  
  I just tried deploy the wicket-atmosphere-quickstart here at
  
  http://api.bola54.com into tomcat v.7.0.32
  
  It's able run well on safari and chrome, but fail run on newest firefox
  
  v.17.
  
  By using the same tomcat version, I am able to run it on firefox v.17 in
  
  my localhost but failed at http://api.bola54.com.
  
  Did anybody know this issue before?
  
  
  Thank you.

Re: Wicket Atmosphere does not run in Firefox 17

2013-01-08 Thread Noven
Emond,

Thank you for your support. I will contact my provider about this. 

Regards,
Noven





 From: Emond Papegaaij emond.papega...@topicus.nl
To: users@wicket.apache.org; Noven noven_...@yahoo.com 
Sent: Tuesday, January 8, 2013 7:27 PM
Subject: Re: Wicket Atmosphere does not run in Firefox 17
 
The quickstart does work on Firefox, but not on your provider. You should only 
enable WS if your provider supports it. Atmosphere tries to autodetect the 
capabilities of the browser and server to determine the best protocol to use. 
For some reason, this system fails to detect that WS is not working on your 
server, but only on Firefox. Chrome reverts to streaming and IE does not 
support WS at all, so it starts with streaming right away.

Best regards,
Emond

On Tuesday 08 January 2013 17:25:07 Noven wrote:
 Emond,
 
 Thank you for the link.
 Btw didn't you find the quickstart does not work in firefox?
 
 I will enable WS back and figure it out how to fix in firefox.
 
 Regards,
 Noven
 
 
 
 
 
  From: Emond Papegaaij emond.papega...@topicus.nl
 To: users@wicket.apache.org; Noven noven_...@yahoo.com
 Sent: Tuesday, January 8, 2013 3:38 PM
 Subject: Re: Wicket Atmosphere does not run in Firefox 17
 
 Disabling WS will cause atmosphere to fall back on a different protocol,
 such as http streaming or polling. WS is designed to support 2-way
 communication, http is not. These other implementations might not be as
 reliable or might consume more resources. This page contains a nice
 description of the benefits of WS:
 http://www.websocket.org/quantum.html
 
 Best regards,
 Emond
 
 On Monday 07 January 2013 17:48:34 Noven wrote:
  Emond,
  
  Finally I can make it run in Firefox by disable using websocket in web.xml
  
  
  init-param
 
              param-nameorg.atmosphere.useWebSocket/param-name
              param-valuefalse/param-value
          /init-param
 
  Don't know if there's drawback doing that since it comes as default
  setting
  in the quickstart.
  
  
  Regards,
  Noven
  
  
  
 
   From: Emond Papegaaij emond.papega...@gmail.com
 
  To: users@wicket.apache.org; Noven noven_...@yahoo.com
  Sent: Thursday, December 27, 2012 2:29 PM
  Subject: Re: Wicket Atmosphere does not run in Firefox 17
  
  It seems you hosting provider does not support websockets. For some
  reason,
  in Chrome the downgrade to 'streaming' works fine, but in Firefox it does
  not. Firefox keeps trying to establish a ws connection, which fails over
  and over again. I think this is a problem in Atmosphere. You could try
  asking this question at their google groups. I've created a ticket
  (WICKET-4946) for passing parameters to atmosphere, which would allow you
  to disable websocket.
  
  Best regards,
  Emond Papegaaij
  
  On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote:
   Hi,
   
   Thank you for your reply before. I did not change anything in firefox.
   If
   I have to, I can't use this feature.
   I doubt if the problem caused from firefox. When the quickstart deployed
   in my localhost (both tomcat and jetty), it run well in firefox.
   
   
   
  
    From: Andreas Kuhtz andreas.ku...@gmail.com
  
   To: users@wicket.apache.org; Noven noven_...@yahoo.com
   Sent: Monday, December 24, 2012 5:21 PM
   Subject: Re: Wicket Atmosphere does not run in Firefox 17
   
   
   Hi,
   
   Have you configured a proxy in firefox? if so, you may enable the
   ws://*
   to use the proxy, not only http and https.
   Hope this helps.
   
   Cheers
   
   
   2012/12/24 Noven noven_...@yahoo.com
   
   Hi All,
   
   I just tried deploy the wicket-atmosphere-quickstart here at
   
   http://api.bola54.com into tomcat v.7.0.32
   
   It's able run well on safari and chrome, but fail run on newest firefox
   
   v.17.
   
   By using the same tomcat version, I am able to run it on firefox v.17
   in
   
   my localhost but failed at http://api.bola54.com.
   
   Did anybody know this issue before?
   
   
   Thank you.

Re: Wicket Atmosphere does not run in Firefox 17

2013-01-08 Thread Noven
Emond,

Today I got the solution of this issue. 

After contacting my hosting provider, we found out that the problem is that 
Apache does not support proxying websockets via AJP or other protocols with the 
currently installed modules.

References:

http://serverfault.com/questions/290121/configuring-apache2-to-proxy-websocket
https://issues.apache.org/bugzilla/show_bug.cgi?id=47485

It may be possible to install an additional module to support websockets.  
There is at least one project to add this functionality to apache:

http://blog.alex.org.uk/2012/02/16/using-apache-websocket-to-proxy-tcp-connection/

Then we try using http protocol to connect to tomcat instead of ajp. 

We may actually have to bypass apache and direct a port on the server directly 
to tomcat.


Hope this may be useful for others.

Regards,
Noven




 From: Emond Papegaaij emond.papega...@topicus.nl
To: users@wicket.apache.org; Noven noven_...@yahoo.com 
Sent: Tuesday, January 8, 2013 7:27 PM
Subject: Re: Wicket Atmosphere does not run in Firefox 17
 
The quickstart does work on Firefox, but not on your provider. You should only 
enable WS if your provider supports it. Atmosphere tries to autodetect the 
capabilities of the browser and server to determine the best protocol to use. 
For some reason, this system fails to detect that WS is not working on your 
server, but only on Firefox. Chrome reverts to streaming and IE does not 
support WS at all, so it starts with streaming right away.

Best regards,
Emond

On Tuesday 08 January 2013 17:25:07 Noven wrote:
 Emond,
 
 Thank you for the link.
 Btw didn't you find the quickstart does not work in firefox?
 
 I will enable WS back and figure it out how to fix in firefox.
 
 Regards,
 Noven
 
 
 
 
 
  From: Emond Papegaaij emond.papega...@topicus.nl
 To: users@wicket.apache.org; Noven noven_...@yahoo.com
 Sent: Tuesday, January 8, 2013 3:38 PM
 Subject: Re: Wicket Atmosphere does not run in Firefox 17
 
 Disabling WS will cause atmosphere to fall back on a different protocol,
 such as http streaming or polling. WS is designed to support 2-way
 communication, http is not. These other implementations might not be as
 reliable or might consume more resources. This page contains a nice
 description of the benefits of WS:
 http://www.websocket.org/quantum.html
 
 Best regards,
 Emond
 
 On Monday 07 January 2013 17:48:34 Noven wrote:
  Emond,
  
  Finally I can make it run in Firefox by disable using websocket in web.xml
  
  
  init-param
 
              param-nameorg.atmosphere.useWebSocket/param-name
              param-valuefalse/param-value
          /init-param
 
  Don't know if there's drawback doing that since it comes as default
  setting
  in the quickstart.
  
  
  Regards,
  Noven
  
  
  
 
   From: Emond Papegaaij emond.papega...@gmail.com
 
  To: users@wicket.apache.org; Noven noven_...@yahoo.com
  Sent: Thursday, December 27, 2012 2:29 PM
  Subject: Re: Wicket Atmosphere does not run in Firefox 17
  
  It seems you hosting provider does not support websockets. For some
  reason,
  in Chrome the downgrade to 'streaming' works fine, but in Firefox it does
  not. Firefox keeps trying to establish a ws connection, which fails over
  and over again. I think this is a problem in Atmosphere. You could try
  asking this question at their google groups. I've created a ticket
  (WICKET-4946) for passing parameters to atmosphere, which would allow you
  to disable websocket.
  
  Best regards,
  Emond Papegaaij
  
  On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote:
   Hi,
   
   Thank you for your reply before. I did not change anything in firefox.
   If
   I have to, I can't use this feature.
   I doubt if the problem caused from firefox. When the quickstart deployed
   in my localhost (both tomcat and jetty), it run well in firefox.
   
   
   
  
    From: Andreas Kuhtz andreas.ku...@gmail.com
  
   To: users@wicket.apache.org; Noven noven_...@yahoo.com
   Sent: Monday, December 24, 2012 5:21 PM
   Subject: Re: Wicket Atmosphere does not run in Firefox 17
   
   
   Hi,
   
   Have you configured a proxy in firefox? if so, you may enable the
   ws://*
   to use the proxy, not only http and https.
   Hope this helps.
   
   Cheers
   
   
   2012/12/24 Noven noven_...@yahoo.com
   
   Hi All,
   
   I just tried deploy the wicket-atmosphere-quickstart here at
   
   http://api.bola54.com into tomcat v.7.0.32
   
   It's able run well on safari and chrome, but fail run on newest firefox
   
   v.17.
   
   By using the same tomcat version, I am able to run it on firefox v.17
   in
   
   my localhost but failed at http://api.bola54.com.
   
   Did anybody know this issue before?
   
   
   Thank you.

Re: Wicket Atmosphere does not run in Firefox 17

2013-01-07 Thread Noven
Emond,

Finally I can make it run in Firefox by disable using websocket in web.xml


init-param
    param-nameorg.atmosphere.useWebSocket/param-name
    param-valuefalse/param-value
    /init-param


Don't know if there's drawback doing that since it comes as default setting in 
the quickstart. 


Regards,
Noven



 From: Emond Papegaaij emond.papega...@gmail.com
To: users@wicket.apache.org; Noven noven_...@yahoo.com 
Sent: Thursday, December 27, 2012 2:29 PM
Subject: Re: Wicket Atmosphere does not run in Firefox 17
 
It seems you hosting provider does not support websockets. For some reason,
in Chrome the downgrade to 'streaming' works fine, but in Firefox it does
not. Firefox keeps trying to establish a ws connection, which fails over
and over again. I think this is a problem in Atmosphere. You could try
asking this question at their google groups. I've created a ticket
(WICKET-4946) for passing parameters to atmosphere, which would allow you
to disable websocket.

Best regards,
Emond Papegaaij


On Mon, Dec 24, 2012 at 12:22 PM, Noven noven_...@yahoo.com wrote:


 Hi,

 Thank you for your reply before. I did not change anything in firefox. If
 I have to, I can't use this feature.
 I doubt if the problem caused from firefox. When the quickstart deployed
 in my localhost (both tomcat and jetty), it run well in firefox.


 
  From: Andreas Kuhtz andreas.ku...@gmail.com
 To: users@wicket.apache.org; Noven noven_...@yahoo.com
 Sent: Monday, December 24, 2012 5:21 PM
 Subject: Re: Wicket Atmosphere does not run in Firefox 17


 Hi,

 Have you configured a proxy in firefox? if so, you may enable the ws://*
 to use the proxy, not only http and https.
 Hope this helps.

 Cheers


 2012/12/24 Noven noven_...@yahoo.com

 Hi All,
 
 I just tried deploy the wicket-atmosphere-quickstart here at
 http://api.bola54.com into tomcat v.7.0.32
 
 It's able run well on safari and chrome, but fail run on newest firefox
 v.17.
 
 By using the same tomcat version, I am able to run it on firefox v.17 in
 my localhost but failed at http://api.bola54.com.
 
 
 Did anybody know this issue before?
 
 
 Thank you.


Re: Example of wicket atmosphere with channel

2013-01-06 Thread Noven
Emond,

Sorry for my late reply. Just come back from holiday. I saw at 
contextAwareFilter and find it useful. But I have not tried it yet in my 
project. Currently I still depend on wicketstuff-push instead 
wicket-atmosphere. I was thinking to move to wicket-atmosphere  because it is 
more easy to implement and has less code than wicketstuff-push. 

Regards,
Noven





 From: Emond Papegaaij emond.papega...@gmail.com
To: users@wicket.apache.org 
Sent: Thursday, December 27, 2012 1:56 PM
Subject: Re: Example of wicket atmosphere with channel
 
I presume you are refering to WICKET-4879, There are no examples of the new
API yet, but the changes are not that big. I did not really implement
channels, but made the changes that would allow you to implement channels.
It is now possible to post an event to a single client (rather than all
clients), either via the AtmosphereResource for that client, or its UUID. I
also added a contextAwareFilter() to @Subscribe, which allows you to access
the RequestCycle and session from the filter. This can be used to
differentiate on the receiver of the event, where filter() can only be used
to differentiate on the content of the event. Be careful with this new
method though, because it will not scale very will with large numbers of
concurrent users.

Looking at the code again, I think I'm going to change the Predicate into a
Function on AtmosphereResource. That would allow you to keep track of some
attributes in AtmosphereRequest on which to write your filter, which puts a
lot less weight on the server than setting up a RequestCycle.

Best regards,
Emond Papegaaij


On Thu, Dec 20, 2012 at 8:31 PM, Noven noven_...@yahoo.com wrote:

 Hi,

 I just saw new features released at wicket 6.40. And I am interested to
 see example code of the atmosphere channel. Where can i find the example of
 this feature?

 Thanks.



Re: Example of wicket atmosphere with channel

2012-12-24 Thread Noven
I opened the link but unfortunately I couldn't view the source. It appears as 
internal error. 
Thank you for the link, I will download the example and run in my local instead.

Regards,
Noven





 From: Arun Chauhan arundraj...@gmail.com
To: users@wicket.apache.org 
Sent: Monday, December 24, 2012 5:06 PM
Subject: Re: Example of wicket atmosphere with channel
 
Have you tried looking at the Wicket framework's examples?

http://www.wicket-library.com/wicket-examples-6.0.x/atmosphere/



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Example-of-wicket-atmosphere-with-channel-tp4654979p4655038.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 Atmosphere does not run in Firefox 17

2012-12-24 Thread Noven

Hi,

Thank you for your reply before. I did not change anything in firefox. If I 
have to, I can't use this feature. 
I doubt if the problem caused from firefox. When the quickstart deployed in my 
localhost (both tomcat and jetty), it run well in firefox. 



 From: Andreas Kuhtz andreas.ku...@gmail.com
To: users@wicket.apache.org; Noven noven_...@yahoo.com 
Sent: Monday, December 24, 2012 5:21 PM
Subject: Re: Wicket Atmosphere does not run in Firefox 17
 

Hi,

Have you configured a proxy in firefox? if so, you may enable the ws://* to 
use the proxy, not only http and https.
Hope this helps.

Cheers


2012/12/24 Noven noven_...@yahoo.com

Hi All,

I just tried deploy the wicket-atmosphere-quickstart here at 
http://api.bola54.com into tomcat v.7.0.32

It's able run well on safari and chrome, but fail run on newest firefox v.17.

By using the same tomcat version, I am able to run it on firefox v.17 in my 
localhost but failed at http://api.bola54.com.


Did anybody know this issue before?


Thank you.

Re: Datatable sortproperty error

2012-12-20 Thread Noven
Martin,

My apology. It was error in my code when extending the datatable. I have 
correct it and it works fine now. 


Thank you.




 From: Martin Grigorov mgrigo...@apache.org
To: users@wicket.apache.org; Noven noven_...@yahoo.com 
Sent: Thursday, December 20, 2012 3:42 PM
Subject: Re: Datatable sortproperty error
 

Hi,

What is the error ?
Looking at the signature I don't see a problem.



On Thu, Dec 20, 2012 at 10:36 AM, Noven noven_...@yahoo.com wrote:

Hi,

I am facing error when try to add sortproperty to datatable column. I use 
wicket 6.3.0, it works fine using wicket 1.4.2.

My code is below :


ListIColumnMessage, String columns = new ArrayListIColumnMessage, 
String();
columns.add(new PropertyColumnMessage, String(new ModelString(Subject), 
subject, subject)); // error

columns.add(new PropertyColumnMessage, String(new ModelString(Subject), 
subject)); // work


Did somebody found this error before? How to make work?

Thank you.


Noven



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

Re: Wicket 6 and wicket push

2012-11-11 Thread Noven
Hi Martin,

I just did migration from wicket 1.4 to wicket 6.1. 


My wicket 1.4 apps used wicketstuff-push. As wicket 6 has featured Atmosphere, 
I change the wicketstuff-push to atmosphere instead. Everything work fine in my 
local tomcat7. But when deployed to server, the atmosphere failed to start. 
Here the logs : 


@4000509f3e752d724124 WARN  - AtmosphereFramework        - Failed using 
comet support: org.atmosphere.container.Tomcat7AsyncSupportWithWebSocket, 
error: Tomcat failed to detect this is a Comet application because context.xml 
is missing or the Http11NioProtocol Connector is not enabled.
@4000509f3e752d7250c4 If that's not the case, you can also remove 
META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar Is the Nio or 
Apr Connector enabled?

I read the same issue here : 
https://github.com/Atmosphere/atmosphere/issues/359, tried the solution but has 
no luck. 

After try and error about a day, I am thinking to use wicketstuff-push back. 

Regards,
Noven




 From: Martin Grigorov mgrigo...@apache.org
To: users@wicket.apache.org; Noven noven_...@yahoo.com 
Sent: Sunday, November 11, 2012 3:46 PM
Subject: Re: Wicket 6 and wicket push
 

Hi,

WicketStuff-Push has nothing common with wicket-atmosphere.
I.e. you can use them both in the same application if you want.



On Sat, Nov 10, 2012 at 10:18 PM, Noven noven_...@yahoo.com wrote:

Hi all,

Just wanna ask question. Since wicket 6 is now featuring atmosphere, does it 
still work with wicket push? Did anybody try it before?
Thanks.


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

Re: Strange problem with DateTextField

2011-06-21 Thread Noven
Vitor,

There are 2 DateTextField I know for wicket, 
org.apache.wicket.datetime.markup.html.form.DateTextFieldand 
org.apache.wicket.extensions.markup.html.form.DateTextField.
I used many DateTextField from wicket extensions in my project. It works fine. 
The code is almost the same with the one you use, 

DateTextField dateTF  = new DateTextField(finalDate, new 
PropertyModel(someObject.getFinalDate(), dd/MM/yy);

You can get the extentions class from maven by add below code to your project 
dependencies. 

dependency
    groupIdorg.apache.wicket/groupId
    artifactIdwicket-extensions/artifactId
    version${wicket.version}/version
    /dependency

If you haven't solved your problem, you can try this. 

I hope this will help you.

Regards,
Noven




From: Vitor Granzinoli Vellozo vitor.vell...@cpmbraxis.com
To: users@wicket.apache.org
Sent: Wednesday, June 22, 2011 4:16 AM
Subject: Strange problem with DateTextField



Wicketers,



I found a problem with DateTextField, when a date comes like 11/10/2010
(dd/MM/) to be showed at

a page, and it shows 10/10/2010, it shows a date decreased. The same
ocurrs if the date is 12/10/2010.



It ocurrs with dates near 10/10/2010. I also fixed dates manually and it
doesn't change, it's very strange

and I need you help.



Below, the code:



DateTextField dateTF = new DateTextField(finalDate, new
PropertyModel(someObject.getFinalDate(), finalDate), new
PatternDateConverter(dd/MM/, true));

dateTF.add(new DatePicker());

add(dateTF);





Some idea about?



Thanks a lot

Vitor

facebook like notification

2011-06-19 Thread Noven
Hi All.. 

Newbie need guide , I just registered and this is my first post. 

I am facing problem about creating a facebook like notification.
Like if your friend tag someone in your photos, there will be a 
notification appeared on your facebook page. 

My problem actually, I can't manage the user session/application state. 
I have successfully presented my feedback message into jGrowl like here

The real scenario is : 
There are 2 role of user in my application, a user and a supervisor.
When the user create something via a form, a notification appeared on 
the supervisor page lively. 

My question is how I can trigger the notification (which is a 
feedback message) appears on the supervisor page. Where I have to put my
code, override some method in wicket application class? 

I am sorry if there is a similar question like mine before. 

Thanks, 
Noven