[Wicket-user] SortableDataProvider, size() iterator(int first, int count), Correct execution order?

2006-11-23 Thread Manu
Hi, there,

I have the following composition:

WebPage ...

... DataView  CustomProvider extends SortableDataProvider

... PagingNavigator  DataView

The ERROR? I found is this:

When clicking on any of the navigation buttons (PagingNavigator), my
CustomProvider implementation is managed by Wicket FW calling its
implemented (abstract in SortableDataProvider) in the following order:

1 size()
2 iterator(int first, int count)

That causes wrong results, because it calls first the size() to check
the results obtained when I havent called the iterator(...) yet, and
inside my implementation of iterator(int first, int count) I obviously
do the call to the API that accesses to my persistent layer obtaining
the results according to the specified (first, count) pair...

So, what happens in practice... that when navigating the size() method
retrieves the before obtained iterator.size(), and not the new one
that will be obtained immediatly after it, when calling to
iterator(...).

So, if the order was this:

1 iterator(...)
2 size()

The problem would be solved...

Please, would you mind explaining my how to resolve this issue?

Thank you!

M

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Why does setResponse sometimes does notResponse?

2007-02-15 Thread Manu
Hallo,

I have this web-flow sequences (two branches to the same leaf):

[web-flow 1] WebPage1  WebPage2 [+Applet]  WebPage3
[web-flow 2] WebPage1B [+Applet]  WebPage2 [+Applet]  WebPage3

The Applet is the same in all cases: is an Applet that digitally signs
(windows keystore for certs) and automatically launches a javascript
event onSignOK(),  which does
document.formNavigateToPageX.submit().

When trying web-flow 1 things work perfect: first navigate to Page1,
then click-on-link and navigate to Page2, which internally checks
digital signature, and in case OK it automatically navigates to Page3,
by means of setResponse(Page3). That works fine.

But the other web-flow 2 does not: navigate to Page1B, internally
checks digital signature, and in case OK it navigates to Page2 by
means of setResponse(Page2). That works fine... but when then arrives
Page2, it internally checks another digital signature, and in case OK
it should navigate to Page3.. but not. Internally it also does a
setResponse(Page3)... but after the constructor endes, nothing
happens... it executes and renders, and the flow dies at Page2.

Any idea what can be wrong here?

Dankeschen!

Manu

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Why does setResponse sometimes does notResponse?

2007-02-19 Thread manu
 you shouldnt be calling setresponsepage inside constructors
 try RestartResponseException

Yes, RestartResponseException forced it to response fine.

Anyway, it's a shame setResponse sometimes fails in constructors, I
already have other web-flows working fine with it. That's because I
have some flow-decision-logic concentrated in constructors
(logic-convergence reasons)
 instead of previous page's end-points (links, buttons, etc). May
should I extract that constructors logic-convergence to be processed
appart in a Switch class that may accept a WebPage parameter to then
internally call its setResponse, so avoid logic in constructors and
then call this Switch class at the end-points. I guess that maybe
this will not be applicable in all cases, but could try.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Why does setResponse sometimes does notResponse?

2007-02-19 Thread manu
   available, and I cannot think of a good end-user reason why this
   couldn't be called. The getMarkupId method can in fact be called in
  if it is possible to make every method work at constructor, of course
  this is not necessary.
 It's a good idea to shield people from errors that aren't immediately
 clear until runtime.

Instead of that, wouldnt it be easier to make setResponse work
forcibly in construction time similar as RestartResponseException
does when explicity called? cancelling current page creation ( its
component-tree) and force flow to the new page before responding...

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] onGoingBack2Page(+innerForm) = innerForm.fields = empty!?

2007-04-24 Thread manu

Dear Sirs,

The scenario is the following:

- Page1  Form1 (innerClass)  input1(String)... inputN(String)
- Page2  Link/Button (whatever for going back to Page1 - has a reference
object of Page1)
...
- PageN  Link/Button (idem)

It happens that, when flowing-back from Page2, or... PageN, to Page1, then
Page1 displays but with all innerClass-Form1 fields empty!

The state of other things in Page1 keep there, but all the state of fields
in Form1 has desappeared.

What's wrong here, any idea?

Regards.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] onGoingBack2Page(+innerForm) = innerForm.fields = empty!?

2007-04-25 Thread manu

Actually the flow page1ToPage2 it's done by form submission, i.e., all form
is correctly processed. The matter was when going back from Page2...N to
Page1. It was happening that the inerForm page1.Form1 was not keeping state
(fields were null).

After reviewing the code, I noticed that I was keeping a reference of Page1
in Page2...N, but Page1 is not a direct WebPage, but a custom extension of
it. Then, what I did was just keeping the reference in Page2...N as a pure
WebPage (implicit upcast), and then worked fine. So, it seems that the
framework didn't like me to use the custom extension to keep the reference
of Page1; just the WebPage.

Danke ;)


On 4/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:


you cannot navigate from page1-page2 via a link because that will not
submit the form, and so you will lose all your values.

try submitlink and make sure there are no form errors - ie all models have
been updated with proper values - and then navigate to page2.

-igor


 On 4/24/07, manu [EMAIL PROTECTED] wrote:

  Dear Sirs,

 The scenario is the following:

 - Page1  Form1 (innerClass)  input1(String)... inputN(String)
 - Page2  Link/Button (whatever for going back to Page1 - has a
 reference object of Page1)
 ...
 - PageN  Link/Button (idem)

 It happens that, when flowing-back from Page2, or... PageN, to Page1,
 then Page1 displays but with all innerClass-Form1 fields empty!

 The state of other things in Page1 keep there, but all the state of
 fields in Form1 has desappeared.

 What's wrong here, any idea?

 Regards.




 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Applet not loaded in 1.2.6, but in 1.2.5, and viceversa, depending on codebase [jetty-server]

2007-05-03 Thread manu
Dear people,

I have found the following strange behavior in wicket-1.2.6:

Since long time ago I've been using wicket-1.2.5, and testing a
webPage where there's an applet with the following codebase:

param name=codebase value=lib /

Yesterday, I decided to update to wicket-1.2.6, and then, while
testing this webPage again, I found ClassNotFoundException during
applet's loading.

So, after a little time doing try-and-error, I noticed that changing
the codebase to the following, then it worked fine:

param name=codebase value=../lib /

I am using the lightweight jetty-server with the configuration
inherited from wicket-examples. Nothing has changed during this
development time, then, only the classpath in my Eclipse project, were
I just changed to wicket-1.2.6.

Any idea why is this happening?

Thank you ;)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] BookmarkablePageLink converts String parameters to String[]? (Wicket 1.2.6)

2007-05-08 Thread manu
Dear Sirs,

I updated to Wicket 1.2.6 and I have found the following behavior when
using BookmarkablePageLink (which was not happening before in Wicket
1.2.5). The code example is:

private class Link1 extends BookmarkablePageLink {
private static final long serialVersionUID = 1L;
public Link1(String linkId, String labelId, String labelValue,
PageParameters params) {
super(linkId, Page1.class, params); 
this.add(new Label(labelId, labelValue));
}
}

When clicking on this link the error on Page1 (target page that
recovers params) is:

Caused by: java.lang.ClassCastException

After debugging it, I found that the page parameters (Strings added to
params) were converted to String[1], id est, all arrays, when
creating the BookmarkablePageLink. So it seems that there inside
happens this String2String[] transformation.

To jump over this issue, for the moment, I had to switch to standard
Link class, avoiding the use of BookmarkablePageLink.

What's the solution to this?

Thanks ;)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] webPages variableFlow, backButton, theSmartAndCorrectWay?

2007-05-09 Thread manu
Hi, Sirs,

I have the following webPages variableFlow:

Flow1: Page1  Page2  Page3  Page4  Page5  Page6
Flow2: Page1  Page3  Page4  Page6

As expressed in this flows, sometimes, depending on internal
conditions, Page1 flows directly to Page3, jumping over Page2, and so
it happens with Page4 to Page6, avoiding Page5.

Then I have to return back using a button on each page, let's call it,
back-button ;)

As I need to keep state on all pages, when going back from PageN, I
have to retrieve PageN-1, from inside a List (custom object) that I
use to save flow history.

But I guess there might be a much better and smart way to do this in
Wicket. I haven't seen good examples of it, other than saving in PageN
a reference to PageN-1, and then flowing using this internal
references.

So, is there any better way to threat with page history (back-button)
and conserving state?

Thanks ;)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user