I would like to override this behavior to display the div only when an
ajax call takes more than 2 seconds for example to be executed. So for
a little ajax call less than 2 seconds, I would like that nothing
appears.
If you set the div initially invisible (display: none) you can add
Med vennlig hilsen
TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: toriv...@arrive.no
http://www.arrive.no
http://servicedesk.arrive.no
-Opprinnelig melding-
Fra: Lieven Doclo [mailto:lieven.do...@jintec.be]
Sendt: 3. juni 2010 11:27
Til: users
Emne:
I've recently been wondering about the following use case: an instance
of Foo class, used as a detached value object, is edited in a
FooEditPage. For some reasons, let's say this page then needs to launch
dialogs spanning over different pages. Each of these pages could then
change some fields
In the header of my page, I'd like to add a picture-slide-show kind of
thing. That is, my header will be containing a picture, that will e.g.
fade
out every 5 seconds and a new picture would take it's place.
After googling, I didn't manage to find any wicket components that can
do
this. I
Gmail is by the way not ajax but a flash application.
There is an opensource flash app i think on sourceforge that does
pretty much the same as gmail.
Is this some other uploading than uploading attachments to mails? Because that
uses Ajax not Flash.
- Tor Iver
it is a bug, open a jira issue
Or a feature? Either it should use getObject() internally or Model.getObject()
should be declared final to prevent the programmer from thinking he can
override it - both will solve the issue.
- Tor Iver
We are trying to create parametrized portlet URLs to a maximized stand-alone
portlet, and run into an issue where the constructor to the Page is invoked
twice. But the second time, the query parameters are gone. Why does it create
the view page twice? Or is it Liferay magic going on?
(We
add(new Label(weatherMessage, new
StringResourceModel(weather.message, this, null)));
If you put a property weather.message into the page's properties file then it
will load from there (even if you provide a default in the panel's properties
file). Is that what you mean? Properties are
We are trying to create parametrized portlet URLs to a maximized
stand-alone portlet, and run into an issue where the constructor to
the Page is invoked twice. But the second time, the query parameters
are gone. Why does it create the view page twice? Or is it Liferay
magic going on?
Since
For some reason the first method worked fine but the second method
didn't.
setMarkupId() needs to be combined with setOutputMarkupId(true);
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For
Also, organisation is initialized in constructor with new
Organisation().
Does this initialization happen before or after you create the model?
java.lang.IllegalArgumentException: Parameter modelObject cannot be
null
This error message indicates it happens after.
- Tor Iver
WicketMessage: Unable to find component with id 'user' in [Page class =
com.dropchop.jop.kliping.web.pages.Login, id = 1, version = 0]. This
means
that you declared wicket:id=user in your markup, but that you either
did not
add the component to your page at all, or that the hierarchy does
option value=0Day/option
option value=1Week /option
option value=2Fortnight/option
option value=3Month/option
option value=4Year/option
If you really want to hardcode the options in the HTML like that, remember not
to use DropDownChoice which will replace the markup, but make your own
Something like run org.mypackage.Start ?
http://mojo.codehaus.org/exec-maven-plugin/
mvn -Pwhatever -DmainClass=org.mypackage.Start exec:java
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For
I'm sort of dubious about your suggestion as I don't see any direct
connection
between this DropDownChoice and TinyMCE editor from wicket-contrib-
tinymce.
I think Pedro misunderstood you and therefore posted code for changing the
Wicket style which is something else.
- Tor Iver
... but keep getting stopped in the spam filters when sending confirmation.
Any trick to make it actually get through?
Med vennlig hilsen
TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: toriv...@arrive.no
http://www.arrive.no
http://servicedesk.arrive.no
But, I am experiencing this not so much expected scenario that for
the same person, in the same browser session, click the browser's
Refresh Button, or F5, a new page instance is created. Is the latter
behavior expected?
For bookmarkable page URLs: Yes. Look into how versioned-setting and
To clarify, I want to use Localizer#getString(...) in a thraed I
create.
I have seen other posts on this issue, but haven't been able to figure
out the solution.
The Localizer.getString() looks for its messages in Wicket's property file
structure, which depends on Application, the
Apologies for the dumb question but I'm rather new to wicket and was
wondering if it is safe to use member variables within components
(i.e. compared to servlets, struts1 actions etc).
Mostly yes: The component instances are tied to the user's session via the
pagemap. But be wary of excessive
panel A / panel B / panel C
to:
panel A / panel B / panel D
One option could be to setActive(panel B) then activate(panel D factory); to
get the panel B reference just loop through the model or keep a reference to it
somewhere.
- Tor Iver
searchResults = new SearchResults(id,list); //- Not sure if this
is the
correct way to refresh a ListView...
It's not. Creating a new object like this will defeat the logic because it has
not been added to the hierarchy that the Ajax call expects.
What you want to do is to modify the
this.setModelObject(updatedModelInstance);
Are you sure you do not mean setModel() instead of setModelObject() here?
Also, look into whether you use setReuseItems(true) on the listview, then you
probably want modelChanged() somewhere too.
- Tor Iver
public TargetPage( IModel? model, final Page returnPage ) {
You should use PageReference objects instead to avoid issues with serialization.
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For
We have some Wicket portlets that work fine in the Glassfish 2.1 + Liferay
5.2.3 combination, but fail in the more modern Glassfish 3.0.1 + Liferay 6.0.4
combo. What happens is that all requests always lead to a new (view or edit)
page being constructed while in the old framework the portlet
I noticed that you ignored the warning here:
!-- Important! This filter mapping must come before Wicket's! --
by placing the Wicket filters first.
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
currently 1.5 has no support for portlets
Well the portlet-related classes from 1.4 seem to still be there in trunk...?
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail:
Thanks Igor for your response. I thought I had read that wicket 1.4.x
was JSR
286 complaint but not sure how that is possible since JSR 286 does call
out
inter-portlet communications. Did i mis-read the documentation.
One of our developers had to subclass WicketPortlet to support events,
So next step is someone with experience in portlets to try to create a
separate project with the classes
from org.apache.wicket.protocol.http.portlet and whatever else is
needed.
Probably mostly a WicketPortletFilter to be used in front of WicketFilter that
builds on the portlet-oriented
However, wicket never calls the getConverter() method and simply uses
SomePOJO.toString() to retrieve the text for the choices. What am I
doing wrong?
One possibility is that in all the nested classes in the typical Wicket source
file you have added the method to the wrong class. Try adding
In the case of automating or scripting builds, is there ever a worry
about
keeping the Eclipse and Maven builds consistent? I would imagine that
one
could develop and debug in Eclipse. But when it comes time to do an
official build (with Maven), the results could be a little different.
(Resending with some more text and less stacktrace because Apache's spam filter
did not like it the first couple of times).
Since we are using Wicket 1.4.8 portlets we have situations where the same
portlet is rendered multiple times on a page. However, under Glassfish 3 this
somehow leads to
Still wondering, how to disable concurrent logins with wicket-auth-
roles...
Can't you cache the sessions and return the cached one from
Application.newSession() if the same user logs in again? Or invalidate the old
session?
- Tor Iver
java.lang.ClassCastException:
org.apache.wicket.protocol.http.WebSession
cannot be cast to
org.apache.wicket.authentication.AuthenticatedWebSession
Do you make sure to specify your Appication when setting up WicketTester?
Otherwise it will use a default one that will not necessarily do what
Page page = new Wicket.createPageSomeHow(pageStr);
Try reflection, e.g. Class.forName(pageStr).newInstance() for using a
parameterless constructor.
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For
ListGender genders = getGenderList();
DropdownChoicePerson new DropDownChoicePerson(fieldId, new
PropertyModelPerson(currentPerson, gender), genders);
The class type parameter for the dropdown and models there should be Gender:
That the model delegates to a property in a Person object should
Usually -1 votes should be accompanied by a justification if you want
them to be considered seriously. Why are you voting -1?
Moving portlet support to a separate project (instead of core or extensions)
makes more sense, that is at least one justification.
(I guess this would in effect be
A -1 vote would be a vote against dropping support. You seem to be
making
an argument for dropping it. Plus it wasn't your -1, was it?
Ah, then I misunderstood. Was a bit early in the morning I guess.
And if you only wanted a reply from him you would have sent a private email
instead of
any ideas how i could disable (client-side) an ajax-button after
clicking
them once?
Override getAjaxCallDecorator() and return an IAjaxCallDecorator which returns
getElementById('+yourButton.getId()+').disabled = true;+script for
decorateScript(). You also need to enable it in the
Any clue to get the mouse click position will be great.
The event object has clientX and clientY properties you can use.
But Wicket AFAIK uses Yahoo User Interface (YUI) out of the box, so look into
the functions there to simplify the work.
- Tor Iver
Clicking another button I want the hidden panel to be visible and when
i set
the visibility to true and attach the markupContainer to the
ajaxRequest, it
does not repaint it and I got an error saying the component was not
found.
Yes, without a placeholder tag for invisible components there
I have been tryin to figure out what to do to remove jsessionid from
the URL
The web container will add that to the first response URL when a session is
created in case cookies are not supported. What is corny is that this is not
further maintained (in a non-cookie situation) without the
I remember reading somewhere that using AJAX to refresh a component
generated using repeater may cause some problems. Is this what I am
against here with WicketTester? (Keep in mind that the table does get
refreshed correctly in production.)
Repeaters are special in the sense that they take
We are running Glassfish 3.0.1 + Liferay 5.2.3 and have some portlets using
Wicket 1.4.9 (in deployment mode). These work fine on the platform when running
on our local Windows developer PCs, but when deployed onto a Solaris server
running the same software, forms stop working. Debugging
Don't worry, we've all had those head -- palm moments :)
PEBKAC. :)
Maybe a FindBugs plugin that checks that overridden methods always have a
non-empty implementation? Even the Eclipse built-in test for empty blocks would
help in some cases (except it allows a comment to satisfy the
is it because a user disables cookies in the browser?
Yes, in that case the rewritten URLs are needed to maintain session state.
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands,
We are running Glassfish 3.0.1 + Liferay 5.2.3 and have some portlets
using Wicket 1.4.9 (in deployment mode). These work fine on the
platform when running on our local Windows developer PCs, but when
deployed onto a Solaris server running the same software, forms stop
working.
Turns out the
I need to render options in a MultipleSelectList using more then one
field from
a POJO. Is possible to use ChoiceRender selecting more then one
property (for
example passing it more then one property expression)?
ChoiceRenderer is a convenience implementation of IChoiceRenderer, just make
How do I get Page1's specific localized message in Page2 ?
1) Make a superclass for the two pages and put the message in the superclass'
property file
2) Put the property in the Application's property file
In both cases the mechanisms in Wicket will find the message.
- Tor I.
That part of the thread is what I was replying to - that it was then
insecure because the DB ID is in the URL. This is not a standard way of
doing most links in Wicket - because of the security leak
A workaround is to use one-time keys (tokens) in a map that you set for the URL
and then
That's not how proggress is made...
No, but there are dozens of web frameworks, why try to progress Wicket into
something that works in a way there perhaps already is another framework does?
What you propose sounds close to how Tapestry already works, for instance...
- Tor Iver
The issue I am having is that once this happens, the onSubmit() method
is no longer called and wicket starts calling the onError() method.
Which is as expected: You usually do not want to process a form that fails
validation.
Since my business logic is inside the onSubmit() method, it never
Isn't this the logical place to put this code?
Yes, once all validation has passed, you will want to persist the correct data.
Once the user leaves out a certain input, onError() is called and
onSubmit() never gets called again.
Strange, it should be called on the next submit if the user
What if I try to extend org.apache.wicket.markup.html.basic.Label?
Will it work when I extended MessageLabel?
Yes, except you need to be explicit about using a ResourceModel that
MessageLabel did for you. If you pass in the key as before then you just use
new ResourceModel(key) in the call
Which container can I use to put DataView inside?
A WebMarkupContainer tied to a div surrounding it is the easiest.
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail:
Attach a web markup container to the body tag. Override
isTransparentResolver and return true. This gets you a component that you
can add to the ajax request target to repaint the entire body.
Thanks, I added a wrapping div for it (since WicketPortlet strips out the
body tag) and it
In my quest for a more portlet-oriented use of Wicket, I am trying an approach
where you switch panels (by constructing new instances and repainting a
wrapper) within one Page. However, it seems that ListViews do not get
repainted (no calls to populateItem()) in that scenario:
1) Initial
div wicket:id=listview-container
wicket:container wicket:id=list-view/
/div
Which is laid out as:
...
panel.add((listviewContainer = new
WebMarkupContainer(listview-container)).setOutputMarkupId(true));
...
This is almost what I have (in the Page), except the outermost one is
I don't know what you mean with transparent but ofcourse you cannot
repaint invisible things.
A transparent container is one that appears in the markup and in the code but
which returns true for isTransparentResolver(). It's not invisible but is not
part of the explicit hierarchy. An example
wicket:enclosure is not present if not visible (from browser
perspective). So it cannot be repainted.
I think we are talking past each other: It was just an example of something
that is a transparent container to a Wicket developer, though it is implemented
using IComponentResolver instead of
So this special component is designed to be aware of children components
only at the rendering time ( working with the markupStream ) and not at the
pre-rendering. As the ListView depends on pre-rendering logic, add an
transparent resolved component in ajax request target has no effect because
I guess it expects only a List type object. I can work around this by
converting the Set into a List and then provide it but felt somehow this is
a limitation. How can I work with generic collections?
Any thoughts much appreciated
No, because ordering requires the indexing a List has. In
I could override onConfigure in every component, and read the field that
controls the enabling/disabling, but that would create a lot of boilerplate
code for the 80-90% of FormComponents/links that should be disabled. It
would be a lot cleaner to disable the parent, and only handle the ones I
BUMP...
Anyone? we run wicket 1.4.9
Any reason you use WicketServlet instead of WicketFilter? We use multiple apps
in a war and that works fine in the filter case. In fact it seems that
WicketServlet delegates to an internal WicketFilter anyway...
- Tor Iver
I don't think it is a good idea to have multiple applications in one
war. Wicket stores static state in ThreadLocals (Application, Session,
etc.).
The ThreadLocal objects are static, yes, but the actual objects stored there
are per thread and thus not static.
All apps in the same war share
hmm that fixes it, it's because of generic limitations that we need to set
the class explicitly, correct?
Yes, type information is only available at compile time, the compiler
synthesizes generics use into explicit casting used at runtime.
- Tor Iver
12/2/10 15:54:28:415 ICT] 0023 WebAppE [Servlet Error]-[Error
while finishing the connection]: java.lang.OutOfMemoryError
Increase heap using the -Xmx parameter, or if that does not help look for
common causes for runaway page stores like having Page pointers in other Pages
Can anybody please throw some light on how two wicket applications, deployed
into the same container can interact with each other?
The easiest is to just pass the parameters as normal path- or query parameters
(strings) in the link. For more complex cases you can either try passing a JSON
Just to know Why a static variable is not serializable?
Because objects (instances) are serialized and static data belongs to the class
and not instances.
- Tor Iver
-
To unsubscribe, e-mail:
A drop down box fires an AJAX request and the text field with the date
picker has an overridden isVisible() method.
You have used setOutputMarkupPlaceholderTag(true) on the component that
visibility is toggled for yes?
- Tor Iver
Can i change TextField's (FormComponent) valid status and set a custom error
message from outside ? Like :
Normally you write a validator that calls component.error() to set the error
message, and add that validator to the FormComponent. As long as it has that
error it will count as invalid.
I tell people that I think you should let your Model and Model backing
object control the look and feel/display/content of your components.
Even visibility should be delegated to the model or model object and not
set by the component. Am I wrong here?
Yes. :)
The model should NOT care
setResponsePage(new SomePage() {
@Override protected void onPreviousButtonClicked() {
setResponsePage(OriginalPage.this);
}
});
final PageReference pageRef = this.getPageReference();
setResponsePage(new SomePage() {
@Override protected void onPreviousButtonClicked() {
I just noticed that after upgrading to rc2, my some of my texts like
håndteret kald when getting saved/posted becomes this: hÃ¥ndteret kald..
Charset issue, they get posted as UTF-8; you probably either need to test for
charset or assume UTF-8 across the board.
- Tor Iver
We have a Quartz thread which periodically sends emails with a link to
a Wicket page. Calling RequestCycle.get().urlFor(Class,
PageParameters) doesn't work because the thread is not a part of
Wicket request cycle. Is there a way to ask Wicket to generate the URL
in this case?
What you really
Does wicket support development of portlets ? I cant find much information
by googling.
Wicket 1.4 does (and it works fine at least in our context of using Liferay as
container), apparently in 1.5 they are moving that functionality out from the
main library.
- Tor Iver
typing T would select Two, but typing Th would select Three. Is
this possible in Wicket?
This is the way well-behaved modern browsers already work :)
- Tor I.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For
I have a similar issue.. can anyone please tell why the target parameter for
onClick of AjaxfallbackLink comes as null?
It will be null for non-Ajax (i.e. the fallback) requests when the user has
Javascript disabled. In those cases the entire page will be redrawn anyway so
there is no need to
- jasperreports-1.4.16.jar
- jasperreports-3.7.2.jar
The first one is from WicketStuff, but still, it is confusing to see this.
This one of my biggest peeves with Maven: It has this concept of a groupId to
namespace artifacts in the repository, but this is of no consequence when the
jar
is there a possibility to make a link invisible itself via onClick?
link.setVisible( false );
Sure: Just use this instead of link, since this in the onClick() will be
the anonymous object based on Link.
- Tor Iver
And idea how to avoid that behaviour?
resetButton.setDefaultFormProcessing(false);
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
I have this book on order; I look forward to studying it.
Order, is that what you have when you do not just buy the PDF edition and
open it in iBooks on your iPad - like I did? :)
(Just for completeness I also clicked the I want this for Kindle link at
Amazon to give a suggestion to aid those
Can somebody help me with this exception? What can be wrong am
desperate. What to look for?
Typically, the real error is further down in the text that what you included.
Common causes are:
* Having a wicket:id the the HTML with no corresponding component
* Adding a component without adding
i have to build a redirect page for urls ending with .php.
If i mount the page with *.php Path i get a 404.
Sounds like something that is better handled with a traditional ServletFilter
than anything Wicket.
- Tor Iver
-
To
Look into org.apache.wicket.markup.html.form.FormComponentPanelT
- Tor Iver
-Original Message-
From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
Sent: 11. april 2011 15:08
To: users@wicket.apache.org
Subject: Form composed of Panel components
I have a complex form that I choose
I mean, how can i do in concrete class to provide a different title
depending on language.
Your title model class could check Session.get().getLocale() to decide what
text to return from getObject().
- Tor Iver
-
To
1) Why do you use immediate-child selectors (involving ) instead of just
child selectors (without the )? The selector .custom-component-class header
will work.
2) wicket namespace tags are removed in deployment mode (or if you tell markup
settings to strip them), so wicket:child will disappear
I can use dopost and doget but how to handle Json request?
JSON is just data representation, there are some Java libraries out there to
deal with JSON formatted data (e.g. Jettison at http://jettison.codehaus.org/
or JSON.simple at http://code.google.com/p/json-simple/ ).
But if you want to
Clean the web container work area or the unpacked application folder? This
sounds like a case of the web container keeping old code around.
mvh
- Tor Iver Wilhelmsen, Arrive AS
-Original Message-
From: henry [mailto:henstri...@yahoo.com]
Sent: 4. mai 2011 13:58
To:
Sounds like a combo of a dynamic image resource component (using e.g.
JFreeChart or the like) and an AjaxSelfUpdatingTimerBehavior is needed.
mvh
- Tor Iver Wilhelmsen, Arrive AS
-Original Message-
From: lambdad...@gmail.com [mailto:lambdad...@googlemail.com]
Sent: 9. mai 2011 14:32
My guess: You have forgotten to call myLabel.setOutputMarkupId(true) or
myLabel.setOutputPlaceholderTag(true) so the Ajax framework cannot find the
element in the DOM.
mvh
- Tor Iver Wilhelmsen, Arrive AS
-Original Message-
From: wmike1...@gmail.com [mailto:wmike1...@gmail.com]
Sent:
I haven't tried it and guaranteeing the ordering would need to be accounted
for. But its a potential direction.
Another approach would be to change the Hibernate mapping from a set to a
bag since that will map to a List on the Java side.
- Tor Iver
You could add a Javascript/Ajax callback to a Page that sets e.g. a Session
flag that says that Javascript is enabled.
See
http://stackoverflow.com/questions/162911/how-do-i-call-java-code-from-javascript-code-in-wicket
for an example.
Or you could try to implement what you need Javascript
How can one perform form field validation if the form fields are inside the
panels contained in the forms?
Extend FormComponentPanel instead of Panel. That deals with the nesting.
- Tor Iver
-
To unsubscribe, e-mail:
From: Horacio Natyural [mailto:horacio.natyu...@gmail.com]
What are the implications of this error message?
Wicket will ignore any overriding (on the Page level) of the property, only the
component's own (and the Application's?) properties files will be used.
E.g. if FooComponent.properties
The first workaround we ended up using was something like:
public class SafeWicketFilter extends WicketFilter {
private boolean
initWasAlreadyCalledSoYouShouldNotDoThisYouStupidGlassfish = false;
@Override
public void init(FilterConfig filterConfig) throws
Hmm... there is just one, no more. :(
You have run into a known Glassfish bug where WicketFilter.init() is called
twice. A solution is to add a boolean guard in a WicketFilter subclass that
only calls super.init() once.
- Tor Iver
I already used AjaxButton but it still show that popup. Do we have other
options?
Do you have an onbeforeunload event handler that returns a value? That will
trigger such a message as well.
- Tor Iver
-
To unsubscribe,
*But* the link leads me to the solr response page. I know it's intended
by clicking a link to get directed to the called page, but i would like
to call the url and immediatly after that call i would like to redirect
to wicket page.
Sounds like what you really want to do is use Apache
HttpClient looks great. Do you know if i can execute the HttpMethod
without waiting for request to comeback?
Maybe an asynchronous way?
There seems to be an async fork you can try:
http://jfarcand.wordpress.com/2010/03/04/new-open-source-project-alert-a-new-asynchronous-http-client-library/
throw new
RestartResponseAtInterceptPageException(DashboardPage.class);
Will you ever be returning from that (via continueToOriginalDestination())? If
not, setResponsePage(DashboardPage.class) is better.
- Tor Iver
101 - 200 of 265 matches
Mail list logo