Since TextArea can contain any SELECT statement, Column names, count can
change
every time. So I need a dynamic table that is compatible to view any SELECT
Statement result.
Since you appear to have no need for performing updates or inserts, try
ditching the DataTable in favour of using
I have one comma. I followed the same example in the book, which is
add(Label,IModel). But something's wrong.
Strange example if so: Try instead
add(new Label(id, model));
The Model is for the Label.
- Tor Iver
-
To
@Martin: after calling D1.replaceWith(D2), D1=D2 is done as well.
Are you sure you call D2.setOutputMarkupId(true)? Otherwise the Wicket Ajax
handler will not find the correct DOM element to replace.
- Tor Iver
-
To
Also:
* How to avoid excessive use of Labels and AttributeModifiers (with
ResourceModels) just for l10n, by using wicket:message in the template instead
* compressing code by use of ids matching property names combined with
CompoundPropertyModel and/or PropertyListView
- Tor Iver
public W IWrapModelW wrapOnInheritance(Component component,ClassW
type)
The ClassW parameter is only needed if you intend to do new W(); or the
like in the method (the Class is then something the compiler can grab hold of
for calling the constructor). For just passing the type parameter to
If I am using some form validator, I notice that getDefaultModelObject
does not have the value from the getInput. I am assume this
intentional. Is there a way to force wicket to update the modelObject?
Yes, form component models are not updated until they pass validation, that is
very
Is there a way to force a modelobject update on each individual field
and then do my form validation.
It seems you want to use getConvertedInput(). Going via the model to get the
converted value is just a detour when you are in a validator. If you push data
to the model and then decide it is
When I do this :
new ModelQuestionnaire(q)
it creates an IModel for Questionnaire, doesn't it?
I think he means to make a more dynamic model, e.g.
public class QuestionnaireModel extends LoadableDetachabeModelQuestionnaire {
private String theKey;
public
How can I do this in a elegant way?
Are you sure your Campo class implements equals() properly? Also remember it is
better to pass the IModelListCampo (that you will be using later to pick up
the values) to the CheckGroup, e.g. in your case a PropertyModel based on where
you read out the
setVisible(false) , actually renders component but disables it via style sheet
Isn't that the case only when you use setOutputPlaceholderTag(true)? For other
cases, nothing is output AFAIK.
- Tor Iver
-
To unsubscribe,
Is there a hook point to serialization of components? We would like to
throw a WicketRuntimeException if we detect that we are about to attempt to
serialize out an attached (in our case Hibernate) entity rather than using a
LoadableDetachableModel and only serializing the id.
I usually solve
So what is the best way (official? permanent?) to link to a previous
response?
Link to a posting on Nabble or one of the other mailinglist-aggregators out
there perhaps? :)
- Tor Iver
-
To unsubscribe, e-mail:
URL resource =
getClass().getClassLoader().getResource(DOCOferta.jrxml);
An aside: This is the equivalent to getClass().getResource(/DOCOferta.jrxml);
i.e. a resource on the classpath root.
Check your projects to see if the file is in the correct location to be
included at runtime.
Q / Problem) Since Application.getHomePage() returns Class? extends Page
and in my case Multiple pages are mounted to point to the same WebPage. How
to I specify the Home Page.
getHomePage() returns what Page to use for a request when the URL does not
refer to a mounted Page or other
Once the user has clicked a link to another page (Or switched a tab if it is
a tabed page), is there a way to terminate the request to prevent a load on
the server for a page that will not be displayed?
Normally: no, because these are separate requests. The first request will
cancel only when
Environment: Wicket 1.5.1
I have the same happen in 1.4.19. It's as if the Check's input state is reset
(to the CheckGroup model state? I.e. it perhaps checks the model and cannot
find the Check's equivalent value there?).
- Tor Iver
It seems to me that Wicket should detach its models again after events have
triggered, in addition to after rendering has completed. That would reset
the state of all models to what the developer expects it to be before
rendering begins.
That's nearly always - then you are just as well
It's a known fact for me aswell now :)
Note that even though properties files need to be in the default encoding,
you can use non-iso-latin characters by way of the \u syntax, though a bit
more cumbersome than raw Unicode characters.
- Tor Iver
Is there a convenient way to shut down a wicket application so that it saves
its complete state to e.g. the filesystem and the next wicket app that boots
up initially reads the state from those files? anyone else handling server
upgrades differently and in a better way?
Well, if you put the
*this.getRequestCycle().getOriginalResponse().setContentType(jpg);*
Looks wrong, typically the content type is a MIME content type, which has two
components, e.g. image/jpeg
- Tor Iver
-
To unsubscribe, e-mail:
Ah, it's been a while since a JSF/JSP zealot bothered to annoy Wicket users.
Now go away and cook up a tag library or five.
- Tor Iver
use the TextField component and add OnChangeAjaxBehavior to it, then
from inside onEvent() you can repaint the list.
And remember to put a WebMarkupContainer around the repeater since repeaters
cannot be addressed by Ajax (due to reused markup and resulting synthesized
ids).
- Tor Iver
continueToOriginalDestination() does alway sthrow the replacehandler
exception. this is how that method works...
In 1.5 perhaps, in 1.4 it returns false if it was not a redirect; that might be
the cause of confusion.
- Tor Iver
1.how do i use reset in java code.I have just declare a reset button in my
html which is working as expected but wana know is there any other
alternative of doin it.
A HTML input of type=reset will by default do nothing server-side but just
reset input fields of a form to the initial values.
When I enter first time on page I change my local to de-De.
A better place to do that is in Application.newSession(). Or you can tell your
browser to prefer de_DE and let Wicket pick up using Accept-Language: header
(IIRC it does that for you).
- Tor Iver
The label components are not refreshed after changing locale. Do you know
why.
My guess is that the labels are not using a Locale-aware model like
ResourceModel, but instead have been set using construction-time getString() or
the like.
Another problem is that when I change the locale I
Plus another problem I see is if I have to use separate
templates for each script tag I may end up with lots of small files so my
logic will be peppered around.
How is that much different from using a bunch of Wicket classes with templates
instead of placing all webapp logic in a
// Indirection for PropertyModel object
public class MySessionModel extends AbstractReadOnlyModelMySession {
public MySession getObject() {
return (MySession) Session.get();
}
}
- Tor Iver
-Original Message-
From: Rahman USTA
Look into restlet.org
Reference implementation for JAX-RS (ignore that it sorts under the Glassfish
section, it runs fine in other containers too):
http://jersey.java.net/
An older REST implementation that started before the JAX-RS spec but has been
modified to conform (AFAIK):
I tried using DropDownChoice.setNullValid(true); but that only works for the
dropdown choices in which no model has been set.
Then you probably also need setRequired(false); Otherwise it will not show the
null choice for non-null models.
- Tor Iver
No, the only workaround is probably to do the FileUpload logic during
validation, and flag the upload field as completed somehow (or just show that
files have been uploaded)
- Tor Iver
-Original Message-
From: Daniel Meier [mailto:meier_dan...@sunrise.ch]
Sent: 6. februar 2012 14:34
I don't suppose anyone has ported Wicket to .NET?
What, and lose all the non-designable ASP.Net or Razor goodness? :)
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail:
When i put my mouse over one of those buttons (close or change month), i
don't have the pointer cursor and when i click it does nothing.
Welcome to the wonderful world of IE compatibility mode.
You probably need to add a DOCTYPE declaration to the top of your HTML:
!DOCTYPE html PUBLIC
I would like to know what is the best way to serve slightly different content
depending on the User Agent string coming from the browser.
You can pick it up in Application.newRequestCycle() or
WebApplication.newWebRequest(), and use it to pick a value for
Session.setStyle() and then use
I dont understand why WebSession is not a derivative of the native session
and while from Wicket, one can access the raw session or request, the other
way round doesn't seem part of officially charted waters.
Because a Wicket session can be stored elsewhere if you want. Storing it in the
What about the part that would solve my problem --
wicket:wicket.wicketapp:session , do I just use that or there is some higher
order function available :)
WebApplication. getSessionAttributePrefix(WebRequest, String) seems to set it,
but afterwards it's harder to get at: But once set you
Could someone explain the meaning of the string argument to
Session.setStyle()?
It's used in parsing resource names, and often in code as well, e.g. hiding
detail views for mobile browsing.
If you have a Locale of no_NO and a style of mobile Wicket will look for
e.g.
Thus the browser still shows the old version in the URL. But all future Ajax
requests are targetting a different page version than visible in the browser
URL :(.
Can't you fix that with a
getPage().dirty();
in the Ajax request handler?
- Tor Iver
Thanks a lot. One last stupid question: is this supposed to work for Wicket
1.4?
Doubful, the event system was added in 1.5
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands,
Is there any way to skip a page using back button. i.e.
Forward sequence: HomePage-Page1-Page2
If the link from Page1 to Page2 is a Javascript link that does a
location.replace('url for Page2') the browser should not remember Page1 in the
history, if memory serves. Removing from the
See org.apache.wicket.ajax.IAjaxIndicatorAware. With this you can provide
your own indicator which will be shown/hidden before/after the Ajax request
I think the poster wants to use visibility: hidden instead of display: none
for when it is not shown (the taking up space requirement).
- Tor
Now , i am changing browser language from IE. I am able to get
message from properties file for label and another things. But i am still
unable to show above alert message in different languages. Can you solve
this problem. Please reply soon.
Typically, you would do this by
My question is why is target always null in the onClick handler?
Typically that happens for AjaxFallback* components when the click is not an
Ajax request, e.g. the user has disabled Javascript. In those cases target is
null and the whole page will be rendered in the (normal) response.
- Tor
My problem is how to redirect the ajax target from one Panel to the other.
If Panel A needs to invoke anything in Panel B then Panel A should have a
reference to Panel B (or to a mediator object that knows about it), and send
the AjaxRequestTarget (which applies to the entire Page's component
I´m really new to web programming, so how should that solve my Problem? If I
got it right the mediator does only know the colleagues which would be Panels
in my case. But the methods of these colleague Panels are hidden because of
inheritance (myPanel is child of Panel). Could you describe
Hi I get a serialize exception in a panel of mine its correct that one of the
contained fields cannot be serialized, however this field are injected and
should not be touched by the checker, the field are marked with the @inject
annotation. I'm using guice for injection.. Any thing obvious
/;jsessionid=6730E8A6F6FED95C9AC24E7A37F3A35A?0
This is added by the web container in case the browser does not support
cookies. It is added on the first response regardless, and also on subsequent
ones if the browser does not accept cookies, or you turn it off (e.g. using
cookies=false in
is possible to create mouseover and show tooltip (wicket panel with html)
when I move cursor over html element/text/link. Is there any way how to do it
in wicket?
I have used the wicketstuff Mootip extensions to do that earlier, worked fine.
Only drawback was that the MootipBehaviour
Last cause: Could not find child with id: cart:prezzo in the wicket:enclosure
You are running into an issue with repeaters: Their subelements have the index
as part of the path, so the relative element id for the first row element would
be cart:0:prezzo - and with no rows there is no element
How do I change the cursor to Wait as long as the spinner is also spinning?
Use CSS (cursor: progress;) for the element used as the busy indicator, either
on id or on class with or without the :hover pseudoclass.
- Tor Iver
I want to know how to input date into database using form. I am using
Timestamp in mysql.
The Wicket-related psrt of that question is that you use a TextFieldDate with
a model, and you then get the model object value in onSubmit() and use normal
SQL to insert or update.
- Tor Iver
Additionally you can put log4j.properties in its own jar and put it in
$tomcat/lib.
That's the default for Tomcat 6+, but formally the location for shared
classpath entries is defined in the property common.loader in
$tomcat/conf/catalina.properties. So e.g. to re-establish the older
I am using netbeans for maven project(with added wicket framework) and i want
to access something.properties from a java class.
Are the properties files not being put into the output jar/war files?
Remember that Maven by default sets up a structure where *.java goes into
src/main/java and
Coiuld u please give me a sample of the code for the pom.xml for accessing
.properties file
Not sure what you mean, you don't usually put code in pom.xml. Look into
configuring the resource elements to include the correct file types and
folders.
- Tor Iver
In 1.4 version of wicket there was no impact, but in 1.5.5 the id is not
overwritten by wicket.
Presumably they changed it so that it would work as a markup equivalent to
setMarkupId(), though I haven't checked the changes list to verify that. :)
- Tor Iver
I want to embedded CheckBox in the DropDownChoice Options so that I can
select multi options in the page.
Browsers render multiple-select controls differently, adding checkboxes to a
DropDownChoice (single-select) makes no sense since the browser will be sending
one value anyway.
Look into
Hi, can anyone tell me any other alternative of enclosure if the above
problem cant be bugged out??
You can do explicitly what the enclosure does more conveniently, by using a
WebMarkupContainer where isvisible() delegates to the child's isVisible().
- Tor Iver
is there an API in wicket to know if a Validator instance has been
added to a form?
Two solutions:
1) Call iterator() and test with instanceof IValidator on each element
until you get true. This will only find validators on the form and not
on the subcomponents...
2) Make a Component.IVisitor
We have (wisely :) ) chosen Wicket as web framework, but also chosen Sun
Portal as the portal engine (not just Pluto but the commercial product).
This causes a problem since Sun apparently haven't implemented the two
interfaces required by Apache's bridge, so Wicket 1.3.x portlets do not
work
For b) I hope to get started on that ASAP.
Excellent news! :)
(Since this is so significant for us I might have a go at adding the
support later this week if I can wrap my head around the source and API
docs... testing for the presence of the Portlet 2.0 API as you mentioned
is probably the
Take on account that in Ajax, the browser does not make a normal HTTP
request, but an
XmlHttpRequest from Javascript, and then expects an XML fragment as a
response (a piece of DOM tree
as far as I know). I cannot imagine how could you transmit an image
via Ajax, but if it is
possible,
To dig up this old thread:
I now use Ate Douma's patch for JSR-286 support from
https://issues.apache.org/jira/browse/WICKET-1620 which has removed the
need for the portal to implement the Apache portlet bridge's two
interfaces. A small step for man etc. :)
There now is an issue - the same I had
Thijs Vonk wrote:
Ate Douma wrote:
Thanks to both of you!
Note though that you have to build a svn copy of the
portlet-container.
RC2 contains a bug I found which prevents Ajax to work correctly.
Will try that.
-
To
Got it to work after building portlet-bridges-common from the trunk
source.
- The change I made to PortletWindowUtils which seems to work (so far
*crosses fingers*):
public static String getPortletWindowId(PortletSession session)
{
final Object tmp =
When I, on the fly, change the language to something else
(de_CH), the Locale in my application is not changed.
Looking at Wicket 1.3 and 1.4 sources, the locale is picked up in the
Session constructor, so presumably you need to nuke the Wicket session
or let it expire before trying a new
201 - 265 of 265 matches
Mail list logo