Re: [NEWBIE] How to do if... else... switch... in wicket html ?

2009-03-17 Thread Sébastien Piller

Hi,

Use panels, and instantiate either one type or another on the java side. 
Then your content will change.


Cheers,


Ista Pouss wrote:

Hi,

What is the best technique to do some "if" "else" and so on with wicket ?

I need a html with something like that (stupid and naïve approch) :


  do this thing

 It's not good

 render other

How to do that with wicket ?

Thanks.

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


  



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



Re: Need to minimize the names using Ajax

2009-03-10 Thread Sébastien Piller

Use an AjaxEditableLabel.

newbie_to_wicket wrote:

Hi All,
I am using wicket framework.
I have to achieve the functionality as I shown in the below image.
  http://www.nabble.com/file/p22437770/names.jpeg 
Whenever I pressed R in the textfield box then it should displays the names

which contans R as the first letter.


Thanks for your help
J

  



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



Re: Wicket pages as plugin

2009-03-03 Thread Sébastien Piller

We use iframes for that. It works quite well.

Stefan Lindner wrote:

Dear wicket users and wizzards!

Is ist possible to use wicket to implement "partial" pages that can be
embedded into another page? E.g. to have a normal content management
system like Joomla and use wicket top lug it into exisiting pages for
some dynamic, database driven content? The HTML that is created by
wicket must not contain the usual ... part.

Any Ideas hints?

Stefan

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


  



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



Re: XMLBeanFactory not serializable - what to do??

2009-02-17 Thread Sébastien Piller

transient field + lazy init method?

Edwin Ansicodd wrote:

have a Serializable object on a Wicket page.  This object in turn has a
reference to an XMLBeanFactory.  Wicket is giving me an error because
XMLBeanFactory is not serializable.  What do I do??
  



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



Re: Wicket placeholder for component causing invalid markup

2009-01-26 Thread Sébastien Piller

Hi,

I'm pretty sure what you need is wicket:enclosure [1] instead

[1] http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html


the_adam wrote:

If we have a component with a corresponding markup tag  and want to hide
it and display placeholder tag via Component#setOutputMarkupPlaceholderTag
the resulting markup will be:



However this is not a valid markup. The proper markup would be:

 where x is
the number of columns. Obviously wicket won't know how many columns there
are so one would have to set that explicitly.

Are you planning to anyhow address this issue, i.e. provide a different
placeholder method (maybe
WebMarkupContainer#setOutputRowPlaceholderTag(boolean, short)) or is the
only way of solving this to manually swap component-to-display with custom
placeholder component?
  



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



Re: Things I miss in Wicket

2009-01-16 Thread Sébastien Piller
Sure! sorry, missed that one... Well, all requirements were already 
implemented :D


If I were naughty, I would write "rtfm" ;)

Jan Kriesten wrote:

Hi Sébastien,

  

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



hehe - that one already exists, too! :D

Best regards, --- Jan.

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


  



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



Re: access ServletOutputStream in wicket

2009-01-16 Thread Sébastien Piller
I really doubt that such an exception may be fixed by upgrading 
jasperreport (NotSerializableException is pure wicket exception, not a 
jasper one).


The stacktrace shows you that the problem is here:

   final java.io.InputStream
com.homeaccount.web.jasper.JRResource$1.val$report
[class=java.io.ByteArrayInputStream] <- field that is not serializable


so nothing to do with jasperreport. Just declare your streams as 
"transient"
and lazy-init it in an initialisation method. And don't forget to close 
them as well...


I you want to, here is how I've my generation of pdf:

# Part that generate a PDF to a byte array

   public byte[] create(int orderid) {

   final JasperReport report;

   Order o = getOrder(orderid);

   try {

   report = (JasperReport) JRLoader.loadObject(InvoiceCreator.class

   .getResourceAsStream(

   "/jasperreports/Invoice/Invoice.jasper"));

   } catch (JRException e) {

   throw new RuntimeException(e);

   }

   final Map params = new HashMap();

   params.put("basedir", "/jasperreports/Invoice/");

   params.put("curr", o.getCurrency());

   params.put("orderid", o.getId());

   params.put("shopid", o.getShops().getId()); 


   params.put("REPORT_LOCALE", new Locale("fr");

   byte[] bytes;

   DataSource dataSource = Globals.getDataSource();

   Connection connection = DataSourceUtils.getConnection(dataSource);

   try {

   bytes = JasperRunManager.runReportToPdf(report, params,

   connection);

   } catch (Exception e) {

   bytes = null;

   throw new RuntimeException(e);

   } finally {

   DataSourceUtils.releaseConnection(connection, dataSource);

   }

   return bytes;

   }


# Part that write that data to the wicket's stream

   private static Link newInvoiceLink(String string, final Integer id) {

   return new Link(string) {

   @Override

   public void onClick() {

   getRequestCycle().setRequestTarget(new 
ResourceStreamRequestTarget(new AbstractResourceStream() {

   private static final long serialVersionUID = 1L;

   private transient InputStream is = null;

   public void close() throws IOException {

   if (is != null) {

   is.close();

   }

   is = null;

   }

   public InputStream getInputStream() {

   if (is == null) {

   is = new ByteArrayInputStream(getInvoice(id));

   }

   return is;

   }

   }, "Invoice #" + id + ".pdf"));

   }

   };

   }


This way you won't have any serializableexception anymore.

Hope this help

noon wrote:

I had some similar issues and I solved them by upgrading the JasperReports
from 2.x to 3.0.0.




novotny wrote:
  

Hi,

Ok I found in wicketstuff, a JRPdfResource  class that does the jasper to
pdf conversion for me
and I added code to do this:

InputStream is = getClass().getResourceAsStream("/test.jasper");

JRResource pdfResource = new JRPdfResource(is);

pdfResource.setReportParameters(new HashMap());
add(new ResourceLink("print", pdfResource));

But when I run it I get 


org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: java.io.ByteArrayInputStream
Field hierarchy is:
  2 [class=com.homeaccount.web.loanoptions.MortgageResultsPage, path=2]
private java.lang.Object org.apache.wicket.MarkupContainer.children
[class=[Ljava.lang.Object;]
  private java.lang.Object
org.apache.wicket.MarkupContainer.children[8]
[class=org.apache.wicket.markup.html.link.ResourceLink, path=2:print]
private final org.apache.wicket.Resource
org.apache.wicket.markup.html.link.ResourceLink.resource
[class=com.homeaccount.web.jasper.JRPdfResource]
  private
com.homeaccount.web.jasper.JRResource$JasperReportFactory
com.homeaccount.web.jasper.JRResource.jasperReportFactory
[class=com.homeaccount.web.jasper.JRResource$1]
final java.io.InputStream
com.homeaccount.web.jasper.JRResource$1.val$report
[class=java.io.ByteArrayInputStream] <- field that is not serializable
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:349)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:618)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:541)

I checked and JRResources implements Serializable, is there a way I can
get Wicket to avoid serializing this?

I was also thinking maybe I could do something like this:

ad

Re: access ServletOutputStream in wicket

2009-01-15 Thread Sébastien Piller

Hi,

look at RequestCycle#setRequestTarget and ResourceStreamRequestTarget


novotny wrote:

Hi,

I'm learning Jasper to create/display a PDF when a link is clicked and the
template code I have looks like:

ServletOutputStream servletOutputStream = response.getOutputStream();
InputStream reportStream =
getServletConfig().getServletContext().getResourceAsStream("/reports/FirstReport.jasper");
  
JasperRunManager.runReportToPdfStream(reportStream,

servletOutputStream, new HashMap(), new
JREmptyDataSource());

response.setContentType("application/pdf");
servletOutputStream.flush();
servletOutputStream.close();

How should I acccess the servlet objects, or is there a better way to do
this that is the "wicket way(tm)"?

Much appreciated, Jason
   
  



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



Re: Things I miss in Wicket

2009-01-15 Thread Sébastien Piller

Hi,

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


1) you have various way of altering tags and attributes: 
attributemodifiers, attributeappenders, overriding oncomponenttag, 
oncomponenttagbody...
2) you have the special wicket tag "key="resourcekey">[...]" to automatically add labels 
and stringmodels without any java representation




Tobias Marx wrote:

Hi there!

There are some things in Wicket I am missing and I think they could improve the 
framework a lot.

But just some small background first:

In my opinion the most important things in a web application are:

- as few lines of code as possible, as many as really necessary

- separation of design and web application code and logic

- if a webapplication changes in the design or some small items are added this 
should be possible without needing a java developer


Therefore I would like to suggest more intelligent templates in Wicket:

1. Pass parameters inside of wicket components eg:



and make them accessible in the Java code.

This is  a way to customize and reuse components purely by editing templates


2. Make Strings/Labels accessible directly in templatesto avoid redundant 
code like this:

add(new Label("indexTitle", .) and instead allow to add properties directly.

3. Pick up components automatically without needing to add them in the Java 
code:

add(new LastPostsPanel("lastPostsPanel"));
add(new NewsPanel("newsPanel"));

This could be matched automatically

I think Wicket could be better without so much redundant copy&paste code...by 
improving templates

Thanks for listening...

Toby




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


  



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



Re: Dynamic PDF Creation

2009-01-09 Thread Sébastien Piller

Some little points:

- on the "onsubmit" of a form (or any onsubmit like in button, 
submitlink, ajaxfallbackbutton, etc.) you don't need to verify the 
validity: wicket does it for you, it firsts validate the form and then 
call onsubmit if there is no error. Thus it means you can remove your 
"validateCriteria" and "if(!haserrormessage)"
- you don't need to implement the whole IRequestTarget interface 
yourself, instead you may use some existant implementation (this 
requires less work for you) for exemple ResourceStreamRequestTarget 
(which is the most usefull in your case). There are dozens 
implementation of IRequestTarget in the framework, just have a look to 
find one which fit your needs.
- this is often dangerous/expensive to add non-static inner classes 
(like you do with your anonymous implementation), because of 
serialisation of pages (reference to your top level class is hold in the 
inner class, and thus gets serialized if the inner instance needs to). 
Be aware of your session size, it is really important under heavy load.


jeredm wrote:

Thanks for the response!  It seems to be working well.  I am posting what I
ended up with.  Please let me know if you see anything that is a really bad
idea.

@Override
public void onSubmit(){

validateCriteria();
if(!hasErrorMessage()){
MyReportFactory pdfRef = new MyReportFactory();
final ByteArrayOutputStream pdfout = pdfRef.createPDF(startDt, 
endDt,
reportType);

final Response response = getRequestCycle().getResponse();
response.setContentType("application/pdf");
response.setContentLength(pdfout.size());
getRequestCycle().setRequestTarget(new IRequestTarget(){

@Override
public void detach(RequestCycle requestCycle) {
// No need to do anything here as I already 
closed the stream...I think
}

@Override
public void respond(RequestCycle requestCycle) {
try{
  OutputStream stream = 
response.getOutputStream();
  stream.write(pdfout.toByteArray());
  stream.flush();
  pdfout.close();
}catch(IOException ex){
  throw new RuntimeException(ex);
}
}

});
}
}

Pills wrote:
  

Have a look at RequestCycle#setRequestTarget.

Additionnaly, you may have a look at SubmitLink, since the validation 
step has nothing to do in the onClick of a link


jeredm wrote:


I am using FOP to create a PDF dynamically based on user input into a web
form.  I don't have a problem creating the PDF only with the display of
it. 
I need that PDF to be immediately sent to the user via a redirect or

download.  so something like this 

@Override
public void onClick(){
  validateUserDataFromForm();

  if(!hasErrorMessage()){
 ByteArrayOutputStream pdfData =
factory.createPDF(startDateThatIsSetViaTheForm,
endDateThatIsSetViaTheForm,
reportType);

 // Output the steam to a page I can redirect to.
 // I can use a File if ByteArrayOutputStream is making things tough.
 // I am fine if the user gets prompted like a download link, but I
want
a single click to create and prompt for download.
  }
}


 Here is what I have tried.
1) Making the PDF a resource:  This worked initially as I needed it to,
but
I was having problems with the resource being reused and while the report
needed to vary on each generation.  Basically, I need to create the PDF,
give it to the user, and then destroy the copy on the server.  Every time
the user clicks the create button a new PDF needs to be built and sent to
the user.  I also don't like this option as I don't want to waste memory
by
adding too many resources that are not re-used.  I need the user data to
update the display of the PDF when it is built, so I need the link to
pass
in new values to the createPDF function every time.

2) Something like this...
final Response response = getRequestCycle().getResponse();
response.setContentType("application/pdf");
response.setContentLength(pdfout.size());

try{
  OutputStream stream = response.getOutputStream();
  stream.write(pdfData.toByteArray());
  stream.flush();
}catch(Exception ex){
  throw new RuntimeException(ex);
}

That results in an error like so...
[org.apache.wicket.protocol.http.WicketFilter] - closing the buffer
error...

Any help would be appreciated!  Thanks!

Jered

  
  

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






 

Re: Dynamic PDF Creation

2009-01-09 Thread Sébastien Piller

Have a look at RequestCycle#setRequestTarget.

Additionnaly, you may have a look at SubmitLink, since the validation 
step has nothing to do in the onClick of a link


jeredm wrote:

I am using FOP to create a PDF dynamically based on user input into a web
form.  I don't have a problem creating the PDF only with the display of it. 
I need that PDF to be immediately sent to the user via a redirect or

download.  so something like this 

@Override
public void onClick(){
  validateUserDataFromForm();

  if(!hasErrorMessage()){
 ByteArrayOutputStream pdfData =
factory.createPDF(startDateThatIsSetViaTheForm, endDateThatIsSetViaTheForm,
reportType);

 // Output the steam to a page I can redirect to.
 // I can use a File if ByteArrayOutputStream is making things tough.
 // I am fine if the user gets prompted like a download link, but I want
a single click to create and prompt for download.
  }
}


 Here is what I have tried.
1) Making the PDF a resource:  This worked initially as I needed it to, but
I was having problems with the resource being reused and while the report
needed to vary on each generation.  Basically, I need to create the PDF,
give it to the user, and then destroy the copy on the server.  Every time
the user clicks the create button a new PDF needs to be built and sent to
the user.  I also don't like this option as I don't want to waste memory by
adding too many resources that are not re-used.  I need the user data to
update the display of the PDF when it is built, so I need the link to pass
in new values to the createPDF function every time.

2) Something like this...
final Response response = getRequestCycle().getResponse();
response.setContentType("application/pdf");
response.setContentLength(pdfout.size());

try{
  OutputStream stream = response.getOutputStream();
  stream.write(pdfData.toByteArray());
  stream.flush();
}catch(Exception ex){
  throw new RuntimeException(ex);
}

That results in an error like so...
[org.apache.wicket.protocol.http.WicketFilter] - closing the buffer error...

Any help would be appreciated!  Thanks!

Jered

  



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



Re: Wizard and redirect to a Page + backbutton

2009-01-06 Thread Sébastien Piller

Hi,

Unfortunately, not really. Now I don't rely on the wizard's events 
anymore and use a regular link instead, this works better


If you find a way to make a clean redirection from inside 
onActiveStepChanged, I'll highly appreciate it ;)





jorgesantoro wrote:

I have the same problem, did you find a solution for it?
Thanks


Pills wrote:
  

Hello,

I've a little problem with wicket. I'm trying to debug the following use 
case:


In a wizard, I sometimes need to redirect the user to a page outside the 
wizard (that is: quit the wizard). I use the standard "setResonsePage" 
method with my page class, on the "onActivenStepChanged" event.


#onActiveStepChanged
...
if (lastStep instanceof ChooseLoginMode && 
"createaccount".equals(clm.loginmode)) {   
((WizardModel)getWizardModel()).setActiveStep(lastStep); // Doesn't 
work...

*setResponsePage(PageSubscribe.class); *// backbutton gets messed
  or
*redirectToInterceptPage(new PageSubscribe());* // idem
}

But when the user click to the browser's backbutton, the wizard isn't in 
a correct state. It display the step #1 but its model and logic is for 
step #2, or even more weird state...


What would be your advice to fix that kind of issue? Any idea are 
welcome (this appened at least 4 times the two past days on our 
production machine) ;)


Thanks!

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





  



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



Re: Modal window - chagne width and height

2009-01-04 Thread Sébastien Piller

Hi,

I doubt such a feature is implemented in the wicket code

most likely, you will need to call the javascript function 
"window.resizeTo" yourself, with an AjaxBehavior (ie 
AjaxAbstractDefaultBehavior#respond and AjaxRequestTarget#appendJavascript)



Vitek Tajzich wrote:

Hi,

 


Is it possible to resize Modal Window by ajax?

 


I need for some reason to resize currently opened window. I've been looking
on google and mailing list and I didn't found anything usable. I also looked
into javascript for modal window and I think It should be possible..

 


Thanks..

 


V.


  



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



Re: Prototyping mode: Automatic markup generation

2008-11-28 Thread Sébastien Piller
IMO it is not required. This kind of error appears mostly with 
beginners, or during early phase of development: it doesn't happens 
anymore after.


For me, the behavior of wicket with that error is quite good. No need 
for some magical generation of markup.


This may lead to wrong use of the framework, too (user may think that 
they don't have to write any markup, and obviously this is not the case)



Casper Bang wrote:
While I understand the Wicket authors do not want a magic framework, I 
wonder if anyone else than me ever wished for a "development mode" or 
option on the error page when protyping and receiving the very typical 
"org.apache.wicket.WicketRuntimeException: The component(s) below 
failed to render. A common problem is that you have added a component 
in code but forgot to reference it in the markup".


Would it not be possible for Wicket to simply ignore the markup aspect 
if so instructed, and generate the required markup on-the-fly from the 
Java tree? Perhaps it's because I am new, but I sure run into that 
wicket message a lot. Anyway, just a though.


/Casper

-
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]



wicket:message as attribute and nested components

2008-11-05 Thread Sébastien Piller

Hello,

I was wondering if the behavior described here 
http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html (use 
wicket:message as attribute) was broken or if I'm doing something wrong 
(Wicket 1.3.5)


I've written that:


   
   
   
   wicket:id="label">[label goes here]
   wicket:id="component">

   
   
   wicket:id="feedback">

   
   
   




With a Java part that works fine.

If I remove the bold part, everything goes fine. If I leave them, I get 
the usual WicketRuntimeException


org.apache.wicket.markup.MarkupException: Unable to find component with id 
'label' in [MarkupContainer [Component id = _message_attr_12]]. This means that 
you declared wicket:id=label in your markup, but that


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



Re: example application for spring wicket hibernate

2008-11-02 Thread Sébastien Piller

you may look at wicket iolite too, it's very usefull

miro wrote:

are there any  examples for spring, wicket and hibernate ?
  



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



Re: Handle Hibernate transaction in wicket

2008-02-20 Thread Sébastien Piller
Yes, I read a bit about Spring some time ago, but atm I'm working on a 
project that will be released soon. I can't afford to rewrite half my 
code on the lasts weeks ;)


Next time, I'll take some time to getting started with it. I'm sure it's 
worth, that's what I read all the day. But I must consider my 
colleagues, too... They are not very very interested with dev, and 
already have difficulties to write php... so, with Spring, they will 
shot themselves :)


Thx

James Carman a écrit :

Once you get used to Spring, you'll really appreciate it.  I wouldn't
write it off as too difficult if I were you.  It's definitely worth
learning (and it helps your resume; it's in high demand).


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



NoClassDefFoundError with DatePicker on app reload

2008-02-20 Thread Sébastien Piller




Hello,

I've a problem with the DatePicker component. Every time I reload my
application (in Eclipse -> Run -> 'My project' on MyEclipse
Tomcat, or with an application undeploy/redeploy on Tomcat), I got the
stacktrace below.
java.lang.NoClassDefFoundError:
org.apache.wicket.extensions.yui.calendar.DatePicker
      at booby.dbadmin.people.FormPerson.(FormPerson.java:174)
      at
cosimoo.wizardorderprocess.WizardOrderProcess$Address.(WizardOrderProcess.java:90)
      at
cosimoo.wizardorderprocess.WizardOrderProcess.(WizardOrderProcess.java:693)
      at
cosimoo.PagePassOrderOrCustomizeNewProduct$1.onClick(PagePassOrderOrCustomizeNewProduct.java:21)
      at
org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:214)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183)
      at
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
      at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
      at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1166)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1241)
      at
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316)
      at
org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
      at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
      at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
      at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
      at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Unknown Source)

However, I'm sure that class is in my path... I can see it under
/libs/wicket-extensions-1.3.1.jar. And if I make a clean start (ie stop
tomcat, manually clean the webapps folder, restart tomcat and copy my
file.war), then everything works fine.

Is it a classloader issue or something like that? How to avoid this?



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



Re: Is there any Color Picker ? like the calendar.DatePicker

2008-02-20 Thread Sébastien Piller




In the Dojo subproject, there is a DojoColorPicker, but it works not
perfectly on my config. Depending on what you want to do with it, it
may be useful.


Java Programmer a écrit :

  On Feb 20, 2008 8:28 AM, laiqinyi <[EMAIL PROTECTED]> wrote:
  
  
 Is there Color Picker ?
I can choice any color, than return the color code(like FF 00)
thanks

Mead

  
  
I don't know if there are ready to use component but nice and
functional JS could be found here
http://www.dhtmlgoodies.com/index.html?whichScript=js_color_picker_v2
Making it Wicket component should be rather simple with provided examples ...

Best regards,
Adr

-
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: Problem on undeploy

2008-02-15 Thread Sébastien Piller

Hello,

I just tried it, and it worked :) I don't know if I can use this 
directive on my deployment server... I'll have a look with my hoster.


After some investigation, I'm now quite sure that it's a Wicket problem. 
I tried with a very simple project (Hello World) and it made the lock.


Could anybody tell me if it's a known bug or if I have to write a jira?

Thanks


TahitianGabriel a écrit :

Have you also tried the antiResourceLocking=true parameter?

That's the one I use and it works!

  


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



Re: Problem on undeploy

2008-02-14 Thread Sébastien Piller




Yes, I made a syntax error... but even with the syntax bellow, the
problem stills...




Sébastien Piller a écrit :

  
But the problem stills Have I done a syntax error?




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



Re: Problem on undeploy

2008-02-14 Thread Sébastien Piller




Hello,

thank you for your answer. I wrote a */META-INF/context.xml* file with
that in it:

  
      
      antiJARLocking
      true
      
  

But the problem stills Have I done a syntax error?


C S a écrit :

  Have you tried the antiLocking options (antiJARLocking and
antiResourceLocking)? 
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html  I haven't but
they seem to speak to your problem with the left over jars




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



Re: Problem on undeploy

2008-02-14 Thread Sébastien Piller
2008-02-14 12:46:23] [info] rw
  [2008-02-14 12:46:23] [info]  space 12288K,  52% used
  [2008-02-14 12:46:23] [info]  [0x2b0e, 0x2b727278,
0x2b727400, 0x2bce)
  [2008-02-14 12:46:24] [info] 
  [2008-02-14 12:46:19] [471  javajni.c] [debug] argv[0] = stop
  [2008-02-14 12:46:24] [508  javajni.c] [debug] Java Worker thread
finished
  [2008-02-14 12:46:25] [848  prunsrv.c] [debug] Waiting for java
jni stop worker to finish...
  [2008-02-14 12:46:25] [850  prunsrv.c] [debug] Java jni stop
worker finished.
  [2008-02-14 12:46:25] [935  prunsrv.c] [debug] Waiting for worker
to die naturally...
  [2008-02-14 12:46:32] [508  javajni.c] [debug] Java Worker thread
finished
  [2008-02-14 12:46:33] [946  prunsrv.c] [debug] Worker finished
gracefully in 7500 ms.
  [2008-02-14 12:46:33] [info] Service stopped.
  [2008-02-14 12:46:33] [info] Console CTRL+C event signaled
  [2008-02-14 12:46:33] [info] Stopping service...
  [2008-02-14 12:46:33] [471  javajni.c] [debug] argv[0] = stop
  [2008-02-14 12:46:33] [1255 prunsrv.c] [debug] Worker finished.
  [2008-02-14 12:46:34] [1265 prunsrv.c] [debug] Waiting for
ShutdownEvent
  [2008-02-14 12:46:35] [848  prunsrv.c] [debug] Waiting for java
jni stop worker to finish...

I know it's a bit long, but as I don't know what is normal and what is
not, I post everything.

It speaks about my connection pool, too. But the wicket app is already
undeployed, so why is my pool still alive?


Thank you for any help. 


Sébastien Piller a écrit :
Hello
guys,
  
  
I have a problem with wicket when I undeploy my application. Tomcat
tries to undeploy everything, but he fails to delete the wicket's API
librairies (wicket-1.3.1.jar, wicket-extensions-1.3.1.jar, etc.).
  
  
It seems to the same issue as this one:
  
http://mail-archives.apache.org/mod_mbox/wicket-commits/200801.mbox/[EMAIL PROTECTED]
  
  
Is there a workaround for this? I really need to be able to redeploy my
application without restarting Tomcat...
  
  
Thanks
  





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



Problem on undeploy

2008-02-14 Thread Sébastien Piller

Hello guys,

I have a problem with wicket when I undeploy my application. Tomcat 
tries to undeploy everything, but he fails to delete the wicket's API 
librairies (wicket-1.3.1.jar, wicket-extensions-1.3.1.jar, etc.).


It seems to the same issue as this one:
http://mail-archives.apache.org/mod_mbox/wicket-commits/200801.mbox/[EMAIL 
PROTECTED]

Is there a workaround for this? I really need to be able to redeploy my 
application without restarting Tomcat...


Thanks

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



Handle Hibernate transaction in wicket

2008-02-13 Thread Sébastien Piller

Hello,

I'm searching for a best practice to integrate some hibernate 
transaction with Wicket. I'd like to implement the "session-per-request" 
that is described here 
http://www.hibernate.org/hib_docs/v3/reference/fr/html_single/#tutorial-firstapp-workingpersistence


I think I can commit the transaction and close the session on the 
"onAfterRender" method. But where is the best place to start it? On the 
first line of the constructor? Or in the onBeforeRender (I think not)? 
Anywhere else?


And what about the ajax queries? I need to recreate a new transaction 
for each ajax request, need I?


Thank you a lot for your think :)

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



Re: Load resource from anywhere on the HDD

2008-02-11 Thread Sébastien Piller




Sorry, it is solved I'm too stupid, or need glasses...

The only need to fix this problem is to configure the resource finder,
in the init() method of the application class...
WebApplicationPath resourceFinder =
(WebApplicationPath) getResourceSettings().getResourceFinder();
  String s = "/etc/path/to/uploads/dir";
  if (!new File(s).exists()) {
      new File(s).mkdirs();
  }
  resourceFinder.add(s);

Nothing else to change... reference your resource the same way as
anything else...

Wicket is really pleasant. Every problem has a nice solution ;)



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



Load resource from anywhere on the HDD

2008-02-11 Thread Sébastien Piller

Hello,

I have a little question: my app lets the user upload some files on the 
server side. I would like to put them somewhere on the server hdd, out 
of the context of the application (let say on /dev/etc/uploads), so when 
I redeploy my war (update of the system), all the uploaded files aren't 
going to be deleted.


I just don't know how to reference them, when they are not in any 
package (this files are images, swf, and other binary, and I need to 
display images & swf in html). I searched for some ResourceReference, 
but none of them lookup out of the webapp.


Need I to write my own ResourceLocator/ResourceReference to achieve 
that? Or is there something existant in wicket?


Thank you vm ;)

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



Re: AjaxFormValidatingBehavior: getting NotSerializableExc

2008-02-06 Thread Sébastien Piller

That's it! I'm too stupid... sorry for the disturbing ;)

Martijn Dashorst a écrit :

My first guess is that the IVisitor is not serializable. Since you
create two nested anonymous inner classes inside one another, the
behaviors keep a reference to the IVisitor.

Martijn


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



AjaxFormValidatingBehavior: getting NotSerializableExc

2008-02-06 Thread Sébastien Piller




Hello guys,

I'm having a little problem with the use of AjaxFormValidatingBehavior.
I add it to all my fields, using a visitor.

    form.visitChildren(FormComponent.class, new IVisitor()
{
    public Object component(Component component) {
    if (component instanceof TextField) {
    component.add(new AjaxFormValidatingBehavior(form,
"onkeyup") {
    private static final long serialVersionUID = 1L;
    
    @Override
    protected void onError(AjaxRequestTarget
target) {
    super.onError(target);
    updateFieldsCssClasses();
    }
    
    @Override
    protected void onSubmit(AjaxRequestTarget
target) {
    super.onSubmit(target);
    updateFieldsCssClasses();
    }
    });
    } else if (component instanceof DropDownChoice ||
component instanceof CheckBox) {
    component.add(new AjaxFormValidatingBehavior(form,
"onclick") {
    private static final long serialVersionUID = 1L;
    
    @Override
    protected void onError(AjaxRequestTarget
target) {
    super.onError(target);
    updateFieldsCssClasses();
    }
    
    @Override
    protected void onSubmit(AjaxRequestTarget
target) {
    super.onSubmit(target);
    updateFieldsCssClasses();
    }
    });
    }
    
    return null;
    }
    });


But when this code is rendered, it throws this exception:
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: xxx$10
  Field hierarchy is:
    2 [class=xxx, path=2]
  ...
  at java.lang.Thread.run(Unknown Source)
  Caused by: java.io.NotSerializableException: xxx.$10
      at java.io.ObjectOutputStream.writeObject0(Unknown Source)
      at java.io.ObjectOutputStream.defaultWriteFields(Unknown
Source)

However, AjaxFormValidatingBehavior implements Seriablizable... so I
don't understand why Wicket complains about it...

Have I miss something?

PS: it works this way under at least 1.3.0 and 1.3.1






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



DojoColorPicker seems not to work

2008-01-31 Thread Sébastien Piller




Hello,

I'm using DojoColorPicker (latest trunk from the svn) for the first
time and I think I've found an issue.

I use it very trivialy:
rvbhexcode = new DojoColorPicker("rvbhexcode", new
PropertyModel(formTarget, "rvbhexcode"));
  rvbhexcode.setRequired(true);
  form.add(rvbhexcode);

In IE6/IE7, it is rendered as a normal textfield (there is no
colorpicker on the right).
Under Firefox, I can select a color, and its hexa code is properly
setted on the textfield. But when I submit the form, the model is not
updated (the selected color is not setted to my model, and the form
cannot submit, it complains about a required field not filled).

Is it a known issue? Or do I something wrong?

Does another color picker exist in wicket?

Thank you ;)



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



Re: DDC and page reload

2008-01-30 Thread Sébastien Piller
I found a patch (very ugly but works). On the onSelectionChange, I wrote 
this:


if (MyAbstractPage.this instanceof MyPageWithTheRefreshIssue) {
   setResponsePage(new MyPageWithTheRefreshIssue());
}


But I wonder: is this a normal behavior? I guessed I need not to refresh 
it manually, need I?


Thanks! ;)



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



Re: DDC and page reload

2008-01-30 Thread Sébastien Piller

Yes, no problem, but it's really trivial...

My Flash object is added here (I use the ShockWaveComponent, little 
modified, from the wiki):
  
   ShockWaveComponent swf = new ShockWaveComponent("swf", 
"ShirtDesignerV2.swf", "770", "480");

   swf.setValue("quality", "high");
   swf.setValue("bgcolor", "#869ca7");
   swf.setValue("id", "editor");
   swf.setValue("name", "editor");
   ...
   String curr = getCurrentCurrency();
   swf.setValue("flashvars", "somevar=" + "somevalue"+ "¤cy=" 
+ curr);

   swf.setValue("allowScriptAccess", "sameDomain");
   swf.setValue("type", "application/x-shockwave-flash");
   add(swf);

And here I change the currency with the DDC:
   DropDownChoice currencies = new 
DropDownChoice("currencies", new PropertyModel(this, "currentCurrency"), 
Arrays.asList(new String[] { "CHF", "EUR", "USD" })) {

   @Override
   protected boolean wantOnSelectionChangedNotifications() {
   return true;
   }
  
   @Override

   protected void onSelectionChanged(Object newSelection) {
   //System.out.println("SETTED: " + newSelection);
   setCurrency(newSelection + "");
   }
   };
   add(currencies);

There is nothing special here

But when the onSelectionChanged is fired, the flashvars doesn't change

Thanks ;)


Edvin Syse a écrit :

I think it would be easier to help you if you supplied some code :)

-- Edvin



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



DDC and page reload

2008-01-30 Thread Sébastien Piller

Hello,

I have a little problem with drop down choices. I have one on my page. 
It stores some currencies. In the same page, I've got a Flash module, 
who needs the actual currency to work. I pass it using the usual 
"flashvars".


But when I change a currency on the DDC (ie from USD to EUR), the actual 
page is refreshed (or seems to), but the currency passed in the 
flashvars is the old one (USD) although all of my models are properly 
updated. So I think wicket hasn't recomputed some markup...


Can I force him to fully reload (recreate) the current page when a 
onSelectionChange event is fired?


Thanks!

;)

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



Re: It is there any Component not translate the HTML tag, and display the right format

2008-01-30 Thread Sébastien Piller




In fact: setEscapeModelString
;)

Gerolf Seitz a écrit :

  .setEscapeOutputStrings(false) (or something like that)

  Gerolf

On Jan 30, 2008 10:04 AM, laiqinyi <[EMAIL PROTECTED]> wrote:

  
  
Hi  All,

now, I have integrated a wyswyg Editor with Wicket,and I save a lot of
HTML tag into DataBase.
The problem is, HTML tag could not show correct form, but display the
ESC(transferred) tag
for example:

in the database there is :
rr

in the html source code there is:

rr

and It can see rr in the browser,lost format So, It is there any Component not translate the HTML tag, and display the right format BestRegards, Mead - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How to set no cache header

2008-01-23 Thread Sébastien Piller

Hello guys,

I would like to prevent a page to be stored on the client side. How can 
I set the "Cache-Control" headers?


Thanks!

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



Re: Upload files using Flex (php move_uploaded_file equivalent)

2008-01-23 Thread Sébastien Piller

I think I got it ;)

Here is what I wrote. It works fine until now. It still has some weak 
points (no error on client side if server can not process the file) but 
I paste it here:


if (request instanceof ServletWebRequest) {
   try {
   ServletWebRequest swr = (ServletWebRequest) request;
   HttpServletRequest hsr = swr.getHttpServletRequest();
  
   if (ServletFileUpload.isMultipartContent(hsr)) {
   MultipartServletWebRequest mswr = new 
MultipartServletWebRequest(hsr, Bytes.megabytes(2));


   Map map = mswr.getFiles();
   for (Object o : map.keySet()) {
   Object object = map.get(o);
  
   if (object instanceof DiskFileItem) {

   DiskFileItem dfi = (DiskFileItem) object;
   File f = dfi.getStoreLocation();

   File directory = new 
File(AbstractApplication.get().getUploadFolder(), "logos");

   directory = new File(directory, "temp");
   directory.mkdirs();
  
   FileUtils.move(f, new File(directory, 
getSession().getId() + "." + FileUtils.getExt(dfi.getName(;

   }
   }
   return;
   }
   } catch (Exception e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   }
   }

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



Upload files using Flex (php move_uploaded_file equivalent)

2008-01-22 Thread Sébastien Piller




Hi everybody,

I have a problem with my application. 

I need to upload some files on the server using an Adobe Flex
application. Flex doesn't provide much control for the file upload, I
can't get the raw file data that I want to upload (so I can't send them
in the url, or encode them or anything else). 

On the server side, I have a wicket page, with a constructor taking
only one page parameters argument ("public
MyUploadPage(PageParameters params)")

The only thing that doesn't work is when I need to write the data/move
them with wicket (I receive nothing in the page parameters). I saw some
code in PHP like that:

 $file_temp = $_FILES['file']['tmp_name'];
   $file_name = $_FILES['file']['name'];
  move_uploaded_file(...);


What is the direct equivalent in Wicket?

Thanks!



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



Re: disabling crypt of PasswordTextField

2008-01-15 Thread Sébastien Piller
Mmm... I think they are not. What I type is setted to the model as is, 
no crypto here


Juliano Gaio a écrit :
Hi All, 


how to disable crypt of a PasswordTextField ?

Juliano.
  



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



Re: Javascript call to wicket

2008-01-10 Thread Sébastien Piller




Yes, I'd like to do it, but as english is not my mother language, I
need somebody to correct it after I write it. 

Who wants to do that? ;)

Gwyn Evans a écrit :

  As Cemel suggested, if you have time to put a summary up on the Wiki,
it would be appreciated!
  
  




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



Javascript call to wicket

2008-01-08 Thread Sébastien Piller

Hello guys,

I've a little question about the javascript and wicket. I need to update 
some models on server side using javascript (in fact, I need to update 
it from a flash object, and that's why I use js).


But I have no idea about how to do this... I know how to call a JS 
function from flash, but I don't know how to update a wicket model using 
a javascript/ajax call.


Has anybody some hint about that?

Thanks you

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



Re: @AuthorizeInstanciation and several roles

2008-01-02 Thread Sébastien Piller




Well, with swarm I do need to define the policy files, which isn't
trivial for me (I never saw this kind of syntax before). 
And there is a lot of new classes/interfaces in this api (SwarmWebApp,
Principal, SwarmActionFactory, LoginContext, ...) with no much
documentation. It's not easy to transform an AuthenticatedWebApp in a
SwarmWebApp.

I think wicket-auth-roles is more clear and easy to use (just to put an
annotation and implement getRoles in the session). It's trivial and
looks pretty. When I need to, I manually enable/disable the links. It's
easy to implement with my layout.

I think some clear and simple examples using swarm with users extracted
from a db will be a very good improvement. (with login page, normal
pages, securized pages and several security levels)

If so, I might upgrade my app to use swarm. But for now it looks too
complicated for just autorizing instantiation. 

And last but not least, swarm/wasp are both in version 0.1 beta, I'd
prefer to wait for a stable release or at least a rc. (my app will be
in production soon)

Thanks

Maurice Marrink a écrit :

  Hi,

I'm wondering what exactly about swarm you find difficult or too complex.
Perhaps we can make some improvements.

preventing pages in swarm to be constructed is as complex as extending
SecureWebPage.

Off course you need to create a policy for those 3 types of users,
containing you're secure pages.

About hiding links to pages people are not supposed to come, it will
spare your users from hitting the access denied page.
It tends to annoy people: if the app knows i'm not allowed to go there
then why can i click on that link anyway, etc.

Maurice

On Dec 31, 2007 1:05 AM, Pills <[EMAIL PROTECTED]> wrote:
  
  
Hello,

I'm using the wicket-auth-roles package to allow or restrict access to some
pages. I need to autorize the instanciation of some pages to several roles.
Is it possible to write something like:

@AuthorizeInstanciation("poweruser,admin,sysadmin")
class Mypage extends WebPage {...}

and something like this in my authenticated session:

public Roles getRoles() {
return new Roles(new String[] {"poweruser","admin","sysadmin"});
}

If it's possible, what is the right syntax?

PS: I've read a bit about wasp/swarm, but it looks too much complicated for
my needs (I just need to prevent some components to be instantiated for some
kinds of users). Hiding/showing links and such fonctionnality is not needed

Thank you ;)
--
View this message in context: http://www.nabble.com/%40AuthorizeInstanciation-and-several-roles-tp14552711p14552711.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: @AuthorizeInstanciation and several roles

2007-12-31 Thread Sébastien Piller




I answered your first post (where you omitted { and }).

I have seen your correction after sending this

;)

nasrin mansour a écrit :

  yes i said this before , has my syntax any different with your's?

On Dec 31, 2007 2:07 PM, Sébastien Piller <[EMAIL PROTECTED]> wrote:

  
  
 Yes, I tried it too, but it doesn't work.

The right syntax seems to be @AutorizeInstanciation( *{* "poweruser",
"admin", "sysadmin" *}* )

Thanks

nasrin mansour a écrit :

hi
i don't have enough experience in this topic like you but i think if you
look at wicket-role-auth-example it's usuful and
 i think you must wite  this :
@AuthorizeInstanciation("poweruser,admin,sysadmin")
in this way:
@AuthorizeInstanciation("poweruser ", "admin", "sysadmin")

On Dec 31, 2007 3:35 AM, Pills <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote:



 Hello,

I'm using the wicket-auth-roles package to allow or restrict access to
some
pages. I need to autorize the instanciation of some pages to several
roles.
Is it possible to write something like:

@AuthorizeInstanciation("poweruser,admin,sysadmin")
class Mypage extends WebPage {...}

and something like this in my authenticated session:

public Roles getRoles() {
   return new Roles(new String[] {"poweruser","admin","sysadmin"});
}

If it's possible, what is the right syntax?

PS: I've read a bit about wasp/swarm, but it looks too much complicated
for
my needs (I just need to prevent some components to be instantiated for
some
kinds of users). Hiding/showing links and such fonctionnality is not
needed

Thank you ;)
--
View this message in context:http://www.nabble.com/%40AuthorizeInstanciation-and-several-roles-tp14552711p14552711.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: @AuthorizeInstanciation and several roles

2007-12-31 Thread Sébastien Piller




Yes, I tried it too, but it doesn't work.

The right syntax seems to be @AutorizeInstanciation( { "poweruser", "admin", "sysadmin" } )

Thanks

nasrin mansour a écrit :

  hi
i don't have enough experience in this topic like you but i think if you
look at wicket-role-auth-example it's usuful and
 i think you must wite  this :
@AuthorizeInstanciation("poweruser,admin,sysadmin")
in this way:
@AuthorizeInstanciation("poweruser ", "admin", "sysadmin")

On Dec 31, 2007 3:35 AM, Pills <[EMAIL PROTECTED]> wrote:

  
  
Hello,

I'm using the wicket-auth-roles package to allow or restrict access to
some
pages. I need to autorize the instanciation of some pages to several
roles.
Is it possible to write something like:

@AuthorizeInstanciation("poweruser,admin,sysadmin")
class Mypage extends WebPage {...}

and something like this in my authenticated session:

public Roles getRoles() {
   return new Roles(new String[] {"poweruser","admin","sysadmin"});
}

If it's possible, what is the right syntax?

PS: I've read a bit about wasp/swarm, but it looks too much complicated
for
my needs (I just need to prevent some components to be instantiated for
some
kinds of users). Hiding/showing links and such fonctionnality is not
needed

Thank you ;)
--
View this message in context:
http://www.nabble.com/%40AuthorizeInstanciation-and-several-roles-tp14552711p14552711.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: HTML code inside language file

2007-12-12 Thread Sébastien Piller

Marco Aurélio Silva a écrit :

Hi

I'm trying to use some HTML codes with internationalized page. For example,
some texts have words in italic and I need to use the  tag. But when
wicket renders the text the  tag is showed on screen instead make the
word italic. Any suggestion?

Thank you
Marco

  

Hi,

just call "setEscapeModelStrings(false)" on your label ;)

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