WicketFilter 1.5

2011-03-30 Thread Jan Kriesten

Hi,

WicketFilter with 1.5 doesn't seem to use/support 'getRelativePath' any
more.

I used to override this to apply Locale selection and stripping this
information off:

/de/myRelativeWicketPath - /myRelativeWicketPath + Session Locale 'de'

Where can I hook that now?

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Apache Wicket Cookbook Published!

2011-03-26 Thread Jan Kriesten
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi Igor,

nicely done! :)

Thanks for your steady support with the mailing list and on irc! This
another big helping hand from your side to many of us! :)

Ordered my copy today!

Best regards, --- Jan.


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)

iEYEARECAAYFAk2Nma8ACgkQME/SSH3iSFkUeQCdHVBpF8JCbHRCtNqL/KzqIQmB
yjIAmwb0SmM9RfFXLUS2MvYWGrd2Pdt0
=w8Xe
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: [OT] where is JPA 2.0 API spec in maven?

2010-09-09 Thread Jan Kriesten

Hi Korbinian,

 in fact the current is 2.1.1, but 2.0.0 is reference implementation and
 for the JPA 2.0 API it wont matter what 2.0.x it is (see scope provided
 here - just API);

actually, I meant the javax.persistence-API, which can be referenced
with eclipse:

  dependency
groupIdorg.eclipse.persistence/groupId
artifactIdjavax.persistence/artifactId
version2.0.2/version
  /dependency

The current version there is 2.0.2. From the release notification:

The javax.persistence library has been updated in our repository and in
maven.

The new version, 2.0.2, should address any issues people have had
related to some churn of previous versioned javax.persistence libraries
in our maven repository.

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: [OT] where is JPA 2.0 API spec in maven?

2010-09-08 Thread Jan Kriesten

Hi,

 JPA 2:
 dependency
 groupIdorg.eclipse.persistence/groupId
 artifactIdeclipselink/artifactId
 version2.0.0/version
 scopeprovided/scope
 /dependency

AFAIK the current version is 2.0.2

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Guice v 2 Wicket + ldms?

2010-05-29 Thread Jan Kriesten

Hi Nino,

 Are anyone using that combo?

sure.

Best regards, --- Jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Caching components

2010-03-26 Thread Jan Kriesten

Hi Martin,

 One reason for loading some data in contstructur or onBeforeRender is to
 prevent creating huge hierarchies. This is faster than override
 isVisible(), since isVisible would called more than one times.

why are you loading data in the component at all? There is this nice
'LoadableDetachableModel' which could/should wrap that...

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Future of Wicket Security (WASP/SWARM)

2010-01-22 Thread Jan Kriesten

Hi Martijn!

 [ ] adopt Wicket security into Apache Wicket
 [x] keep Wicket security at Wicket Stuff

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Scala, dependency injection and wicket

2009-10-12 Thread Jan Kriesten

Hi,

 I've started testing this approach and I'm a little stuck. I can easily
 inject objects like that for running the application, but how do I
 inject mock objects for testing? The module used by the injector (in the
 article's example) is hard-coded into the InjectorService object.

you could use modules depending on environment settings e.g.

Shouldn't be too hard.

--- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: vps hosting for wicket app

2009-10-07 Thread Jan Kriesten

Hi Matej,

 I'm using slicehost but looking at this it just seems insane. Have you
 actually used this hosting? Is there a catch somewhere?

I'm using it (3 root servers atm) - even for hosting high traffic customers. The
bandwidth is amazing and there hasn't been any service problem since I'm on it.
I had a hard disk failure once and it has been replaced within 3 hours (with a
downtime of 15 minutes).

I only have positive responses from other clients hosting there as well.

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Scala, dependency injection and wicket

2009-10-07 Thread Jan Kriesten

Hi Haim,

I think you read the article from Jonas Bonér about DI with Scala [1]?

In the paragraph about Guice you'll stumble over my name and my preferred way to
DI with Wicket.

Best regards, --- Jan.


[1] 
http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di.html

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Scala, dependency injection and wicket

2009-10-07 Thread Jan Kriesten

Hi Haim,

 Yes, I remember seeing that. How would you add it to wicket? by adding
 ServiceInjector trait to the Application class or using the wicket-guice way
 (addComponentInstantiationListener(new GuiceComponentInjector(this));)?

the Injector is just a trait, so anywhere it's needed, I just add it to the
corresponding class - whether it's a Wicket component or not doesn't matter. So
you have

class MyWebPage extends WebPage with Injector {
  @Inject val domainRepo: DomainRepo = domainRepo
}

class DomainRepo extends Repo with Injector {
  @Inject val customerRepo: CustomerRep = customerRepo
}

This is a general approach, so no need to add a intantiation listener.

 One more question though, In the example you're only using constructor
 injection. Any reason not to use field injection?

Actually, I use field injection most of the time, see above.

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: vps hosting for wicket app

2009-10-06 Thread Jan Kriesten

Hi,

I'm always surprised, how expensive hosting is on the other side of the ocean. 
;-)

Just two examples from Germany, where server performance make Slicehost look
like a lame duck:

http://hetzner.de/en/ (my favorite!)
http://webtropia.com/home/ (only in Germany, sorry)

I agree, though, that if the data has to travel from Germany to the US the
experience might not be the same like from here. ;-)

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: server push

2009-10-05 Thread Jan Kriesten

Hi Jahid,

 We need server push for one of our web application. Is there something
 that you can suggest? The requirement is, it should work on any server
 (Tomcat, jetty, jboss,). is there any wicket component that does
 this?

as far as I know there isn't any standard yet which works on any servlet
container. This is on the roadmap for the servlet api 3.0. Tomcat has a
different API than Jetty than resin.

I'm going for pull ATM, which works fine for my purposes. But your mileage may 
vary.

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: urls with localization

2009-07-27 Thread Jan Kriesten

Hi,

 How is it possible to use such urls in wicket?
 If users clicks that link then appropriate page with defined locale will be
 shown.
 www.domain.com/uk/home
 www.domain.com/nl/home


see this thread:
http://www.nabble.com/Localization%2C-Bookmarkable-pages%2C-and-mounting-strategies-to16676213.html#a16682606

Best regards, --- Jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: urls with localization

2009-07-27 Thread Jan Kriesten

 I'm using wicket 1.3.5 and RequestDecorator could not be found.

You have to read the posts more carefully - there were two references to 
pastebin!

--- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket-Scala extensions

2009-07-14 Thread Jan Kriesten

Hi Antony,

great to see Scala and Wicket getting more popular. :-)

I've been using them together quite a while now and am convinced that there are
lots of benefits in it!

I created a dynamic component (like wicket:component which isn't officially
supported) which also works with Ajax. There's also a 'VarModel' which is
similar to your Fodel. You'll find the sources here:
http://www.footprint.de/fcc/2008/11/some-wicket-scala/

I also use Scala's mixin capabilities to abstract layout information out of the
pages/components. E.g. to define cell styles of datatable columns or to format
cell output, I have something like:

  trait Centered[T] extends IStyledColumn[T] {
abstract override def getCssClass: String = {
  val style = super.getCssClass

  if( style==null ) columnCentered
  else style +   + columnCentered
}
  }

  trait DateFormat[T] extends PropertyColumn[T] {
override protected def createLabelModel( embeddedModel: IModel[T] ):
IModel[_] = {
  val m = super.createLabelModel( embeddedModel )
  m.getObject match {
case dt: DateTime = VarModel( dt.toString( dateFormatter.withLocale(
getLocale ) ) )
case _ = m
  }
}
  }

To create/apply a cell to use this style I just have to apply this trait:

val col1 = new PropertyColumn[M]( new Model( Date ), COL_DATE, reg_date )
with Centered[M] with DateFormat[M]


Scala's just great to abstract more between logic and layout.

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: shorter input names

2009-05-18 Thread Jan Kriesten

Hi Ian,

 Thanks for that.  For your solution to work it looks like wicket would
 need to only call getInputName at most once for each input (since
 subsequent calls would return different names).  Is that how it works?

no, within the trait I override the 'def getInputName' from Wicket with a 'val
getInputName' - i.e. even when Wicket is calling it more than once it is still
only evaluated once. That's another nice thing Scala provides... :-)

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: shorter input names

2009-05-17 Thread Jan Kriesten

Hi Ian,

 Is there a way to get wicket to generate shorter name attributes for
 input elements?  I have a largish form and most of the data being sent
 to the server is the names of the input elements.

it is by overriding the method 'getInputName' on every FormComponent and
returning a stable identifier over requests - though this is pretty horrible
task to do.

If you're using Scala instead of Java things are getting better, though. I
defined the following trait (aka implemented interface):

---
object FormInputNameId {
  private var currId = 0

  private def getName = {
if( currId==Integer.MAX_VALUE-1 ) currId=1 else currId = currId + 1
fid: + currId
  }
}

trait FormInputNameId[T] extends FormComponent[T] {
  override val getInputName: String = FormInputNameId.getName
}
---

This trait can be attached to any FormComponent with just something like

val newFormComponent = new TextField( id ) with FormInputNameId

The Scala compiler does the rest for you (one of my favorite features of Scala
to have real reusable code!).

Best regards, --- Jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Charts with wicket

2009-04-02 Thread Jan Kriesten

 How is it possible to do charts (cheese, bars, radard etc) with wicket
 (in Ajax, Java etc) ?

you may want to take a look at jfreechart.

--- jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How To Download Excel File?

2009-03-31 Thread Jan Kriesten

Hi,

 I could be wrong - but maybe the question is about how best to structure
 this in Wicket ..

it's just that easy (this is Scala, not Java):

  add( new Link( ImageLink.ID_LINK ) {
def onClick = {
  val resourceStream = new ByteArrayResourceStream(
xlsExporter.createExcel, application/vnd.ms-excel );
  getRequestCycle.setRequestTarget( new ResourceStreamRequestTarget(
resourceStream ) {
override def getFileName = export.xls
  } )
}
  })

ByteArrayResourceStream is a simple implementation of IResourceStream. Creating
the Excel bytearray is another issue (I suggest using Apache POI).

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Making wicket work with Dynamically created html

2009-03-24 Thread Jan Kriesten

Hi Vasya,

 The velocity template is pretty good at displaying the html elements
 dynamically, but im not finding an easy way to bind the data back...

I'm not really sure what you're trying to accomplish. You can't use the velocity
to create wicket-components on the fly and have them bound to a form, that'll
not work.

If you want to create some dynamic form you should use repeaters and build them
up using them - and bind the formcomponents directly to the model (maybe you
need to write some specialized model yourself).

I did something like that with XML specifying the form and having a ElementModel
binding the form elements to JDOM nodes.

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: handling not mounted URLs

2009-03-23 Thread Jan Kriesten

Hi Jeremy,

 Can you mount another filter that, if Wicket does not respond, instead
 responds with either a valid page or a redirect back to a valid Wicket page?

no, that's no option. I got the ErrorPage-Version working in the way that I
manually set the status code with

val uri = req.getAttribute( javax.servlet.error.request_uri 
).asInstanceOf[String]
if( uri!=null ) {
  val res = getResponse.asInstanceOf[WebResponse].getHttpServletResponse
  res.setStatus( 200 )
}

That way you get a 200 on the client.

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: handling not mounted URLs

2009-03-23 Thread Jan Kriesten

Hi Jeremy,

 Maybe I'm just sleepy - but where did you put that code?  It's not java.

heh - that's Scala. :-)

The code belongs to the HomePage class.

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: handling not mounted URLs

2009-03-23 Thread Jan Kriesten

Hi Brill,

 Ahh... are you try to set up an RESTful type of URI where the path is
 relevant to the request being executed?

no, not really, my usecase is much simpler. :) If I encounter an unmounted path
I just want to create a frameset which has a target on another server. And the
target url should get the pathinfo appended.

 Hmm... how about a IRequestTargetUrlCodingStrategy?

I first thought to go that way, just that you can't mount '/' - so that's no
option either.

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: London Wicket Event - 1st of April @ Google

2009-03-23 Thread Jan Kriesten

 Alastair Maw has just informed me of the catchy little title he's come up
 with for his talk: Why Making Table Components Is Hard.

hehe - didn't we have kind of talk the last time as well? ;-)

Have a nice meetup!

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



handling not mounted URLs

2009-03-22 Thread Jan Kriesten

Hi,

I've set up a Wicket application as ROOT with URL pattern /* and have some
mounts on it.

Now I want all unmounted stuff handled thru the Homepage-class (i.e. get the
path-info for a redirect). Is there a way to do this?

ATM, I get a 404 : /test/ was not found on this server. when calling
http://localhost:8080/test/

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: handling not mounted URLs

2009-03-22 Thread Jan Kriesten

Hi Brill,

 what about setting up an error page using the standard servlet method
 that points to a wicket page?

the point is: you will still get a 404 error code for the page (which the
user/search engine shouldn't, since it's not an error).

Best regards, --- Jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Making wicket work with Dynamically created html

2009-03-20 Thread Jan Kriesten

Hi Vasya,

 How do I then map my html to panels which wicket wants ? If there is a
 template/example that would help.

take a look at the wicket-velocity project where velocity templates are used for
components. That should be similar to what you want.

Best regards, --- Jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Custom wicket:tags?

2009-03-09 Thread Jan Kriesten

Hi Wayne,

 is it possible to develop our own custom wicket tag(s)?
 Anyone done this, or have any pointers?

yep, possible.

I did sortof in the Dynamo example
(http://www.footprint.de/fcc/2008/11/some-wicket-scala/)

Regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



[off topic] was: VOTE: Remove ? extends from constructor of DropDownChoice

2009-03-02 Thread Jan Kriesten

 i also dont remember using a compound property model...can we remove that?

hehe - i haven't used that either.

+ 1 on removing cpm! ;-)

Best reagards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: [vote] In Wicket 1.4 and onwards, remove widening from the list of choices model in DropDownChoice, changing it from IModelList? extends Foo to IModelListFoo

2009-03-01 Thread Jan Kriesten

 [X] Yes, change the DropDownChoice constructor to take the
 choices list as IModelListT or ListT without the
 wildcard
 
 [ ] No, keep DropDownChoice as it is in Wicket 1.4-rc2


Best regards, --- Jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket meetup in Amsterdam news

2009-02-13 Thread Jan Kriesten

Hi,

 If interest is there I could present something based on my 'Real World Scala 
 and
 Wicket' I held last week in London.
 Yes please! I hope there will be enough registrations to our
 session so we can make it.

I added a 'Practical Scala + Wicket' presentation. I'm looking forward to see
you all! :-)

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket at ApacheCon EU'09 in Amsterdam

2009-02-13 Thread Jan Kriesten

Hi,

I can't really think of any specification which would make sense to build -
there is just no need for that IMHO.

If managers need something like that - there's JSF. And knowledge is growing
that JSF isn't the ultimate answer. There are other open source projects
embraced by managers as well without being an official standard - else why would
there be so many Struts applications out there?!

Also, Wicket does support a standard, which makes it quite valuable: Portlets!
Does Tapestry do that?

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket meetup in Amsterdam news

2009-02-12 Thread Jan Kriesten

Hi Martijn,

I'd happy to attend as well - though only the Wicket meetup and not the
ApacheCon. Both dates would do.

If interest is there I could present something based on my 'Real World Scala and
Wicket' I held last week in London.

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Testing DataView

2009-02-11 Thread Jan Kriesten

Hi,

 By the way, I've heard from my Scala-using colleagues that 
 some Scala versions have had trouble in serialising some 
 inner classes.

that should work with Scala 2.7.2 - in the current version it's broken if
inheriting serializable from Java classes. It's already fixed and should be ok
with the next version again.

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Things I miss in Wicket

2009-01-16 Thread Jan Kriesten

Hi Sébastien,

 1) and 2) are already implemented, or something very close exists. 3)
 may be a good improvement, maybe with a new wicket tag
 (wicket:component type=com.me.MyCustomComp /). let's see what think
 core developpers

hehe - that one already exists, too! :D

Best regards, --- Jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Things I miss in Wicket

2009-01-16 Thread Jan Kriesten

Hi Erik,

 Can you point to a place where this is documented? Its not on
 http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html.

actually, it is there. :)

---8---
Element wicket:component

wicket:component - Creates a Wicket component on the fly. Needs a class
attribute. Though this has been in wicket for a long time, it is still kind of
an unsupported feature, as most of the core developers believe that this may
lead to misuse of the framework. Before heavily relying on this feature, you
might want to contact the user list to discuss alternative strategies. (THIS TAG
IS NOT SUPPORTED BY THE CORE TEAM)
---8---

Since wicket:component has some issues (e.g. HeaderContribution doesn't work) I
build my own DynComponent some time ago (see my blog for details).

Best regards, --- Jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Things I miss in Wicket

2009-01-16 Thread Jan Kriesten

Hi Erik,

 Yep, I did see that. However, it does not describe the type attribute
 Pills described:

just replace 'type' with 'class' and you're there. Also, any other attribute you
put into the wicket:component tag is looked a setter on the class for, so you
can pass parameters in from you html code.

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Things I miss in Wicket

2009-01-16 Thread Jan Kriesten

 Ouch, that is ugly. Now I understand why it is deprecated.

It for sure is nothing meant to be used on a day-to-day basis, right. But there
are use cases where you're happy it exists.

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ERROR - DiskPageStore - Error flushing page

2009-01-16 Thread Jan Kriesten

Hi,

 I am getting the above problem , can any one of please provide me the
 solution as to how to fix this issue

since you didn't provide any further hints on what version of wicket you're
using, I suppose this issue has already been resolved with 1.3.5:

https://issues.apache.org/jira/browse/WICKET-1773

Regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Things I miss in Wicket

2009-01-16 Thread Jan Kriesten

Hi Tobias,

I don't agree on a couple of points you made on Wicket.

Wicket is providing the GUI and you have to make sure your gluing to the backend
is as transparent as it can be. So, if you have your interfaces untouched, you
wont need to touch the Java code again for your 3-5 years. Also, wicket allows
easy separation of your markup from your Java code, making redesign not that a
big task as you suggest (given that the hierarchies need to be kept).

But, I think a web /application/ is meant to evolve and not left untouched for
years.

Another thing about Wicket: It's all about reusability. If you design
components, you can jar them up and just drop them into another project. That's
one thing most frameworks don't allow.

If you want to sell a product and don't want the customer to know Java: get your
resources from a database and integrate some kind of templating. It just works
with Wicket as well.

I think I write my web applications at least as fast as you do with PHP. I have
my established Wicket base and just put together the components I need: drop in
authentication, localize things, complex wizards... I doubt you'll be that
error-free in writing such code with PHP than you'd do with Wicket as a base. I
never needed to debug much with Wicket at all.

Most PHP I've seen mixes business logic and user interface so badly that - when
you need to enhance things - you're really in trouble.

My 2c, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Fixed Column Width AjaxFallbackDefaultDataTable

2009-01-13 Thread Jan Kriesten

Hi,

 how can I set fixed column widths in AjaxFallbackDefaultDataTable.

set an appropriate css class on the column (overriding IStyledColumn 
interface)!?

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ComponentResolver and CompoundPropertyModels

2009-01-05 Thread Jan Kriesten

Hi,

 auto components are removed after rendering is complete if i recall
 correctly, so there is nothing processing the submitted input.

there are a couple of problems with that approach, same for embedding components
in markup with the wicket:component

I approached a similar problem auto-adding components with templates. My
solution can be found here: 
http://www.footprint.de/fcc/2008/11/some-wicket-scala/

Instead of handling wxComponent you might filter for other tags - so that might
be the solution for you, too.

Hope this helps.

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



1.4 trunk: AjaxRequestTarget.appendJavascript

2009-01-02 Thread Jan Kriesten

Hi,

current 1.4 trunk 'messes' with escaping '[' to '[^' on
AjaxRequestTarget.appendJavascript which leeds to non-functional Javascript (at
least on my FF 3) when using array indices on variables.

It worked fine before without problems here - where/in which cases is the
escacping for the CDATA necessary?

Best regards, --- Jan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



TextFilteredPropertyColumn[T] and getFilterModel

2008-12-28 Thread Jan Kriesten

Hi,

I'm trying to work out how to handle TextFilteredPropertyColumn with wicket 1.4.

I'm trying to do the following:

tf = new TextFilteredPropertyColumnM( new Model( Name ), COL_NAME, name ){
  protected IModelString getFilterModel( FilterForm form ) {
return new PropertyModelString(
getDataProvider.getFilterState.getFilterMap( FilterMaps.LIKE ), getSortProperty 
)
  }
}

COL_NAME (= sort property) / Filter value are organized in a simple
HashMapString,String.

This worked fine with Wicket 1.3.x - Wicket 1.4 insists that getFilterModel
returns an IModelM - which is obscure, since the filter doesn't have to match
the Model of the Column.

Am I missing something?

Best regards, --- Jan.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Dynamically generating an img tag

2008-12-27 Thread Jan Kriesten

Hi Cristina,

 Java:
 
 // prefix and sufix hold the start and end of the img tag
 String imgTag = prefix + getImgURL() + sufix;
 add(new Label(imgDisplay, imgTag));

try:

add(new Label(imgDisplay, imgTag).setEscapeModelStrings(false));

Best regards, --- Jan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Openid integration?

2008-12-03 Thread Jan Kriesten

Hi Nino,

 Hmm Im using auth roles now.. Are there an way to integrate the two..?

that shouldn't be a too big deal, you just have to convert the spring-security
granted authorities into 'roles'.

To get the AuthenticationManager into your Application you could use the Spring
factory (Scala code):

---8---
class AuthTestApplication extends WebApplication {
  import org.springframework.security.AuthenticationManager
  import scala.reflect.BeanProperty

  // injected/set by Spring context
  @BeanProperty var authenticationManager: AuthenticationManager = null
  ...
}
---8---

web.xml:

---8---
  !-- Setting up Spring Context Listener --
  listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
  /listener

  !-- Setting up Acegi Security --
  context-param
param-namecontextConfigLocation/param-name
param-value
  /WEB-INF/spring-security.xml
/param-value
  /context-param
  filter
filter-nameAcegi Filter Chain Proxy/filter-name

filter-classorg.springframework.security.util.FilterToBeanProxy/filter-class
init-param
  param-nametargetClass/param-name
  
param-valueorg.springframework.security.util.FilterChainProxy/param-value
/init-param
  /filter
  filter-mapping
filter-nameAcegi Filter Chain Proxy/filter-name
url-pattern/*/url-pattern
  /filter-mapping

  !-- AuthTestApplication --
  filter
filter-nameAuthTestApplication/filter-name

filter-classde.footprint.wicket.application.locale.LocaleFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
init-param
  param-nameapplicationClassName/param-name
  param-valueapplication.TestApp/param-value
/init-param
init-param
  param-namebeanName/param-name
  param-valueauthTestApplication/param-value
/init-param
init-param
  param-nameconfiguration/param-name
  param-valuedevelopment/param-value
/init-param
  /filter
  filter-mapping
filter-nameAuthTestApplication/filter-name
url-pattern/*/url-pattern
  /filter-mapping
---8---

And the spring-security.xml as an example:

---8---
?xml version='1.0' encoding='UTF-8'?
!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN'
'http://www.springframework.org/dtd/spring-beans.dtd'

beans
  bean id=filterChainProxy
class=org.springframework.security.util.FilterChainProxy
property name=filterInvocationDefinitionSource
  value
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT

/**=httpSessionContextIntegrationFilter,logoutFilter,anonymousProcessingFilter
  /value
/property
  /bean

  !-- Filter --
  bean id=httpSessionContextIntegrationFilter
class=org.springframework.security.context.HttpSessionContextIntegrationFilter
property name=forceEagerSessionCreation value=true/
  /bean

  bean id=logoutFilter
class=org.springframework.security.ui.logout.LogoutFilter
constructor-arg value=//
constructor-arg
  list
bean
class=org.springframework.security.ui.logout.SecurityContextLogoutHandler/
  /list
/constructor-arg
property name=filterProcessesUrl value=/auth/logout/
  /bean

  bean id=anonymousProcessingFilter
class=org.springframework.security.providers.anonymous.AnonymousProcessingFilter
property name=key value=guestKey/
property name=userAttribute value=GUEST,ROLE_GUEST/
  /bean

  bean id=anonymousAuthenticationProvider

class=org.springframework.security.providers.anonymous.AnonymousAuthenticationProvider
property name=key value=guestKey/
  /bean

  bean id='authenticationManager'
class='org.springframework.security.providers.ProviderManager'
property name='providers'
  list
ref local='testAuthenticationProvider'/
ref local=anonymousAuthenticationProvider/
  /list
/property
  /bean

  bean id='testAuthenticationProvider'
class='org.springframework.security.providers.dao.DaoAuthenticationProvider'
property name='userDetailsService' ref='testUserDetailsService' /
  /bean

  bean id='testUserDetailsService'
class='org.springframework.security.userdetails.memory.InMemoryDaoImpl'
property name='userMap'
  value
testadmin=testadmin,ROLE_ADMIN
testuser=testuser,ROLE_USER
  /value
/property
  /bean

  !-- Inject Wicket Application --
  bean id=authTestApplication class=application.TestApp
property name=authenticationManager ref=authenticationManager/
  /bean

/beans
---8---

Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Openid integration?

2008-12-02 Thread Jan Kriesten

Hi Nino,

 I have something working only partially though, cant get email and name
 attribute back from the openid provider properly.. Seems to work with
 openid.org, but not claimid.com or myopenid.com

why not using spring-security and don't have any more hassle at all?

Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Insights on templating and dynamic components

2008-11-29 Thread Jan Kriesten

Hi,

I just wrote up a bit on my quest to support dynamic wicket components from
template generated markup code. You'll find it here, including (Scala) code:

http://www.footprint.de/fcc/2008/11/some-wicket-scala/

It should be usable from Java as well, though!

Have fun!

Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Testing with jetty embedded in test + httpunit

2008-11-23 Thread Jan Kriesten

Hi,

running a Wicket application with jetty:run works just fine.

Now I thought it should be possible to launch an embedded jetty within a test
and have httpunit run against it.

Written the test and starting up the internal jetty: Everything seems to be
fine, application is launched with the complete environment (spring injection,
spring security listener).

Now comes httpunit: Requesting the TestSuitePage == 500 servlet exception! :-O

12:49:17.426 ERROR o.a.w.RequestCycle - Markup of type 'html' for component
'test.TestSuitePage' not found

I double checked that TestSuitePage.html is actually in place and copied to the
test-classes folder.

Has anyone a clue what I'm doing wrong or which settings I have to adjust to
make Wicket happy?


Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Testing with jetty embedded in test + httpunit

2008-11-23 Thread Jan Kriesten

grml - problem solved.

Sometimes one's just too stupid... :-(

Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migration to 1.4 - generic headache

2008-10-29 Thread Jan Kriesten

Hi Igor,

 yes it sucks. i agree. personally i prefer code written against wicket
 1.3. even in 1.3 i hardly had to cast anything and even with those
 casts i do not remember getting any class cast exceptions.

hehe - just as I was saying months ago. *g*

 anyways, we will see how it goes. until 1.4 i think the generics will
 stay the way they are unless we hear a ton of users complaining.

If you need someone to complain you may always call on me. :D

--- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migration to 1.4 - generic headache

2008-10-29 Thread Jan Kriesten

Hi Igor,

 you are against generics completely. but they are going to happen. the
 way they are now is not perfect, in 1.5 we will try to move them to a
 better place, but like it or not they are here to stay.

huh - hell, no, I'm not against generics at all. Where do you get that from? I'm
against generics on Components which are not FormComponents (or ListViews)!

I'm using Wicket together with Scala and other than with Java, I can't just drop
the generics attributes (and live with the warnings). And the Void is really a
hell of a generic...

Generics on Models are what is needed and if your vision to decouple models from
the component and use introspection/reflection to support them comes true I'd be
quite happy (and could use Scala's mixin-feature to have my model functionality
on the components).

Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wicket-ioc/cglib constructor injection

2008-10-20 Thread Jan Kriesten

Hi,

wicket-ioc/cglib (using 1.3-snapshot) has problems when it comes to creating
proxies for constructor injection (and also when it comes to enhance final 
classes):

Caused by: java.lang.IllegalArgumentException: Superclass has no null
constructors but no arguments were given
at net.sf.cglib.proxy.Enhancer.emitConstructors(Enhancer.java:721)
at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:499)
at
net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
at
org.apache.wicket.proxy.LazyInitProxyFactory.createProxy(LazyInitProxyFactory.java:173)
at
org.apache.wicket.guice.GuiceComponentInjector.inject(GuiceComponentInjector.java:114)


Is there a way around this or could the above cases just handled to not be
enhanced at all?

Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket-ioc/cglib constructor injection

2008-10-20 Thread Jan Kriesten

Hi Igor,

 add a package private default constructor to your class.

default constructor wont work in this case.

 these are all well known limitations of proxying classes, you should try to
 make sure your injected dependencies are interfaces or you something like
 salve so no proxies are needed.

Defining an interface for the class results in wicket-ioc not injecting the
original class/constructor at all. So there's a flaw with this approach.

Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket + sso (jCIFS)

2008-10-16 Thread Jan Kriesten

Hi,

filters are applied in order of their appearence in the web.xml - so when your
wicket-filter is applied, there hasn't any authentication been performed...

Best regards, --- Jan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket + sso (jCIFS)

2008-10-16 Thread Jan Kriesten

Hi James,

 I think it's the order they are mapped in the web.xml file.  The
 declaration order doesn't decide what goes first/last.  Basically, the
 filter-mapping elements decide the order.

right, but I used the word 'filter' not as a synonym for the xml-tags but the
application of the filter definition. :-)

But I think he got what I wanted to say, anyway. ;-)

Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxRequestTarget is null in Internet Explorer 6

2008-09-22 Thread Jan Kriesten


 I´m struggeling with the AjaxFallbackLink the target object is null, if it
 runs to the onClick() method. 

 I still have that problem and why is sb. responding to another thread... 

You should check the documentation what 'null' means on a AjaxFallbackLink: you
don't get an Ajax but a normal (read: fallback) request!


Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scalability PageMaps

2008-09-18 Thread Jan Kriesten

 Also, looking at this whole thing.
 32000 concurrent sessions on one machine? What are you trying to achieve? I
 have yet to see a machine that can handle 32k concurrent users...

hehe - the new 'Office Cray' CX1 might be up for the challenge. :D



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scalability PageMaps

2008-09-18 Thread Jan Kriesten

you can order it with windows hpc _or_ red hat linux :-)

 I saw that yesterday.  I wonder if that thing will run linux?  When I
 get rich and infamous, I'm buying one.

 Also, looking at this whole thing.
 32000 concurrent sessions on one machine? What are you trying to achieve? I
 have yet to see a machine that can handle 32k concurrent users...

 hehe - the new 'Office Cray' CX1 might be up for the challenge. :D


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket and Mootools?

2008-09-17 Thread Jan Kriesten

 What is the best way to integrate mootools in wicket ?
 Does Mootools slow down the application? Does somebody had good expierence 
 with it?

there is already a project in wicket-stuff with this... :-)

best regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Web statistics tools, analysis

2008-09-03 Thread Jan Kriesten

Hi,

 Google Analytics?

I have my problems with this, actually. There are privacy-policy-issues with
Google Analytics, especially in germany. You have no control to remove log
information after a certain time or remove tracks if user demand it.

As nice as Google Analytics looks, it's actually against German laws to just
give 'personal' user data to a third party without the user having agreed to it.
And IP's are considered personal data. Google and other companies are started to
be questioned about this service and how they comply to German laws on this
matter ([1], [2]) - and I for one find the questions valid.

All other log statistics are mostly based on nice URLs (e.g. awstats), so the
question remains I suppose.

Best regards, --- Jan.


[1]
http://www.heise.de/newsticker/Datenschutzbeauftragte-kritisieren-Google-Analytics--/meldung/110603
[2] https://www.datenschutzzentrum.de/tracking/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DataTable - tfoot before tbody?

2008-08-31 Thread Jan Kriesten

Hi Eyal,

 When I look at FireBug, I see that the tfoot section of the table is BEFORE
 the tbody.
 Has anyone encountered this?
 Do I do something wrong?

this is intented and required by the HTML spec:

http://www.w3.org/TR/html4/struct/tables.html#h-11.2.3

Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Convenience

2008-08-26 Thread Jan Kriesten

Hi Uwe,

 new TextField(..).setRequired().setVisible().setEnabled()
 instead of having to
 new TextField(..).setRequired(true).setVisible(true).setEnabled(true)
 
 what do you think ?

nah - you're just lazy. ;-) Not more convenience-methods, there are already
too many...

Best regards, --- Jan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DefaultDataTable

2008-08-17 Thread Jan Kriesten

hi uwe,

 using DefaultDataTable, how to best apply css to the columns (in order
 to size them, etc)

by using an IColumn implementing IStyledColumn: getCssClass()

best regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [announce] Wicket in Action e-book has been published!

2008-08-14 Thread Jan Kriesten


Congrats to both of you for going thru this and not giving up. I know how it is 
to write (although not on a scale that big!) - your work is very much 
appreciated! :-)


Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DiskPageStore - FileNotFoundException

2008-08-04 Thread Jan Kriesten


Hi,

with the current 1.3-Snapshot, I encounter problems with DiskPageStore:

---8---
09:30:43.151 ERROR [.wicket.protocol.http.pagestore.DiskPageStore] - Error 
flushing page
java.lang.RuntimeException: java.io.FileNotFoundException: 
/usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht

-filestore/abcgm_hyTIaiqgnqDNmUr/pm-null (No such file or directory)
at 
org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:104)
at 
org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:171)
at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241)
at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:891)
at 
org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:961)

at java.lang.Thread.run(Thread.java:613)
Caused by: java.io.FileNotFoundException: 
/usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht-filestore/abcgm_

hyTIaiqgnqDNmUr/pm-null (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.init(RandomAccessFile.java:212)
at 
org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:99)

... 5 common frames omitted
---8---

The path 
/usr/local/www/services/local.silberlicht.de/html/WEB-INF/tmp/Silberlicht
-filestore/ actually exists and has the proper rights - so creation of temporary 
directories/files should be possible (actually, the directory was created by the 
wicket app).


Is this a bug I should report to JIRA? Anyone else seeing this?

Best regards, --- Jan.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: LocaleUrlsEncodingStrategy ?

2008-07-12 Thread Jan Kriesten


hi nino,


Because of the way wicket handles locale, it's only for the cache's sake...
Whats wrong with my approach, the code are below link.
http://papernapkin.org/pastebin/view/1635/ 


i haven't really looked at your code, but i'd use an approach with a modified 
filter to handle this.


there was a thread on a similar topic some time ago:

http://www.nabble.com/Localization%2C-Bookmarkable-pages%2C-and-mounting-strategies-to16676213.html#a16682606

best regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: LocaleUrlsEncodingStrategy ?

2008-07-12 Thread Jan Kriesten


hi nino,


did you have a java version of the filter also? I guess Sebastian has it?


no, i switched completely to scala, sorry. maybe sebastian has implemented it in 
java.


best regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: generics

2008-07-02 Thread Jan Kriesten


Hi,


i agree that its no big deal, i am just trying to figure out some sort
of guidelines for when we do include the type and when we dont. if we
say that we only include the type when the component uses its model
then neither Link nor Form qualify. in fact neither will ListItem.
only things like ListView and FormComponents will qualify.


I'd actually prefer untyped Link and Form, since I also don't use Models on them 
directly most of the time. But other's may have a different style and always use 
Models...


Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket @ berlin.jar Java Conference

2008-07-01 Thread Jan Kriesten


Hi,

I will present Wicket at berlin.jar.

The presentation will be based on my presentation from october last year (with 
some updates of course). I hope to see some of you around there! :-)


More infos on berlin.jar at http://berlin.jar.jug-bb.de/

Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WebPage markup error with latest trunk

2008-06-24 Thread Jan Kriesten


hi sven,


Did somebody create a jira issue already?


https://issues.apache.org/jira/browse/WICKET-1664

best regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: wicket generics

2008-06-07 Thread Jan Kriesten


hi igor,

that's a mess. :-(

i would go for decoupling component/model for 1.4 - that makes a clean cut for 
the api towards generics. everything else is just half-baked.


my 2c, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-04 Thread Jan Kriesten




i was of the generify component and model mind while i was
generifying the framework, but after coding against it i began to see
some of the ugliness and now my mind is almost changed.


yep, day to day usage is the main point.

i came to that conclusion as well when i was trying to migrate somewhat 
non-trivial use of wicket to 1.4 base. the standard components like link et al 
aren't the real problem (though it doesn't look pretty), it gets complicated 
when you're using non-trivial components (like datatable and their dependents) 
where the type on the component gets in your way.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-04 Thread Jan Kriesten


hi johan,


and remove getModel/getModelObject methods from component itself?
But then everybody that does use models have to implement it..


that would be the consequence with it's tradeoff.

i wouldn't have a problem with that though:

val myLabel = new Label('id') with StringModel( :-P )

but i suppose the java lobby will complain... ;-)

regards, --- jan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: recursive component

2008-06-04 Thread Jan Kriesten


hi stefan,


The think is the markup is required to be like this. The only thing I'd
like to reduce is the written java code. In short I'd like to create a
reusable node component that I can configure (with populateCaption() and
populateChildren() callback methods perhaps) just like the Loop :)


martijns solution still applies - just make your own panels with the needed 
methods?!


regards, --- jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: configurable component

2008-06-03 Thread Jan Kriesten


hi stefan,


Is there a way to configure the wicket components using the html markup?

I would like to do something like this:

table
tr wicket:id=group1
...
/tr
tr wicket:id=group2 wicket:component=parent=group1
...
/tr
tr wicket:id=group3 wicket:component=parent=group2
...
/tr
/table

The reason for this is that I want to create tables with collapsible
rows (if group1 is collapsed then group1 and group2 are not shown)


since you would have to add specific components 'group2' and 'group3' from 
within java, anyway, you can add 'isVisible' logic there, not?


best regards, --- jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-03 Thread Jan Kriesten



If only we had type inference :-)
Is this any nicer in scala?


in scala you wouldn't have to have the getModel/getModelObject within Component 
in the first place (you could use mixins for this purpose).


--- Jan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-03 Thread Jan Kriesten


Hi Gabor,


I was thinking about using the existing wicket 1.4 API from scala, if
that's any more comfortable.


I tried to migrate a bigger project from 1.3 to 1.4 api - and it isn't really 
more comfortable. It's easier to do one or two casts than trying to conform the 
generics Component structure. Especially since there are cases with 1.4 generics 
(like StringResourceModel) which sometimes aren't recognized as IModelString 
(which of course is more a Scala than a Wicket problem)...


Best regards, --- Jan.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-03 Thread Jan Kriesten


Hi James,


Remember that 1.4 isn't done yet either.  Perhaps these are just
growing pains that the wicket team is going through (or perhaps it's
not).


it's not... ;-)

No, really, I have invested quite some time to get comfortable with Components + 
Generics. And I came to the conclusion: it's not worth it.


Regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten



1) Generifying* Wicket
   [X] Can best be done in a limited fashion, where we only generify
IModel but not components. I care more about what generifying can do
for API clarity (declaring a component to only accept certain models
for instance) than static type checking.



2) How strongly do you feel about your choice above?
   [X] I might rethink upgrading if my choice doesn't win.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten


Hi,


I'm not sure I like where this discussion is going. I don't see anyone
having any particular objections against current state.


@matej_k:

ugh - you should count again... if I counted right, most of the responses yet 
prefer 'Component' /not/ being touched by generics.


 +1, I agree.  I think this discussion might be counter-productive if
 folks who aren't using the generified versions are voting.

@jwcarman:

There is an issue with generics on components which is leading into a big mess - 
and as far as I can see, many objections are especially on that topic! It might 
not be Wicket's fault, though, it might be a language problem (i.e. Java's to 
blame).


But IMHO putting generics on Component is a bad design, since it per se touches 
all of Wicket's Components without urgent need. Boilerplate over and over. If I 
look at my components and libraries (and yes, i have tried out 1.4!) - I have at 
most 30% of my components containing a Model!


Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten


Hi Matej,


Question is, how many of those users actually use generified wicket on
day-to-day basis.


well, I did, and it really doesn't looked nice (and it doesn't work as it should 
in the end, but that's another story).


The main point is (repeatedly) ignored by the people who are 'pro' generics:

Why do you have to put generics on Components, when need is only in a fraction 
of cases?


Discussing the possibility of Void is somewhat an obscure workaround. It's 
just boilerplate in more than 70% (of my cases), and this boilerplate gets 
repeated over and over again with each assignment.



Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten


Hi Sebastiaan,

I *really* would like to see a clarification of this statement. In 
Wicket the component and model are very tightly coupled.


that's part of the problem, agreed.

What is a *good 
design* alternative, where only IModel is generified? getModelObject() 
returns Object? getModel returns IModel??


IMHO the practical solution would be to leave generics from components and have 
getModelObject return Object, yes. On certain components (ListView e.g.), those 
methods may be overridden by more concrete implementations.


Regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten


Hi Sebastian,

What about getModel()? If componennt is not generified I'm really 
wondering if the there is any benefit to generics at all... (I do really 
think it will spawn lots of questions on the list as well).


what's the problem with getModel? If you specialize on a certain Component, you 
can implement T getModel() ?


Regards, --- Jan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten


Hi William,


If you use more than one type of model for a given component I would
hardly say that it is only a fraction of the time. Do you use only one
type of model on all your components? :o)


read again - I said 70% of my components don't have a Model...


The use of Void is not an obscure workaround. Why do you think they have
it? I think it's intent is very clear if you understand what void
represents. The key point is that Java generics are not runtime generics
;o)


See above, the point is having Void in there for especially nothing to gain - 
Just make reading harder and each assignment even longer...


Regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten


hi william,


Wouldn't that infer that the component has to have generics, or am I
missing something here?


you miss something...

getModel/getModelObject would have to be non-final and overriden by the 
specialized component (return types are covariant, so you can override object 
with something more specific).


regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten


hi william,


Enlighten me with an example


just like that:

Component { public object getModelObject(){ ... } }
FormComponentT extends Component { public T getModelObject() { ... } }

regards, --- jan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten


hi sebastiaan,

You could use Java's covariant return types to override getModel() to 
return a specific type. Which would mean that you would need to subclass 
to simulate generics (with a new subclass for each type).


not really, you can do generify your components from a certain level and 
wouldn't have to subclass for each type. that way you could require 
formcomponents to have generics on them, without the whole component tree 
generified.


but i guess this would also lead to many questions why this and not that...

i'd prefer living with have to cast when it comes to getModel/getModelObject...

regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: users, please give us your opinion: what is your take on generics with Wicket

2008-06-02 Thread Jan Kriesten


hi al,


The second is almost certainly worth doing. That said, I use PropertyModel
more often than anything else, and that doesn't allow you to make any
guarantees anyway. :-/


good point. :-)

regards, --- jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket and Google Gears / Adobe AIR

2008-05-27 Thread Jan Kriesten


just curious: what use does an air application have from a server-side 
html-rendering engine ?


hehe - you could use wicket as a xml-engine creating valid flex-markup... ;-)

regards, --- jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Class? extends Page?) casting troubles

2008-05-22 Thread Jan Kriesten


Hi Johan,


I thing that the example below is exactly the thing that generics are pretty
good:

populateItem(ListItemPerson item) {
   add(new LinkPerson(edit, item.getModel()) {
   public void onClick() {
   setResponsePage(new EditPage(getModelObject()));
   }
   });

(and EditPage is by itself already generified to Person)


well, just that the LinkPerson is IMHO redundant and unnecessary(just dropped 
a note to Martijn, but since you brought that up...)


populateItem(final ListItemPerson item) {
item.add(new Link(edit) {
public void onClick() {
setResponsePage(new EditPage(item.getModelObject()));
}
});

So, it might have sense with ListItem, but not necissarily with Link...

Regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Class? extends Page?) casting troubles

2008-05-22 Thread Jan Kriesten


Hi Johan,


But i really dont think that Person in link is redundant why is it?


the point was, that in this case Link simply doesn't need to have given a model 
at all, since you can access the surrounding final vars (you can access the item 
in onClick):



populateItem(final ListItemPerson item) {
   item.add(new Link(edit) {
   public void onClick() {
   setResponsePage(new EditPage(item.getModelObject()));
   }
   });


What else could you do/access in Link what is not possible with this approach?


Regards, --- Jan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Class? extends Page?) casting troubles

2008-05-22 Thread Jan Kriesten


Hi Johan,


ahh yes thats true i overlooked your changes..
then yes currently you have to do new LinkVoid (to get rid of the
warnings)


there are quite annoying many cases of this kind, where you really just don't 
need to add models to components and have to boilerplate these with Void or 
anything else.


So, I can really understand and support Martijns objections to have Component 
generified just for the sake of it.


If it's to clearify the API - make those cases generic or have them implement a 
different IModel (like ListModel e.g.).


Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Class? extends Page?) casting troubles

2008-05-22 Thread Jan Kriesten


hi sebastiaan,

I'm very much against using generics to do something other from what 
generics where meant to do (i.e., type safety).


i'm all in when you're talking about type safety. having compile-time checks on 
the types is a time-saver during development.


with wicket generics it's just that the time-saver get's in it's own way, i.e. 
bringing in so much boilerplate, that coding is getting harder to do right 
(besides from source readability).


regards, --- jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Class? extends Page?) casting troubles

2008-05-22 Thread Jan Kriesten


hi johan,


But if you have a lot of LinkVoid for you cases
then make 1 simple subclass of Link


so anyone make your own wrapper to get readable sources again? let me think: how 
many webmarkupcontainer, link, page etc. classes do i use with void?


i don't think that's a serious option.

--- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Class? extends Page?) casting troubles

2008-05-22 Thread Jan Kriesten


Hi Doug,

 The bottom line was that the work didn't take that long and in the end I
 feel my code is more readable and type-safe.

I have tried 4 times to convert my 1.3 codebase to 1.4 - and failed 4 times. All 
in all I spent 3 days and just reverted it.


There are API changes thru generics, which just break the way my app works.

Trying to code tables with PropertyColumns and IColumns just isn't readable any 
more due to having to cast (which before wasn't necessary)...


And the many Void aren't making it any better of course!


Best regards, --- Jan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: (Class? extends Page?) casting troubles

2008-05-21 Thread Jan Kriesten


Hi,


IModel getModel()
Object getModelObject()
I can live with having these methods not being generified.


for my own cases, generics have been also been more pain- than helpful with 
Wicket.

I don't see any _real_ advantage in having all components needing a type just 
for the sake of typing IModel.


Isn't there an alternative approach? I'd suggest moving to scala - but that's no 
 real option I suppose... ;-) Else one could just externalize the Model 
handling out of Component into a Trait which could be generified. For Java 
actually I have no idea how that could be accomplished for Wicket...


Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scheduler in wicket

2008-05-15 Thread Jan Kriesten


hi,


I am planning to use quartz, but before starting to integrate it in my
wicket's app i would like to know if anybody have used it or another scheduler 
with
wicket.


quartz is a good choice - it just works (tm).

best regards, --- jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why Localizer Retained so many heapsize?

2008-05-12 Thread Jan Kriesten


hi johan,


I will also open up Localizer api a bit more so that you can override the
cache that is used:


please make sure, that you also remove the direct access on the cache to check 
if it contains a certain key:


// Value not found are cached as well (value = null)
if ((cacheKey != null)  cache.containsKey(cacheKey))


Best regards, --- Jan.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >