Re: [Wicket-user] using feedback not based on labels

2006-05-10 Thread Ittay Dror
Igor Vaynberg wrote: so you want to use it outside the model? outside of an IModel context, yes. but then feedbackpanel.anyMessage(int level) is just Page.getFeedbackMessages().hasAnyMessage(new ErrorLevelFeedbackMessage(level)) no? no, because the model joins the page messages and

Re: [Wicket-user] using feedback not based on labels

2006-05-10 Thread Igor Vaynberg
maybe you can submit a patchhere is what i would suggestextract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the session and page messages yourself and still use the same utility methods in FeedbackMessages on the joined

Re: [Wicket-user] using feedback not based on labels

2006-05-10 Thread Ittay Dror
yep although i think an abstract base class suffices will try to do it shortly. Igor Vaynberg wrote: maybe you can submit a patch here is what i would suggest extract IFeedbackMessages interface from FeedbackMessages and create a CompoundFeedbackMessages impl, that way you can join the

Re: [Wicket-user] using feedback not based on labels

2006-05-10 Thread Ittay Dror
ok, i have it. how do i send it? i created an AbstractFeedbackMessages, which has 2 abstract methods: isReadonly() and getMessages(). the rest use them i'm thinking of maybe change it to ReadonlyFeedbackMessages and FeedbackMessages which will extend it, and CompoundFeedbackMessages will

Re: [Wicket-user] using feedback not based on labels

2006-05-10 Thread Igor Vaynberg
hrm, so now if you want to join the two what do you do in getMessages() of the compound impl?create a new arraylist and merge messages from the other two? do you do the merged array generation on every call or keep it in a transient field? -IgorOn 5/9/06, Ittay Dror [EMAIL PROTECTED] wrote: ok, i

Re: [Wicket-user] using feedback not based on labels

2006-05-10 Thread Ittay Dror
Igor Vaynberg wrote: hrm, so now if you want to join the two what do you do in getMessages() of the compound impl? create a new arraylist and merge messages from the other two? do you do the merged array generation on every call or keep it in a transient field? i copy the code from

Re: [Wicket-user] using feedback not based on labels

2006-05-10 Thread Igor Vaynberg
nice thing about having an interface is that you dont have to do that, you can aggregate on demand and for things like Iterator simply return a compound iterator. but this is more work.i guess your way works too. create a patch and attach it to our sf.net tracker and one of the core devels will

RE: [Wicket-user] ListChoice changes appearance from dropdown to listbox

2006-05-10 Thread Nino Wael
Hi Johan Yeah it must be something like that. But there are multiple rows for this case. I do also have a properties files where the default text are in, im not sure if that has any impact. Somehow it must have slipped my mind that there where the dropdownchoice I guess Ill just use

[Wicket-user] (conceptual) bug in getModelObject()?

2006-05-10 Thread Ittay Dror
public final Object getModelObject() { final IModel model = getModel(); if (model != null) { // If this component has the root model for a compound model if (getFlag(FLAG_HAS_ROOT_MODEL))

Re: [Wicket-user] (conceptual) bug in getModelObject()?

2006-05-10 Thread Matej Knopp
Ittay Dror wrote: public final Object getModelObject() { final IModel model = getModel(); if (model != null) { // If this component has the root model for a compound model if (getFlag(FLAG_HAS_ROOT_MODEL)) { // we

[Wicket-user] Component.FLAG_XXX are private

2006-05-10 Thread Ittay Dror
i want to overcome the issue which i've just posted about, and to set the FLAG_HAS_ROOT_MODEL to false, but the value is private. can it be made protected? thanx, ittay -- === Ittay Dror Chief architect, openQRM TL, RD, Qlusters Inc. [EMAIL PROTECTED]

Re: [Wicket-user] (conceptual) bug in getModelObject()?

2006-05-10 Thread Ittay Dror
same in setModelObject Ittay Dror wrote: public final Object getModelObject() { final IModel model = getModel(); if (model != null) { // If this component has the root model for a compound model if (getFlag(FLAG_HAS_ROOT_MODEL)) {

Re: [Wicket-user] Component.FLAG_XXX are private

2006-05-10 Thread Matej Knopp
But why would you do that? this flag is set automatically when you set a compound model to a component. -Matej Ittay Dror wrote: i want to overcome the issue which i've just posted about, and to set the FLAG_HAS_ROOT_MODEL to false, but the value is private. can it be made protected?

Re: [Wicket-user] (conceptual) bug in getModelObject()?

2006-05-10 Thread Ittay Dror
then i think this should be more explicit. e.g., add to ICompoundModel a getRootObject(), and i think that if that returns null, then return getObject(this) Matej Knopp wrote: Ittay Dror wrote: public final Object getModelObject() { final IModel model = getModel(); if

Re: [Wicket-user] (conceptual) bug in getModelObject()?

2006-05-10 Thread Johan Compagner
It is not simulation holding outer models.It is the model for every child that doesn't have a model so yes it inherits its.But that is just the name. And i can't really discuss that what the real meaning is of comound and if it is the 'good' word for that or not. So i don't know what you mean with

Re: [Wicket-user] Component.FLAG_XXX are private

2006-05-10 Thread Johan Compagner
it is an internal thing of component.Why are you wanting to change/override that?johanOn 5/10/06, Ittay Dror [EMAIL PROTECTED] wrote:i want to overcome the issue which i've just posted about, and to set the FLAG_HAS_ROOT_MODEL to false, but the value is private. can it be made protected?

Re: [Wicket-user] can feedback panel be generalized?

2006-05-10 Thread Bruno Borges
I've just coded my custom version of FeedbackPanel and it works fine. I have a subclass of FeedbackPanel and a HTML file that is kind of copy of the FeedbackPanel.html from Wicket's Core.Then I added new labels and CSS and done. Now I have a feedbackPanel that shows over on top of all the webpage

[Wicket-user] composite component

2006-05-10 Thread Ittay Dror
after troubling many people here, and thankful for their help, here is the CompositeComponent component. you just overwrite two methods, and voila! hope it is useful for someone else. it is part of the product i'm working on, so it's MPL licensed. public abstract class CompositeComponent

[Wicket-user] getting id attribute from preview

2006-05-10 Thread Ittay Dror
hi, i am trying to write something similar to the date picker - i have an input field and a javascript needs to write to it. therefore, when generating the javascript, i want to give it the field's id. so, creating this MyDatePicker component, i pass to it the other component in the ctor.

Re: [Wicket-user] Using Link on an internal anchor

2006-05-10 Thread Juergen Donnerstag
I think getUrl() is not final and can be overwriten. I've done something similar recently for autolinks. regards Juergen On 5/10/06, Jerry Smith [EMAIL PROTECTED] wrote: Hi all! How would I go about making a Link that in addition goes to whatever page, but then scrolls to some named

Re: [Wicket-user] composite component

2006-05-10 Thread Johan Compagner
Yes and that is essentially only one formcomponent (youre composite) that has intenally its own markup/componentsAnd it gets the input directly from themFor example see the CheckGroup and the Check classes. Check classes aren't also FormComponents. johan And are the children you put in that

Re: [Wicket-user] conversion

2006-05-10 Thread Johan Compagner
we try to do it:if (object instanceof String) {// and that String is not emptyfinal String string = (String)object;if (!Strings.isEmpty(string)) { // and there is a non-null property type for the component final Class propertyType = propertyType(component); if

[Wicket-user] What's the purpose of PackageResource.bind in IInitializer ?

2006-05-10 Thread smallufo
HiCan somebody explain the purpose of PackageResource.bind() in IInitializer ?I tried to remove PackageResource.bind(application , Foo.class , bar.gif) in IInitializerand ... keeps the following code intact in Page/Panel add(new Image(myImage , new PackageResourceReference(Foo.class,

Re: [Wicket-user] What's the purpose of PackageResource.bind in IInitializer ?

2006-05-10 Thread Igor Vaynberg
imagine this situation w/out the use of initializeryou have a cluster where you do not use sticky sessionsuser comes to node A and requests a page. this page binds a bunch of resources that image components on this page need. browser starts to render one of these image components and makes a

Re: [Wicket-user] What's the purpose of PackageResource.bind in IInitializer ?

2006-05-10 Thread Johan Compagner
also no cluster or what ever. Simple one tomcat installationThe only thing is you need to do some maintenance. So you shutdown tomcat or the webapp contextupdate it and restart it again. The shutdown did save the session to disk.. Then after restart all sessions comes in memory again. And the

Re: [Wicket-user] Visibility of clearInput method

2006-05-10 Thread Johan Compagner
you just want only to clear the input on that specific FormComponent?So you don't want to call Form.clearInput() ?Calling FormComponent.valid() does the same thing by the way. It clears the rawInput(and calls onValid()) But i guess this is not that logical to do (know)clearInput can be public

Re: [Wicket-user] Using Link on an internal anchor

2006-05-10 Thread Johan Compagner
you could make a nice component for that?AnchorLink?it is requested before so maybe it is a simple class for the core.johanOn 5/10/06, Jerry Smith [EMAIL PROTECTED] wrote: Hi all! How would I go about making a Link that in addition goes to whatever page, but then scrolls to some

Re: [Wicket-user] conversion

2006-05-10 Thread Eelco Hillenius
Yeah, I'm not totally crazy about that either. But the fact that we only try to convert when there is a converter set comes from: * some components, like CheckBox use their own kind of conversion, and thus override the convertValue method * some users strongly objected against Wicket always

Re: [Wicket-user] What's the purpose of PackageResource.bind in IInitializer ?

2006-05-10 Thread Eelco Hillenius
It's something we probably will try to get rid of for Wicket 2.0; instead of the pessimistic, register first approach we have now, we can choose an optimistic approach which will allow disallow in a similar fashion as file filters work. Eelco On 5/10/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

Re: [Wicket-user] conversion

2006-05-10 Thread Johan Compagner
I guess you mean only try to convert when there is a type set ?Checkbox is abit of a bad example, A DropDown or anohter Choice is a better oneConverter is Type conversion String to Date or Integer or what ever. But convertValue (used in the Choice classes) is not type conversionBut it is more a

Re: [Wicket-user] conversion

2006-05-10 Thread Ittay Dror
yes, after i saw the exception, and looked at the code to find the exact reason, i added the type Johan Compagner wrote: we try to do it: if (object instanceof String) { // and that String is not empty final String string = (String)object;

[Wicket-user] wicket legacy integration (high level suggestion)

2006-05-10 Thread Ittay Dror
i think it will help wicket's cause if it has some way of integrating into existing applications, especially existing pages. what can be done is to have a way for the page's markup (the html), to be a url which is then retrieved to get the html page. if this url points to struts/jsp/servlet,