> 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
> 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
> 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
---
> 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 elements to include the correct file types and
folders.
- Tor Iver
--
> 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 e
> 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 stru
> 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 TextField with
a model, and you then get the model object value in onSubmit() and use normal
SQL to insert or update.
- Tor Iver
--
> 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
> 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
> 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 cons
> /;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
> 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 obvi
> 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 descri
> 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
> 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
> 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
> 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).
> 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 P
> 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, e
> 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
--
> 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. MyPage_mobile_no_
> 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
> 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
> 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 th
> 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:
http://www.w3.org/TR/xh
> 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
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 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
--
> 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):
http://www
// Indirection for PropertyModel object
public class MySessionModel extends AbstractReadOnlyModel {
public MySession getObject() {
return (MySession) Session.get();
}
}
- Tor Iver
-Original Message-
From: Rahman USTA [mailto:rahman.usta...@gmail.com]
Sent
> Plus another problem I see is if I have to use separate
> templates for each
> 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
> 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
---
> 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 valu
> 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
---
> 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
---
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
> "*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: users-un
> 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 th
> 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
---
> 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
> 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
--
> 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 wh
> Q / Problem) Since Application.getHomePage() returns Class
> 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 RequestTarget. A def
>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 run
> 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: users-unsubsc
> 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 so
> 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, e-mail
> 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 IModel> (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 values now.
> When I do this :
> new Model(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 LoadableDetachabeModel {
private String theKey;
public QuestionnaireModel(String key) { theKey
> 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
> 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 int
> public IWrapModel wrapOnInheritance(Component component,Class
> type)
The Class 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 oth
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
---
> @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 unsubsc
> 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 unsubs
> 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 us
> throw new
> RestartResponseAtInterceptPageException(DashboardPage.class);
Will you ever be returning from that (via continueToOriginalDestination())? If
not, setResponsePage(DashboardPage.class) is better.
- Tor Iver
--
> 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
> *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 co
> 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, e-m
> 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
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 ServletExceptio
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 h
> 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: users-u
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 for
> 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 to a
since that will map to a List on the Java side.
- Tor Iver
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:
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
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: users@wicket.apache.
> 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 u
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 disapp
> 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 unsubsc
Look into org.apache.wicket.markup.html.form.FormComponentPanel
- 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 to
> 1. get the existing class value,
Only when parsing the markup in onComponentTag().
- Tor Iver
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
> 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
-
> 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 addin
> 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 t
> 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
> 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
-
> - 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
> 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
> 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.apach
> 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
---
> 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 re
> 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
-
> setResponsePage(new SomePage() {
> @Override protected void onPreviousButtonClicked() {
>setResponsePage(OriginalPage.this);
> }
>});
final PageReference pageRef = this.getPageReference();
setResponsePage(new SomePage() {
@Override protected void onPreviousButtonClicked() {
setRespon
> 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 car
> 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.
> 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
---
> 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: users-unsubscr...@wicket.apa
> 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
re
> 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
ins
> 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
---
> 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 sh
> 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 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 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 t
> 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 beca
> 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 o
1 - 100 of 270 matches
Mail list logo