Re: Dynamically Toggling a Details Row in a DataTable

2012-10-09 Thread Martin Grigorov
Hi,

Check 
http://wicketinaction.com/2008/10/repainting-only-newly-created-repeater-items-via-ajax/
This may give you an idea how to add/remove additional rows with Ajax.

On Tue, Oct 9, 2012 at 11:21 PM, Bill Speirs  wrote:
> Paul-
>
> Thanks for the response... yea, we'd like to see another row below the
> current one, and in an single column. This way we can put whatever
> component/panel we'd like in that new row. Any suggestions on where to get
> started? I feel as though I'm going to need to re-work (more than simply
> extend) DataTable as I'll need to add additional rows.
>
> Thanks!
>
> Bill-
>
> On Tue, Oct 9, 2012 at 4:14 PM, Paul Bors  wrote:
>
>> Must it be in a separate row? It doesn't make much sense to have details in
>> a separate row unless you want to show the same columns.
>> And if you are going to show details for the same columns, then why not
>> just
>> toggle each of the cell component between a simplified and detailed view?
>> I do it all the time when editing a table row, I toggle between labels and
>> form fields to set the contents of the table row.
>>
>> If you do want to show extra details that do not match the columns in your
>> table, use a pop-up or modal pop-up.
>>
>>
>> ~ Thank you,
>>   Paul Bors
>>
>> -Original Message-
>> From: William Speirs [mailto:wspe...@apache.org]
>> Sent: Tuesday, October 09, 2012 3:01 PM
>> To: users@wicket.apache.org
>> Subject: Dynamically Toggling a Details Row in a DataTable
>>
>> I would like to create a component that generates an additional row in a
>> DataTable for each existing row. This additional row will contain "details"
>> for the above row. I would like to have a column in the DataTable that
>> contains a link/button/etc which controls the visibility (display: hidden
>> for that row) of the details row. Inside the details row, the colspan would
>> be set to the # of columns and contain an AjaxLazyLoadPanel such that when
>> the row is displayed the getLazyLoadComponent() method is called,
>> generating
>> and fetching the proper component.
>>
>> So the DataTable will look like a normal DataTable, except when you click
>> the link/button/etc a new row is shown and displays the Component returned
>> from the call to the getLazyLoadComponent() method.
>>
>> How would I go about implementing this type of DataTable?
>>
>> Thanks in advance...
>>
>> Bill-
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>



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

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



Re: the Wicket.Ajax.get + AbstractDefaultAjaxBehavior can't work on v6.1.0. I worked well in v1.5.6 at before.

2012-10-09 Thread Martin Grigorov
On Wed, Oct 10, 2012 at 8:35 AM, JamesXWang  wrote:
> Hi Martin,
>
> Thank you very much for your help!
>
> I think renderHead(HtmlHeaderContainer container) can still work because
> when I view the source of the UI the js have already been rendered and the
> function callWicket()  can get those js vars. But anyway I've changed to the
> new api you suggested.
>
> I found a cause is that when I upgrade I only change wicketAjaxGet to
> Wicket.Ajax.Get like below,
>
> var wcall = wicketAjaxGet(fliedBookListenerUrl, function() {
> //logic here.
>  }.bind(this), function() { }.bind(this));
>
> Now I've changed it again to -
>
> var wcall = Wicket.Ajax.get({"u":fliedBookListenerUrl}, function() {
> //logic here.
>  }.bind(this), function() { }.bind(this));
>
> then it can get into the respond() method of  fliedBookListener = new
> AbstractDefaultAjaxBehavior() {
> @Override
> protected void respond(final AjaxRequestTarget target) {...} }
>
> But the problem is that after the java logic ajax call can't return to the
> function() in
>
> var wcall = Wicket.Ajax.get({"u":fliedBookListenerUrl}, function() {
> //logic here.
>  }.bind(this), function() { }.bind(this));

Yes, it is wrong.
As described at
https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax now
Wicket.Ajax.(get|post) methods accept a JavaScript object with the
configuration.
So, it should be: Wicket.Ajax.get({u: theUrl, sh:
[successHandlerFunction1, successHandlerFunction2]})

>
> Did I did sth wrong in calling Wicket.Ajax.get() ?
>
> BR,
> James
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/the-Wicket-Ajax-get-AbstractDefaultAjaxBehavior-can-t-work-on-v6-1-0-I-worked-well-in-v1-5-6-at-befo-tp4652813p4652819.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
>



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

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



Re: IResourceStream from ByteArrayResource ?

2012-10-09 Thread Martin Grigorov
Hi,

You should not write the PDF back to the browser in the Ajax response.
Check again the code in AJAXDownload.java in the Wiki.
In in the AJax response it just returns a JavaScript evaluation that
does something like: window.location=theCallbackUrlToPDF
So when the Ajax call finish a new non-Ajax call to the PDF resource
is made to download it. No need of blockUI during the second call.

On Wed, Oct 10, 2012 at 7:21 AM, mlabs  wrote:
> well I switched to an ajax link so that I could add the blockUI decorator
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayResource-tp4652776p4652816.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
>



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

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



Re: the Wicket.Ajax.get + AbstractDefaultAjaxBehavior can't work on v6.1.0. I worked well in v1.5.6 at before.

2012-10-09 Thread Martin Grigorov
Hi,

On Wed, Oct 10, 2012 at 6:07 AM, JamesXWang  wrote:
> Hi Folks,
>
> Here are the app code based on Wicket 1.5.6 -
> 1. MyPage.java
>
> @Override
> public void renderHead(HtmlHeaderContainer container) {

Use #renderHead(IHeaderResponse)  instead.

> super.renderHead(container);
> String fliedBookListenerUrl = "var fliedBookListenerUrl='" +
> fliedBookListener.getCallbackUrl() + "';";
>
> container.getHeaderResponse().render(JavaScriptHeaderItem.forScript(fliedBookListenerUrl,
> "wicket-ajax-fliedBookListenerUrl"));
> ...}
>
> 2. mypage.js
>
> function callWicket() {
> var wcall = wicketAjaxGet(fliedBookListenerUrl, function() {
> //logic here.
> }.bind(this), function() { }.bind(this));
> }

Did you change this to Wicket.Ajax.get() ?
Can you paste the new version of this code please ?

>
> 3. MyPage.java
> fliedBookListener = new AbstractDefaultAjaxBehavior() {
> @Override
> protected void respond(final AjaxRequestTarget target) {
>...//logic here
>}
> }
>
> They work well at before. But after I upgrade to Wicket 6.1.0 yesterday they
> broken.
> I've added below code to MyWicketApplication.init(),
> getResourceSettings().setThrowExceptionOnMissingResource(false);
> getRequestCycleSettings().addResponseFilter(new
> AjaxServerAndClientTimeFilter());
> getDebugSettings().setAjaxDebugModeEnabled(true);
>
> I've also changed wicketAjaxGet to Wicket.Ajax.get.
>
> When I debug I found that the Wicket.Ajax.get() was called but it can't get
> into the AbstractDefaultAjaxBehavior.respond().
>
> Anyone know the root cause and the solution or alternative api?

Check for JavaScript errors with Firebug/Dev tools.

>
> Many thanks in advanced.
>
> - JamesWang
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/the-Wicket-Ajax-get-AbstractDefaultAjaxBehavior-can-t-work-on-v6-1-0-I-worked-well-in-v1-5-6-at-befo-tp4652813.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
>



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

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



RE: IResourceStream from ByteArrayResource ?

2012-10-09 Thread Paul Bors
My bad, you want to download it via Ajax, n/m.

Although, why would you want to download a file via Ajax?
All you're really doing in your example is to redirect the client browser to
request one of your mapped URLs.

Why can't you just handle the refresh part of your page in Ajax, and then
call RequestCycle.setResponse(new MyRespone()) to server the file to the
client?

Do you have more than one file that must be downloaded in sequence or
something?



-
~ Thank you,
p...@bors.ws
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayResource-tp4652776p4652815.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: IResourceStream from ByteArrayResource ?

2012-10-09 Thread Paul Bors
Hmm, this is what strikes me odd about your approach in your link's
onSubmit():

public void onClick(AjaxRequestTarget target) {
// I get it, you're creating your own stream writer
AbstractResourceStreamWriter rstream = new
AbstractResourceStreamWriter() {
public void write(Response output) {
output.write(MyPDFSharedResource.getPDFBytes());
}
};
// and your resource handler
ResourceStreamRequestHandler handler = new
ResourceStreamRequestHandler(rstream, MyPDFSharedResource.getFileName());
   
handler.setContentDisposition(ContentDisposition.ATTACHMENT);
// and you schedule it
   
getRequestCycle().scheduleRequestHandlerAfterCurrent(handler);
// But what are you doing now?
String url = MyPDFSharedResource.getUrl();
   
target.appendJavaScript("setTimeout(\"window.location.href='" + url + "'\",
100);");
}

Why are you using Ajax here to redirect the browser and why not just simply
respond to the client directly with your PDF resource?

Why not just simply implement
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/Response.html
and then grab a hold of the
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/cycle/RequestCycle.html
and call its setResponse(Response response)?

I forgot how I did this, but I'm sure I must have used an implementation of
a Reponse and then responded the the onClick() via
RequestCycle.setResponse(new MyRespone()). I query the database, parse some
data into CSV and Exel files and then server them to the client browser. I
also do this when I package a windows installer and server the MSI as a byte
array in MyResponse.

If you want a code snippet example let me know...



-
~ Thank you,
p...@bors.ws
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayResource-tp4652776p4652814.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



the Wicket.Ajax.get + AbstractDefaultAjaxBehavior can't work on v6.1.0. I worked well in v1.5.6 at before.

2012-10-09 Thread JamesXWang
Hi Folks,

Here are the app code based on Wicket 1.5.6 -
1. MyPage.java

@Override
public void renderHead(HtmlHeaderContainer container) {
super.renderHead(container);
String fliedBookListenerUrl = "var fliedBookListenerUrl='" +
fliedBookListener.getCallbackUrl() + "';";
   
container.getHeaderResponse().render(JavaScriptHeaderItem.forScript(fliedBookListenerUrl,
"wicket-ajax-fliedBookListenerUrl"));
...}

2. mypage.js

function callWicket() {
var wcall = wicketAjaxGet(fliedBookListenerUrl, function() { 
//logic here.
}.bind(this), function() { }.bind(this));
}

3. MyPage.java
fliedBookListener = new AbstractDefaultAjaxBehavior() {
@Override
protected void respond(final AjaxRequestTarget target) {
   ...//logic here
   }
}

They work well at before. But after I upgrade to Wicket 6.1.0 yesterday they
broken. 
I've added below code to MyWicketApplication.init(),
getResourceSettings().setThrowExceptionOnMissingResource(false);
getRequestCycleSettings().addResponseFilter(new
AjaxServerAndClientTimeFilter());
getDebugSettings().setAjaxDebugModeEnabled(true);

I've also changed wicketAjaxGet to Wicket.Ajax.get.

When I debug I found that the Wicket.Ajax.get() was called but it can't get
into the AbstractDefaultAjaxBehavior.respond().

Anyone know the root cause and the solution or alternative api?

Many thanks in advanced.

- JamesWang



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/the-Wicket-Ajax-get-AbstractDefaultAjaxBehavior-can-t-work-on-v6-1-0-I-worked-well-in-v1-5-6-at-befo-tp4652813.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: IResourceStream from ByteArrayResource ?

2012-10-09 Thread mlabs
I pushed my quickstart up to GitHub:

https://github.com/mlabs-dev-pub/test

TIA



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayResource-tp4652776p4652812.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: Dynamically Toggling a Details Row in a DataTable

2012-10-09 Thread Paul Bors
Not really, I did that for adding new rules to a data table (only I added to
the top and made the row editable).
Simply put, edit your DataProvider and make it return an extra "row" in your
element collection. It will screw up your pagination (but then again, you
might want that especially if you want to expand/collapse details on more
items.).

If you need more details I can show you some code snippets...

Another idea is to populate your details cell with a hidden panel that spans
all the rows in the table.
When the link is selected, you toggle its visibility to true and refresh the
table.

~ Thank you,
  Paul Bors

-Original Message-
From: Bill Speirs [mailto:bill.spe...@gmail.com] 
Sent: Tuesday, October 09, 2012 4:22 PM
To: users@wicket.apache.org
Subject: Re: Dynamically Toggling a Details Row in a DataTable

Paul-

Thanks for the response... yea, we'd like to see another row below the
current one, and in an single column. This way we can put whatever
component/panel we'd like in that new row. Any suggestions on where to get
started? I feel as though I'm going to need to re-work (more than simply
extend) DataTable as I'll need to add additional rows.

Thanks!

Bill-

On Tue, Oct 9, 2012 at 4:14 PM, Paul Bors  wrote:

> Must it be in a separate row? It doesn't make much sense to have 
> details in a separate row unless you want to show the same columns.
> And if you are going to show details for the same columns, then why 
> not just toggle each of the cell component between a simplified and 
> detailed view?
> I do it all the time when editing a table row, I toggle between labels 
> and form fields to set the contents of the table row.
>
> If you do want to show extra details that do not match the columns in 
> your table, use a pop-up or modal pop-up.
>
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: William Speirs [mailto:wspe...@apache.org]
> Sent: Tuesday, October 09, 2012 3:01 PM
> To: users@wicket.apache.org
> Subject: Dynamically Toggling a Details Row in a DataTable
>
> I would like to create a component that generates an additional row in 
> a DataTable for each existing row. This additional row will contain
"details"
> for the above row. I would like to have a column in the DataTable that 
> contains a link/button/etc which controls the visibility (display: 
> hidden for that row) of the details row. Inside the details row, the 
> colspan would be set to the # of columns and contain an 
> AjaxLazyLoadPanel such that when the row is displayed the 
> getLazyLoadComponent() method is called, generating and fetching the 
> proper component.
>
> So the DataTable will look like a normal DataTable, except when you 
> click the link/button/etc a new row is shown and displays the 
> Component returned from the call to the getLazyLoadComponent() method.
>
> How would I go about implementing this type of DataTable?
>
> Thanks in advance...
>
> Bill-
>
>
> -
> 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: Dynamically Toggling a Details Row in a DataTable

2012-10-09 Thread Bill Speirs
Paul-

Thanks for the response... yea, we'd like to see another row below the
current one, and in an single column. This way we can put whatever
component/panel we'd like in that new row. Any suggestions on where to get
started? I feel as though I'm going to need to re-work (more than simply
extend) DataTable as I'll need to add additional rows.

Thanks!

Bill-

On Tue, Oct 9, 2012 at 4:14 PM, Paul Bors  wrote:

> Must it be in a separate row? It doesn't make much sense to have details in
> a separate row unless you want to show the same columns.
> And if you are going to show details for the same columns, then why not
> just
> toggle each of the cell component between a simplified and detailed view?
> I do it all the time when editing a table row, I toggle between labels and
> form fields to set the contents of the table row.
>
> If you do want to show extra details that do not match the columns in your
> table, use a pop-up or modal pop-up.
>
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: William Speirs [mailto:wspe...@apache.org]
> Sent: Tuesday, October 09, 2012 3:01 PM
> To: users@wicket.apache.org
> Subject: Dynamically Toggling a Details Row in a DataTable
>
> I would like to create a component that generates an additional row in a
> DataTable for each existing row. This additional row will contain "details"
> for the above row. I would like to have a column in the DataTable that
> contains a link/button/etc which controls the visibility (display: hidden
> for that row) of the details row. Inside the details row, the colspan would
> be set to the # of columns and contain an AjaxLazyLoadPanel such that when
> the row is displayed the getLazyLoadComponent() method is called,
> generating
> and fetching the proper component.
>
> So the DataTable will look like a normal DataTable, except when you click
> the link/button/etc a new row is shown and displays the Component returned
> from the call to the getLazyLoadComponent() method.
>
> How would I go about implementing this type of DataTable?
>
> Thanks in advance...
>
> Bill-
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


RE: IResourceStream from ByteArrayResource ?

2012-10-09 Thread Paul Bors
If you're trying to fix a bug in Wicket see:
http://wicket.apache.org/contribute/patch.html

If you want us to view your code in order to better troubleshoot your
problem, I guess you can attach it to the e-mail thread or use your own
git-hub public repository or any other public web server and provide to us
the URL.

~ Thank you,
  Paul Bors

-Original Message-
From: mlabs [mailto:mlabs@gmail.com] 
Sent: Tuesday, October 09, 2012 4:18 PM
To: users@wicket.apache.org
Subject: Re: IResourceStream from ByteArrayResource ?

ok I have made a quickstart .. where should I upload that?

what i'm seeing in the AJAX debug window is :

INFO: focus set on download1
INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on
./;jsessionid=D89D0A1222792A09CE564114BEC86C42?0-1.IBehaviorListener.1-downl
oad&random=0.9511702647404887
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (104729 characters)
INFO:
%PDF-1.7 % . 
<>
%%EOF
ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not
find root  element
INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...
INFO: focus removed from download1




--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayRes
ource-tp4652776p4652808.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



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



Re: IResourceStream from ByteArrayResource ?

2012-10-09 Thread mlabs
ok I have made a quickstart .. where should I upload that?

what i'm seeing in the AJAX debug window is :

INFO: focus set on download1
INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on
./;jsessionid=D89D0A1222792A09CE564114BEC86C42?0-1.IBehaviorListener.1-download&random=0.9511702647404887
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (104729 characters)
INFO:
%PDF-1.7 % . 
<>
%%EOF
ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not
find root  element
INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...
INFO: focus removed from download1




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayResource-tp4652776p4652808.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: Dynamically Toggling a Details Row in a DataTable

2012-10-09 Thread Paul Bors
Must it be in a separate row? It doesn't make much sense to have details in
a separate row unless you want to show the same columns.
And if you are going to show details for the same columns, then why not just
toggle each of the cell component between a simplified and detailed view?
I do it all the time when editing a table row, I toggle between labels and
form fields to set the contents of the table row.

If you do want to show extra details that do not match the columns in your
table, use a pop-up or modal pop-up.


~ Thank you,
  Paul Bors

-Original Message-
From: William Speirs [mailto:wspe...@apache.org] 
Sent: Tuesday, October 09, 2012 3:01 PM
To: users@wicket.apache.org
Subject: Dynamically Toggling a Details Row in a DataTable

I would like to create a component that generates an additional row in a
DataTable for each existing row. This additional row will contain "details"
for the above row. I would like to have a column in the DataTable that
contains a link/button/etc which controls the visibility (display: hidden
for that row) of the details row. Inside the details row, the colspan would
be set to the # of columns and contain an AjaxLazyLoadPanel such that when
the row is displayed the getLazyLoadComponent() method is called, generating
and fetching the proper component.

So the DataTable will look like a normal DataTable, except when you click
the link/button/etc a new row is shown and displays the Component returned
from the call to the getLazyLoadComponent() method.

How would I go about implementing this type of DataTable?

Thanks in advance...

Bill-


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



Dynamically Toggling a Details Row in a DataTable

2012-10-09 Thread William Speirs
I would like to create a component that generates an additional row in a
DataTable for each existing row. This additional row will contain "details"
for the above row. I would like to have a column in the DataTable that
contains a link/button/etc which controls the visibility (display: hidden
for that row) of the details row. Inside the details row, the colspan would
be set to the # of columns and contain an AjaxLazyLoadPanel such that when
the row is displayed the getLazyLoadComponent() method is called,
generating and fetching the proper component.

So the DataTable will look like a normal DataTable, except when you click
the link/button/etc a new row is shown and displays the Component returned
from the call to the getLazyLoadComponent() method.

How would I go about implementing this type of DataTable?

Thanks in advance...

Bill-


Re: captcha show different strings

2012-10-09 Thread Anna Simbirtsev
thank you

you were right, this actually did it:

captchaImageResource.invalidate();
imagePass = randomString(6, 8);
captchaImageResource.getChallengeIdModel().setObject(imagePass);

On Tue, Oct 9, 2012 at 1:48 PM, Paul Bors  wrote:

> As per the live example at:
>
> http://www.wicket-library.com/wicket-examples/captcha/wicket/bookmarkable/or
>
> g.apache.wicket.examples.source.SourcesPage?3&SourcesPage_class=org.apache.w
> icket.examples.captcha.Captcha
>
> org.apache.wicket.extensions.markup.html.captcha.CaptchaImageResource is
> the
> model for the image... reading its API:
>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/markup/htm
>
> l/captcha/CaptchaImageResource.html#CaptchaImageResource(org.apache.wicket.m
> odel.IModel, int, int)
>
> public CaptchaImageResource(IModel challengeId, fontSize,
> margin) Construct.
> Parameters:
>   challengeId - The id of the challenge
>   fontSize - The font size
>   margin - The image's margin
>
> My guess would be that you need to send through the right challengeId model
> that holds on the string of letters you want to change...
>
> There is also a little Kitten Capcha in the API you might want to check out
> :)
>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/captcha/ki
> ttens/KittenCaptchaPanel.html
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
> Sent: Tuesday, October 09, 2012 1:43 PM
> To: users@wicket.apache.org
> Subject: Re: captcha show different strings
>
> only the look of it changes, but the letters don't
>
> On Tue, Oct 9, 2012 at 1:40 PM, Paul Bors  wrote:
>
> > It chances on every form submit, why don't you look over the code
> > since is open source and figure out what the model type/object for it
> is...
> >
> > ~ Thank you,
> >   Paul Bors
> >
> > -Original Message-
> > From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
> > Sent: Tuesday, October 09, 2012 1:36 PM
> > To: users@wicket.apache.org
> > Subject: Re: captcha show different strings
> >
> > yes, but how can I get it to produce a different string upon simple
> > page reload?
> >
> > On Tue, Oct 9, 2012 at 1:27 PM, Thomas Götz  wrote:
> >
> > > The string is only equal within the same session, meaning: upon
> > > simple page reload it stays the same. If you start a new session
> > > (either be opening a new browser or by simply deleting the '?1' from
> > > the url) you will get a fresh new string.
> > >
> > > Cheers,
> > >-Tom
> > >
> > >
> > > On 09.10.2012, at 18:47, Anna Simbirtsev 
> wrote:
> > >
> > > > Hi
> > > >
> > > > I am looking at the captcha example and it always produces the
> > > > same
> > > string.
> > > > How do I make it to produce different strings?
> > > >
> > > > http://www.wicket-library.com/wicket-examples/captcha/?0
> > > >
> > > > Thanks
> > > > Anna
> > >
> > >
> > > 
> > > - 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: captcha show different strings

2012-10-09 Thread Paul Bors
As per the live example at:
http://www.wicket-library.com/wicket-examples/captcha/wicket/bookmarkable/or
g.apache.wicket.examples.source.SourcesPage?3&SourcesPage_class=org.apache.w
icket.examples.captcha.Captcha

org.apache.wicket.extensions.markup.html.captcha.CaptchaImageResource is the
model for the image... reading its API:
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/markup/htm
l/captcha/CaptchaImageResource.html#CaptchaImageResource(org.apache.wicket.m
odel.IModel, int, int)

public CaptchaImageResource(IModel challengeId, fontSize,
margin) Construct. 
Parameters:
  challengeId - The id of the challenge
  fontSize - The font size
  margin - The image's margin

My guess would be that you need to send through the right challengeId model
that holds on the string of letters you want to change...

There is also a little Kitten Capcha in the API you might want to check out
:)
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/captcha/ki
ttens/KittenCaptchaPanel.html

~ Thank you,
  Paul Bors

-Original Message-
From: Anna Simbirtsev [mailto:asimbirt...@gmail.com] 
Sent: Tuesday, October 09, 2012 1:43 PM
To: users@wicket.apache.org
Subject: Re: captcha show different strings

only the look of it changes, but the letters don't

On Tue, Oct 9, 2012 at 1:40 PM, Paul Bors  wrote:

> It chances on every form submit, why don't you look over the code 
> since is open source and figure out what the model type/object for it
is...
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
> Sent: Tuesday, October 09, 2012 1:36 PM
> To: users@wicket.apache.org
> Subject: Re: captcha show different strings
>
> yes, but how can I get it to produce a different string upon simple 
> page reload?
>
> On Tue, Oct 9, 2012 at 1:27 PM, Thomas Götz  wrote:
>
> > The string is only equal within the same session, meaning: upon 
> > simple page reload it stays the same. If you start a new session 
> > (either be opening a new browser or by simply deleting the '?1' from 
> > the url) you will get a fresh new string.
> >
> > Cheers,
> >-Tom
> >
> >
> > On 09.10.2012, at 18:47, Anna Simbirtsev  wrote:
> >
> > > Hi
> > >
> > > I am looking at the captcha example and it always produces the 
> > > same
> > string.
> > > How do I make it to produce different strings?
> > >
> > > http://www.wicket-library.com/wicket-examples/captcha/?0
> > >
> > > Thanks
> > > Anna
> >
> >
> > 
> > - 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: captcha show different strings

2012-10-09 Thread Anna Simbirtsev
only the look of it changes, but the letters don't

On Tue, Oct 9, 2012 at 1:40 PM, Paul Bors  wrote:

> It chances on every form submit, why don't you look over the code since is
> open source and figure out what the model type/object for it is...
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
> Sent: Tuesday, October 09, 2012 1:36 PM
> To: users@wicket.apache.org
> Subject: Re: captcha show different strings
>
> yes, but how can I get it to produce a different string upon simple page
> reload?
>
> On Tue, Oct 9, 2012 at 1:27 PM, Thomas Götz  wrote:
>
> > The string is only equal within the same session, meaning: upon simple
> > page reload it stays the same. If you start a new session (either be
> > opening a new browser or by simply deleting the '?1' from the url) you
> > will get a fresh new string.
> >
> > Cheers,
> >-Tom
> >
> >
> > On 09.10.2012, at 18:47, Anna Simbirtsev  wrote:
> >
> > > Hi
> > >
> > > I am looking at the captcha example and it always produces the same
> > string.
> > > How do I make it to produce different strings?
> > >
> > > http://www.wicket-library.com/wicket-examples/captcha/?0
> > >
> > > Thanks
> > > Anna
> >
> >
> > -
> > 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: captcha show different strings

2012-10-09 Thread Paul Bors
It chances on every form submit, why don't you look over the code since is
open source and figure out what the model type/object for it is...

~ Thank you,
  Paul Bors

-Original Message-
From: Anna Simbirtsev [mailto:asimbirt...@gmail.com] 
Sent: Tuesday, October 09, 2012 1:36 PM
To: users@wicket.apache.org
Subject: Re: captcha show different strings

yes, but how can I get it to produce a different string upon simple page
reload?

On Tue, Oct 9, 2012 at 1:27 PM, Thomas Götz  wrote:

> The string is only equal within the same session, meaning: upon simple 
> page reload it stays the same. If you start a new session (either be 
> opening a new browser or by simply deleting the '?1' from the url) you 
> will get a fresh new string.
>
> Cheers,
>-Tom
>
>
> On 09.10.2012, at 18:47, Anna Simbirtsev  wrote:
>
> > Hi
> >
> > I am looking at the captcha example and it always produces the same
> string.
> > How do I make it to produce different strings?
> >
> > http://www.wicket-library.com/wicket-examples/captcha/?0
> >
> > Thanks
> > Anna
>
>
> -
> 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: captcha show different strings

2012-10-09 Thread Anna Simbirtsev
yes, but how can I get it to produce a different string upon simple page
reload?

On Tue, Oct 9, 2012 at 1:27 PM, Thomas Götz  wrote:

> The string is only equal within the same session, meaning: upon simple
> page reload it stays the same. If you start a new session (either be
> opening a new browser or by simply deleting the '?1' from the url) you will
> get a fresh new string.
>
> Cheers,
>-Tom
>
>
> On 09.10.2012, at 18:47, Anna Simbirtsev  wrote:
>
> > Hi
> >
> > I am looking at the captcha example and it always produces the same
> string.
> > How do I make it to produce different strings?
> >
> > http://www.wicket-library.com/wicket-examples/captcha/?0
> >
> > Thanks
> > Anna
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: IResourceStream from ByteArrayResource ?

2012-10-09 Thread mlabs
i'll have a go .. but in the meantime, is there a complete working example of
this out these somewhere ?
What I'm trying to do is:

- use an Ajax Indicating link to download a file - to the standard file
'save-as' dialog and during the download, invoke jquery.blockUI to prevent
users from doing anything in my app...

TIA




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayResource-tp4652776p4652800.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: captcha show different strings

2012-10-09 Thread Thomas Götz
The string is only equal within the same session, meaning: upon simple page 
reload it stays the same. If you start a new session (either be opening a new 
browser or by simply deleting the '?1' from the url) you will get a fresh new 
string.

Cheers,
   -Tom


On 09.10.2012, at 18:47, Anna Simbirtsev  wrote:

> Hi
> 
> I am looking at the captcha example and it always produces the same string.
> How do I make it to produce different strings?
> 
> http://www.wicket-library.com/wicket-examples/captcha/?0
> 
> Thanks
> Anna


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



Re: wire legacy ajax (jquery) widget to Wicket page

2012-10-09 Thread Simon B
Hi Martin, 

Thanks for your post, in the end I found this post on thewicketevangelist //
Jeff Schwartz who doesn't post so much any more (I think he has switched
from wicket to node js), which is a shame as his blog is really instructive: 

http://thewicketevangelist.blogspot.com.es/2011/12/reusable-jquery-ui-autocomplete-wicket.html

  

Anyway what I did was add the widget as a AbstractAjaxBehavior and implement
the renderHead(Component, IHeaderResonse) and onRequest() methods. 

For anyone interested the implementations where along the lines of: 
   @Override   public void renderHead(Component _component, IHeaderResponse
_response) {  super.renderHead(_component, response); 
renderHeaderJs(_response, JS_BOOTSTRAP);  ... more rendering of other js
files ...  Map variables = new HashMap();  variables.put("jsCurrenciesArray", getJsCurrenciesArray()); 
... more interpolated variables ...  variables.put("callbackUrl",
getCallbackUrl().toString());  TextTemplate packageTextTemplate = new
PackageTextTemplate(MyJqueryWidgetBehavior.class, JS_INIT); 
packageTextTemplate.interpolate(variables); 
_response.renderOnDomReadyJavaScript(packageTextTemplate.asString());   }  
private void renderHeaderJs(IHeaderResponse _response, String
_inPackageJsFile) {  if (!_response.wasRendered(_inPackageJsFile)) {
_response.renderJavaScriptReference(new
PackageResourceReference(JqueryRealtyAdvertSideFilter.class,  
_inPackageJsFile)); _response.markRendered(_inPackageJsFile);  }  
}   @Override   public void onRequest() {  RequestCycle requestCycle =
RequestCycle.get();  Request request = requestCycle.getRequest(); 
IRequestParameters irp = request.getRequestParameters();  // construct
the filter to be run against the mw from the parameters in the ajax
request...  Filter filter = getFilterFromParameters(irp);  // run
the filter using the injected manager (  // check out
getBehaviorInstantiationListeners().add(wicketGuiceInjector); in the
Application class  realtyAdvertManager.runFilter(filter);  // create
a model from the results of the filter  ListModel realtyAdvertModel =
new ListModel(filter.getBeans());  // use the model to create a results
panel  FilterResults newResults = new FilterResults("results",
realtyAdvertModel); // replace the model in the component heirarchy 
Component oldResults = getComponent().get("results"); 
oldResults.replaceWith(newResults); // write it out to the request so
that it blats over the original results panel 
requestCycle.scheduleRequestHandlerAfterCurrent(new
ComponentRenderingRequestHandler(newResults));   }

Anyway thanks to Jeff Schwartz for his original blog post.  And thank you
Martin for taking the time to post another solution.
Cheers
SimonSimon



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wire-legacy-ajax-jquery-widget-to-Wicket-page-tp4652684p4652797.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: Page expiration error on AJAX call

2012-10-09 Thread Ondrej Zizka
That's the problem, that the changes were quite unrelated - I started
changing the structure of components, and found out this regression
after quite some work.
However I think I will end up going `git reset HEAD^` until I find...




On Mon, 2012-10-08 at 22:49 -0400, Paul Bors wrote:

> Start by looking for a JS "onClick" event/behavior through your recent 
> changes :)
> 
> Or add some code for us to view...
> 
> ~ Thank you,
>   Paul Bors
> 
> -Original Message-
> From: Ondrej Zizka [mailto:ozi...@redhat.com] 
> Sent: Monday, October 08, 2012 9:37 PM
> To: wicket-users
> Subject: Page expiration error on AJAX call
> 
> Hi,
> 
> I have an AjaxEditableLabel wrapped in a component.
> After some changes (I'm still finding which), it's behavior gone totally
> astray:
> 
> On click, it gave me Page Expired every time.
> That was happening with 
>   this.getPageSettings().setRecreateMountedPagesAfterExpiry(false);
> When this is true, it redirects me to an invalid URL - from
> http://localhost:8080/essc-portal/release/EAP/5.0.0.GA?10   to
> http://localhost:8080/essc-portal/release//?12
> 
> The AEL's code is:
> 
> 
> I have tried everything that came to my mind.
> 
> Any ideas what could be wrong?
> 
> Thanks,
> Ondra
> 
> 
>   
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 




Re: Listview containing links not working, when created through AJAX update

2012-10-09 Thread Martin Grigorov
Hi,

On Tue, Oct 9, 2012 at 4:26 PM, Anders Sørensen  wrote:
> I have an application which worked in Wicket 1.5.x, but something seems to
> be broken, after updating to 6.1.1.
>
>
>
> I have a table listing machines on the left side. When an item is clicked, I
> update a table on the right using AJAX.
>
> This updated table contains a lot of AjaxLinks, but none of the them works.
>
>
>
> Clicking them triggers nothing. Nothing happens in my Firebug console.
>
>
>
> Looking at the ajax-response in Firebug, I see no header-contribution
> element in the response.
>
> I would expect, to see lines like this, in the header-contribution of the
> ajax-response, but nothing:
>
>
>
> Wicket.Ajax.ajax({"u":"./?3-4.IBehaviorListener.0-tabs-panel-list-computerli
> st.table-computerlist.table_body-computerlist.table.row-0-computerlist.table
> .row.link","e":"click","c":"idcd1"});;
>

Those should be in  tags in the Ajax response, not in
 which is used to load more .js/.css resources.

>
>
> Is this a bug, or have I missed something while upgrading from 1.5. til
> 6.1.1?

If you can reproduce it in a quickstart then please attach it to a
ticket in Jira.

>
>
>
> Best regards
>
>
>
> Ais
>



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

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



Re: Page expiration error on AJAX call

2012-10-09 Thread Ondrej Zizka
I was thinking about that, but saw no errors in the log. Maybe hidden?
What would be the logging group?

Thanks,
Ondra




On Tue, 2012-10-09 at 07:41 +0300, Martin Grigorov wrote:

> Hi,
> 
> Check your logs for errors related to the serialization of the page.
> If the page is not properly serialized then next attempts to find it
> will fail with PageExpiredException.
> 
> On Tue, Oct 9, 2012 at 4:37 AM, Ondrej Zizka  wrote:
> > Hi,
> >
> > I have an AjaxEditableLabel wrapped in a component.
> > After some changes (I'm still finding which), it's behavior gone totally
> > astray:
> >
> > On click, it gave me Page Expired every time.
> > That was happening with
> >   this.getPageSettings().setRecreateMountedPagesAfterExpiry(false);
> > When this is true, it redirects me to an invalid URL - from
> > http://localhost:8080/essc-portal/release/EAP/5.0.0.GA?10   to
> > http://localhost:8080/essc-portal/release//?12
> >
> > The AEL's code is:
> > 
> >
> > I have tried everything that came to my mind.
> >
> > Any ideas what could be wrong?
> >
> > Thanks,
> > Ondra
> >
> >
> >
> 
> 
> 




Listview containing links not working, when created through AJAX update

2012-10-09 Thread Anders Sørensen
I have an application which worked in Wicket 1.5.x, but something seems to
be broken, after updating to 6.1.1.

 

I have a table listing machines on the left side. When an item is clicked, I
update a table on the right using AJAX.

This updated table contains a lot of AjaxLinks, but none of the them works.

 

Clicking them triggers nothing. Nothing happens in my Firebug console.

 

Looking at the ajax-response in Firebug, I see no header-contribution
element in the response.

I would expect, to see lines like this, in the header-contribution of the
ajax-response, but nothing:

 

Wicket.Ajax.ajax({"u":"./?3-4.IBehaviorListener.0-tabs-panel-list-computerli
st.table-computerlist.table_body-computerlist.table.row-0-computerlist.table
.row.link","e":"click","c":"idcd1"});;

 

Is this a bug, or have I missed something while upgrading from 1.5. til
6.1.1?

 

Best regards

 

Ais



Re: Wicket with JPA and container managed transactions

2012-10-09 Thread Dieter Tremel
Am 08.10.2012 17:37, schrieb Martin Grigorov:
> The JNDI lookup just done for you in normal JavaEE setup as well.
> So I think your code is OK.

Thank you Martin for your useful answers.

I posted a little more generic solution of an AbstractEjbModel in my
blog in
http://hotchpotch-blog.de/2012/10/09/wrapping-eines-ejb-in-ein-loadabledetachablemodel/
(only in german language).

If I have some more time I will have a look at javaee-inject. That
solution of packing EJB into CDI bean I could not make run, perhaps my
code hasn't been smart enough in this tests.

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



Re: wicket client-server app

2012-10-09 Thread Alexei Fedotov
Martin, thank you!



On Tue, Oct 9, 2012 at 2:11 PM, Martin Grigorov  wrote:
> Hi Alexei,
>
> On Tue, Oct 9, 2012 at 12:55 PM, Alexei Fedotov
>  wrote:
>> Hello Sir,
>>
>> Imagine our Apache Openmeetings (Incubating) application runs using
>> Apache Wicket framework. Then we want to customize a client side of
>> the application by completely replacing it with a different
>> application (it is written in flash). Are there any canonical way to
>> do so?
>>
>> * How many different protocols wicket application uses (rpc calls,
>> AJAX requests, anything else)?
>
> HTTP.
> You can make requests to:
> - pages (non-Ajax)
> - components in pages (Ajax and non-Ajax)
> - behaviors (Ajax and non-Ajax)
> - resources (see org.apache.wicket.request.resource.IResource, Ajax
> and non-Ajax)
>
>> * How can I get client-server API from wicket application? Is there
>> any way to generate a list of remote server calls (via some javadoc
>> parameters)?
>
> See the different #urlFor() methods in RequestCycle and Component classes APIs
> These methods can be used to get the URLs to request pages, component,
> behaviors and resources
>
>> * Is there any wicket source subset which can be used as client SDK to
>> send server requests using wicket protocols, or just to study how
>> client-server communication is done?
>
> wicket-ajax-jquery.js (Wicket 6.+) and wicket-ajax.js (Wicket 1.5)
> provide Ajax APIs
> See the methods in Wicket.Ajax.** namespace.
>
>> * Could you please help with any useful reading pointers?
>
> I'm not sure there is specific documentation for this.
> All you need is #urlFor() to get the callback urls.
>
>> * Imagine wicket filter embedded some database object into HTML (e.g.
>> a list of users). How can I get that contents (the user list) from
>> client side? Would wicket server part operate correctly if that
>> web.xml filter is disabled?
>
> In what format is this object (the user list) ?
> Since it is something that your application adds then it is your
> responsibility to make your app to work with or without it.
>
>>
>> The reason why I ask is the following. Open source users don't like
>> applications which think for themselves. They come with intention to
>> add their code and modifications, sometimes the code is already in
>> place.
>>
>>
>> --
>> With best regards / с наилучшими пожеланиями,
>> Alexei Fedotov / Алексей Федотов,
>> http://dataved.ru/
>> +7 916 562 8095
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> 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: wicket client-server app

2012-10-09 Thread Martin Grigorov
Hi Alexei,

On Tue, Oct 9, 2012 at 12:55 PM, Alexei Fedotov
 wrote:
> Hello Sir,
>
> Imagine our Apache Openmeetings (Incubating) application runs using
> Apache Wicket framework. Then we want to customize a client side of
> the application by completely replacing it with a different
> application (it is written in flash). Are there any canonical way to
> do so?
>
> * How many different protocols wicket application uses (rpc calls,
> AJAX requests, anything else)?

HTTP.
You can make requests to:
- pages (non-Ajax)
- components in pages (Ajax and non-Ajax)
- behaviors (Ajax and non-Ajax)
- resources (see org.apache.wicket.request.resource.IResource, Ajax
and non-Ajax)

> * How can I get client-server API from wicket application? Is there
> any way to generate a list of remote server calls (via some javadoc
> parameters)?

See the different #urlFor() methods in RequestCycle and Component classes APIs
These methods can be used to get the URLs to request pages, component,
behaviors and resources

> * Is there any wicket source subset which can be used as client SDK to
> send server requests using wicket protocols, or just to study how
> client-server communication is done?

wicket-ajax-jquery.js (Wicket 6.+) and wicket-ajax.js (Wicket 1.5)
provide Ajax APIs
See the methods in Wicket.Ajax.** namespace.

> * Could you please help with any useful reading pointers?

I'm not sure there is specific documentation for this.
All you need is #urlFor() to get the callback urls.

> * Imagine wicket filter embedded some database object into HTML (e.g.
> a list of users). How can I get that contents (the user list) from
> client side? Would wicket server part operate correctly if that
> web.xml filter is disabled?

In what format is this object (the user list) ?
Since it is something that your application adds then it is your
responsibility to make your app to work with or without it.

>
> The reason why I ask is the following. Open source users don't like
> applications which think for themselves. They come with intention to
> add their code and modifications, sometimes the code is already in
> place.
>
>
> --
> With best regards / с наилучшими пожеланиями,
> Alexei Fedotov / Алексей Федотов,
> http://dataved.ru/
> +7 916 562 8095
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



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

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



Re: SharedResourceReference question

2012-10-09 Thread Martin Grigorov
Hi,

Wicket doesn't provide such functionality at the moment. I've just
created a ticket for it:
https://issues.apache.org/jira/browse/WICKET-4809

Until then you can roll your own logic in your
ResourceReference#getResource() method.

On Mon, Oct 8, 2012 at 9:03 PM, mlabs  wrote:
> I have a bunch of shared resources that serve up various formats of data
> (JSON/PDF etc) ...
> What's the best way to authenticate with these things? I don't want to just
> leave them wide open...
>
> TIA
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/SharedResourceReference-question-tp4652769.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
>



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

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



Re: IResourceStream from ByteArrayResource ?

2012-10-09 Thread Ernesto Reinaldo Barreiro
I have seem this trick failing for IE depending on the browser settings.
Can you produce a quickstart?

On Tue, Oct 9, 2012 at 9:16 AM, mlabs  wrote:

> tried it with firefox and chrome so far... fails in both  (on mac)
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayResource-tp4652776p4652783.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
>
>


-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com


Re: IResourceStream from ByteArrayResource ?

2012-10-09 Thread mlabs
ok so everything seems to be working now except for the file save-as dialog
not popping up ...
it's not opening in-place anymore, but the save-as dialog either.. 
I set the content disposition as suggested... 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/IResourceStream-from-ByteArrayResource-tp4652776p4652781.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