Re: access post data

2009-09-21 Thread Petr Kobalíček
My problem,

it's needed to set correct request content type (for example
application/json) to disallow wicket from processing the post data
(and making parameters from them).

Cheers
- Petr

2009/9/21 Petr Kobalíček :
> Hi,
>
> is there simple way how to access raw POST data?
>
> I'm trying:
>               
> ((WebRequest)getRequest()).getHttpServletRequest().getInputStream();
> but it's empty (it seems to be already processed).
>
> Thanks
> - Petr
>

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



access post data

2009-09-21 Thread Petr Kobalíček
Hi,

is there simple way how to access raw POST data?

I'm trying:
   
((WebRequest)getRequest()).getHttpServletRequest().getInputStream();
but it's empty (it seems to be already processed).

Thanks
- Petr

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



Re: rpc question

2009-09-20 Thread Petr Kobalíček
Hi all,

thanks for all responses. Currently I will solve my problem by
rewritting original qooxdoo-rpc-java server to be usable also from
wicket. I don't know if my solution is clear, but if I get feeling
that it's not bad I will share my code with community.

Regards
- Petr

2009/9/20 Jeremy Thomerson :
> And, if you want access to the session from within your web service, you can
> wrap the wicket session filter around your servlet, service, etc, so that it
> has access to Session.get().  There are a quite a few posts on this mailing
> list that will steer you in the right direction for that.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Fri, Sep 18, 2009 at 7:18 PM, Eelco Hillenius
> wrote:
>
>> While you could use Wicket for this, personally I think you're getting
>> close to viewing Wicket as the golden hammer :-)
>>
>> Why not use Jersey for instance. I just used that myself (in a project
>> where the UI is in Wicket), and especially together with Jackson for
>> JSON <--> Pojo serialization this seems to work pretty well. It's also
>> part of a standard (JaxRS), which imho should never be the main reason
>> to choose something, but is a nice little extra.
>>
>> Eelco
>>
>>
>> 2009/9/18 Petr Kobalíček :
>> > Thanks guys,
>> >
>> > the solution from Pedro
>> > (
>> http://blog.brunoborges.com.br/2008/11/restful-web-services-with-wicket.html
>> )
>> > is very close I talked about. I think that wicket supports to send
>> > JSON instead of XML, so I'm going to play with this.
>> >
>> > I have another question, maybe very OT, can I connect this solution
>> > with standard RPC server to check for types, etc? For example with
>> > http://jabsorb.org/ ? I'd like to use wicket sessions and request
>> > cycle with RPC services, or is my demand stupid (I mean that there are
>> > better solutions)?
>> >
>> > My problem is that I have quite big application in qooxdoo that
>> > communicates only through JSON (not strictly RPC). This is used for
>> > administration part. And second part of application is pure wicket
>> > solution. I'd like to stay with qooxdoo for administration, i like it.
>> >
>> > Cheers and thanks
>> > - Petr
>> >
>> > 2009/9/18 Marc Ende :
>> >> Hi Petr,
>> >>
>> >> sorry, I've misunderstood your mail... :)
>> >>
>> >> you've meant the other way round. May be you should try to
>> >> build a restful webservice. It's also possible with wicket if you
>> >> decide xml as a resultpage.
>> >>
>> >> For example:
>> >> http://java.dzone.com/news/wicket-creating-restful-urls
>> >>
>> >> Am Fri, 18 Sep 2009 17:48:01 +0200
>> >> schrieb Marc Ende :
>> >>
>> >>> Hi Petr,
>> >>>
>> >>> I think you should use a LoadableDetachableModel. Within the method
>> >>> load() you can execute your call to the webservice or other
>> >>> remote-service.
>> >>>
>> >>>
>> http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels
>> >>>
>> >>> yours
>> >>> marc
>> >>>
>> >>> Am Fri, 18 Sep 2009 14:20:27 +
>> >>> schrieb Petr Kobalíček :
>> >>>
>> >>> > Hi list,
>> >>> >
>> >>> > is there a simple tutorial about making RPC services in wicket? I
>> >>> > mean all integrated with wicket RequestCycle and Sessions, ideally
>> >>> > that I can expose web services through some Wicket page like class.
>> >>> > I'm porting one application and we have admin interface in qooxdoo
>> >>> > toolkit (it communicates through json requests).
>> >>> >
>> >>> > I'd like to hear about "wicket" solution to this problem.
>> >>> >
>> >>> > Thanks for possibilities
>> >>> > - Petr
>> >>> >
>> >>> > -
>> >>> > 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
>> >
>> >
>>
>> -
>> 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: rpc question

2009-09-18 Thread Petr Kobalíček
Thanks guys,

the solution from Pedro
(http://blog.brunoborges.com.br/2008/11/restful-web-services-with-wicket.html)
is very close I talked about. I think that wicket supports to send
JSON instead of XML, so I'm going to play with this.

I have another question, maybe very OT, can I connect this solution
with standard RPC server to check for types, etc? For example with
http://jabsorb.org/ ? I'd like to use wicket sessions and request
cycle with RPC services, or is my demand stupid (I mean that there are
better solutions)?

My problem is that I have quite big application in qooxdoo that
communicates only through JSON (not strictly RPC). This is used for
administration part. And second part of application is pure wicket
solution. I'd like to stay with qooxdoo for administration, i like it.

Cheers and thanks
- Petr

2009/9/18 Marc Ende :
> Hi Petr,
>
> sorry, I've misunderstood your mail... :)
>
> you've meant the other way round. May be you should try to
> build a restful webservice. It's also possible with wicket if you
> decide xml as a resultpage.
>
> For example:
> http://java.dzone.com/news/wicket-creating-restful-urls
>
> Am Fri, 18 Sep 2009 17:48:01 +0200
> schrieb Marc Ende :
>
>> Hi Petr,
>>
>> I think you should use a LoadableDetachableModel. Within the method
>> load() you can execute your call to the webservice or other
>> remote-service.
>>
>> http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels
>>
>> yours
>> marc
>>
>> Am Fri, 18 Sep 2009 14:20:27 +
>> schrieb Petr Kobalíček :
>>
>> > Hi list,
>> >
>> > is there a simple tutorial about making RPC services in wicket? I
>> > mean all integrated with wicket RequestCycle and Sessions, ideally
>> > that I can expose web services through some Wicket page like class.
>> > I'm porting one application and we have admin interface in qooxdoo
>> > toolkit (it communicates through json requests).
>> >
>> > I'd like to hear about "wicket" solution to this problem.
>> >
>> > Thanks for possibilities
>> > - Petr
>> >
>> > -
>> > 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



rpc question

2009-09-18 Thread Petr Kobalíček
Hi list,

is there a simple tutorial about making RPC services in wicket? I mean
all integrated with wicket RequestCycle and Sessions, ideally that I
can expose web services through some Wicket page like class. I'm
porting one application and we have admin interface in qooxdoo toolkit
(it communicates through json requests).

I'd like to hear about "wicket" solution to this problem.

Thanks for possibilities
- Petr

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



Re: how to get resource path to use it in own js

2009-09-12 Thread Petr Kobalíček
thanks, this is exactly what I need
- Petr

2009/9/12 Pedro Santos :
> I think you are looking for:
> http://wicket.sourceforge.net/apidocs/wicket/RequestCycle.html#urlFor(wicket.ResourceReference
> )
>
> Ex:
> RequestCycle.get().getUrlFor(new
> ResourceReference(SomeClass.class,"path-to-resource"))
>
> On Sat, Sep 12, 2009 at 7:34 AM, Petr Kobalíček 
> wrote:
>
>> Hi list,
>>
>> how to get resource path to use it in own javascript?
>>
>> For example I can reimplement renderHead method in
>> AbstractDefaultAjaxBehavior and in method render head I can add
>> javascript or css references:
>>
>> public void renderHead(IHeaderResponse response)
>> {
>>  super.renderHead(response);
>>
>>  // here
>>  response.renderJavascriptReference(new
>> JavascriptResourceReference(SomeClass.class, "path-to-resource.js"));
>> }
>>
>> this will generate 

how to get resource path to use it in own js

2009-09-12 Thread Petr Kobalíček
Hi list,

how to get resource path to use it in own javascript?

For example I can reimplement renderHead method in
AbstractDefaultAjaxBehavior and in method render head I can add
javascript or css references:

public void renderHead(IHeaderResponse response)
{
  super.renderHead(response);

  // here
  response.renderJavascriptReference(new
JavascriptResourceReference(SomeClass.class, "path-to-resource.js"));
}

this will generate