Hi Casper,
Have you seen the reference library documentation on the main wiki:
http://cwiki.apache.org/WICKET/reference-library.html
Any one can create an account and then edit the wiki pages.
Mike
In Wicket in Action it's mentioned briefly how one could use a
SimpleAttributeModifier to
Hi Wayne,
The way we do it is to only extract the current page from the data
provider once per render cycle.
e.g. the first time size() is called the underlying extraction is
performed to build the list for the size of the current page and all
subsequent calls use this cached value.
You
Hi Stefan,
You can get the IP address that sent the request like this:
WebRequest wr = (WebRequest) RequestCycle.get().getRequest();
String originatingIPAddress = wr.getHttpServletRequest().getRemoteHost();
You can probably place it directly in the decode(...) method of your url
coding
Hello,
Spring ships with a FactoryBean for the Scheduler
see
http://static.springframework.org/spring/docs/2.5.x/reference/scheduling.html#scheduling-quartz
I guess it depends on the persistence strategy your jobs have but it
could be as easy as injecting the spring managed scheduler bean
Hi ArchieC,
The way RadioGroup works is that it renders to a hidden field and stores
the selected value of the selected Radio.
i.e. the rendered markup is not that relevant and the model object for
the selected radio will be placed into the model for the RadioGroup when
the form submits.
Hi Nino,
I believe that this is not what Archie asked about, he wanted to place
database id's in the value of the radios.. Dont know why he wanted to
though... I might have gotten it wrongly though..
You're right that he wanted to use the database id but from his example
there didn't seem
Hello,
I don't know of any stock component that does this but it should be
straight forward to create a component that supports it.
What I'd do for this case is create a text field for the value input,
drop down choice for the less than, greater than and equals options.
The model
Hi Björn,
If your project is configured to use maven then you can use the
m2eclipse plugin to invoke the jetty:run target which will run in the
debugging perspective.
http://m2eclipse.codehaus.org/
For me I get dynamic code replacement, markup file changes, etc handled
without needing to
Hello,
You need a static (singleton) counter somewhere that is incremented when
a user is authenticated and decremented when the session is destroyed.
One way would be to have a static AtomicLong in your WebApplication
subclass; or a spring bean; or via persistence for an authenticated
Hello,
A big delay in refreshing can be a sign that your pages are serializing
your domain object graph as part of the page serialization process. In
my case it turned out that my AJAX autocompleting search page was
serializing a 50MB in memory index on each update.
I would investigate
Hi Mo,
I tried them, I can generate the modal Window. but the AjaxLink is not submit
link for a form. I need to show the error message only if there is form
processing error.
Should I use AjaxSubmitLink instead? or do you have some examples similar to
this condition?
If the alerts you want
You can also check out this wiki page:
http://cwiki.apache.org/WICKET/simple-sortable-datatable-example.html
Basically the DefaultDatatable takes:
1. an array of TableColumn extending classes that are used to build the
cell component and connect the row object (typically each column would
be
Hi Valentine,
If you for example have spring inject a dependency into your
WebApplication instance and then pass this into a page like:
private SpringBean serviceReference;
public MyPage () {
SpringBean bean =
((MyApplication)Application.get()).getNonProxiedSpringBean();
Hello,
I think you can just call FeedbackPanel.setFilter(IFeedbackMessageFilter
filter) and pass in a filter that will just reject everything like:
new IFeedbackMessageFilter()
{
private static final long serialVersionUID = 1L;
public boolean accept(FeedbackMessage message)
Hello,
Pink tiles means there is a mismatch somewhere between your layers.
Does your openlayers javascript work correctly? (i.e. when not emitted
from wicket openlayers?)
This page embeds an openstreet map in openlayers:
http://wiki.openstreetmap.org/wiki/OpenLayers
But it doesn't use the
Hi Andrea,
I'm trying to make a component that edits the
corners of a rectangle. The model of this
component should be a JTS Envelope class:
http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/Envelope.html?is-external=true
This class has getters for
Hello,
Your javascript isn't really a wicket component so you should implement
it as a behaviour then add it onto the page.
e.g. page.add (javascriptBehaviour);
This way your js code can be written into the header and if you register
the onload hook the rendering can be done automatically
Hello,
I think your problem is in how you define the search criteria pojo model:
final IModel addContactInfoModel = new
LoadableDetachableModel() {
protected Object load() {
ContactInfoPOJO modelObject =
Hello,
I scanned nabble first and job related posts seem to be allowed so here
is mine:
I work for a research group at the University of Toronto (St. George
Campus). We have just posted two Wicket development jobs (see:
http://toronto.craigslist.ca/tor/sof/758987243.html)
They are short
Hello,
You need to create a custom tab panel that will render all the tabs when
the page is rendered but only the active tab will have the 'display:
block' set which effectively hides the others.
Tab switching uses javascript for the 'onclick' action for the tab links
to switch which of the
Hi Björn-Peter,
Have a look at DefaultDataTable which is part of the wicket-extensions
module
|*DefaultDataTable
Hi Daniel,
If you subclass DefaultDataTable there is a protected method call
newCellItem(...) that you can use to attach the onclick class onto the td.
like:
class MyDataTable extends DefaultDataTable {
/* (non-Javadoc)
* @see
Hi Tom,
It sounds like you are doing too much in your heavy Ajax requests. You
should consider changing how it works so that the process can be started
by the Ajax request but does not need to block other ajax requests while
waiting for the results. You can use a progress bar to denote to
Hello,
Look at SelectOptions and SelectOption in wicket-extensions they give
more control over the structure of the HTML select/select that is
ultimately rendered.
SelectOption does extend WebMarkupContainer so it should be possible to
add your panel to the option and have it included
Hi Paul,
What I would do would be to find a javascript implementation that does
what you want and then have the selection events fill in a hidden field
which will then be available on the server side when the form is
posted. This would be similar to how the Palette works in
PaulH98 wrote:
Michael O'Cleirigh wrote:
Hi Paul,
What I would do would be to find a javascript implementation that does
what you want and then have the selection events fill in a hidden field
which will then be available on the server side when the form is
posted. This would
Hi Jerry,
Your implementation isn't working because:
1. tabs have to be contained with in the form to be part of the submission:
form wicket:id=form
div wicket:id=tabs[tabbed panel will be here]/div
input wicket:id=buttonsave
Hi Wojtek,
Create a panel that contains the setup to present the properties of your
Point class.
Add the 'AjaxSelfUpdatingTimerBehavior' to the panel.
So long as the PointPanel is setup properly using an IModelPoint
implementation that knows how to populate itself and the nested fields
Hi Jeffrey,
Due to the way pages are serialized models don't work right is shared
between pages.
There are two kinds of modal windows and one of them is a page that is
rendered on your page through an IFRAME.
If the model data is not appearing its because you are using the page type.
You
Hi Wojtek,
Use the SimpleAttributeAppender from wicketstuff-misc:
org.wicketstuff.misc.behaviors.SimpleAttributeAppender
Here is the maven dependency detail:
dependency
groupIdorg.wicketstuff/groupId
artifactIdmisc/artifactId
version1.4-SNAPSHOT/version
Hi Martin,
I saw the same type of behavior you are talking about with
LoadableDetachableModels not detaching but AbstractReadOnlyModel's
working properly.
What I found was that I was instantiating my LDM's as private variables
in my custom components but that they were not being detached.
Hi Reinhard,
You need to seperate your image generating logic from the wicket Image
Resource.
I'd create a test program or unit test to build verify that the image
you want is being built correctly and then bind it into wicket.
For example you can just use a BufferedDynamicImageResource
You could use the @Autowired Spring annotation and the
autowire=byType attribute to the bean definition to support autowiring
to get the same effect as @SpringBean brings in Components.
e.g.
bean class=foo.bar.MyApplication autowire=byType /
Regards,
Mike
I was always thinking that
Hi Pieter,
Components that have .setVisible(false) will never be evaluated again
automatically. You need to call .setVisible(true) on all that apply.
One way would be control visibility in the base panel by overriding
onBeforeRender() to handle all the cases in one place. e.g.
class
Hello,
I've just committed the first version of the datatable-autocomplete
module into the wicketstuff-core project at wicketstuff.org.
It is licensed under the Apache License version 2.
The main use for this project is to have quick AJAX lookups for large
static datasets. It includes a
Hello,
Your problem is that you calling setOutputMarkupId(true) on the wrong
panel (you are calling it on LawView page constructor where in fact it
should be called on the component
that is added to the ajax request target, LawPanel). Also I think the
updated panel has to replace the current
Hi John,
Normally the error, info, fatal messages on Component enter the message
into the List of Feedback messages in the Session. The messages are
accumulated during the pre render phase of the request cycle and then
the entire list is detached at the end of the request cycle. see
Hi Wadi,
The easy way is to have the conversion to xls occur within the link
action (extracting from db and storing to a temporary file in XLS format).
then you can use a DownloadLink with the model set to the File
(generatedXLSFileName).
If it is not tied to some other process you will
I remember reading that to make AJAX work in a ModalWindow you need to
use a PageCreator (and add the panel into the page) instead of just
adding the panel.
This is how we do it and AJAX works properly; I think its because
window content is actually through an IFRAME to the created page.
Hello,
The easy way is to create a custom column and use that to convert the value.
i.e. extend ProperyColumn and override the protected IModel?
createLabelModel(IModelT rowModel) method such that it converts the
inner value (0 or 1) into the string value you want.
Hi Alfredo,
This question came up last week aswell, here is an example of how you to
subclass PropertyColumn to convert an integer into an arbitrary string:
http://www.nabble.com/Re%3A-How-to-manipulate-values-in-a-data-table--p23413680.html
Essentially you wrap the PropertyModel with a
Hi Luther,
If I add a few values to a page div ala an Ajax button - and the user hits
refresh on the page, the new values I've added go away.
The user is completing a form - but hasn't formally submitted the form yet -
so there is nothing stored in the database yet. The browser naturally
Hello,
I don't think you need to track the selected (true/false) state your
self. Let the radio group model do it automatically for you like:
listLanguages.add(new NameWrapper(English, en, );
listLanguages.add(new NameWrapper(German, de, ));
listLanguages.add(new NameWrapper(French, fr, ));
Hi Farhan,
You should create an IRequestTargetUrlCodingStrategy implementation to
serve the CSS from the database.
It should work to mount the strategy on something like
'/custom-user-css' and then user the rest of the path as the options for
say the user and version of the css to load.
Hi Farhan,
Can you please send me the sample codes of your implementation for Images ?
I also want dynamic images to be displayed on my web page.
I tried to condense what I did into an email but that grew too big.
I've put up the important classes onto the Wicket Wiki here:
Hello,
Another way is to add an onclick listener to each row in the table by
overriding newRowItem(...) in DefaultDataTable like this:
DefaultDataTable table = new DefaultDataTableLocationsEntity(datatable,
columns,
locationsProvider, 10) {
@Override
protected
Hello,
Inside the Palette there is a RecorderT which is basically a
customized HiddenField that holds the id of each selected element.
/**
* Returns recorder component. Recorder component is a form
component used to track the
* selection of the palette. It receives
'filename'. This property i want to feed into an Image component to
have it display the corresponding image to the selected item in the
Palette.
Am 19.02.2010 14:34, schrieb Michael O'Cleirigh:
getRecorderComponent().add(new
FormComponentUpdatingBehavior(onchange
Hi Josh,
I'd create a PrinterFriendlyPage and then use a customized Link from the
NotPrinterFriendlyPage to have it open in a new window.
Link has this public method where you can setup the PopupSettings class
that seems to provide the configuration hooks for how the popup should
work when
Hi Thorsten,
The content of the tooltip should be a panel. The panel's model can
contain the ListInteger of the increases you want offered and then it
can use a repeater or ListView to render each option. If the links were
AjaxLink subclasses you could set their model to be the particular
Hi Martin,
AjaxSelfUpdatingTimerBehavior has an method called
onPostProcessTarget(...); its is called each time the ajax request hits
the server side.
You will want to add your timeout detection here.
You don't need to turn off the behavior. You can just invalidate the
session directly
Hello,
I'd like the trunk to follow the latest wicket release since when
wicketstuff-core is released it is meant to be paired with the current
wicket release. i.e. not 1.4-SNAPSHOT but 1.4.7, 1.4.8, 1.4.9 and
eventually into 1.5RC1, etc.
Envisioned Process for 1.4.8 Wicket Release:
1.
Hi Warren,
The way I normally handle this situation is to create a javascript
emitting behaviour that is attached to the container. This behaviour
will emit the necessary javascript method to do what you need to do.
Then for each child component you can use an AttributeModifier to write
Hello,
I can see two options but there are probably others aswell:
1. emit the id value of the input tag so your javascript will be able to
find it.
2. change your CSS to style on the class of the tag vs the id.
For 1, I would :
add a behviour like this to your TextField:
new
Hello,
Another option would be to make your detachable model aware of the
version aswell as the id which will allow you to catch this case.
Process:
Cache the version aswell as the object id.
Then either do a query to make sure the cached version is still valid or
wait until after the
Hi Zilvinas,
The Model for a CheckGroup is a CollectionT; I looked in
Check.onComponentTag(...) in Eclipse and it shows that it emits the
checked tag if the model object of the Check is contained in the
CheckGroup's collection.
But you should only really need to use the CollectionT returned
Hello,
I'm not sure on the answer to your question about the anonymous inner
class but in general sharing models between pages can be a bad idea.
The memory issues comes into play if the IModel is like Model and the
contained object is not transient (it is serialized as part of the page).
Hello,
There was discussion on d...@wicket.apache.org about migrating away from
self hosted developer tools (jira, wiki and maven repository) for
wicketstuff.org.
Because I wanted SNAPSHOTS of wicketstuff to be generating and Teamcity
keeps getting banned by sourceforge I've done the setup
Hello,
I was able to successfully stage a release for wicketstuff-core 1.4.7
into the oss.sonatype.org infrastructure.
All of the 1.4.7 artifacts can be retrieved from this staging repository:
http://oss.repository.sonatype.org/content/repositories/orgwicketstuff-124/
This is the
Hello,
Based on the positive reception for a 1.4.7 wicketstuff-core release, 4
positive votes (3 + mine) and no negative, I promoted the staged
release into the sonatype repository and filed the ticket for central
sync up.
The sync up has now occurred and the 1.4.7 artifacts are available
Hello,
Now that wicketstuff-core 1.4.7 is released I want to schedule when the
1.4.8 and 1.4.9 releases should be performed to give everyone enough
time to get their changes in and do any related testing.
I think separate branching could be an option but we should wait until
after we catch
Hello,
Based on the feedback I received on when to cut the 1.4.8 and 1.4.9
releases I have decided to perform them now versus later.
I have created branches for each wicket version starting from 1.4.7
through 1.4.9.
1.4.7 line :
Hello,
I've created a new template for wicketstuff-core releases. After every
wicket release we will create a branch from trunk that locks in the
wicket version and cut a matching release like wicketstuff-core-1.4.9.
At a certain point in time (either a window of time to be determined) or
Hello,
Based on the 2 positive votes (+my vote) and because any problems with
these releases can be fixed with a point release I've promoted the 1.4.8
and 1.4.9 staged wicketstuff-core releases into the central maven
repository. Release artifacts are now available automatically through
maven
Hello,
For release I'm doing at work I need to generate a wicketstuff-core
1.4.9.1 release.
I see that there have been some updates to trunk (1.4.10-SNAPSHOT) so if
you would like these changes to be included in the this point release
please back port your changes to the 1.4.9 branch.
Hi Charles,
As long as wicketstuff-core builds locally with
wicket-contrib-jasperreports in the core pom (as a module) you can
commit the core pom.
I have a hudson instance running that will build and auto deploy into
the sonatype snapshot repository a 1.4.10-SNAPSHOT version of your
Hello,
The release artifacts for wicketstuff-core since 1.4.7 have been
deployed through sonatype and are available through maven central.
http://repo2.maven.org/maven2/org/wicketstuff/
This is only for the projects in wicketstuff-core directory structure,
if you are looking at one of the
Hello,
I've staged and promoted a new release of wicketstuff-core version
1.4.9.1. It is available in maven central now.
All of the artifacts are available from maven central like this:
dependency
groupIdorg.wicketstuff/groupId
artifactIddatatable-autocomplete/artifactId
On 06/18/2010 09:43 AM, peer wrote:
Hi Wickets,
My initial situation:
A ParentPage which contains a TabbedPanel with tabs. On the Parent Page is a
Feedbackpanel which works globally and displays every error message.
The tabs in the TabbedPanel don't know anything about the Feedbackpanel of
the
Hello,
What you need to do is add a parameter to the url of the behaviour. But
the trick is that you don't attach a fixed string but rather an
otherFieldValue=' +
document.getElementById(otherFieldComponentMarkupID).value which will
use javascript to extract the current value of the
Hello,
I've staged and promoted a new wicketstuff-core version 1.4.9.2 and it
is available through maven central now.
The artifacts can be retrieved like this:
dependency
groupIdorg.wicketstuff/groupId
artifactIddatatable-autocomplete/artifactId
version1.4.9.2/version
/dependency
The
Hello,
You need to use a behaviour in your panel to emit the javascript.
panel.setOutputMarkupId (true);
panel.setOutputMarkupIdPlaceholder(true);
panel.add(new AbstractBehaviour () {
public void renderHead(IHeaderResponse response)
{
// markupid is determined for this
Hello,
With wicket 1.4.10 almost here I am taking steps to get wicketstuff-core
trunk to compile again.
I have added profiles into the wicketstuff-core/pom.xml to allow
building some modules using java5 and others using java6 but for release
purposes I need to change the structure to
Hello,
I have committed the changes related to moving the modules into seperate
directories. Right now the hudson build server is not building snapshots
correctly but I have just run through deploying them manually. I also
have to fine tune how the maven compiler plugin is configured as
Hello,
Since wicket 1.4.10 was released this week it follows that a
wicketstuff-core release is due as well.
The branch for 1.4.10.1-SNAPSHOT is located here:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicketstuff-core-1.4.10
And the release tag:
Hello,
With the first milestone of wicket 1.5 released there has been some
interest expressed for a corresponding wicketstuff-core branch.
Because wicket 1.5 is basically experimental right now I'm not sure if
switching trunk to track it is the best idea.
But eventually trunk will track
Hello,
Based on the vote there were 3 votes for and none against. All those
who voted wanted trunk to track 1.5-SNAPSHOT versus a stable milestone.
I have created a branch to track wicket 1.4-SNAPSHOT here:
Hello,
If you are ok with using Jetty then I think the jetty:run plugin is the
best way.
With the m2eclipse plugin
(http://m2eclipse.sonatype.org/installing-m2eclipse.html) you are able
to launch war artifacts directly in debug mode.
Most dynamic stack replacements work and all that is
Hello,
You should use a DropDownChoiceAccount and use the constructor that
takes an IChoiceRendererAccount which allows you to define:
1. the text that is output for the account
2. the value that is output in the html for the account. This would be
the place to pull out the long.
I think
Hi Frank ,
Are you sure that your dao is setting max results on the underlying
query? The provider.iterator(...) should only be returning the current
page values and typically the page size would be small like 25 to 100.
Also it depends on your backend database since I know that some
Hi Steve,
Wicketstuff-core artifacts have been released through the
oss.sonatype.org repository and into central since version 1.4.7. (with
the latest being 1.4.10.1)
See: http://repo2.maven.org/maven2/org/wicketstuff/
Snapshots are here:
You can use the AjaxRequestTarget to emit javascript back to the
browser like this:
target.prependJavascript(alert('sent from the server'););
Typically you would have placed the javascript method definitions into
the page so they would exist already in the browsers DOM and then you
would
Hello,
Last night I cut a matching wicketstuff-core release for wicket 1.4.11.
The stable branch for 1.4.11.1-SNAPSHOT is located here:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicketstuff-core-1.4.11
I will plan on releasing the 1.4.11.1 point release within
Hi Nino,
Since I've begun picking up wicket 1.5.. Should we have a wicket stuff core 1.5?
I could do some porting if needed?
The wicketstuff-core trunk is tracking wicket-1.5-SNAPSHOT and hudson is
building it (wicketstuff.org/hudson) even though I don't think anything
can be built right
I think its easier to attach an ajax behaviour to the text field (like
onkeyup) that will push the changes to wicket for validation. You can
use target.addComponent(indicator) to get the indication to be shown
based on the results of the validation.
Look at subclassing
Hello,
wicketstuff-core trunk started tracking wicket 1.5-SNAPSHOT when the
first milestone was released. Now that the second milestone will be out
soon I think its time to start working on making the wicketstuff-core
projects work with wicket 1.5.
I've just committed some changes to trunk
Hello,
I've cut a matching release for wicket 1.4.12 that has just shown up in
the maven central repositories.
The stable branch for 1.4.12.1-SNAPSHOT is located here:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicketstuff-core-1.4.12
I will plan on releasing
Hi,
You could look at creating a custom subclass of FormComponentPanel that
would contain both panel A and panel B.
Then for its validation you would process the checks that depend on the
valid values from A and B.
This way you don't need any type of hack and the data is naturally
Hello,
Pages are serialized at the end of the request cycle (this includes at
the end of ajax requests)
Look at AbstractPageStore.serializePage(...)
Specificically the call to
Objects.objectToByteArray(page.getPageMapEntry()) which turns the page
into a bytearray.
Hello,
Look into overriding dataTable.newRowItem (..) like this:
protected ItemT newRowItem(final String id, int index, final IModelT
model)
{
ItemTitem = new ItemT(id, index, model);
item.add (new MyBehaviour(index, model));
}
Then create a behaviour to implement
Hi Sebastian,
Its related to the dependencies of the wicketstuff-push. When I
switched the wicketstuff build to use a real JDK 5 instead of JDK 6 in
compatibility mode errors like this were seen:
[INFO]
[INFO] Error
:
Hi Mike,
thanks for your resoponse. Maybe you can just have the push-comet module
being compiled with Java 6? I am using the push.timer implementation
currently. I recompiled it using Java5 and it works fine.
Regards,
Seb
On 29.09.2010 19:55, Michael O'Cleirigh wrote:
Hi Sebastian,
Its
How about using a WebMarkupContainer?
Then you can use an attribute modifier like the below example to set the
class value.
All you have to do is make the new component heirarchy match the markup
heirarchy.
div wicket:id=styler class=foo
table
form wicket:id=form
...
/form
/table
/div
Hi
I don't think there is any wicket implementation right now.
But you can probably build something to do it.
It looks like there are JSF components (I assume that you are looking
for the same kind of wicket integration) that allow diagram creation.
If you have access to the source you
Hello,
There is a sixth option, look at Component.onInitialize() which was
added recently (in July 2010) to 1.4.x which lets you initialize the
component after it has been added to the page.
If you need to access state in the page and aren't passing a model
through to your component this
Hello,
You can use:
textfield.add (new AttributeModifier (onkeydown, true, if
(window.event.altKey){if (window.event.keyCode ==
80){document.getElementById(' + link.getMarkupId() +
').onclick();}});
If you do this within the Component.onInitialize() you will have the
true markupid of the
Hi Mark,
The cell's of a datatable are created by the IColumn. So you need to
create a wrapping object or additional IModel that contains the
edit-ability of each row and then use that inside the populateItem(...)
method of the column to figure out which case to show (i.e. the label or
the
Hi,
The wicketstuff push in 1.4.8 used jetty 6 (with the org.mortbay...
package naming) where as the 1.4.12 release uses jetty 7 (with the
org.eclipse.jetty ... package naming.
I don't think the exact class you are looking for exists anymore.
Here is the relevant section from the
Hi,
The Column provides the component that is used for the cell in the table.
Look at subclassing property column and overriding this method:
public void populateItem(ItemICellPopulatorT item, String componentId,
IModelT rowModel)
{
item.add(new Label(componentId,
you access to svn.
as far as builds, Michael O'Cleirigh takes care of those on regular
basis. you might want to talk to him if you want more details.
-igor
On Fri, Oct 29, 2010 at 10:05 AM, Josh Glassmanjosh...@gmail.com wrote:
I would be willing to do so, at least temporarily. How do I get
1 - 100 of 164 matches
Mail list logo