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
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
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
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
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
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
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
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
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))
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
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]
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))
{
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?
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
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
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?
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
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
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.
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
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
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
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,
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
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
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
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
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
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:
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
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;
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,
32 matches
Mail list logo