The only problem right now is the cast to Component[]. The
fix is easy, just change it to Object[]. The optimization
makes a lot of sense and there is reason why it can't really
be simple.
The simplest explanation is that the (synthetic) array classes both
extend Object but are not in the
My question is how to ask the cart section to updates its
state (and redraw it) from a child page?
Just add the superclass element to the AjaxRequetTarget parameter. This
means either holding a reference to it (e.g. a protected instance field)
or better, use get(path:to:cart) to get at it.
Med vennlig hilsen
TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: toriv...@arrive.no
http://servicedesk.arrive.no
* As far as I understand, all steps are constructed at the
same time. How, then, can I make the content of step B dynamic?
No it's rendered
I have a panel that is on a page and the panel needs to be
able to reference another panel on the same page.
In the code, you can either keep instance variables pointing to the two
panels in the page source (since they are on the same page they are in
the same Page) and go via those in the
(using Netbeans, wicket 1.4rc2, glassfish v3,
portlet-container from open-portal project)
I thought the portlet-container in effect was dead since the Sun Portal
is dead? They have ditched that in favor of a solution based on Liferay
5.2 called Web Space (codename WebSynergy during
WicketMessage: Exception 'java.lang.ClassCastException:
java.lang.Integer' occurred during validation
org.apache.wicket.validation.validator.RangeValidator on component
2:body:recvAnalisysForm:intField Root
cause:java.lang.ClassCastException: java.lang.Integer at
It's a *wicket* archetype that uses Maven as a build tool.
But if it *breaks* the assumptions made by all other plugins used by
Maven as a build tool, is it then not an archetype that *abuses* Maven
as a build tool? :)
What other contexts would you want to use this *wicket* archetype that
does
There is no sane reason why anyone would put the html, js,
css and properties resources in any place except *next* to
the corresponding.java file. Your .java file can not function
without the .html file. Your component will fail if the
.properties file is not available. When the js file
Brill Pappin [EMAIL PROTECTED] wrote:
I'd say that WIcket *is a product*, and as such the consumers
of that product have the final say.
Not any more than you can e.g. go to Ford Motor Co. and demand they make
this and that modification to the design of the Mustang, for instance.
Like most
- when loading the page from the browser, the URL is returned
including the page parameters;
Yes, that would be a GET-method request.
- when updating through AJAX, the URL is returned without the
page parameters.
AAJAX requests are often POST-method. In POST requests the parameters
are
Try:
Link lk = new ExternalLink(lk, http://...;) {
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put(target, _blank);
}
};
A bit overkill: You might instead want to add
Override init() and add
mountBookmarkablePage(/stats, StatisticPage.class);
- Tor Iver
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
that XMLHttpRequest.open(...) are disallowed if they target
for another domain, than the one the document is in?
Like disallowing cross-site calls?
Yes, to avoid cross-site scripting attacks; remember Javascript has
globally accessible objects so if cross-site scripting was allowed then
an
Ok.. that didn't stop the client from submitting the form of
the previous page again.
Any other solutions to preventing double submissions?
Tell people to use a less stupid browser than IE? (Which is the one with
that behavior if memory serves)? :)
Real solution: Use a hidden token that you
It is like I need another selection mechanism for resource file which
is not
the locale but something that is specific to the logic of my
application.
Look at styles, i.e. Session.setStyle(String) and the documentation there for
resource lookup. Basically the style tag goes before the
I implemented the desired solution by duplicating the complete
org.apache.wicket.authentication.AuthenticatedWebApplication class in
our
source tree,
What was wrong with implementing IAuthorizationStrategy.isActionAuthorized()
and adding getSecuritySettings().setAuthorizationStrategy(new
What was wrong with implementing
IAuthorizationStrategy.isActionAuthorized() and adding
getSecuritySettings().setAuthorizationStrategy(new
YourParticularImplementation()); in your Application.init()? The action
to test for is Component.RENDER.
Ah, perhaps the other method is more to your
It seems that our developers frequently mistakenly forget to use item.add()
and end up writing add() in ListView sublasses and the like. This sounds like
a job for FindBugs, do anyone know of any existing FindBugs plugin that deals
with common mistakes in Wicket code?
Med vennlig hilsen
TOR
target.prependJavascript(window.location.href=google.com);
Is there a better way of doing this?
Doubtful; Ajax is primarily concerned with NOT replacing the whole page. If you
always replace the page use a normal link instead which lets you set a
RedirectRequestTarget for instance.
- Tor
WicketMessage: The component(s) below failed to render. A common
problem is that you have added a component in code but forgot to
reference it in the markup (thus the component will never be rendered).
This indicates to me you are not using wicket:child / in the parent's markup
and/or not
Is there any way of making a nav bar like this:
wicket:link
a href=HomePage.htmlBrowse/a |
a href=Search.htmlSearch/a
/wicket:link
Stateful, i.e. only one instance of each page is created. So if you
were
on the home page and clicked the 'Search' link, then clicked the
Are people still making fun of your huge nokia? ;-)
... or the side-talking 1st gen nGage :P (parodied a lot here:
http://www.sidetalkin.com/photos.html )
On a more serious note, Wicket apps should run well in the iPhone's Safari
browser, but if you want to support small devices in general
I have an AutoCompleteTextField with a POJO model; I override getConverter() to
return a converter that looks up the field value in the same list that
getChoices() uses for filtering. Which works fine if you actually put something
into the field that matches.
However, if you type a non-mathing
Why there are no SVN tags anymore ?
svn ls http://svn.apache.org/repos/asf/wicket/tags/ does not have tags
for
1.4.1 and 1.4.2
Wicket's not fond of such conventions it seems :) - use
http://svn.apache.org/repos/asf/wicket/releases/ instead.
- Tor Iver
It seems joda-time used by DateLabel has an issue with Liferay's use of the
locale nb_NO (for Norwegian bokmål in Norwayas opposed to the more common
no_NO, where it seems to default to U.S. locale and UTC instead of native
(CET+DST here) - i.e. it seems to use both components to decide
I have 2 drop-downs and a search button my page. When the page is
loaded
for the first time, the first option in both the drop-downs is Choose
Option. Now if I select some value and click Search, the page is
rendered again and the Choose Option is gone forever. But I want it
back. How do I
Yep, we need something to take those obj out from there.
Maybe a collection of weak references?
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail:
or a shorter
Link? foo = new LinkVoid
... or wait for JDK 1.7 where you can do
LinkVoid foo = new Link
Which is more useful in cases like
MapString, ListFoo fie = new HashMap();
- Tor Iver
It looks like JBoss portal support is incomplete... If I send you a
minimalistic AJAX portlet which works in eXo, would you mind adapting
it for
JBoss (web.xml portlet.xml) and try and see if it works? HTH!
We use Glassfish + Webspace/Liferay, but ended up using a mapping
But in Wicket 1.4.3 the validate() method is protected so it's not
visible. By the way actually only hasError() method is public.
In your Form class you can just override it with public visibility when you
need it to be.
- Tor Iver
Consistency is one of wicket's strengths. My tiny vote for 1.4.4
-- Tony
+1
I never interpreted wicket:enclosure (as documented) as allowing the child
attribute to reference a component anywhere else than inside the enclosure.
- Tor Iver
Problem adding an applet to wicket still remains the same.. can some 1
help
1) Be aware that applets are not loaded from WEB-INF/classes, but it seems you
know this.
2) The class attribute value should not end in .class since that can make some
browsers try to load HelloWorld.class.class
jsessionid works
... but leads to lots of boilerplate where you need to rewrite all URLs
targeted at your app's code. I guess Wicket can do that for you, but still...
- Tor Iver
-
To unsubscribe, e-mail:
I guess the servlet container handles jsessionid transparently.
Yes, coming in (either cookie or in the URI) and setting the cookie; but it
does not normally add it to links in the output from your webapp, that is the
framework or developer's responsibility.
- Tor Iver
Ah looks like I may have found it:
http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-
stuff/attic/wicket-portlets/
probably put in the attic because Wicket has supported portlets natively
since 1.4-m3 or thereabouts.
- Tor Iver
I'm doing that. I'm doing what the link referenced earlier in this
thread
said to do.
Wicket Ajax cannot update anything that isn't in the DOM. You need a
placeholder element for what you want to render in the Ajax, e.g.
add(new
What I find unclear, is the way it functions. It extends a wicker
portlet, but the application is ran from WebApplication instance that
mounts EditPage, HeaderPage, and doesn't seem to have any direct link
to the WicketPortlet.
The link is via the filter mapping and page mounting. Case in
For Servlet 2.4/2.5 I have found (depending on container) that you need to add
the dispatchers involved, like so:
filter-mapping
filter-namewicket.report/filter-name
url-pattern/report/*/url-pattern
dispatcherREQUEST/dispatcher
I would like to have two access denied pages according to some
parameters.
Is this possible?
In your implementation of IUnauthorizedComponentInstantiationListener check for
the parameters (e.g. placed into the request or the like) and set a different
responsepage or redirect to a different
I am having a problem finding a resource or an example for portlets
communications with events processEvent(EventRequest request,
EventResponse response)
how do I dispatch and event from wicket page? for example if I have a
ViewPage and I need to send an event to a subscribed portlet , how do
java.lang.IllegalArgumentException: Payload has not the right class at
org.apache.jetspeed.events.EventCoordinationServiceImpl.createEvent(Eve
ntCoordinationServiceImpl.java:98)
This is the portlet container complaining about:
ReportType report = new ReportType();
hmmm... but we are talking about something very basic: the home page!
Have you set it unversioned? How about trying to make it stateless?
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional
about unversioned, i have just done a quick test on wicket-examples
helloworld, adding serialVersionUID (not informed in the examples) and
the
result is the same: pagestore file increasing to the infinite (max
size of
course :)
I meant Wicket's
setVersioned(false);
the serialVersionUID
public RequestCycle newRequestCycle(Request request, Response response)
{
ServletWebRequest servletWebRequest = (ServletWebRequest) request;
HttpServletRequest hreq =
servletWebRequest.getHttpServletRequest();
ServletContext context = hreq.getSession().getServletContext();
you've got to admit it's a short distance between bloody fist fights in
a
basement for no purpose whatsoever and using struts.
Hm, it seems the slogan Struts 2: Not As Bad As Struts 1 did not catch on.
- Tor Iver
-
To
We are running Wicket + Liferay (Webspace) in Glassfish 2, and experience no
problems; IIRC Glassfish uses the same Catalina engine as Tomcat?
For AJAX/resource requests, another supports element for mime-type
text/xml is needed.
This sounds like a Tomcat issue, our portlets use Ajax fine
I have a Form with the id=test and a Textfield=EMAIL.
Claim the first, then:
The Textfield I added with add(new RequiredTextFieldString(emailInput)).
Claim the second.
These conflict, because the id used in the actual code is emailInput.
test.EMAIL.Required=test
EMAIL.Required=test
So
Jonathan, can you elaborate? Why do you think jersey is
better? Have you any experience of integrating it with wicket?
We use Jersey for REST here, mostly because it is Sun's reference
implementation of JAX-RS (and thus will most likely be updated fastest).
As for the options:
* Restlet:
We have an issue where we are using a CMS that provides an API for
getting article components in a peculiar way: Links are sent over as a
raw HTML element followed by a link element followed by the rest of
the HTML. So a link like a href=http://foo/fie; is sent as
1. HTML: a href=
2. Link:
Is there a way to use urlFor() or the like to create links
that updates the breadcrumb model with our BreadCrumbPanel
subclass for the linked id, i.e.
IBreadCrumbModel.setActive(new ArticlePanel(...))?
*crickets*
Anyway, I finally found the likely answer in the form of an extended
I just figured out that the deal is that SWFObject doesn't
like to be set visible false on page load then visible true via Ajax.
Any thoughts on how to get around this?
Ajax in Wicket needs the page DOM to have an element with the id it is
supposed to replace with the output of a (now
2 - A constructor is for constructing - your object should
not be in an incomplete state when the constructor is
finished (such a state that methods such as isVisible can not
be called)
Tha language ensures that the object is complete when the constructor
exits, but with the exception of
I made a FeedbackPanel to apply the Portlet 2.0 CSS classes to relevant
messages. In my naïvetè I assumed I could just override
getCSSClass(FeedbackMessage), but that is called both to set a style on the
li item AND on the contained span element. Is there any reason for this,
especially since
param name=file value={{URL HERE}}
Put some wicket:id on that, then add a WebComponent for it that you add
an AttributeModifier to, which sets the value attribute.
When I try to do the obvious, replace the {{URL_HERE}} part
with span wicket:id=downloadMsf/span it complains
Does anyone know of a simple way to have more than one option
with a null value in a DropDownChoice?
Well, how would you disambiguate between them? Null usually means
unset in the context of DDC, but here you have semantic meanings to
the choices, so they should be real objects.
A better
How do I redirect to a mailto: url? This doesn't seem to work:
Mailto is a browser-managed protocol that does not use http; and the
Ajax response does not go to the browser but is analyzed by the Ajax
implementation.
Perhaps adding custom Javascript in the requestTarget to do a
window.open()
To address this, I wrote some code that gets the component tree, and
either returns a List, or a string with the components' id's and
classes. It can be found at http://gist.github.com/144041.
Is this useful to anyone? Is there a better way for me to view the
component tree at runtime/test
http://localhost:8080/web/?wicket:interface=:3:logout::ILinkListener::
I don't see the need to expose implementation details (i.e. ?wicket in
the
URL) at this point. Therefore, does it make more sense that the
LogoutPage
(the response page) itself performs the logout action? The link for
I have created panel.now i want to show that panel with diffrent width
and
height in another page(3 panels).
div wicket:id=panel1 style=height: 100px; width: 50px
Will be replaced with contents of wicket:panel element
/div
Or betters, use classes in nested elements that you specify
it will place one bye one
but i need next to next.column wise
Well, either use a Table with three columns to represent the panels or use div
with CSS float: etc. in the page template.
- Tor Iver
-
To unsubscribe, e-mail:
how to redirect to external url say www.google.com in case
runtimeexception
occurs
You need to drill down to the HttpServletResponse and call sendRedirect().
- Tor Iver
-
To unsubscribe, e-mail:
But it will be the portlet class the responsible for handling
processing. So the only way to pass information from the onClick
function to the
portlet application for rendering (for example) is using the portlet
session.
But why would you want to go via the Application? The WicketPortlet is
So in my parent html :
body
span wicket:id=myDiv/span
div wicket:id=myNewPanel/div
div wicket:id=myNewPanel2/div
/body
And add a label with id myDiv in related parent java. This part is
common to all classes.
But when I render the TestFormOne, that doesn't work
public abstract class TestForm extends WebPage {
public TestForm() {
add(new Label(myDiv, my div from test form)); = common to
every
concrete page
add(createDivWithComponent(myNewPanel)); = has to be
redefine by
each concrete page
How do you make repeating view to repeat the items horizontally? The
number
of items is not known at the time of creating the markup.
Repeaters do not care about horizontal vs. vertical; it all comes down to the
markup.
E.g. you can have a ListView which generates a sequence of table cells:
I would like to save a form's markup as a string when the form's submit
button is pressed. The part that I am having difficulty with is
understanding how to use wicket to grab a form's rendered markup. I
have a
feeling it must be pretty simple, but I'm getting lost in the wicket
WicketMessage: The component(s) below failed to render. A common
problem is that you have added a component in code but forgot to
reference it in the markup (thus the component will never be rendered).
When you do
add(new Label(label, ...
in a Page, you also need something like
span
super(new CompoundPropertyModel(this));
This seems wrong: A call to super() cannot reference this directly or
indirectly:
JLS §8.8.7 says:
It is a compile-time error for a constructor to directly or indirectly invoke
itself through a series of one or more explicit constructor invocations
The problem are in HomePage.java in the onClick... this don't reRender
my componente in the header.
Are you sure? The real problem seems that your itens label uses an implicit
model based on the constructor-time value of getAmount(), and which is never
changed.
Look into using a model
Yes, but don't do that. Frames were outlawed in 2001 and should stay
that way.
+1
Frames create a shedload of problems both for the developer and for the user
- Tor Iver
-
To unsubscribe, e-mail:
We have an app with three user types and two user levels (read or
read-write in effect). We want to use these in authorization, and thought about
an approach using annotations. However, at the point of the Wicket auth.
interface methods, only class-targeted annotations are visible, and that
After about 5 minutes of omfg not that error again, I think I found a
quick hack to avoid org.hibernate.LazyInitializationException with
WicketTester. I've checked everywhere on the lists but didn't find a
similar
solution, so apologies if someone else already posted this. There may
also
be
Then there is JavaZone in Oslo later on.
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
new SimpleAttributeModifier(text-align, right) on the Label?
text-align is not a known attribute. It is a CSS property so
SimpleAttributeModifier(style, text-align: right) could work, or there is
an attribute align that may or may not be OK depending on HTML spec.
- Tor Iver
I notice one thing that is not what I want: instead of generating
wanted HTML element ID such as signInOut or feedback, Wicket added
one number or letter to wicket ID as HTML element ID (for example:
signInOut4, feedbackb).
How can I overcome this?
Are you sure you want to? Do you use any
Any one Have idea about how to Store wicket fields(TextField) to
XML
File?
Why would you want to do that? Usually you only store the model value, storing
the field itself is only relevant for the page serializing.
- Tor Iver
How to use Markupstream? where to use ?
You use that normally only when you need to make very custom code, e.g. your
own tags. For most other situations, adding Behaviors is the preferred way of
altering components.
- Tor Iver
hello, I have another problem, with DropDown this time. If I have only
one
DropDown on my page, everything works great. But when I add another
DropDown
to the page, with diferent datasource, the first DropDown shows data
from
the second datasource. All DropDowns share the same datasource.
java.lang.NullPointerException
at com.company.project.event.SMSEvent.hashCode(SMSEvent.java:334)
This looks a lot like an exception we get in one project as well, where a bean
serialized into the DiskPageStore comes back with all properties set to null
(including the ones tested for in
Also setNullValid(true) otherwise the blank option will disappear once you have
made a choice or the model has a value.
- Tor I.
-Opprinnelig melding-
Fra: Martin Asenov [mailto:mase...@velti.com]
Sendt: 17. mars 2010 15:23
Til: users@wicket.apache.org
Emne: RE: Replace Choose one
How can I make FeedbackPanel occupy zero space when having no messages?
Override isVisible() to test if there are any messages to show, and call
setOutputMarkupPlaceholder(true);
- Tor Iver
-
To unsubscribe, e-mail:
Now I want to replace %destinationLink% with new BookmarkableLink(...);
I am using GNU Gettext translations(.po files), thats why such
solution...
Is it possible or is there any reasonable way to do this?
Look into the various urlFor() methods. In your case in particular
String url =
After using CSS for layout things for two years my summary is:
Use tables for layout, CSS for the rest
It it simple, it works, and it doesn't break in each new version of IE
The question then becomes: what do you use to lay out tabular data? :)
(IE is broken in all versions, and its CSS
I
want to display the same on for example a label, is there any component
that
displays the text as HTML , i mean i dont want to see the tags, i want
to
see some formatted text.
Use a Label, but call setEscapeModelStrings(false) on it.
--
- Tor Iver
its a browser from August 27, 2001 ... thats 9 years ago..
So who is using opera 6 ? Or Netscape 7? Or Safari 1.0 ?
Sadly, IE6 is also a central component in some Active/X-based apps used in some
companies, apps which actually manage to BREAK on newer releases of IE. So they
are held
Hi,
I'm trying to use an upload progressbar,
the problem is that it does not appear whent I use an ajaxsubmit button
but
appears when i used the form onSubmit method.
what could be the problem.
Possibly it starts out invisible, and in that case you need to call
You could do it with JQuery directly, or implement WiQuery dialog.
The latter is preferrable, because if you close a ModalWindow in the browser
with no roundtrip then the server side state will not be notified that it is
closed, and thus might reappear if the page is refreshed as a whole.
-
ModelMySuperLongNameForASimpleFooObject model = Model.newModel();
Go on a hike in the Greek islands for six months, when you come back download
Java 1.7 where you can do neato stuff like
ModelMySuperLongNameForASimpleFooObject model = new Model();
Or use an IDE which automatically fills the
The problem is not the Wicket side of things, but the browser side. Should
Wicket test for HTML 5 support, and fall back to a Javascript hack?
- Tor Iver
-Opprinnelig melding-
Fra: Josh Kamau [mailto:joshnet2...@gmail.com]
Sendt: 26. april 2010 13:29
Til: users@wicket.apache.org
After adding the dropdown to the form, i am able to save the record
properly. However, when i display a form with an existing record,
the DropDownChoice is not showing the current 'nationality' and it is
only
showing Choose One;
Sounds like Wicket gets confused regarding value/id, try
i meant where do you expect the localized message to be rendered into?
if wicket:message is attached to the table tag?
Well, since he is using the attribute version of wicket:message, I guess he
expects the output from
table wicket:message=summary:myresource
to be
table summary=localized
Let's say you encounter an error halfway through the constructor of a
page,
and you want to display error(error message) and then return without
processing rest of components? It doesn't seem like this is possible
in
wicket because it makes you fill in all components or else it barfs.
Am I
Using wicketstuff tinymce 1.4.1 attached to a TextArea, it seems I cannot get
it to stop escaping the resulting HTML:
TextAreaString textArea = new
TextAreaString(threadSubjectTextInput, new ModelString());
textArea.setEscapeModelStrings(false);
Using wicketstuff tinymce 1.4.1 attached to a TextArea, it seems I
cannot get it to stop escaping the resulting HTML:
TextAreaString textArea = new
TextAreaString(threadSubjectTextInput, new ModelString());
textArea.setEscapeModelStrings(false);
Well, I think that's quite obvious when you consider that each page is
the root of a tree (not directed, acyclic graph) of components.
Each component can have at most one parent.
But you can pass a component to a different page/component without adding it;
like in the example of having a back
https://localhost:8080/test
Typically, a container will have a HTTPS-enabled connector on a different port;
in Glassfish by default it is 8181, on Tomcat it is by default disabled but
seems to have the value 8443 in a default server.xml (443 being the assigned
port that you need root/admin
hey, what is the prefered approach?
Try using an IVisitor you pass to visitChildren() in the outermost component.
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail:
We are trying to tunnel some images from a content system, and run into a
problem trying to make URLs for them via UrLResourceStream: Stepping through
the code we see some instanceof-testing but none which deals with this
particular resource type. Is there some missing code somewhere or a
My boss said that it is not a good practice and he recomended to use
something like in Struts called Timers, do we have something like
that in
wickets¿?
Try looking into Quartz, a library for such things. The lack of a standard
scheduling framework outside of JMX is a problem in JEE in
I would like to know what's the outcome of setting setNullValid(true) -
-
is it that the choices will start with an empty string choice?
The empty choice is there for null model objects whether nullValid is true or
false, the difference is that if you call setNullValid(false), then the option
1 - 100 of 265 matches
Mail list logo