I have links that allow to change the locale, like so:
add(new Link(toEnglishLink)
{
public void onClick()
{
getSession().setLocale( Locale.ENGLISH );
}
});
In principle,
Hi Maurice,
Okey, I successed authentication by using Component#getPath Action#getName
in isActionAuthorized method.
Thanks a lot!!
--
View this message in context:
http://www.nabble.com/IAuthorizationStrategy-and-TabbedPanel-t1277505.html#a3411746
Sent from the Wicket - User forum at
Why can't wicket discover the type using reflection?___Andre MatheusOn 3/14/06, Igor Vaynberg [EMAIL PROTECTED]
wrote:also look at FormComponent.setType(Class). wicket can perform type conversion from the request parameter string to the type of your model object. if the conversion fails it
I guess we could do that somehow. But then we need to specify that somehow in youre IModel interface.so instead of getObject(Component) we also should have getType(Component)That will effect a lot of things.
johanOn 3/15/06, Andre Matheus [EMAIL PROTECTED] wrote:
Why can't wicket discover the type
I agree it will effect lots of things, but in the other side every component would have its value automatically validated to the datatype... it would be nice... :-)___Andre Matheus
On 3/15/06, Johan Compagner [EMAIL PROTECTED] wrote:
I guess we could do that somehow. But then we need to specify
On Wed, 2006-03-15 at 10:34 +0100, Johan Compagner wrote:
redirect again to a bookmarkable/mounted page:
add(new Link(toEnglishLink)
{
public void onClick()
{
getSession().setLocale( Locale.ENGLISH );
Hi,Which type should I define in POJO Model to hold the value of the array of TextField/DropDownChoice when populated by ListView? Should I define it as String[] or ArrayList or something else? I have attached the following example to explain my situation: public class DetailForm extends Form {
I did say this for a reason:setResponsePage(MyPage.class)so don't dosetResponsePage(new MyPage())because if you make an instance we have to really redirect to that instances.And als we can do a bookmarkable redirect.
So yes there is a difference.johanOn 3/15/06, David Leangen [EMAIL PROTECTED]
Sorry... Below I didn't say new MyPage(), I said getPage().
It didn't work with getPage(), which in theory should return the same glass.
Does this still make any difference?
Thanks for your patience,
Dave
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
It also adds more magic to the wicket core. I'm not sure if I like more magic. I'm a developer, not a magician.I think the current way is good: specifying your type explicitly, also is a reminder that you need to add a validation message to the resource bundle.
MartijnOn 3/15/06, Andre Matheus
no again. then you set an instance. And getPage() is the same as doing nothing because that is thepage where we return to by default.So if you set the response page to a page instances we can't redirect to a mount because a mount is
a bookmarkable pageWhen targeting a instance the url must be
Thanks. We made a utility function in the our session. Works great.
On 3/14/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
There is no build in function for that. If you want to shorten that,
just provide your own request cycle that passes this function through,
or make it a utility function
Hi I've
created a control which essentially is a radio button and a listbox, where each
click on the radio button populates the listbox with values.
I've done or rarther are trying to do this by using the wicket radiochoice and
a wicket ListMultipleChoice. And are overiding the
Please someone should tell me why i can deploy the Ajax examples in Wicket-examples and it runs fine in tomcatand when i repeat the same approach in my own application, the browser gives me error?
I have been fighting with these _javascript_ problem for some time but no much progress
please
if you first touch a DropDownChoice class before you use a RadioChoiceis then everything fixed?in 1.2 this is completely fixed because we register all interfaces upfront instead of when we touch a component class.
johanOn 3/15/06, Nino Wael [EMAIL PROTECTED] wrote:
Hi I'vecreated a control which
The DataTable in Wicket Extensions 1.1
handles paging and sorting, but you must build a custom IDataProvider that accumulates
the sorting instructions from the DataTable and provides sorted subsets of the
data when requested by the DataTable (which handles the actual paging display).
I'd love to see this (along w/ an example or two on usage) ;)On 3/15/06, Frank Silbermann [EMAIL PROTECTED]
wrote:
The DataTable in Wicket Extensions 1.1
handles paging and sorting, but you must build a custom IDataProvider that accumulates
the sorting instructions from the
I'm trying to wrap my head around how I would create a page where I could either edit an existing record or create a new one.Currently, I've got a form where I can add a record to the database - that part is working great. I'd like to refactor it now to also edit an existing record, if there is
Thanks a lot. I actually finally ditched Windows last week (in favor
of OSX). But I'll test it with IE when I have a change. Would you mind
reporting an issue in the SF tracker please?
Cheers,
Eelco
On 3/14/06, David Leangen [EMAIL PROTECTED] wrote:
Just thought I'd mention that something
We actually considered this last year, and decided against it. Besides
the argument that it is more expensive - which probably isn't as valid
today due to changes in how we handle those model updates - an
explicit type gives you more flexibility over which converter should
be used.
I'm wondering
you cannot add a new component via an ajax call because wicket will not know where to put its markup. via ajax you can only replace components that have been previously renderered.so in your case if you wanted to replace the Label you would do something like this
final Label label;add(label=new
I cant speak for Frank's implementation, but when the IDataProvider is implemented correctly you only retrieve the window of data that will be rendered for this request and hold none of it in session. so the performance of the datatable component itself should be great.
-IgorOn 3/15/06, Mats Norén
sounds like you are on the right place. you dont have to use the default constructor. the default/PageParameters constructor is only needed if this page is going to be accessed through a bookmarkable url. outside of that you are welcome to use any constructor you want.
-IgorOn 3/15/06, Vincent
you add components to the listview's listitem not the listview itself. since each listitem has a unique id you dont have a problem, ie :listview.0.mylinklistview.1.mylinketc-Igor
On 3/15/06, Vincent Jenks [EMAIL PROTECTED] wrote:
So, let's say I've got a ListView and in it I need to nest other
I see, I'll try it again. So, that being said, when can I be sure I'm not using a bookmarkable page? I noticed that on some requests the bookmarkable querystring is used and on others...the path is used.
I apologize if I'm asking annoying n00b questions, I'm trying to cram Wicket into my head and
when you do setResponsePage(Class) a bookmarkable url is created and the page instance will be created through the default or the (PageParameters) constructor. when you do setResponsePage(new MyPage()) you create the instance yourself with any constructor you want and a non-bookmarkable url will
Implementing the getObject method to return the proper type you mean?
Yeah, that wouldn't be the way to go. It would only be feasible with
special models then, which would suck too. I guess I change my mind;
it's not worth the little extra convenience it might get you
sometimes.
Eelco
On
yeah, implementing the Class getObjectType(). it is nasty if the model can hold different types, and it is only useful for a small subset of models.if you really really really want the automatic typing why not do getModelObject().getClass() - prob wont work very well if you return a null, but you
type erasure sucks, dont think generics can help us there. and even if there wasnt type erasure what can you do for IModel? extends SomeClass :)-IgorOn 3/15/06,
Eelco Hillenius [EMAIL PROTECTED] wrote:
For Wicket 2.0 we might be helped with generics. Or we might not, asunfortunately, there is no
but i guess if there wasnt typeerasure we wouldnt have the wildmasks...-IgorOn 3/15/06, Igor Vaynberg
[EMAIL PROTECTED] wrote:type erasure sucks, dont think generics can help us there. and even if there wasnt type erasure what can you do for IModel? extends SomeClass :)
-IgorOn 3/15/06,
Eelco
Ahh that makes perfect sense, can't believe I overlooked that! Anyhow, thank you!On 3/15/06, Igor Vaynberg
[EMAIL PROTECTED] wrote:you add components to the listview's listitem not the listview itself. since each listitem has a unique id you dont have a problem, ie :
Hi Michael,
One thing that I personallythink is important
to understanding ListView is knowing that each item in the ListView is one
concrete model object instance. If you think about it, then you will see
you shouldn't need many(if any) collections in your form backing model
classes. So
So, in a nutshell, my code could be refactored to eliminate the need for Label objects in each row and in their place, use the model objects?On 3/15/06, Jonathan Cone
[EMAIL PROTECTED] wrote:
Hi Michael,
One thing that I personallythink is important
to understanding ListView is knowing
Ok its pretty basic but I havent been able to figure out why i am not able to get CompoundPropertyModel work for me.Class BasePage{ Account getAccount( ){ }}Class MyPage extends BasePage{
MyPage(){ Form form = new Form(); form.setModel(new CompoundPropertyModel(this)); form.add(new
I'm in the process of writing a servlet filter to secure an area of my site
that is nothing more than static web pages. This is my first servlet filter
though, and what I need it to do is use the authentication information in my
Wicket session. My problem is that stepping out of the Wicket
this line is wrong:form.setModel(new CompoundPropertyModel(this));in this case this refers to the form, you want it to refer to the pagechange to form.setModel(new CompoundPropertyModel(BasePage.this
));-IgorOn 3/15/06, karthik Guru [EMAIL PROTECTED] wrote:
Ok its pretty basic but I havent been
i get your point right igor but my headache is is even more of the fact that i always get this
Error : Object Expected
from browser _javascript_ console even when i reused the example source letter for letter. This is error is common not just with AJAX but also with most other wicket extensions
you mean WicketSessionFilter?do you really need to extend it? what it does is set the wicket.Session threadlocal to the wicket session so that it is available outside of wicket world. so if you setup your security filter to run after the wicketsessionfilter, in your security filter you can get to
what browser/version do you use?-IgorOn 3/15/06, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
i get your point right igor but my headache is is even more of the fact that i always get this
Error : Object Expected
from browser _javascript_ console even when i reused the example source letter for
you cannot call the page standalaone from the browser. wicket doesnt work that way. the /only/ pages you can call yourself are the bookmarkable pages that have a stable url.the ?path... urls are internal and the same url can point to different pages dependent on what the session state is. you
I don't call them directly *with* the querystring...I called this up in a browser:
http://localhost:8080/MyApp/edit_product...which jumped to:
http://localhost:8080/MyApp/edit_product?path=1and threw the exception.You mean to say that I could *never* safely call a url of an Application I've mapped
Ahh OK OK, the light came on...I added this for a default ctor and it works just how I want: public EditProduct() { this(null); }On 3/15/06,
Vincent Jenks [EMAIL PROTECTED] wrote:
I don't call them directly *with* the querystring...I called this up in a browser:
ahh, so EditProduct is your home page! thats the crucial missing piece of information :)your homepage /is/ a bookmarkable page because all you give application is a class (setHomePage(Class)) so when wicket needs to instantiate it it will either use PageParameters or the default constructor.
Vincent,
I'm not sure I understand your question. The Label objects are used to
render some value field of your model object. In my opinion, its easiest to
understand the ListView as a black box that takes a list of domain objects,
wires up the proper rendering components for the elements you
the question was about large datasets, in which case it is not a good idea to keep that stuff in session. but i am glad to see IDataProvider is flexible enough for you to adopt to your usecase.-Igor
On 3/15/06, Frank Silbermann [EMAIL PROTECTED] wrote:
The DataTable in
Wicket
I thought I had read that wicket has some formatting capabilities? Am I mistaken? Or, am I left to use Java's formatting capabilities?Thanks!
I set up the dir structure similar to the one on your blog (root:
wicket.examples.preview) but I'm having some problems. The text which
is meant to be replaced is not. And dont get any error message or the
like. What shall I do?
Juergen
On 3/15/06, Ryan Sonnek [EMAIL PROTECTED] wrote:
Do you
Juergen, are you using the javascript from my blog or the one I
attached to the last email? If you copied the javascript from the
blog, I'm guessing there's some issue with html escaping. Try the
files I included in my email.
This info could go up on the wiki, but it will really mirror what's
ok, works now. Missed to download behaviour.js
Gili:: please see
http://jroller.com/page/wireframe?entry=preview_multiple_levels_of_components
Juergen
On 3/15/06, Gili [EMAIL PROTECTED] wrote:
Any chance you cam write up a short Wiki entry on how to use it?
Gili
Ryan Sonnek
formatting?-IgorOn 3/15/06, Vincent Jenks [EMAIL PROTECTED] wrote:
I thought I had read that wicket has some formatting capabilities? Am I mistaken? Or, am I left to use Java's formatting capabilities?Thanks!
I just committed your example to wicket-example
Juergen
---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer
Woo Hoo! Thanks Juergen!
On 3/15/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:
I just committed your example to wicket-example
Juergen
---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends
formatting displayed valuesdollars, number of decimal points, dates, etc.On 3/15/06, Igor Vaynberg [EMAIL PROTECTED]
wrote:formatting?
-IgorOn 3/15/06, Vincent Jenks
[EMAIL PROTECTED] wrote:
I thought I had read that wicket has some formatting capabilities? Am I mistaken? Or, am I left to
After some reading and experimenting with wicket, I am just trying to
collect the steps that would be necessary to migrate an web application
(that used XSLT transformations) to wicket. There are several questions
that I would like to ask.
I surely do not understand Wicket enough, these are
Matthias,I'm also in the early stages of learning wicket, but I thought I'd throw my 2c.If the 200+ pages are static, why can't you just keep them that way? Wicket doesn't preclude you from having static pages/images/resources. You can use Wicket only for the dynamic part of the website and leave
i would create a page that has the layout, add a label to that page with a model that streams the appropriate static page. that way you only have one wicket page that can display all the static ones.-Igor
On 3/15/06, Guillermo Castro [EMAIL PROTECTED] wrote:
Matthias,I'm also in the early stages
thats plain java. You could use a converter for that.johanOn 3/15/06, Vincent Jenks [EMAIL PROTECTED]
wrote:formatting displayed valuesdollars, number of decimal points, dates, etc.
On 3/15/06, Igor Vaynberg
[EMAIL PROTECTED]
wrote:formatting?
-IgorOn 3/15/06, Vincent Jenks
[EMAIL
if we want to support this then we don't want a IModel.getObjectType() ofcoursebut a IModel.getObjectType(Component)A model doesn't return one thing for a text field!think about compound models.. So you can't type the IModel itself because that doesn't help
if the model can return multiply
can you follow in the debugger where Label.onComponentTagBody() and then the call getModelObjectAsString()is going to and what model is taken from the parent?johanOn 3/15/06,
karthik Guru [EMAIL PROTECTED] wrote:
Ok its pretty basic but I havent been able to figure out why i am not able to get
Ah!
A stupid typo on my part. Rather than getPageClass(), I kept writing
getPage().
That works as I expected because that's what I (erroneously) thought I
was doing all along.
Thanks again!
On Wed, 2006-03-15 at 12:23 +0100, Johan Compagner wrote:
no again. then you set an instance. And
mmhh It did struck me for a while to understand the underlying concept of Wicket's model and the relationship with various components. One thing I notice, It seems that Struts deal with form backing model more transparent than Wicket does in terms of accessing the model object (or may be I'm just
This approach used to work for me under 1.1, but no longer in 1.2.
I have a BookmarkablePageLink that I want to disable when its target is
a subclass of a given page.
I used to do something like this:
protected void onRender( final MarkupStream markupStream )
{
setEnabled( !
Struts might be more transparent in that it delivers you a flat model.
There's just that request and that one form comming in, and the form
is populated by matching incomming request parameters with formbean
properties. Furthermore, that formbean IS your model (and your only
one), instead of a
Just override isEnabled. That's why it's not final.
Eelco
On 3/15/06, David Leangen [EMAIL PROTECTED] wrote:
This approach used to work for me under 1.1, but no longer in 1.2.
I have a BookmarkablePageLink that I want to disable when its target is
a subclass of a given page.
I used to do
Igor Vaynberg schrieb:
i would create a page that has the layout, add a label to that page with
a model that streams the appropriate static page. that way you only have
one wicket page that can display all the static ones.
But this layout page should be able to modify the static source
I apologize! The fields on the template were of type 'text'. They were never labels/span.
I changed to wicket.TextField in the Panel and its working fine now. I sdn't be working late i guess :)But normally i have seen wicket complain - about such mismatch. Oh may be its because Label does not have
Just override isEnabled. That's why it's not final.
Well, of course it would have to be that simple...
You guys are going to have to stop designing Wicket so well if you want
to attract more users. ;-P
---
This SF.Net email is sponsored
wicket is very flexible, you just have to get used to it. composition is especially easy due to wicket's component oriented nature.-IgorOn 3/15/06,
Matthias Albert [EMAIL PROTECTED] wrote:
Igor Vaynberg schrieb: i would create a page that has the layout, add a label to that page with a model that
no the layout page has all that common stuff. And it injects the static part into itself from the static pages.johanOn 3/16/06, Matthias Albert
[EMAIL PROTECTED] wrote:Igor Vaynberg schrieb:
i would create a page that has the layout, add a label to that page with a model that streams the
Hi Johan
It worked to touch DropDownChoice class, thanks.
-regards Nino
-Oprindelig meddelelse-
Fra: [EMAIL PROTECTED] på vegne af Johan Compagner
Sendt: on 15-03-2006 14:47
Til: wicket-user@lists.sourceforge.net
Cc:
Emne: Re: [Wicket-user] wicket:1.1.1 error unknown interface
Hi,
Using a adaptation of TabbedPanel ( wicket 1.2 ) with wicket 1.1 , I had
some problems with sub-panels update.
First I select a subpanel in a page that contains TabbedPanel and
multiple subpanels without using PanelCachingTab.
When I go back with the browser on a previous tab on same page and
71 matches
Mail list logo