[Wicket-user] ListViews dynamic Forms

2007-07-11 Thread Jan Kriesten

Hi!

After I had some chit-chat ;-) with Almaw today already on IRC I still am
looking for a solution fot the following problem:

Consider the following Form:

form
input name=description type=text value= / (required=true)
---
ListView:
n times input name=images type=text value=xy/
input type=submit value=add image/
---
input type=submit value=save/
/form

The 'add image'-button allows the user to add more input-fields of 'images' to
be added to the ListView. Everything works fine on this Form as long as the Form
validates and the Model gets updated on 'add image' - the ListView-input-fields
are saved before adding another entry.

But this doesn't work out in the above case, when description isn't yet filled
out (because it's a required field). Then the new images-input-field has to be
added within an 'onError'-Event. Since I change the ListViews's Model, I have to
call listview.removeAll() so the ListView is recreated from the Model (which
isn't updated because of validation errors). So any input the user entered to
the ListView-fields before pressing 'add image' are lost.

Inner Forms aren't an option either, because the images-input-field might also
not validate (I have quite an complex test case set up).

So, my question is: can I save the posted values to the model without actually
verify all fields? I tried to override validate() and only call super.validate()
when the 'save'-button is entered, but that didn't work out.

Any help is appreciated.

Best regards, --- Jan.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ListViews dynamic Forms

2007-07-11 Thread Jan Kriesten

Hi,

update on this topic:

I've found a workaround to update the ListViews childrens Models by walking the
Components below ListView with an IVisitor and do a updateModel() on all
FormComponents.

The question remains, if there's a way to do this without updating the Model?

Best regards, --- Jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] css-styles

2007-06-28 Thread Jan Kriesten

hi,

i've come across the problem that many components add special css-files and
that those headercontributions cummulate to a certain amount of lines with link
rel=stylesheet... - in my case up to 12.

so, the idea comes, having only one link line within the html-response and
within that all @import: url()-lines. but that would be a certain amount of
voodoo - not to mention to return the refs depending on the referrer...

just thinking loud... ;-)

cheers, --- jan.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-24 Thread Jan Kriesten

hi juergen,

 Solution: you simply must attach HeaderContributor.forCss to any other
 of your components (e.g. html in your code)

hmm, that i can do for own components, it'll break components like the wicket
tree, too!

also, this doesn't make sense, as when there is _no_ wicket-id in the
html-contributor works!

regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-24 Thread Jan Kriesten

hi juergen,

 I added my comment to the other thread obviously discussing the very
 same topic.

yes, have seen that. what i still don't understand is, why did it work when
there was no wicket:id in the html? only the wicket:id broke 
header-contribution.

regards, --- jan.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] html wicket:id=html CSS]

2007-06-24 Thread Jan Kriesten

hi juergen,

 yes, this a valid comment. The html component is causing the
 problem. The header contribution code has obviously been designed in a
 way that it expects to be the very first contribution to the pages
 output markup. With the html component it no longer is, since the
 html tag must be rendered first and than, sometimes later, the
 head section.

i understand. so, wouldn't it be the easiest way to change the behavior of the
HeaderContributors to automatically do a

getBodyContainer().add( new HeaderContributor.forCSS() )?

this could be tricky since the HeaderContributors are static as far as i've 
seen.

 Though the most obvious approach doesn't right now, it is not a show
 stopper for you, since you can add the HeaderContributor to any other
 component of your page (except the page) and it'll work, correct?

not quite, my main problem isn't right now that my css don't get added to the
header, but the css for wicket-components like
org.apache.wicket.markup.html.tree.LinkTree

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] html wicket:id=html CSS]

2007-06-24 Thread Jan Kriesten

hi juergen,

 I've reverted the change to WebPage, so it should work.
 And I think a found the reason why HtmlHeaderContainer didn't work as
 expected. I changed that too, all junit tests are still fine. I'll
 committ it in a minute.

yep, great job! seems to work fine now - thanks! :-)

you've deserved a relaxed sunday now! ;-)

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] [Fwd: Re: html wicket:id=html CSS]

2007-06-22 Thread Jan Kriesten

copy to the list, as sourceforge doesn't allow zip-attachments atm.


 Original Message 
Subject: Re: [Wicket-user] html wicket:id=html  CSS
Date: Fri, 22 Jun 2007 08:53:23 +0200
From: Jan Kriesten [EMAIL PROTECTED]


Hi Juergen,

 I'll try my best to find some spare time to do it. Hopefully over the weekend.

much appreciated, thank you! :-)

I attached a zip-file containing the example.

Best regards, --- Jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] html wicket:id=html CSS

2007-06-21 Thread Jan Kriesten

hi,

could someone verify that the given code doesn't work for him, too?

i'm lost a bit in this matter.

thanks!

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] html wicket:id=html CSS

2007-06-20 Thread Jan Kriesten

hi juergen,

actually, your example code doesn't add any css but only javascript. ;-)

i attached a simple example which shows the problem. the page - if correctly
rendered - should have a yellow background, but hasn't. the line

add( HeaderContributor.forCss( CSS ) );

doesn't lead to the corresponding html-code. if i remove the wicket:id from
html everything works as expected!

best regards, --- jan.






test.tar.gz
Description: GNU Zip compressed data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket Google Guice integration is in trunk

2007-06-20 Thread Jan Kriesten

Hi Al,

 I've just implemented Google Guice integration for Wicket 1.3.x.

that's simply just great news! :) Thanx for your efforts on this! :))

Best regards, --- Jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] html wicket:id=html CSS

2007-06-19 Thread Jan Kriesten

Hi,

I'm not sure, I remember something that has been said about giving html an id
and problems with HeaderContributors:

If I give the html a wicket:id to modify the 'lang'-attribute, it seems that
wicket isn't able to handle contributions to the header correctly any more (in
my case it broke the css for a tree).

Is there any way to work around this issue, yet?

Best regards, --- Jan.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] html wicket:id=html CSS

2007-06-19 Thread Jan Kriesten

hi juergen,

 Please see the jira issue. I was not able to reproduce it with the
 latest 1.3 trunk. SimplePageTest_13 at least shows that header
 contributions seems to work ok. If you could modify this test and
 proof your point, that would be very helpful.

i actually tested this with matej today afternoon (latest trunk) where we could
reproduce it with the tree component - i'll try send you an example tomorrow...

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] html wicket:id=html CSS

2007-06-19 Thread Jan Kriesten

hi juergen,

just looked at SimplePage_13.[html|java] - there is no
HeaderContributor.forCss(css) which couldn't work...

the modifiers for the html-attributes do work, that's not the problem. maybe
you missed the point?

best regards, --- jan.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Question] wicket.markup.html.form.Radio

2007-06-15 Thread Jan Kriesten

hi alex,

 Why wicket.markup.html.form.Radio component does not extend FormComponent?
 I wanted to add a FormComponentUpdatingBehavior to this component and it is
 not possible because it does not extend the FormComponent, but a
 WebMarkupContainer.

i've got a similar issue and this topic is already being worked on:

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

targeted for 1.3.0 beta 3

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] [Question] wicket.markup.html.form.Radio

2007-06-15 Thread Jan Kriesten

hi alex,

 Thank you Jan! Sad thing is that 1.2.x branch will never support this
 feature.

actually, if you're up to building it from the sources yourself, modifying Radio
to work as you expect is pretty easy.

just remove the 'final' from FromComponent.getValue() and let Radio extend
FormComponent instead of WebMarkupContainer. that should be all.

regards, --- jan.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket did not make the grade.

2007-06-11 Thread Jan Kriesten

hi,

 What I do: 
 - checkout the directory wicket-examples

try checking out not only wicket-examples but the whole trunk.
then you should have all dependencies.

regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket Acegi ?

2007-05-31 Thread Jan Kriesten

hi johan,

 hmm then i have to stopp working on it right now...
 because i am already passed the hour again


good work! thanx for doing so!

have you seen my example how to use acegi without using filters?

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket Acegi - small implementation

2007-05-30 Thread Jan Kriesten

huhu!

i just gave acegi with your wicket-role-model a try and came up with this quick
implementation (2 java  1 xml-file):

http://wicket.silberlicht.de/misc/acegi-wicket.tar.gz (2k size)

you need the acegi-framework from

http://www.acegisecurity.org/

and the spring.jar (acegi needs this for it's configuration - nothing else!).

if all libs/classes are in place, you can change the role-example to use
AcegiWebApplication and AcegiWebSession. make sure, that you have your Roles
configured in the acegi.xml! :-)

i think it's not 100% bulletproof but it's already usable. and you can
authenticate to what you like. :-)

if it's good enough and interesting for others, your welcome to add this to
the wiki.

best regards, --- jan.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Swarm - [was Wicket Acegi ?]

2007-05-29 Thread Jan Kriesten

Hi,

I followed this thread with great interest and just found out about Swarm.

What makes me wonder is, using Acegi as a Filter means not to use
component-based authorization. But it should be possible to integrate Acegi into
the application and all Filter-gotchas should be resolvable. Or am I missing
something?

Why re-invent the wheel with Wasp/Swarm?

BTW, I also stumbled over the HiveMind-naming. *g*

Best regards, --- Jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Swarm - [was Wicket Acegi ?]

2007-05-29 Thread Jan Kriesten

hi maurice,

i didn't want to stat a framework war... ;-)

my point was just to understand why you started a new thing. i'm currently in
the process of selecting a authentication/authorization framework, too. it
should be highly flexible, so it can integrated in very different environments.
still, the component oriented security should be reflectable.

what i was thinking about was - instead of using acegi as a filter and use it on
urls - integrate it in the wicket-app and act on top of the components. this
sounds like the wasp/swarm-concepts, only that acegi is the base.

what i really dislike about acegi is the spring/xml-stuff. but that's another
story... ;-)

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Swarm - [was Wicket Acegi ?]

2007-05-29 Thread Jan Kriesten

hi eelco,

 You're right, if you really want, you can use URL based authorization.

you got me wrong, i was thinking to integrate acegi into the app like wasp/swarm
is doing and so have an acegi-interface that can be used on component-level. so,
best of both worlds.

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Swarm - [was Wicket Acegi ?]

2007-05-29 Thread Jan Kriesten

hi martijn,

 what i really dislike about acegi is the spring/xml-stuff. but that's another
 story... ;-)
 
 If you take the spring/xml and the URL based authorization out of
 Acegi, what is left?
 
 Not a stab at Acegi, just asking.

hehe - now i'm having to argue pro acegi where i'm not yet finished finding out
if it really is what i'm looking for. *ggg*

first of all, what i dislike is the xml-/spring-injection-dependent
configuration. everything else is not tight to spring, it can be used in any
other environment.

everything else is:

acegi supports a wide range of authentication models. from http basic
authentication headers, ldap to jaas - you just have to choose.

also, the authorization is as customizable as is e.g. swarm. like in swarm, you
have to define your policies. it's just an implementation detail, if you use it
url- or component-based.

so, when thinking about authentication/authorization, i don't think of a
one-time-installation at one defined customer but how it can be integrated into
a variety of heterogenous systems. having a wicket application running in a
system using a service-oriented-approach, i might have to use a ticketing system
(like cas) to handle authorization. acegi delivers such functionality.

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Swarm - [was Wicket Acegi ?]

2007-05-29 Thread Jan Kriesten

hi eelco,

 It's definitively possible to use Acegi ACL stuff with Wicket's auth
 model. You'll have to build it yourself, but once you know you're way
 around Acegi and you exactly what your requirements are, implementing
 it shouldn't be too difficult.

see my post to martijn - having the wicket's auth system on top of acegi would
deliver an easier concept for complex systems (like soa etc).

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Swarm - [was Wicket Acegi ?]

2007-05-29 Thread Jan Kriesten

hi eelco,

 Yeah, makes sense. Contributions are welcome of course. We don't mind
 having competing implementations; it'll only make them better :)

hehe, i'll keep you posted. ;-)

--- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] FormComponentLabel for Radio?

2007-05-03 Thread Jan Kriesten

hi,

isn't it possible to create a FormComponentLabel for Radio??

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] getting object from model using propertyExpression

2007-04-20 Thread Jan Kriesten

hi,

is there a way to use property expressions to get an object from a complex 
model?

my problem is, that i'm building the form dynamically based on a structure _and_
the model - the model contains the relevant data, the structure defines the form
 elements.

so, building the form depends first on the structure (which defines
binding/property expressions) and the concrete number of form entries depends on
the model - so i need to access the model during form building with the property
expression. since wicket does this already - i shouldn't need to implement this
manually... :D

best regards, --- jan.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] getting object from model using propertyExpression

2007-04-20 Thread Jan Kriesten

hi eelco,

no, you misunderstood me - i need to access the model /before/ my components are
created (cause the number of components to be created depends on the model).

i found the helper class myself:

Object property = PropertyResolver.getValue( binding, model.getObject() );


but thanks for your efforts!

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] html lang=en -- change lang?

2007-04-20 Thread Jan Kriesten

hi,

is it possible to change the attributes of the html-tag, too?

best regards, --- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] have wicket ignoring compononts/tags

2007-04-16 Thread Jan Kriesten

hi,

is it possible to have wicket configured to ignore references which can't be
resolved?

e.g. trying to add a component which doesn't exist in the markup (ok, this could
be done by catching the thrown exception, but only if the 'add'-method is used)
or not adding a component which is referenced in the markup.

background: i have different targets to publish from the same content system.
not all targets need all information displayed, so some markup files miss
certain id's (same classes are used, markup used is decided by the target to
publish to).

another use-case would be having generic markup files which are used as
'default', containing more wicket-tags than actually served by the corresponding
class.

optimal would be a page-based property

greets from sunny hamburg! :-)

--- jan.



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] dynamic forms panels

2007-04-12 Thread Jan Kriesten

hi,

i've followed the discussions on the list about dynamic forms and the solution
using panels. but actually i'm doing myself hard getting this concept 
implemented.

i have done the following successfully using stripes and freemarker, using
recursions in depth, but wicket is another story:

i have an xml-file describing a content type (which comes from a database) like
this:

---8---
?xml version=1.0 encoding=iso-8859-15?
content-descriptor name=artikel
  tab name=personal
input type=datetime name=published required=true /
input type=select mode=dropdown name=gender required=true 
  option label=choose value=/
  option label=female value=f/
  option label=male value=m/
/input
input type=text/line name=username size=100 required=true /
input type=boolean name=active value=true /
  /tab
  tab name=misc
group name=bilder maxentries=3
  input type=file name=foto maxentries=3 required=false /
  input type=text/line name=description required=false size=100 /
  group name=morefiles maxentries=2
input type=text/line name=text1 required=true size=100 /
input type=text/line name=text2 required=true size=100 /
  /group
/group
input type=text/tagged name=skills required=false /
input type=select mode=radio name=color required=false 
  option label=red value=r/
  option label=green value=g/
  option label=blue value=b/
/input
input type=select mode=multi name=pets required=false 
  option label=dog value=dog/
  option label=cat value=cat/
  option label=squirrel value=squirrel/
/input
  /tab
/content-descriptor
---8---

based on this description (the tab-entries represent tabs in the form and are
not reflected in the content), i have contents coming from a database:

---8---
?xml version=1.0 encoding=iso-8859-15?
content
  published20.01.2006/published
  genderm/gender
  usernameJan/username
  activetrue/active
  bilder
foto27/foto
foto22/foto
descriptionmy fotos/description
morefiles
  text11/text1
  text22/text2
/morefiles
  /bilder
  bilder
foto21/foto
foto50/foto
foto5/foto
descriptionArtworks/description
morefiles
  ein_textinfotext 1/ein_text
  zwei_textinfotext 2/zwei_text
/morefiles
  /bilder
  skillsI am a player! :)/skills
  colorr/color
  petssquirrel/pets
/content
---8---

what i'm trying to do is building a form which represents the content based on
the descriptor. that means dynamically add entries, hierarchies to the content
when the user wishs to.

as far as i understand i would have to create panels for each type in the
descriptor. but how should the starting point be used? having a listview and add
different panels? how could groups be handled - how would the content in a
recursion be updatable. i'm quite lost in such a complex scenario with wicket. i
guess i've been in the wrong programming model for quite a while... ;-)

with stripes, i converted the content into a typed list which contains typed
maps and list, stripes handles the types via reflection. the recursion was then
done in freemarker over the nodes of the descriptor and the list. adding entries
to the lists/maps was then handled by the actionbean.

anyone up for the challenge?

best regards, --- jan.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] available application locales

2007-04-04 Thread Jan Kriesten

hi,

i'm quite new to wicket and am impressed. :-)

i just stumbled over the i18n/l10n questions, which are relevant in most of our
projects. if anyone could enlighten me how the following can be resolved with
wickets:

we have a database driven approach localizing our application. so there is a
config telling the app, which languages are available. all pages are available
in all configured languages, a nav-link is available on any page to switch 
language.

this said, how can i dynamically create links to a specific language of the same
page? can i define/map distinct url-path to languages (e.g. /en/index.html,
/de/index.html)?

thanks for your time! :-)

--- jan.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] available application locales

2007-04-04 Thread Jan Kriesten

hi marc-andre,

 Add a Link, in the onClick method, add the code to set the local setting
 for this session.  That's it.

ah, yes - that solves on part, another problem still remains, how to direct link
(from extern) to a specific language? that's why i asked for distinct
url/language paths.

regards, --- jan.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] available application locales

2007-04-04 Thread Jan Kriesten

huh - that really sounds scary...

mounting hundreds of paths within a dynamically generated site. having just a
default path-attribute added and evaluated would be nicer.

i'll have to check this.

but thanks so far!

--- jan.

Marc-Andre Houle wrote:
 Add a page parameters to your page that include a parameter to the
 language to use.
 Make sure to use a bookmarkable page (use bookmarkable link).
 
 and to get a nice url, use mounting(Can't find quickly in the wiki, but
 here's the javadoc
 http://wicketframework.org/apidocs/wicket/protocol/http/WebApplication.html#mountBookmarkablePage%28java.lang.String,%2520java.lang.Class%29)
 
 By using nice mounted page, you can add a link that will look like :
 http://host/application-name/page-name/param-name/param
 So, for an application wicket, on the page index using parameter
 language, you would have a url :
 
 http://host/wicket/index/language/french
 
 In the constructor of your page, use the page parameters to determine
 what exactly to render back to the user.
 
 Not sure if it is cleanly explained, but there is plenty of example in
 this list about mounting and page parameters...  Sound scary but it is
 really a piece of cake.
 
 Marc
 
 On 4/4/07, *Jan Kriesten* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
 
 hi marc-andre,
 
  Add a Link, in the onClick method, add the code to set the local
 setting
  for this session.  That's it.
 
 ah, yes - that solves on part, another problem still remains, how to
 direct link
 (from extern) to a specific language? that's why i asked for distinct
 url/language paths.
 
 regards, --- jan.
 
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to
 share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
 
 
 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user