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
Hi all,
I have a page with an AjaxLink which shows a modal window. This modal window
contains a form and when we submit the form, modal window disappear, my page
is reloaded and a second ajaxLink is created. When we click on this second
ajaxLink, another modal window appears.
This part works
Hi,
setResponsePage(QuestionnairesPage.class, new PageParameters(p=3));
you're leaving the current page before it can open the new modal window.
Try this instread:
firstPage.getModalModule().close(target);
...
qPage.getModalModule().show(target);
Hope this helps
Sven
--
View this message
I guess there are cases where you want to use an AbstractFormValidator
and run validation on a form before it is submitted and want to address
those fields before they are submitted. It would be nice if the
modelobject were updated.
Let's say you have 100 textfields attached to a form, you want
Hi Mathilde,
why not simply substitute modal window content instead of reloading page
and creating a brand new modal window?
Your code doesn't work because setResponsePage create a new instance of
QuestionnairesPage different from the one referenced by qPage variable.
Hi all,
I have a
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
Thanks a lot for your answer.
The solution of Sven Meier works well.
Sometimes I wonder why I always try complex solutions instead of simplest
one...
then your model will have invalid data, and if that is acceptable,
what role does the validator fill then? You might as well do your checks
in onSubmit() at that point...
I guess it depends, I normally haven't had a need to validate every
individual component. But I like having all of my model
Well, I talked too fast.
In fact, with Sven's solution :
membreCourant =
serviceMembre.enregistrerReponses(membreCourant, questionnaireCourant);
SessionE4N.get().setMembre(membreCourant);
//setResponsePage(QuestionnairesPage.class, new
1.4.17 is in use by many people and you're the only one having this problem.
1.5.x and 1.4.x are the same related to WICKET-3887.
AjaxLink/AjaxFallbackLink cannot do POST request unless you override
parts of them.
On Fri, Jul 29, 2011 at 7:54 AM, T P D li...@diffenbach.org wrote:
Wicket
It seems, that cause was, that I was adding all the components to the
AjaxRequestTarget in my AjaxRequestTarget.IListener. Is it a bug, that it
does not return focus to the replaced component?
--
View this message in context:
Try to use just one modal window and switch content panels. I.e:
-Create modal window with questionnaireContentPanel as initial content:
modalQuestionnaireModule = new
ModalWindowE4N(modalQuestionnaireModule,);
questionnaireContentPanel = new
I tried your solution Andrea :
- just one modal window :
modalWindow = new ModalWindowE4N(modalQuestionnaire, );
questionnaireContentPanel = new
QuestionnaireContentPanel(modalWindow.getContentId(), this);
modalWindow.setContent(questionnaireContentPanel);
Bruno,
Yet another idea for the dsl:
def ldm[R, ID](id: ID = null, f: (ID) = R) = {new
LoadableDetachableModel(id) { override def load() : R = { f(id); } } }
P.S. Not tested.
On Thu, Jul 28, 2011 at 9:07 AM, Bruno Borges bruno.bor...@gmail.com wrote:
Just wanted to share my experience playing
hello,
despite searching around I haven't found a good working example/explanation
of how to create a page where a form is repeated for each element in a
collection. (I found some info on using repeaters inside forms, but that is
a reverse situation).
Earlier in this thread there's the advice to
Sorry, you are right. Under wicket 1.5 works calling replaceWith on old
content. In your code should be something like :
moduleContentPanel =
questionnaireContentPanel.replaceWith(moduleContentPanel);
target.addComponent(moduleContentPanel);
I didn't tested it with 1.4.x version.
I
Michal Letynski wrote:
Ok i solved the problem. I used wrong version (1.4.17.3 - its buggy). I
get exceptions:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at
OK, so since I'm having this problem and no one else is -- what am I
doing wrong?
And why is it working in Firefox? In Firefox, with javascript disabled,
I get a normal POST; with javascript enabled, I get ajax.
In IE 8, using Wicket 1.4.9, even with javascript enabled, I get a POST
(the
It's very easy.
1) In your HTML:
# Export to Spreadsheet
2) In your Java:
add(new DownloadLink(link, generateExcelFile());
The DownloadLink is a provided Wicket class. Note that generateExcelFile()
must return a File object. If the file already exists, you just read it. If
you need to
Sorry; in the previous post, the HTML got rendered.
I meant to write,
1) In HTML:
a wicket:id=link href=# (just create the standard HTML link)
2) In Java, use
add(new DownloadLink(link, file));
--
View this message in context:
Hi,
it really doesn't matter which repeater, but ListView is probably the
most easy to use.
protected void populateItem(ListItem item) {
add(new AForm(...);
}
Typical error each of us has done wrong when using repeaters for the
first time. It has to be:
I'll help you test it if you boil it down to a quickstart application you
can share.
On Fri, Jul 29, 2011 at 8:12 AM, T P D li...@diffenbach.org wrote:
OK, so since I'm having this problem and no one else is -- what am I doing
wrong?
And why is it working in Firefox? In Firefox, with
When Locating the Markup for a Page, I want to know the corresponding class
(associated with the page/markup).
Currently Im directing Wicket to my Custom Markup location with the
following code in Application:
...
final IResourceStreamLocator defaultLocator =
can you elaborate on that quick solution ? i'm getting errors about not
finding the wicket:id .. the stylesheet link was in the HEAD section .. do I
need to move that? if not, how do I add the link on the java side?
TIA
--
View this message in context:
I thought about this yesterday but maybe overloading the method is better.
Because this way the function must have to be passed as of expecting an id
argument, even if the id argument for ldm() is optional.
I just haven't added yet because of lack of usecase. :-)
But thanks!!
This DSL is
Is there any way to access the HTML of each cell that would be rendered in a
DataGridView without adding it to the page and actually rendering it?
Ultimately, I am trying to add all of the inner HTML of the cells of the
DataGridView to a JavaScript array.
For LDM
class Ldm[T](provider:()= T) extends LoadableDetachable... {
def load():T {
provider()
}
}
object Ldm {
def apply(provider:()=T) = new Ldm[T](provider)
}
could be used as
...
val id = 1
val model = Ldm(()={dao.get(id)})
or
val id = 1
def provider = dao.get(id)
val model =
It's something simple that I'm forgetting, but my non-Submit button (e.g.
Cancel) is not getting called from my Form.
The button is a simple Button, not Ajax.
My HTML (using [] to avoid rendering here):
[form wicket:id=.. ]
[input wicket:id=btnReturn type=button value=Return to Home Page
In the HTML, it would like this:
html
head
titleLog In/title
wicket:link
link wicket:id=stylesheet/
/wicket:link
/head
body
So the WicketID CSS placeholder is where you would normally put a static CSS
declaration. Note the wicket:link around it.
Second, in Java,
This is called a generic method, and you're just giving the type
signature of the method. Here's an example from our code.
public static T extends Number ComparableT NumberFieldT
withMinimum(String id, T min) {
NumberFieldT f = new NumberFieldT(id);
Actually what you will do when clicking cancel override onSubmit event
similarly like other buttons
https://cwiki.apache.org/WICKET/multiple-submit-buttons.html
--
View this message in context:
ok its embarassing to have to post the answers to your questions, heh but
this is one is for less fortunate:
In my application I could pass the Class of the MarkupContainer (rather than
the class that loads the markup)
/**
* The {@link
33 matches
Mail list logo