Re: Can we expose ExceptionErrorPage via IApplicationSettings please?!

2008-04-18 Thread Ned Collyer

Ok ill stay with what I have then because it will work when you enhance your
respond method :)

I do not think being able to skin or extend the ExceptionErrorPage is so
custom as to be unsupported, but I do have an ugly solution that works
around this shortcoming.

Rgds

Ned


igor.vaynberg wrote:
 
 sounds to me like what you should do is simply subclass
 webrequestcycleprocessor and override the entire
 respondonruntimeexception() and ignore whatever is in the app
 settings. simply return your own page that would inspect the user and
 based on that display the general message and maybe the stacktrace if
 appropriate. it can also take the applicaton's deployment mode if you
 want.
 
 sounds to me like what you want is so custom there is no positive
 reason to reuse what is already there.
 
 -igor
 

-- 
View this message in context: 
http://www.nabble.com/Can-we-expose-ExceptionErrorPage-via-IApplicationSettings-please-%21-tp16758488p16760381.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: client side handling of ajax request session expiration

2008-04-18 Thread Erik van Oosten
Hi Ywtsang,

Not an answer to your question, but you can also consider using a ajax
timer to keep the session alive.

For example as outlined in
http://chillenious.wordpress.com/2007/06/19/how-to-create-a-text-area-with-a-heart-beat-with-wicket/.

Regards,
Erik.


ywtsang wrote
 we want to handle session expiration exception triggered by an ajax request

 since the session is expired, the ajax request can't be forwarded to the
 corresponding ajax behavior, instead, the server throw session expiration
 exception 
 (we have configured the handling by
 getApplicationSettings().setPageExpiredErrorPage)

 the handling is ok for non-ajax request, but not ajax request

 we want to handle that using client side javascript

 how can we achieve that?

   

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


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



SWARM OR wicket-auto-roles ?

2008-04-18 Thread mfs

Guys, 

I need some suggestions as to which of the above would be the right
framework for the the application i am currently working on..Some important
fact which would help are as follows : 


1) All the pages in the application would be secure and hence would require
authentication. 

2) There would be two type of users accessing the application. For now, i
see access being restricted on the whole page itself rather on more granular
components. But later down the road that would come in too as the scope
increases. 

3) IMP - The application has to support inter-operability with some other
external apps. Now these (non java) external apps already have their own
mini authentication framework and thats what i will be using for user
authentication. So basically for all my Secure Pages i would have to
redirect to the LoginPage part of these external apps (and not wicket), I
hope thats possible ? , i believe it is with SWARM, some hints would be
really appreciated on that too. A bit on the authentication mechanism, so
basically on succesful login, this external app would 1) encode an authtoken
in the url 2) transfer the control over to my wicket app, and thats where i
would check if it is a valid/authenticated user based on the authToken.
Later on we plan to change this though, and instead have the authtoken
passed over in the cookie instead. 

Initially when i started of i wasnt planning to use any of the above
frameworks but than taking a look into SWARM made me feel like that it might
be a good choice, but would still want to have everyones opinion 

Please comment.. 

Thanks in advance

-- 
View this message in context: 
http://www.nabble.com/SWARM-OR-wicket-auto-roles---tp16760752p16760752.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Form clear

2008-04-18 Thread Mathias P.W Nilsson

Hi!

I have an user Form that is posted with AjaxFallbackButton. When the forms
gets submitted without error
I want to clear the form. How can I reset the form? 
-- 
View this message in context: 
http://www.nabble.com/Form-clear-tp16760778p16760778.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DropDownChoice problem

2008-04-18 Thread Johan Compagner
Yes i also hope that these questions are finally dont come any more.
Checkout the current trunk and its way more clear

On 4/18/08, John Krasnay [EMAIL PROTECTED] wrote:
 This has to qualify as one of the most common questions on the list!
 Hopefully, generics in 1.4 will make it more clear.

 The items in your list have to be the same type as the value model (the
 PropertyModel in your case). In your case, Wicket is complaining because
 the PropertyModel returns a long, but the list contains Authors.

 The cleanest solution is to change your property type to Author. If you
 can't, you can either give the DDC a list of author IDs instead of
 Authors (in which case you need to implement
 ChoiceRenderer.getDisplayValue to look up the author's name given an ID)
 or implement a custom model instead of the property model:

 IModel authorModel = IModel() {
   public Object getObject() {
 return lookUpAuthor(article.getArticleAuthorId());
   }
   public void setObject(Object object) {
 article.setArticleAuthorId(((Author) object).getId());
   }
 }

 HTH

 jk


 On Thu, Apr 17, 2008 at 04:05:45PM -0500, Andrew Broderick wrote:
  Hi,
 
  I have a DropDownChoice in a form, with markup:
 
  select wicket:id=authors /
 
  In my Form class, I add it like this:
 
add(new DropDownChoice(authors, new
 PropertyModel(this.article, articleAuthorId),
acService.getAuthors(), new
 ChoiceRenderer(authorDisplayName, articleAuthorId)));
 
  this.article refers to a class that has a property of articleAuthorId:
 
public long getArticleAuthorId() {
  return articleAuthorId;
}
 
public void setArticleAuthorId(long articleAuthorId) {
  this.articleAuthorId = articleAuthorId;
}
 
  The acService.getAuthors() call gets a list of Author objects:
 
  public class Author implements Serializable {
 
private long articleAuthorId;
private String authorFirstName;
private String authorMiddleName;
private String authorLastName;
private String authorDisplayName;
 
 
public String getAuthorFirstName() {
  return authorFirstName;
}
public void setAuthorFirstName(String authorFirstName) {
  this.authorFirstName = authorFirstName;
}
public String getAuthorMiddleName() {
  return authorMiddleName;
}
public void setAuthorMiddleName(String authorMiddleName) {
  this.authorMiddleName = authorMiddleName;
}
public String getAuthorLastName() {
  return authorLastName;
}
public void setAuthorLastName(String authorLastName) {
  this.authorLastName = authorLastName;
}
public String getAuthorDisplayName() {
  return authorDisplayName;
}
public void setAuthorDisplayName(String authorDisplayName) {
  this.authorDisplayName = authorDisplayName;
}
public Long getId()
{
  return new Long(getArticleAuthorId());
}
public long getArticleAuthorId() {
  return articleAuthorId;
}
public void setArticleAuthorId(long articleAuthorId) {
  this.articleAuthorId = articleAuthorId;
}
  }
 
  The error I get when I try to render the page is:
 
  WicketMessage: No get method defined for class: class java.lang.Long
 expression: articleAuthorId
 
  I don't understand this, as the class used for the choices is Author, not
 java.lang.Long 
 
  Any help appreciated!
 
  Thanks
 
 
 
 
  ___
 
  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214

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



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



Re: Form clear

2008-04-18 Thread Gerolf Seitz
you have to clear the model of the form(components).
so either set a new (empty) model object for the form (in combination
with a compoundpropertymodel) or you have to reset the models of
the formcomponents somehow one by one...

  Gerolf

On Fri, Apr 18, 2008 at 8:53 AM, Mathias P.W Nilsson [EMAIL PROTECTED]
wrote:


 Hi!

 I have an user Form that is posted with AjaxFallbackButton. When the forms
 gets submitted without error
 I want to clear the form. How can I reset the form?
 --
 View this message in context:
 http://www.nabble.com/Form-clear-tp16760778p16760778.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




No built-in converter for Locale.class?

2008-04-18 Thread David Leangen

Before I go and write my own, I just wanted to make sure that there is
no built-in Converter for Locale.

Looking through the code tells me that it's not supported by default. Is
this so?


Thanks,
David




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



Re: Form clear

2008-04-18 Thread Michael Sparer

As you should reset the form's model object anyway, you could pass the form
to the AjaxRequestTarget

e.g.
onSubmit(AjaxRequestTarget t) {

   Object o = getModelObject();

   businessLayer.process(o.clone());

   o.setFoo(null);
   o.setBar(null);

   if (t != null) {
   t.addComponent(this);
   }
}

haven't tested it but should work. maybe you can't set outputmarkupid = true
on forms, then you have to put it into a webmarkupcontainer and add the
container to the target.

regards, 
Michael

Mathias P.W Nilsson wrote:
 
 Hi!
 
 I have an user Form that is posted with AjaxFallbackButton. When the forms
 gets submitted without error
 I want to clear the form. How can I reset the form? 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Form-clear-tp16760778p16761355.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: checkboxes and Link

2008-04-18 Thread Michael Sparer

what i do to accomplish this is something link that:

CheckGroup group = new CheckGroup(group, new ArrayListFoo());
group.add(new CheckGroupSelector(selector)); // -- selects all options

and in the listview's populateItem method

item.add(new Check(check, yourModelObject));

hope that helps

regards, 
Michael

Mathias P.W Nilsson wrote:
 
 Hi!
 
 I need to add Checkboxes to a listview and a way to check, uncheck all
 checkboxes using a Link.
 any pointers would be appreciated.
 
 
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/checkboxes-and-Link-tp16757399p16761724.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Status of acegi/wasp/swarm?

2008-04-18 Thread Maurice Marrink
On Fri, Apr 18, 2008 at 2:00 AM, David Nedrow [EMAIL PROTECTED] wrote:
 We use acegi for one purpose, and that is to authenticate  and authorize
 (AA) against our corporate SiteMinder server. We have existing Spring-based
 applications that successfully auth against SiteMinder via acegi.

  We're starting a new project and are planning to use Wicket. It looks as
 though one currently has to use some Spring bridging to inject acegi into a
 Wicket application.

  Are there plans to replicate the functionality of acegi as it relates to
 AA?

Well we could argue that with Wasp we are already on our way to do
that :) after all the main power of acegi is providing hooks to
implement your own AA. Swarm can be regarded as a reference
implementation.
The fact that acegi also comes bundled with a lot of implementations
for AA against all sorts of services is something we also strife for
however for that we will be needing help from the community :)


  Basically, is there, or wlll there be, a means for me to
 authenticate/authorize/etc against something like SiteMinder without having
 to slide in bits of Spring to do it?

At the moment there is nothing out of the box other than our coupling
with acegi. But i am confident that with the api that is available it
will be possible for you to build your own, perhaps if it is ready you
can contribute it to the community.
You could provide a mapping between Swarm and SiteMinder or you can
build your own Wasp implementation that connects directly to a
SiteMinder server.

Maurice



  -David

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



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



Re: Problems with Palette

2008-04-18 Thread Fabien D.

nobody can help me??

Fabien D. wrote:
 
 Hi everybody,
 
 I have two problems with the Palette.
 
 The first one is when the user submits the form and there are problems
 with the other textfield (Validator), the left field for the selection is
 reseted!! 
 
 The second problem is when all fields are good and when a try de getBack
 the list of selected objects, It returns the first object of my list as
 many as there are selcted objects : 
 
 exemple : 
 
 Available - reset when there is a probleme with validator
 Toto
 Tata
 
 Selected
 Titi
 Tutu
 
 The return is :
 Titi
 Titi
 
 The code  for my palette:
 
 ChoiceRenderer renderer = new ChoiceRenderer();
 List licences = CDataFromBDD.getListNameLicence();
 Mode model_licence = new Model((Serializable)licences);
 Mode model_licence_selection = new Model(new ArrayList());
 //parameter of the licence
 Palette licence = new Palette(licence, model_licence_selection,
 model_licence, renderer, 6, false);
 this.form_ajoutinfgeneral.add(licence);
 
 The code  for my form:
 form_ajoutinfgeneral = new Form(form_ajoutinfgeneral, new
 CompoundPropertyModel(this.model_sous_domaine)) {
   private static final long serialVersionUID = 1L;
   protected void onSubmit() {
   
   List selected =
 (List)model_licence_selection.getObject();
...
 }
 }
 
 Sorry for my english, I'm french, and thank you in advance :)
 
 

-- 
View this message in context: 
http://www.nabble.com/Problems-with-Palette-tp16722516p16761756.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: No built-in converter for Locale.class?

2008-04-18 Thread Johan Compagner
no
what should such a converted do?
And what should people type in as a text string?
Most of the times locales are none editable select boxes or list choices

johan


On Fri, Apr 18, 2008 at 9:40 AM, David Leangen [EMAIL PROTECTED] wrote:


 Before I go and write my own, I just wanted to make sure that there is
 no built-in Converter for Locale.

 Looking through the code tells me that it's not supported by default. Is
 this so?


 Thanks,
 David




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




how to recover the maxlength value

2008-04-18 Thread aynif

Hi,

I want to recover the maxlength value of the year field rather than
...append(', 4, ')... as in the code below (4 is the maxlength value) :

final TextField year = new TextField(year);
myForm.add(year);
year.setOutputMarkupId(true);
final TextField month = new TextField(month);
month.setOutputMarkupId(true);
myForm.add(month);
year.add(new AttributeModifier(OnKeyUp, true, new Model() {
@Override
public Object getObject() {
StringBuffer st = new StringBuffer();
st.append(Autotab(').append(year.getMarkupId()).append(', 4, 
').
append(month.getMarkupId()).append('));
return st.toString();
}
}));

-- 
View this message in context: 
http://www.nabble.com/how-to-recover-the-maxlength-value-tp16761987p16761987.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Swarm/Wasp or wicket-auth-roles or ?

2008-04-18 Thread Maurice Marrink
Maybe some other people could respond also since i am a bit biased :)
but here goes.

On Fri, Apr 18, 2008 at 7:14 AM, mfs [EMAIL PROTECTED] wrote:

  Guys,

  I need some suggestions as to which of the above would be the right
  framework for the the application i am currently working on..Some important
  fact which would help are as follows :


  1) All the pages in the application would be secure and hence would require
  authentication.

You can do this with Swarm, Wicket-auth-roles or a custom build
solution. It is dead easy.


  2) There would be two type of users accessing the application. For now, i
  see access being restricted on the whole page itself rather on more granular
  components. But later down the road that would come in too as the scope
  increases.

2 types of users sounds like something you could do easily with
Wicket-auth-roles, especially with the page security scope.
However if you want to go more granular later on i think Swarm would
be a better choice because it allows more flexibility on the
granularity of your authorization and makes no distinction between 2
or 200 user types


  3) IMP - The application has to support inter-operability with some other
  external apps. Now these (non java) external apps already have their own
  mini authentication framework and thats what i will be using for user
  authentication. So basically for all my Secure Pages i would have to
  redirect to the LoginPage part of these external apps (and not wicket), I
  hope thats possible ? , i believe it is with SWARM, some hints would be
  really appreciated on that too. A bit on the authentication mechanism, so
  basically on succesful login, this external app would 1) encode an authtoken
  in the url 2) transfer the control over to my wicket app, and thats where i
  would check if it is a valid/authenticated user based on the authToken.
  Later on we plan to change this though, and instead have the authtoken
  passed over in the cookie instead.

Well I haven't looked at all the possibilities yet but you could take
a look at 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/examples/yahoo-bbauth
it contains some unfinished code to let another server handle
authentication, another option might be something with the
WicketSessionFilter. There might be other (better) options i'm still
experimenting :)


  Initially when i started of i wasnt planning to use any of the above
  frameworks but than taking a look into SWARM made me feel like that it might
  be a good choice, but would still want to have everyones opinion

I think Swarm is flexible enough to handle your requirements, but like
i said before i am biased :)

Maurice


  Please comment..

  Thanks in advance
  --
  View this message in context: 
 http://www.nabble.com/Swarm-Wasp-or-wicket-auth-roles-or---tp16760342p16760342.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: JmxPanel

2008-04-18 Thread Paolo Di Tommaso
Thanks, I will try it. Anyway strange that there's this still this issue ..


// Paolo

On Thu, Apr 17, 2008 at 2:20 PM, gumnaam23 [EMAIL PROTECTED] wrote:


 Download the jmx panel source code and add an empty DIV element before the
 the JmxPanel.html

 here's patch,   (you need stuff between --START and -- END )

 svn diff src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html

 -- START

 Index: src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html
 ===
 --- src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html (revision
 3817)
 +++ src/main/java/org/wicketstuff/jmx/markup/html/JmxPanel.html (working
 copy)
 @@ -15,6 +15,7 @@
limitations under the License.
  --
  wicket:panel
 +   div style=clear:both /div
div wicket:id=jmxBeanTable/div
 div style=clear:both/div
 /wicket:panel

 -- END

 Or you can ask the author of JMX panel to include this patch in the next
 release.


 paolo di tommaso wrote:
 
  Guys,
 
  someone has soem experience with the nice JmxPanel describe here?
 
  http://chillenious.wordpress.com/2007/08/29/jmx-wicket-panel/
 
  Adding a JmxPanel instance to my page I always get the following EMPTY
  panel
  ..
 
 
  div class=jmxTreePanel
  table
  tr
   tddiv id=tree1 class=jmxTree
div style=display:none id=tree1_0/div
/div/td
  tddiv id=detailPanel2
  /div/td
  /tr
  /table
  /div
  div style=clear:both/div
 
 
  Any ideas ?
 
  Thanks.
 
  // Paolo
 
 

 --
 View this message in context:
 http://www.nabble.com/JmxPanel-tp16740210p16743671.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: client side handling of ajax request session expiration

2008-04-18 Thread ywtsang

right, we have implemented the keep alive timer as well

but still, we also want to handle the ajax expiration exception at client
side, because we discovered that we can't preserve the session if the server
is restarted


Erik van Oosten wrote:
 
 Hi Ywtsang,
 
 Not an answer to your question, but you can also consider using a ajax
 timer to keep the session alive.
 
 For example as outlined in
 http://chillenious.wordpress.com/2007/06/19/how-to-create-a-text-area-with-a-heart-beat-with-wicket/.
 
 Regards,
 Erik.
 
 
 ywtsang wrote
 we want to handle session expiration exception triggered by an ajax
 request

 since the session is expired, the ajax request can't be forwarded to the
 corresponding ajax behavior, instead, the server throw session expiration
 exception 
 (we have configured the handling by
 getApplicationSettings().setPageExpiredErrorPage)

 the handling is ok for non-ajax request, but not ajax request

 we want to handle that using client side javascript

 how can we achieve that?

   
 
 --
 Erik van Oosten
 http://day-to-day-stuff.blogspot.com/
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/client-side-handling-of-ajax-request-session-expiration-tp16743324p16762728.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: No built-in converter for Locale.class?

2008-04-18 Thread David Leangen

 no

Ok, thanks.

 what should such a converted do?
 And what should people type in as a text string?
 Most of the times locales are none editable select boxes or list choices

Not for personal consumption. :-)

I'm just testing out an annotation-based means of controlling page
parameters and control flow. I'm providing default values as Strings,
which means that some fields need converters.

This seems to clean up the pages quite a bit and simplify a lot the
processing of parameters. Maybe a useful feature for a later release of
Wicket?


Cheers,
David




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



Handling lost connection

2008-04-18 Thread Federico Fanton
Hi all,
is there a way to handle a connection lost problem from AJAX buttons? I mean, 
right now when I click on an AJAX button and the server is down, nothing 
happens. I'd like to show an alert instead..
I tried registering a handler with registerFailureHandler, but it doesn't fire 
_only_ on connection lost, I receive alerts on other Ajax errors too.. Inside 
Wicket AJAX debug I see NS_ERROR_NOT_AVAILABLE errors, even with the server 
up.. Am I doing something wrong?
Many thanks for your time!


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



WicketTester: persistant error msg?

2008-04-18 Thread Michael Perkonigg

Hello,

I tried to test a form with a required field.
First I submitted without setting a value and got an error message as 
expected.
Then I set the value and submitted again but again got the error message 
as if it wouldn't be cleared or something.

Is there a problem with them or did I miss how to clear them?

Thanks,
Mike


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



Re: client side handling of ajax request session expiration

2008-04-18 Thread Erik van Oosten
ywtsang wrote:
 because we discovered that we can't preserve the session if the server
 is restarted
   
Ah, I understand. Well, you could if you use a servlet container that
support this, or if you use Terracotta.

Regards,
Erik.

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/



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



StringResourceModel with unknown array parameters

2008-04-18 Thread i ii

is way to add StringResourceModel with array of unknown size?

.properties
attendees.names=All attendees include: {0}

webpage
// example list, but do not know size of list at all times
ListString attendees = new ArrayListString();
attendees.add(Attendee 1);
attendees.add(Attendee 2);
attendees.add(Attendee 3);
add(new Label(attendee-names, new StringResourceModel(attendees.names, 
this, null, new Object[]{ attendees })));

desired output:
All attendees include: Attendee 1 Attendee 2 Attendee 3


Re: StringResourceModel with unknown array parameters

2008-04-18 Thread James Carman
Concat the elements of the array yourself before you add it as a parameter?


On Fri, Apr 18, 2008 at 8:17 AM, i ii [EMAIL PROTECTED] wrote:

  is way to add StringResourceModel with array of unknown size?

  .properties
  attendees.names=All attendees include: {0}

  webpage
  // example list, but do not know size of list at all times
  ListString attendees = new ArrayListString();
  attendees.add(Attendee 1);
  attendees.add(Attendee 2);
  attendees.add(Attendee 3);
  add(new Label(attendee-names, new StringResourceModel(attendees.names, 
 this, null, new Object[]{ attendees })));

  desired output:
  All attendees include: Attendee 1 Attendee 2 Attendee 3


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



captcha image random display problem

2008-04-18 Thread ywtsang

i use the captcha image, but sometime the image shows incompletely
e.g. it does not show the full image, it is just chopped

it happened randomly

my form also have an ajax link to allow refresh the captcha immediately
if i click the ajax link to refresh the image , the image chops randomly
with random extent, to the worst, sometime it shows broken image

both jetty/tomcat can have the above problem

any hint that can help further trouble shoot the problem?


-- 
View this message in context: 
http://www.nabble.com/captcha-image-random-display-problem-tp16763427p16763427.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: client side handling of ajax request session expiration

2008-04-18 Thread Markus Strickler

Hi-

not sure if this helps in your case, but if you define the  
wicketGlobalFailureHandler()  JavaScript function, it will be called  
if your ajax request fails (because of page expiration or any other  
reason).
Or use Wicket.Ajax.registerFailureHandler(function() { ...}) (but I  
never tried that myself).


-markus

Am 17.04.2008 um 13:01 schrieb ywtsang:


we want to handle session expiration exception triggered by an ajax  
request


since the session is expired, the ajax request can't be forwarded  
to the
corresponding ajax behavior, instead, the server throw session  
expiration

exception
(we have configured the handling by
getApplicationSettings().setPageExpiredErrorPage)

the handling is ok for non-ajax request, but not ajax request

we want to handle that using client side javascript

how can we achieve that?

--
View this message in context: http://www.nabble.com/client-side- 
handling-of-ajax-request-session-expiration-tp16743324p16743324.html

Sent from the Wicket - User mailing list archive at Nabble.com.


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




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



Re: StringResourceModel with unknown array parameters

2008-04-18 Thread Enrique Rodriguez
On Fri, Apr 18, 2008 at 5:17 AM, i ii [EMAIL PROTECTED] wrote:
 ...
 add(new Label(attendee-names, new StringResourceModel(attendees.names, 
 this, null, new Object[]{ attendees })));

 desired output:
 All attendees include: Attendee 1 Attendee 2 Attendee 3

Cool, I just had to do something similar yesterday.  I ended up
extending Label and in the super() call I pass in a new
StringResourceModel, where the StringResourceModel's model is another
Model that performs custom text processing, in your case a concat.
Since I use this new Label extension in numerous places, custom String
processing is nicely encapsulated.

Enrique

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



Re: Swarm/Wasp or wicket-auth-roles or ?

2008-04-18 Thread mfs

Also if someone could point to some examples of wicket-auth-roles usage...I
could still see many for swarm but have not really for auth-roles..may be I
an not looking at the right place..please point

mfs wrote:
 
 Guys,
 
 I need some suggestions as to which of the above would be the right
 framework for the the application i am currently working on..Some
 important fact which would help are as follows :
 
 
 1) All the pages in the application would be secure and hence would
 require authentication.
 
 2) There would be two type of users accessing the application. For now, i
 see access being restricted on the whole page itself rather on more
 granular components. But later down the road that would come in too as the
 scope increases.
 
 3) IMP - The application has to support inter-operability with some other
 external apps. Now these (non java) external apps already have their own
 mini authentication framework and thats what i will be using for user
 authentication. So basically for all my Secure Pages i would have to
 redirect to the LoginPage part of these external apps (and not wicket), I
 hope thats possible ? , i believe it is with SWARM, some hints would be
 really appreciated on that too. A bit on the authentication mechanism, so
 basically on succesful login, this external app would 1) encode an
 authtoken in the url 2) transfer the control over to my wicket app, and
 thats where i would check if it is a valid/authenticated user based on the
 authToken. Later on we plan to change this though, and instead have the
 authtoken passed over in the cookie instead.
 
 Initially when i started of i wasnt planning to use any of the above
 frameworks but than taking a look into SWARM made me feel like that it
 might be a good choice, but would still want to have everyones opinion
 
 Please comment..
 
 Thanks in advance
 

-- 
View this message in context: 
http://www.nabble.com/Swarm-Wasp-or-wicket-auth-roles-or---tp16760342p16763531.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AW: Wicket + CMS

2008-04-18 Thread Frank van Lankvelt
Hi,

that is correct, Hippo CMS 7 should be ready for release in a few months
time.  It is a rewrite where the CMS itself is implemented in Wicket.

plug shameless=true

The repository is a JCR (JackRabbit) repository extended with workflow
and faceted navigation.  The CMS is composed as a set of plugins.  These
Wicket components can be configured and that can be dynamically swapped
in and out of the application.  We use this for example for the
templates.  Templates consist of a set of (template) plugins and a
configuration in the repository.  The template configuration can be
edited in the CMS itself!

/plug

At the moment we're rethinking the architecture, so I can't give details
on how plugins are implemented or how they are linked together at
runtime.

cheers, Frank

On Thu, 2008-04-17 at 14:12 +0200, Noz, Felix wrote:
 Hi,
 
 I've also read about plans to use wicket integration in Hippo Cms and I will 
 keep an eye on it. I've also managed to access OpenCms content with wicket 
 but because we have a lot of JSP that we would like to reuse and we 
 contemporary need a solid frontend framework integration we will - as a start 
 - concentrate on a classic rerquest-based one with jsp view for now. Maybe we 
 will recur to wicket again later.  
 Thanks for your and all other people's answers.
 
 Regards
 
 Felix Noz
  
 
 
 -Ursprüngliche Nachricht-
 Von: StephenP [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 16. April 2008 11:57
 An: users@wicket.apache.org
 Betreff: Re: Wicket + CMS
 
 
 Our project has tied in HippoCMS for pulling a portion of content into wicket 
 pages. 
 I don't have many details to hand but it wasn't too hard. 
 Hippo has a xml over http interface that we use to cache content, before 
 putting the xml elements into wicket models.
 
 We are using hippo version 6, but I think hippo version 7 (the next version) 
 will be using wicket internally. I don't know if this will allow any stronger 
 integration with a wicket app.
 
 
 
 
 
 Noz, Felix wrote:
  
  Hello everybody,
   
  I'm currently evaluating different Frontend Frameworks to use them 
  with a Java-Based CMS (OpenCms) and I'm very interested in trying 
  wicket. The CMS has got its own Template mechanism which is based on 
  JSP. Because it would be a problem for us to throw away all existing 
  Templates and JSP Tags my idea was to implement a 
  ResourceStreamLocator that connects to the CMS via http and delivers 
  the resources directly from the CMS so that the CMS is rather a pure 
  persistence and template system.
  My questions are:
  
  - Is this a passible way to connect wicket to a jsp based system?
  - Are there any better solutions?
  - Does anybody else has experience in connecting OpenCms + wicket?
  
  Regards
  
  i.A. Felix Noz
   
  __
  __
   
  Felix Noz
  Junior IT-Berater
  Dipl. Informatiker (FH)
   
  comundus GmbH
  Schüttelgrabenring 3, 71332 Waiblingen
   
  Telefon +49 (0) 71 51-5 00 28-22
  Internet www.comundus.com
   
  Geschäftsführer: Klaus Hillemeier
  Amtsgericht Stuttgart, HRB 264290
   
  comundus ist ein Unternehmen der IT EXCELLENCE Group.
  __
  __
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 --
 View this message in context: 
 http://www.nabble.com/Wicket-%2B-CMS-tp16696564p16720234.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: Problems with Palette

2008-04-18 Thread Igor Vaynberg
provide a quickstart

-igor


On Fri, Apr 18, 2008 at 1:10 AM, Fabien D. [EMAIL PROTECTED] wrote:

  nobody can help me??



  Fabien D. wrote:
  
   Hi everybody,
  
   I have two problems with the Palette.
  
   The first one is when the user submits the form and there are problems
   with the other textfield (Validator), the left field for the selection is
   reseted!!
  
   The second problem is when all fields are good and when a try de getBack
   the list of selected objects, It returns the first object of my list as
   many as there are selcted objects :
  
   exemple :
  
   Available - reset when there is a probleme with validator
   Toto
   Tata
  
   Selected
   Titi
   Tutu
  
   The return is :
   Titi
   Titi
  
   The code  for my palette:
  
   ChoiceRenderer renderer = new ChoiceRenderer();
   List licences = CDataFromBDD.getListNameLicence();
   Mode model_licence = new Model((Serializable)licences);
   Mode model_licence_selection = new Model(new ArrayList());
   //parameter of the licence
   Palette licence = new Palette(licence, model_licence_selection,
   model_licence, renderer, 6, false);
   this.form_ajoutinfgeneral.add(licence);
  
   The code  for my form:
   form_ajoutinfgeneral = new Form(form_ajoutinfgeneral, new
   CompoundPropertyModel(this.model_sous_domaine)) {
 private static final long serialVersionUID = 1L;
 protected void onSubmit() {
 
 List selected =
   (List)model_licence_selection.getObject();
  ...
   }
   }
  
   Sorry for my english, I'm french, and thank you in advance :)
  
  

  --
  View this message in context: 
 http://www.nabble.com/Problems-with-Palette-tp16722516p16761756.html


 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Handling lost connection

2008-04-18 Thread Igor Vaynberg
create a jira issue

-igor


On Fri, Apr 18, 2008 at 3:12 AM, Federico Fanton [EMAIL PROTECTED] wrote:
 Hi all,
  is there a way to handle a connection lost problem from AJAX buttons? I 
 mean, right now when I click on an AJAX button and the server is down, 
 nothing happens. I'd like to show an alert instead..
  I tried registering a handler with registerFailureHandler, but it doesn't 
 fire _only_ on connection lost, I receive alerts on other Ajax errors too.. 
 Inside Wicket AJAX debug I see NS_ERROR_NOT_AVAILABLE errors, even with the 
 server up.. Am I doing something wrong?
  Many thanks for your time!


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



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



Re: StringResourceModel with unknown array parameters

2008-04-18 Thread Enrique Rodriguez
On Fri, Apr 18, 2008 at 8:49 AM, Enrique Rodriguez [EMAIL PROTECTED] wrote:
 ...
 Cool, I just had to do something similar yesterday.  I ended up ...

I coded this up for your example:

MyApp.properties


label.attendees=All attendees include:  ${attendees}

Usage
=

ListString attendees = new ArrayListString();
attendees.add( Johan );
attendees.add( James );
add( new AttendeeLabel( attendees, label.attendees, this,
attendees ) );

Code


public class AttendeeLabel extends Label
{
public AttendeeLabel( String id, String resourceKey, Component
component, ListString attendees )
{
super( id, new StringResourceModel( resourceKey, component,
new Model( new Attendees( attendees ) ) ) );
}

private static class Attendees implements Serializable
{
private ListString attendees;


public Attendees( ListString attendees )
{
this.attendees = attendees;
}


public String getAttendees()
{
StringBuffer sb = new StringBuffer();

for ( IteratorString iterator = attendees.iterator();
iterator.hasNext(); )
{
String attendee = iterator.next();

sb.append( attendee );

if ( iterator.hasNext() )
{
sb.append(   );
}
}

return sb.toString();
}
}
}


HTH,

Enrique

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



Re: Swarm/Wasp or wicket-auth-roles or ?

2008-04-18 Thread Scott Swank
You want the Authentication and Authorization examples near the
bottom of the Wicket Examples.

http://wicketstuff.org/wicket13/

- Scott


On Fri, Apr 18, 2008 at 8:54 AM, mfs [EMAIL PROTECTED] wrote:

  Also if someone could point to some examples of wicket-auth-roles usage...I
  could still see many for swarm but have not really for auth-roles..may be I
  an not looking at the right place..please point



  mfs wrote:
  
   Guys,
  
   I need some suggestions as to which of the above would be the right
   framework for the the application i am currently working on..Some
   important fact which would help are as follows :
  
  
   1) All the pages in the application would be secure and hence would
   require authentication.
  
   2) There would be two type of users accessing the application. For now, i
   see access being restricted on the whole page itself rather on more
   granular components. But later down the road that would come in too as the
   scope increases.
  
   3) IMP - The application has to support inter-operability with some other
   external apps. Now these (non java) external apps already have their own
   mini authentication framework and thats what i will be using for user
   authentication. So basically for all my Secure Pages i would have to
   redirect to the LoginPage part of these external apps (and not wicket), I
   hope thats possible ? , i believe it is with SWARM, some hints would be
   really appreciated on that too. A bit on the authentication mechanism, so
   basically on succesful login, this external app would 1) encode an
   authtoken in the url 2) transfer the control over to my wicket app, and
   thats where i would check if it is a valid/authenticated user based on the
   authToken. Later on we plan to change this though, and instead have the
   authtoken passed over in the cookie instead.
  
   Initially when i started of i wasnt planning to use any of the above
   frameworks but than taking a look into SWARM made me feel like that it
   might be a good choice, but would still want to have everyones opinion
  
   Please comment..
  
   Thanks in advance
  

  --
  View this message in context: 
 http://www.nabble.com/Swarm-Wasp-or-wicket-auth-roles-or---tp16760342p16763531.html


 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: AW: Wicket + CMS

2008-04-18 Thread Uwe Schäfer

Frank van Lankvelt schrieb:

Hi Frank,

think we´ve talked at the meetup about that.


plug shameless=true

The repository is a JCR (JackRabbit) repository extended with workflow
and faceted navigation.  The CMS is composed as a set of plugins.  These
Wicket components can be configured and that can be dynamically swapped
in and out of the application.  We use this for example for the
templates.  Templates consist of a set of (template) plugins and a
configuration in the repository.  The template configuration can be
edited in the CMS itself!

/plug


will the actual delivery be done by a JSP frontend, or a Wicket frontend?

And if JSP will be delivering, can we build CMS-agnostic wicket 
components that could wor as they would in a normal wicket app (wrapped 
by some plugin adapter of course)?


cu uwe
--

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  [EMAIL PROTECTED]
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.


Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet [EMAIL PROTECTED]



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



RE: StringResourceModel with unknown array parameters

2008-04-18 Thread i ii

should be in core, no?

 Date: Fri, 18 Apr 2008 09:22:12 -0700
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: StringResourceModel with unknown array parameters
 
 On Fri, Apr 18, 2008 at 8:49 AM, Enrique Rodriguez [EMAIL PROTECTED] wrote:
  ...
  Cool, I just had to do something similar yesterday.  I ended up ...
 
 I coded this up for your example:
 
 MyApp.properties
 
 
 label.attendees=All attendees include:  ${attendees}
 
 Usage
 =
 
 ListString attendees = new ArrayListString();
 attendees.add( Johan );
 attendees.add( James );
 add( new AttendeeLabel( attendees, label.attendees, this,
 attendees ) );
 
 Code
 
 
 public class AttendeeLabel extends Label
 {
 public AttendeeLabel( String id, String resourceKey, Component
 component, ListString attendees )
 {
 super( id, new StringResourceModel( resourceKey, component,
 new Model( new Attendees( attendees ) ) ) );
 }
 
 private static class Attendees implements Serializable
 {
 private ListString attendees;
 
 
 public Attendees( ListString attendees )
 {
 this.attendees = attendees;
 }
 
 
 public String getAttendees()
 {
 StringBuffer sb = new StringBuffer();
 
 for ( IteratorString iterator = attendees.iterator();
 iterator.hasNext(); )
 {
 String attendee = iterator.next();
 
 sb.append( attendee );
 
 if ( iterator.hasNext() )
 {
 sb.append(   );
 }
 }
 
 return sb.toString();
 }
 }
 }
 
 
 HTH,
 
 Enrique
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


wicket-spring dependency in maven repository

2008-04-18 Thread Doug Donohoe

I'm using wicket-spring-annot and ran into a small problem with maven
dependencies.  The wicket-spring-annot project depends on wicket-spring.

Wicket-spring in turn depends on the entire monolithic spring.jar instead of
the now-preferred spring-core.jar.  This caused a problem in my environment
in that it pulled spring 2.0 down whereas I'm already using spring 2.5.  In
the future, the wicket-spring team may wish to pull this dependency or use
spring-core.

  dependency
  groupIdorg.springframework/groupId
  artifactIdspring/artifactId
  /dependency

Anyhow, to not pull this in, I utilized the exclusions feature of maven:

  dependency
  groupIdorg.apache.wicket/groupId
  artifactIdwicket-spring-annot/artifactId
  version1.3.3/version
  !-- exclude spring framework that wicket pulls in --
  exclusions
exclusion
  groupIdorg.springframework/groupId
  artifactIdspring/artifactId
/exclusion
  /exclusions
/dependency

Just an FYI.
-- 
View this message in context: 
http://www.nabble.com/wicket-spring-dependency-in-maven-repository-tp16764208p16764208.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket markup documentation and question on threading/clustering

2008-04-18 Thread Doug Donohoe

Thanks for the fast response.


igor.vaynberg wrote:
 
 On Thu, Apr 17, 2008 at 6:48 PM, Doug Donohoe [EMAIL PROTECTED] wrote:

  I'm looking for a complete list of all wicket markup (e.g.,
 wicket-panel,
  wicket-child, wicket-exclude etc).  I didn't find anything obvious via
  Google or the wiki.  Am I missing something?  As a newcomer, it would be
  helpful to know what all the choices are and what they do so as to not
 miss
  anything.
 
 http://cwiki.apache.org/confluence/display/WICKET/Wicket%27s+XHTML+tags
 
  Also, I am looking for an explanation of the threading / clustering
  architecture with Wicket.  Neither of the books address these topics in
 any
  depth.  For example, in the simple Link Counter example in Wicket in
  Action, how does that counter work with multiple people accessing the
 page?
  It doesn't appear to be synchronized unless this is under the covers. 
 If
  there is an instance of each page per person that would mean the total
  displayed is per person (and not per all users).
 
 each user gets their own instance of Page. Access to the page object
 is synced on user's session (thats not exactly correct but for
 purposes of this discussion it will do) so you do not have to worry
 about all the nasty syncing yourself. if you have data that you want
 users to share/interact with it has to be kept in some global store:
 database, servlet context, memory, etc.
 
  Finally, if one wants to have multiple application servers for load
  balancing / failover, what options does one have with Wicket?  I assume
 you
  use some sort of clustered session that wicket utilizes.  Perhaps
 something
  like Gigaspaces?
 
 wicket will work with regular servlet container clustering. it stores
 the page in http session and page is serializable so it will be
 replicated.
 
 -igor
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-markup-documentation-and-question-on-threading-clustering-tp16758965p16764210.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AW: Wicket + CMS

2008-04-18 Thread Frank van Lankvelt
Hi Uwe,

  plug shameless=true
  
  The repository is a JCR (JackRabbit) repository extended with workflow
  and faceted navigation.  The CMS is composed as a set of plugins.  These
  Wicket components can be configured and that can be dynamically swapped
  in and out of the application.  We use this for example for the
  templates.  Templates consist of a set of (template) plugins and a
  configuration in the repository.  The template configuration can be
  edited in the CMS itself!
  
  /plug
 
 will the actual delivery be done by a JSP frontend, or a Wicket frontend?
 
at the moment, we're focussing on JSP.  A custom tag library is under
development that accesses the repository and allows url mapping.

It should certainly be possible to develop a frontend in Wicket; the
models that we use to access the repository are easily reused.
To embed plugins, e.g. those used by the CMS, does require some support
from the environment.  The Wicket session needs to provide a valid JCR
session, for example.

 And if JSP will be delivering, can we build CMS-agnostic wicket 
 components that could wor as they would in a normal wicket app (wrapped 
 by some plugin adapter of course)?
 
yes, if you're components don't need to have any interaction with the
CMS then this is certainly possible.

When you do want to have an interaction, some additional constaints will
(likely) be present due to the possible actions of other plugins.

If you want to further discuss the Hippo CMS, then we should move the
discussion to the hipporepos-dev mailing list.  You can subscribe and
visit the archives at
http://lists.hippo.nl/mailman/listinfo/hipporepos-dev
The traffic mainly consists of JIRA updates and svn-logs, but it should
be possible to filter these out if you want to.

thanks for the interest!

cheers, Frank


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



am I doing right? entities no Serializables.

2008-04-18 Thread Fernando Wermus
I am finishing my first app for production in wicket. As any newbie I try to
make a side relevant non-functional problems to focus in which I consider
important.
I was implementing Serializable in all my entities, but I have to change now
that. I ve done it using LoadableDetachableModel. But I couldn't do it in
some parts. When the user walks over a wizard to create an entity, I just
attached to the wizard a new entity and, finally I persist it in the las
step. But, I have to change that now, because the entity is not Serializable
anymore.

 Which is the best way?

I think it is attaching a model which have all the attributes needed for the
creation of the entity and at the end I have to copy the whole information
to my entity, doesn' it? (like I was doing with j2ee DTO :( ). Then I have a
modelForm of the view and my entities at the end of the steps.

Is there a best approach to it?

Bye!

ps: sorry for my english.
-- 
Fernando Wermus.


Re: am I doing right? entities no Serializables.

2008-04-18 Thread Bruno Borges
In this case, yeah I think the best way to go is with a DTO. You could use a
static Inner POJO class.

cheers

On Fri, Apr 18, 2008 at 5:50 PM, Fernando Wermus [EMAIL PROTECTED]
wrote:

 I am finishing my first app for production in wicket. As any newbie I try
 to
 make a side relevant non-functional problems to focus in which I consider
 important.
 I was implementing Serializable in all my entities, but I have to change
 now
 that. I ve done it using LoadableDetachableModel. But I couldn't do it in
 some parts. When the user walks over a wizard to create an entity, I just
 attached to the wizard a new entity and, finally I persist it in the las
 step. But, I have to change that now, because the entity is not
 Serializable
 anymore.

  Which is the best way?

 I think it is attaching a model which have all the attributes needed for
 the
 creation of the entity and at the end I have to copy the whole information
 to my entity, doesn' it? (like I was doing with j2ee DTO :( ). Then I have
 a
 modelForm of the view and my entities at the end of the steps.

 Is there a best approach to it?

 Bye!

 ps: sorry for my english.
 --
 Fernando Wermus.




-- 
Bruno Borges
blog.brunoborges.com.br
+55 1185657739

The glory of great men should always be
measured by the means they have used to
acquire it.
- Francois de La Rochefoucauld


Re: am I doing right? entities no Serializables.

2008-04-18 Thread James Carman
I like for my entities to always be serializable.  Is there some
special requirement to have a non-serializable field on your entity
class?

On Fri, Apr 18, 2008 at 4:50 PM, Fernando Wermus
[EMAIL PROTECTED] wrote:
 I am finishing my first app for production in wicket. As any newbie I try to
  make a side relevant non-functional problems to focus in which I consider
  important.
  I was implementing Serializable in all my entities, but I have to change now
  that. I ve done it using LoadableDetachableModel. But I couldn't do it in
  some parts. When the user walks over a wizard to create an entity, I just
  attached to the wizard a new entity and, finally I persist it in the las
  step. But, I have to change that now, because the entity is not Serializable
  anymore.

   Which is the best way?

  I think it is attaching a model which have all the attributes needed for the
  creation of the entity and at the end I have to copy the whole information
  to my entity, doesn' it? (like I was doing with j2ee DTO :( ). Then I have a
  modelForm of the view and my entities at the end of the steps.

  Is there a best approach to it?

  Bye!

  ps: sorry for my english.
  --
  Fernando Wermus.


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



Re: AW: Wicket + CMS

2008-04-18 Thread Paolo Di Tommaso
Someones in this thread have ever seen Riot CMS ?!

*Riot is a web-based Open Source Content Management System written in Java.
It's quite different from other systems as it has been designed to match the
needs of custom applications, [..]*

http://www.riotfamily.org


I think would be relatively easy to add Wicket support to it.


// Paolo



On Fri, Apr 18, 2008 at 9:28 PM, Frank van Lankvelt 
[EMAIL PROTECTED] wrote:

 Hi Uwe,

   plug shameless=true
  
   The repository is a JCR (JackRabbit) repository extended with workflow
   and faceted navigation.  The CMS is composed as a set of plugins.
  These
   Wicket components can be configured and that can be dynamically
 swapped
   in and out of the application.  We use this for example for the
   templates.  Templates consist of a set of (template) plugins and a
   configuration in the repository.  The template configuration can be
   edited in the CMS itself!
  
   /plug
 
  will the actual delivery be done by a JSP frontend, or a Wicket
 frontend?
 
 at the moment, we're focussing on JSP.  A custom tag library is under
 development that accesses the repository and allows url mapping.

 It should certainly be possible to develop a frontend in Wicket; the
 models that we use to access the repository are easily reused.
 To embed plugins, e.g. those used by the CMS, does require some support
 from the environment.  The Wicket session needs to provide a valid JCR
 session, for example.

  And if JSP will be delivering, can we build CMS-agnostic wicket
  components that could wor as they would in a normal wicket app (wrapped
  by some plugin adapter of course)?
 
 yes, if you're components don't need to have any interaction with the
 CMS then this is certainly possible.

 When you do want to have an interaction, some additional constaints will
 (likely) be present due to the possible actions of other plugins.

 If you want to further discuss the Hippo CMS, then we should move the
 discussion to the hipporepos-dev mailing list.  You can subscribe and
 visit the archives at
 http://lists.hippo.nl/mailman/listinfo/hipporepos-dev
 The traffic mainly consists of JIRA updates and svn-logs, but it should
 be possible to filter these out if you want to.

 thanks for the interest!

 cheers, Frank


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




LoadableDetachableModel and load() method question

2008-04-18 Thread Warren
I have a page that displays a lot of labels and two text field. It is
refreshed thru an AjaxFormSubmitBehavior that just refreshes the same page
with a new item using a LoadableDetachableModel. I need to update the item
displayed and retrieve a new one. I am doing this within the load method.

protected Object load()
{
// Update last Item
// Retrieve next Item
}

Everything works, but load() gets called twice. I understand why that
happens, but I only need it to be called once. I can use a flag to make the
body of load run once, but this does not seem very clean and I can see it
causing problems. Is there a better way to achieve what I am trying to do?

Thanks,

Warren Bell


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



Re: captcha image random display problem

2008-04-18 Thread Jonathan Locke


i think i've seen this before too at some point.  what wicket version?


ywtsang wrote:
 
 i use the captcha image, but sometime the image shows incompletely
 e.g. it does not show the full image, it is just chopped
 
 it happened randomly
 
 my form also have an ajax link to allow refresh the captcha immediately
 if i click the ajax link to refresh the image , the image chops randomly
 with random extent, to the worst, sometime it shows broken image
 
 both jetty/tomcat can have the above problem
 
 any hint that can help further trouble shoot the problem?
 
 
 

-- 
View this message in context: 
http://www.nabble.com/captcha-image-random-display-problem-tp16763427p16767180.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: client side handling of ajax request session expiration

2008-04-18 Thread ywtsang

thanks, having proper setup of clustering with session replication should be
the correct way to go in long term

but for this stage, we are restricted to solve the problem at application
level

our application can afford to have ajax session expire if we restart our
server(s) occasionally, 
but we want to handle that ajax session expire exception gracefully at
client side

can we hack the wicket codes (java/js) that can intercept the ajax session
expiration? any class/pointer that i should look at?


Erik van Oosten wrote:
 
 ywtsang wrote:
 because we discovered that we can't preserve the session if the server
 is restarted
   
 Ah, I understand. Well, you could if you use a servlet container that
 support this, or if you use Terracotta.
 
 Regards,
 Erik.
 
 --
 Erik van Oosten
 http://day-to-day-stuff.blogspot.com/
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/client-side-handling-of-ajax-request-session-expiration-tp16743324p16767350.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: captcha image random display problem

2008-04-18 Thread ywtsang

we are using wicket 1.3.1


Jonathan Locke wrote:
 
 
 i think i've seen this before too at some point.  what wicket version?
 
 
 ywtsang wrote:
 
 i use the captcha image, but sometime the image shows incompletely
 e.g. it does not show the full image, it is just chopped
 
 it happened randomly
 
 my form also have an ajax link to allow refresh the captcha immediately
 if i click the ajax link to refresh the image , the image chops randomly
 with random extent, to the worst, sometime it shows broken image
 
 both jetty/tomcat can have the above problem
 
 any hint that can help further trouble shoot the problem?
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/captcha-image-random-display-problem-tp16763427p16767377.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: am I doing right? entities no Serializables.

2008-04-18 Thread Fernando Wermus
I try to spend the less memory I can using LoadableDetachableModel. But if
the user is filling up a form for a new entity I think I have two options,
one serialize and the other create a kind of dto. I don't like the first
because I don't want my domain model be modified by the web tier
(Serializable interface) and I don't like the second because I prefer
languages as Smalltalk, Grovee or Ruby which you don't need dtos either
serializable interfaces. That's why I was speaking up. I like wicket and
maybe I could find another way.

ps: I am using db4o as my data object base (in this prototype). I know a guy
who make wicket serialize their entities using db4o, but I don't know how
hard is replace the serializable wicket mechanism.

On Fri, Apr 18, 2008 at 7:30 PM, James Carman [EMAIL PROTECTED]
wrote:

 I like for my entities to always be serializable.  Is there some
 special requirement to have a non-serializable field on your entity
 class?

 On Fri, Apr 18, 2008 at 4:50 PM, Fernando Wermus
 [EMAIL PROTECTED] wrote:
  I am finishing my first app for production in wicket. As any newbie I try
 to
   make a side relevant non-functional problems to focus in which I
 consider
   important.
   I was implementing Serializable in all my entities, but I have to change
 now
   that. I ve done it using LoadableDetachableModel. But I couldn't do it
 in
   some parts. When the user walks over a wizard to create an entity, I
 just
   attached to the wizard a new entity and, finally I persist it in the las
   step. But, I have to change that now, because the entity is not
 Serializable
   anymore.
 
Which is the best way?
 
   I think it is attaching a model which have all the attributes needed for
 the
   creation of the entity and at the end I have to copy the whole
 information
   to my entity, doesn' it? (like I was doing with j2ee DTO :( ). Then I
 have a
   modelForm of the view and my entities at the end of the steps.
 
   Is there a best approach to it?
 
   Bye!
 
   ps: sorry for my english.
   --
   Fernando Wermus.
 

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




-- 
Fernando Wermus.


Why is LoadDetachableModel called twice?

2008-04-18 Thread Fernando Wermus
Warren,
  I am new using LoadableDetacheModel. I would like to know why is
called twice in your example.

Thanks.

-- 
Fernando Wermus.


Re: Why is LoadDetachableModel called twice?

2008-04-18 Thread Matthew Young
dump the stack trace and see?

   new Exception().printStackTrace();

On Fri, Apr 18, 2008 at 8:45 PM, Fernando Wermus [EMAIL PROTECTED]
wrote:

 Warren,
  I am new using LoadableDetacheModel. I would like to know why is
 called twice in your example.

 Thanks.

 --
 Fernando Wermus.