Create some kind of generic StringTruncatingModel that does the ...
truncation on getObject().
In DataTable.populateItem(), wrap the row model in a
StringTruncatingModel, before passing to the Label being used to show
the string?
Linda van der Pal wrote:
I thought it would be a cool idea to
could easily truncate the data in the
SortableDataProvider.) The main problem that requires met to dive
deeply into the code is my requirement to also show the full data in a
tooltip.
Regards,
Linda
Iain Reddick wrote:
Create some kind of generic StringTruncatingModel that does
Looking at the API docs for the Select component, it would seem to be
designed for more complex select situations (multi-select and
optgroups). Unfortunately, I can't find any examples on using it with
dynamically generated optgroups.
Can anyone clarify how you would use the component like
I'm having difficulty in seeing the best-practice way of handling DDCs
who's choices are hibernate persisted entities.
Obviously the selection in this case would be a reference to a persisted
entity, which is inherently bad, as this would put the entity into the
session and also result in a
Hi,
I'm working on a Wicket / Hibernate / Spring app, with a configuration
that uses spring's OSIV filter and my own transaction filter (basically
a transaction per-request pattern).
I've run into a problem involving the order of transaction commits and
redirect reponses (triggered by
);
beginTransaction();
filterChain.doFilter( request, wrappedResponse );
doCommit();
endTransaction();
responseWrapper.doCachedRedirect();
...
You could easily put the redirect-delaying code in it's own filter, for
re-usabilty.
iainr
Iain Reddick wrote:
Hi,
I'm working on a Wicket / Hibernate / Spring
Hi,
I need to display a resource link conditionally, based on whether a
resource exists, or is null. The resource itself is bytes in a database
and should not be anchored to a component.
How should I handle this, with regard to the resource being nullable?
Thanks.
iainr
the resource before link is rendered?
You can create a new resource object empty in the case of null bytesand
setVisible(false) or extend link to do this automatically on empty
resource...
Luca
2009/10/14 Iain Reddick iain.redd...@beatsystems.com
Hi,
I need to display a resource link
;
}
}
I then can override onPopulate() and add my children that depend on the
nullable for construction.
It's basically the logic equivalent of if model is not null, add children.
Iain Reddick wrote:
I'm fishing for best practice in this type of situation - do I use the
solution you outlined
{
ResourceReference resourceReference;
@Override
public boolean isVisible() {
if(resourceReference==null)return false;
else return true;
}
}
*hope to help...
Luca
2009/10/14 Iain Reddick iain.redd...@beatsystems.com
I think my best solution is to use a lightweight
, Iain Reddick
iain.redd...@beatsystems.com wrote:
For anyone in this situation (having to use a transaction filter), here is a
solution that uses a response wrapper to delay the redirect until after the
transaction has completed:
private class DelayedRedirectWrapper extends
Hi,
You use it like this:
(assuming myModel is the compound property model)
Label idLabel = new Label(idLabel, myModel.bind(id));
This would give component id idLabel, using property id.
CompoundPropertyModel.bind() basically returns a PropertyModel.
iainr
Manuel Corrales wrote:
Ok, I
Why not just have each page be able to report the section it belongs to
( e.g. getSection() method ). The section navbar component can then
simply call that method on it's page and update the bar accordingly.
Ben Hutchison wrote:
We need to build a Nav Bar that tracks visually indicates what
Hi,
We are trying to use XsltTransformerBehavior with pre-existing XSLT
templates to display various kinds of XML data in a panel.
While this is working fine, it looks as if we will have to modify our
XSL to take account of the fact that the transforming component's tags
become the root
cellItem.getParent().getParent() will get the row component, but it's
not a very clean solution.
Pierre Goupil wrote:
Hello,
Can't you just make the parent's field final and use : Parent.this.cellItem
?
HTH,
Pierre
On Wed, Jul 15, 2009 at 11:33 AM, Lorenzo Bolzani
();
rowItem.add( new SomeBehaviour() );
}
}
?
Lorenzo Bolzani wrote:
2009/7/15 Iain Reddick iain.redd...@beatsystems.com:
cellItem.getParent().getParent() will get the row component, but it's not a
very clean solution.
Hi, thanks for the replies.
I'm using wicket 1.3.3 and this method
You can actually configure the tags that are put around a disabled link
at application level, like this:
getMarkupSettings().setDefaultBeforeDisabledLink( );
getMarkupSettings().setDefaultAfterDisabledLink( );
This would give span*linktext*/span for disabled lnks (such as an
autolink to the
The wrapping markup used can be set via methods in AbstractLink:
setAfterDisabledLink()
setBeforeDisabledLink()
or, you can set a default at application level:
setDefaultAfterDisabledLink()
setDefaultBeforeDisabledLink()
Cassio wrote:
Hello everybody!
Does anyone know for what reason an
at
org.apache.wicket.markup.html.link.AbstractLink.disableLink(final
ComponentTag tag) method.
code:
// Change anchor link to span tag
tag.setName(span);
2009/7/24 Iain Reddick iain.redd...@beatsystems.com
The wrapping markup used can be set via methods in AbstractLink
Surely this is what you want for a non-ajax solution:
class MyPage extends Page {
private TabbedPanel tabPanel;
...
public MyPage() {
tabPanel = new TabPanel(...);
add( tabPanel );
...
confirmBtn = new Button(confirm) {
private static final long serialVersionUID = 1L;
Sorry - I've re-read your initial post and see what your issue is.
Iain Reddick wrote:
Surely this is what you want for a non-ajax solution:
class MyPage extends Page {
private TabbedPanel tabPanel;
...
public MyPage() {
tabPanel = new TabPanel(...);
add( tabPanel
confirmBtn = new Button(confirm) {
private static final long serialVersionUID = 1L;
@Override
public void onSubmit() {
Page homePage = (HomePage)getPage();
homePage.getTabbedPanel().setSelectedTab(0);
}
};
Iain Reddick wrote:
Sorry - I've re-read your initial post and see
Hi all,
One of the difficulties I am finding with wicket is the best practice
when displaying/using data that is potentially null.
Example:
I have a user object which has a nullable group property. I want to
show a link to the group details page when the group property is not
null, but
of thinking worth pursuing?
add(new LinkUser(editgroup, user) {
onclick() {
...
}
isvisible() {
return user.getgroup()!=null;
}
}
?
-igor
2009/7/30 Iain Reddick iain.redd...@beatsystems.com:
Hi all,
One of the difficulties I am finding with wicket is the best practice when
displaying
pursuing?
add(new LinkUser(editgroup, user) {
onclick() {
...
}
isvisible() {
return user.getgroup()!=null;
}
}
?
-igor
2009/7/30 Iain Reddick iain.redd...@beatsystems.com:
Hi all,
One of the difficulties I am finding with wicket is the best practice
when
displaying/using data
see: org.apache.wicket.extensions.yui.calendar.DateField
http://static.ddpoker.com/javadoc/wicket-datetime/1.3.3/index.html
copenhag copenhagen wrote:
Hi,
Would it be possible to make the datepicker popup whenever a textfield is
selected?
Thereby the textfield will be no editable, but only
Sorry - misread your question.
Iain Reddick wrote:
see: org.apache.wicket.extensions.yui.calendar.DateField
http://static.ddpoker.com/javadoc/wicket-datetime/1.3.3/index.html
copenhag copenhagen wrote:
Hi,
Would it be possible to make the datepicker popup whenever a
textfield is
selected
If you want to use inheritance:
Put your base form in a panel with the associated markup for the base
fields (making sure there is a wicket:child / tag in the correct
place). Then just extend this panel, adding the required child form
components and supplying the appropriate markup extension
The data you want to show on the page is transient, so it isn't really
bookmarkable.
Use a regular Link and give the page class a constructor that takes your
DTO.
Mathias Nilsson wrote:
Session or pageParameters
-
To
Thanks - I think insights from more experienced wicket developers are very
welcome at the moment.
I agree very much with what you say in the post that it's hard to find
information about the best shape for a wicket application to meet your needs.
Also the comment re component swapping - I
In reply to (6) and (7):
6) Do your construction in the constructor.
7) If the JFreeChartImage component implementation is the one seen
here: http://wiki.github.com/tita/tita/wicket-jfreechart-tutorial ,
then it needs re-worked, as it only supports a static image. Instead,
the constructor
mountBookmarkablePage is a convenience method for mounting the most common URL
form.
Look here for more info:
https://cwiki.apache.org/WICKET/url-coding-strategies.html
You can also create your and mount your own URL decoding strategies.
- Original Message -
From: Mike Quilleash
Say I have a form with a check box that, when checked, shows some other
field (i.e. it controls the visibility of other form components).
What is the best approach to handling this?
From what I understand, you have 3 options:
1. Add ajax behaviour to the check box (re-render relevant
submit, the hidden component will
still be validated.
Pedro Santos wrote:
2 or 3 since there is no relevant state on the server side you want to
consider to implement the component visibility rule.
On Tue, Jun 1, 2010 at 7:37 AM, Iain Reddick
iain.redd...@beatsystems.comwrote:
Say I have
, Jun 1, 2010 at 5:37 AM, Iain Reddick
iain.redd...@beatsystems.comwrote:
Say I have a form with a check box that, when checked, shows some other
field (i.e. it controls the visibility of other form components).
What is the best approach to handling this?
From what I understand, you have 3
:57 PM
Subject: Re: Show/hide form components best practice
if the form contains all the state then the answer is simple: write a
bit of javascript that does it for you.
-igor
On Wed, Jun 2, 2010 at 2:53 AM, Iain Reddick
iain.redd...@beatsystems.com wrote:
That's just a server round-trip
Iain Reddick iain.redd...@beatsystems.com
Here's some example code (wicket 1.3.x):
Java:
private class TestForm extends Form {
private String always;
private boolean useOptional = false;
private String optional;
public TestForm(String id) {
super(id);
add( new TextField(always, new
, in all those comments, I assume you can not rely on
javascript nor ajax to perform those validations, in which case the
visibility approach
simply couldn't work.
Cheers,
Xavier
2010/6/3 Iain Reddick iain.redd...@beatsystems.com
The problem with this approach is that you throw away all the nice
component should be considered in the form submit mechanism?.
- Original Message -
From: Iain Reddick iain.redd...@beatsystems.com
To: users@wicket.apache.org
Sent: Wednesday, 9 June, 2010 8:35:13 PM
Subject: Re: Show/hide form components best practice
Looking at the wicket source regarding
I've come across similar scenarios fairly often - i.e. where a the
construction of component is impossible if its model object is null, or
some other construction parameter is null.
I'm still not sure what the best approach is in this situation.
One of the methods I've used is to late-bind
What's the cleanest way of doing string manipulation with a component that uses
a String as a model (e.g. a Label). I'm thinking of mutations such as to
uppercase and to lowercase, etc.
An obvious place is to do it in the model, but I'm interested to hear what
other developer's approaches are.
To elaborate a bit - I'm talking about one off situations and also re-usable
solutions, such as the aforementioned to upper and to lower cases.
- Original Message -
From: Iain Reddick iain.redd...@beatsystems.com
To: users@wicket.apache.org
Sent: Wednesday, 4 August, 2010 9:19:46 PM
for reusable situations, or even one off, you can write a simple
decorator model
-igor
On Wed, Aug 4, 2010 at 1:27 PM, Iain Reddick
iain.redd...@beatsystems.com wrote:
To elaborate a bit - I'm talking about one off situations and also
re-usable solutions, such as the aforementioned to upper and to
lower
Here is an interesting generic query DSL that should work well with
Wicket. Clauses can be both added and removed from the query in an OO
fashion, unlike Query DSL and Quaere (which seem more focussed on syntax).
http://code.google.com/p/hibernate-generic-dao/
On 31/08/2010 04:18, Brian
Doesn't that code render the chart twice, with the rendering for the
image map simply being dumped?
On 04/10/2010 07:51, Peter Karich wrote:
thanks!
Dear all,
I've added a new wiki page JFreeChart with tooltip
Firstly, that LDM code is broken - calling detach() on load() makes no sense.
Also, it will hit hibernate on every call to getObject(), as you aren't caching
the loaded Parent entity. This is probably the cause of the hibernate
exceptions you are seeing.
Check out
Without looking at the implementation, to see if the styling is causing an
issue:
1) Delete all style declarations from the css file (i.e. blank it)
2) See if the issue persists - in which case it's probably something else
3) Add your style declarations back one at a time to the css file to
I LOLed at this:
Unfortunately, most of us are stuck in Java world where proper functions are
still considered science fiction like flying cars and World Peace.
- Original Message -
From: Carl-Eric Menzel cmen...@wicketbuch.de
To: users@wicket.apache.org
Sent: Thursday, 21 July, 2011
48 matches
Mail list logo