hmm i don't know about this.
Because the DataView is the one that gives the total pagecount. The
navigator just uses it.
And if the navigator sets a page that is suddenly out of range then 2
things can be done:
Math.min(wantedPageCount,maxPageCount)
or if(wantedPageCount maxPageCount)
Oh yes you are right. I did not think of that the currentPage does not get
listed anymore. Maybe change the IPageable.setCurrentPage() to
setWantedPage(). IMO this reflects more what it realy does than.
I think there should be someway the user can influence how the bounding is
done. Maybe a
Hi,
I'm currently building a form which has some components which are not
shown sometimes in dependency of model data. I'm not sure how to
build things like that because I found no way to do this in the same
way like other model values are bound to the components
(propertymodels and ognl
You can override isVisible of the component you need to have the
visibility switched, and have e.g.:
public boolean isVisible()
{
Foo foo = (Foo)getModelObject();
return foo.shouldDisplay();
}
Eelco
Ralf Ebert wrote:
Hi,
I'm currently building a form which has some components which
you may override Form.onRender() or Form.onComponenTagBody(). First do
your check and set components invisible/visible and than call the
super implementation.
Juergen
On 8/20/05, Ralf Ebert [EMAIL PROTECTED] wrote:
Hi,
I'm currently building a form which has some components which are not
Also possible.
Overriding isVisible is easier/ cleaner to program imo. The advantage of
calling setVisible instead of overriding isVisible is that by calling,
the state change will be recorded which has the effect that the
back-button will be better supported. If that's important in your
yes you're right. And you are also immediately aware which component
may become invisible, as most likely not all components are affected.
Juergen
On 8/20/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
Also possible.
Overriding isVisible is easier/ cleaner to program imo. The advantage of
Hi,
thanks for your help!
You can override isVisible of the component you need to have the
visibility switched, and have e.g.:
Hmm, this works. But in my case, I have a panel (which is used in the
form) which groups many components and some of them get shown or not.
I feel like this
I don't really see the problem with going over
Your navigator shows 20 pages. You click on page 20 and the next thing you
know the navigator is only showing 19 pages and 19th is selectedwhats
the problem?
Onclick() { navigator.setpage(20) - dataview.setpage(20) (sets to 19) }
Onrender() {
Hi,
you may override Form.onRender() or Form.onComponenTagBody(). First do
your check and set components invisible/visible and than call the
super implementation.
I had another case where the container was a form and not a panel so
I could try that, but this didn't work out because of
I disagree. If a user specifies a nonexistant index we should throw a
IndexOutOfBoundsException and let them deal with it. For some website it
makes sense to show nothing, for some it makes sense to display an error
message and for others it makes sense to find out what the last page
really
I too prefer finding the *real* last page and going there. At least,
that makes sense for my use-case.
Gili
Johan Compagner wrote:
hmm i don't know about this.
Because the DataView is the one that gives the total pagecount. The
navigator just uses it.
And if the navigator sets a page that
Then I think you need to use your own subclass of the navigator and check
for this. Maybe the navigator should make this easy by providing a template
method that could be overridden after the new page has been selected, such
as void onPageChange(int requestedPage, int actualPage);
-Igor
Your onToBeNamed() method already exists, and it's called
onBeginRequest() :)
-Matej
Ralf Ebert wrote:
Hi,
you may override Form.onRender() or Form.onComponenTagBody(). First do
your check and set components invisible/visible and than call the
super implementation.
I had another case
Your navigator shows 20 pages. You click on page 20 and the next thing
you
know the navigator is only showing 19 pages and 19th is selectedwhats
the problem?
Onclick() { navigator.setpage(20) - dataview.setpage(20) (sets to 19) }
Onrender() { navigator.getpage() { dataview.getpage()
On 7/30/05, Gert Jan Verhoog [EMAIL PROTECTED] wrote:
On Jul 30, 2005, at 04:44, Igor Vaynberg wrote:
This will create a field label that will turn red when the linked form
component has an error.
Another good use is to prepand an asterisk to the fieldlabel's
label if the
linked
Hi,
Correct me if I'm wrong but when one uses PageLink and passes in a Page
object (you have to construct it yourself) won't you end up with an
expensive cascade of Page construction? Meaning, Page1 links to Page2
links to Page3. When I construct a PageLink to Page2, its constructor
gets
I am a bit of track now. Please help me getting back. My question is who
finds the real last page? The one who calls setCurrentPage() (the
navigator) or the one who implements setCurrentPage() (the pageable
component).
To me it currently makes no sense to speak about IndexOutOfBoundExceptions
The pageable component decides what the actual page number is
Navigator.setCurrentPage(int page) {
pageable.setCurrentPage(page);
}
PaegableDataView.setCurrentPage(int page) {
if (page0) page=0;
if (page=pagecount) page=pagecount-1;
currentpage=page;
}
This
Hi,
Your onToBeNamed() method already exists, and it's called
onBeginRequest() :)
onBeginRequest() is called before event handlers get processed. When
setting visibility in this method, this can lead to wrong visibility
values when the model has been changed by event handlers...
Regards,
Right, but from a error-prevention point of view, if I provided a user
with a link to next page and he clicks on it and sees the same page a
second time, that looks like a bug to him (and to me too).
From the point of view of your use-case (the underlying data is
constantly changing) it
Yes I see now, this is exactly like autoboxing.
-Igor
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Saturday, August 20, 2005 12:33 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Re: ColumnedDataProvider
Hi,
I noticed that if I nest an Image inside a PageLink component and the
Image is valid but the PageLink is expired, then the Image will not be
visible when I view the page.
Think of this from a visual point of view now... I hit the Image
Gallery page I posted earlier, it contains
heh :) look, all I'm saying is that this is a classic exception scoping
problem. Do we handle the exception within the current method or do we
propegate it into the caller?
The only time I believe it is correct to swallow exceptions is if there
is no chance the caller can ever correctly
Using pass-by-references encourages null pointer exceptions, should we
switch to pass-by-value only?
Its there because it is very convinient and using it IN NO WAY ENCOURAGES
YOU TO CREATE THE PAGE INSTANCE!
Ie
class EditUserPage {
public EditUserPage(WebPage backPage) {
if youre list is static then you don;t have ANY problem
because all the links that are generated are the onces that youre list
can display and can always display.
So i really don't see youre problem.
The problem lays in dynamic list.
You render, with 25 items
and you have 3 links (3 pages,
Ok, I understand that use-case now. Though...
Looking at PageLink for the first time in a long while I see a Page in
the constructor and I naturelly create a Page to pass into it.
Furthermore when I brought up this issue a month ago this is exactly
what I was *told* to do (i.e.
As eelco suggested, submit a patch.
-Igor
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Saturday, August 20, 2005 1:48 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] PageLink and lazy Page construction
Hmm.. You may be right. I'm using REDIRECT_TO_RENDER strategy. thus for
me, this is working well. But I understand this doesn't work with
REDIRECT_TO_BUFFER.
-Matej
Ralf Ebert wrote:
Hi,
Your onToBeNamed() method already exists, and it's called
onBeginRequest() :)
onBeginRequest() is
Hi,
I needed a dropdown component for a specific use case and just got it
working. What I tried to built is a select list of strings which can
get new values via JavaScript. As this is no big secret, I attached
the result. Maybe this is useful for somebody. Please not that it
isn't
this is not the case.
what kind of redirect strategy shouldn't influence in what state
onBeginRequest is called
It is called when the render() of the page is called not before.
The name is a bit wrong i think, it should be onBeginRespond()...
johan
Matej Knopp wrote:
Hmm.. You may be right.
Thanks you mentioned google.
It just shows one page with wicket (strange) no page indexes there. Than I
entered Java and it shows me 1..10 and a big next. So I click on the next
and it shows me 1..11 and a big next. Ok next again shows me 1..12 and
next again 1..13 and so forth. If I press
All,
I finally got some time this week to start with the JSR-168 Portlet support and
I
committed my first set of changes for that to the 1_2 branch.
Beware: this is still very much a work in progress (not process as I
accidentally
wrote in some commit messages :-).
As you already can tell
33 matches
Mail list logo