Re: Handling POST, PUT and DELETE from a resource

2012-01-04 Thread 7zark7
I know these sort of replies are annoying, but I don't think Wicket is a good 
choice for handling web service calls - it's pretty easy to map other paths to 
servlets or other handlers that better deal with PUT, DELETE, etc.

-- 
Anh My
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Wednesday, January 4, 2012 at 3:49 PM, Daniel Watrous wrote:

 I'm building a web service and I wonder if there's some way to detect
 and do something unique when calling a ResourceReference with
 different HTTP methods.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org 
 (mailto:users-unsubscr...@wicket.apache.org)
 For additional commands, e-mail: users-h...@wicket.apache.org 
 (mailto:users-h...@wicket.apache.org)
 
 




Re: Multithreaded construction of pages

2010-12-05 Thread 7zark7

Would love to see your code, are you using scala.actors.Futures?


On 12/4/10 4:26 AM, NielsBo wrote:


Hi

I would like to share my experience with implementing multithreading in my
Wicket application.
The problem was pages containing many independent panels each fething data
from external services, and the result being slow pages because each panel
is processed one at a time in Wicket.

The solution involved creating a AsyncLoadableDetachableModel class that
does the loading in a separate thread. I use the
java.util.concurrent.ExecutorService threadpool and the
AsyncLoadableDetachableModel then contains a Future object that synchronizes
with the main thread when getObject() is called.
The threads are started by an IComponentOnBeforeRenderListener on the
application.

Session data is attached/detached to the Threads so they execute the loading
in a context of the end user. I don't use the Wicket Session for this, but a
separate class that implements a MySession interface with properties like
userid, locale etc. that are copied from the Wicket session before starting
the threads.

I think this turned out very nice, and I can now simply replace a use of
LoadableDetachableModel with my new AsyncLoadableDetachableModel where data
is loaded from external services. And it works perfectly! Response time on
the pages are now the time of the slowest panel. Even with just one panel
use the Async model, there can still be an effect if another slow panel is
before the async one in the page/panel hierachy.

Best regards
Niels Bo






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



Re: [OT] WicketForge 0.7.2 available for IDEA 9

2010-11-10 Thread 7zark7

Great, thanks!

On 11/10/10 5:25 PM, Minas Manthos wrote:


WicketForge 0.7.2 is available for download.

change notes: http://plugins.intellij.net/plugin/?id=1545




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



Re: How to hide ListView rows the right way?

2010-11-08 Thread 7zark7

Yes, this is what I recently used as an approach.

I added an additional more AjaxLink which isVisible returns when the 
list model is collapsed.



On 11/8/10 8:20 AM, Frank van Lankvelt wrote:

wouldn't you be better off wrapping your model/dataprovider in a
filter that does the processing that's required?
That way, you can keep populating the views simple, without even
needing to use setVisible.

cheers, Frank


On Mon, Nov 8, 2010 at 4:34 PM, MattyDEufer.mar...@gmail.com  wrote:


Hi Folks,

i abuse the ListView Component (2 of them nested) to iterate over a bunch of
type-save objects to build my own GridView Component, which works very well.

But now, i want to spare out the showing of some rows in the outer ListView
component, but ALSO want to process the inner ListView:populateItem for some
special object processing over ALL Items (espacially the hidden ones), but
NOT showing the row to the client at all.

I try setVisible(false) and this works very well... for hiding, but the
inner ListView will not be processed anymore for this particular hidden
row.

Any ideas how to hide the row AND process/render the inner ListView?

A CSS-Hiding is not a solution, i have to limit the shown items for
peformance matter so i dont want to responde the hidden html-lines to the
client at all.

Thanks in Advance for any hint, and apologise my terrible English. Its not
my mothers tongue.

- Matty
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-hide-ListView-rows-the-right-way-tp3032125p3032125.html
Sent from the Users forum mailing list archive at Nabble.com.

-
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: Free wicket from component hierarchy hell

2010-11-04 Thread 7zark7
Perhaps this is what you mean by any level within given Panel-type 
element,

but would this not screw up making components?

The hierarchy is rather important for this - unlike JSP, etc where you 
just dump data references in a page response


Components are one of the things that makes Wicket so nice.


On 11/4/10 1:13 PM, Martin Makundi wrote:

I propose Free Wicket from component-hierarchy hell

We have discussd before that Wicket has unnecessary binding to
wicket:id and component hierarchy
[http://www.mail-archive.com/users@wicket.apache.org/msg53941.html].

I think I found a simple solution: wicket:id should be allowed to be
on any level within given Panel-type element. User has freedom to
position components and change html layout.

What you think?

Old wicket applications can be automatically refectored to have unique
ids. Currently the wicket hardcoded component hierarchy slows down
development and is totally unnecessary.

https://cwiki.apache.org/confluence/display/WICKET/Wicket+1.5+Wish+List

**
Martin

-
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: get localized string from Model class?

2010-10-31 Thread 7zark7
Hmm, that didn't seem to find a property if I have the property file 
specific to the model class, e.g.:

NiceDateModel.properties

However, I see now there's some classes such as:

IComponentAssignedModeljava.lang.String

or perhaps I should subclass StringResourceModel, etc.

Will look into it further,

Thanks


On 10/30/10 4:53 AM, 7zark7 wrote:

Thank you, I'll give that try!

On Oct 30, 2010, at 1:51 AM, Bas Goorenb...@iswd.nl  wrote:


The component parameter can be null.

e.g. if you look at getObject() in the ResourceModel class:

return 
Application.get().getResourceSettings().getLocalizer().getString(resourceKey,(ComponentString)null,
 defaultValue);

It calls Localizer#getString with the resource key and optionally a component.

Sebastian

- Original Message - From: 7zark77za...@gmail.com
To: Wicketusers@wicket.apache.org
Sent: Saturday, October 30, 2010 8:47 AM
Subject: get localized string from Model class?



Hi,

I am writing a IModelString  implementation which formats Dates in a 
particular way.

I would like the text to be in localized properties files, however I can't seem 
to leverage anything in Wicket for this.  Localizer expects a component to be 
passed to its getString methods, which I do not have a reference to.

Anyone have ideas or done similar?


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




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



Re: get localized string from Model class?

2010-10-31 Thread 7zark7
I understand that, but in this case a IModel or IConverter seems 
appropriate since I'm only interested in the string representation of a 
date, not page or component markup.


However, in doing this, you seem to lose some of Wicket's nice 
localization conventions.



On 10/30/10 11:36 PM, vineet semwal wrote:

afaik you should only have property files corresponding to your components
,pages or application.
however if you just want to do your own way you can always use get your
resourcebundle.

On Sun, Oct 31, 2010 at 11:51 AM, 7zark77za...@gmail.com  wrote:


Hmm, that didn't seem to find a property if I have the property file
specific to the model class, e.g.:
NiceDateModel.properties

However, I see now there's some classes such as:

IComponentAssignedModeljava.lang.String

or perhaps I should subclass StringResourceModel, etc.

Will look into it further,

Thanks



On 10/30/10 4:53 AM, 7zark7 wrote:


Thank you, I'll give that try!

On Oct 30, 2010, at 1:51 AM, Bas Goorenb...@iswd.nl   wrote:

  The component parameter can be null.


e.g. if you look at getObject() in the ResourceModel class:

return
Application.get().getResourceSettings().getLocalizer().getString(resourceKey,(ComponentString)null,
defaultValue);

It calls Localizer#getString with the resource key and optionally a
component.

Sebastian

- Original Message - From: 7zark77za...@gmail.com
To: Wicketusers@wicket.apache.org
Sent: Saturday, October 30, 2010 8:47 AM
Subject: get localized string from Model class?


  Hi,


I am writing a IModelString   implementation which formats Dates in a
particular way.

I would like the text to be in localized properties files, however I
can't seem to leverage anything in Wicket for this.  Localizer expects a
component to be passed to its getString methods, which I do not have a
reference to.

Anyone have ideas or done similar?


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




-
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



get localized string from Model class?

2010-10-30 Thread 7zark7

Hi,

I am writing a IModelString implementation which formats Dates in a 
particular way.


I would like the text to be in localized properties files, however I 
can't seem to leverage anything in Wicket for this.  Localizer expects a 
component to be passed to its getString methods, which I do not have a 
reference to.


Anyone have ideas or done similar?


Thanks

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



Re: get localized string from Model class?

2010-10-30 Thread 7zark7
Thank you, I'll give that try!

On Oct 30, 2010, at 1:51 AM, Bas Gooren b...@iswd.nl wrote:

 The component parameter can be null.
 
 e.g. if you look at getObject() in the ResourceModel class:
 
 return 
 Application.get().getResourceSettings().getLocalizer().getString(resourceKey,(ComponentString)null,
  defaultValue);
 
 It calls Localizer#getString with the resource key and optionally a component.
 
 Sebastian
 
 - Original Message - From: 7zark7 7za...@gmail.com
 To: Wicket users@wicket.apache.org
 Sent: Saturday, October 30, 2010 8:47 AM
 Subject: get localized string from Model class?
 
 
 Hi,
 
 I am writing a IModelString implementation which formats Dates in a 
 particular way.
 
 I would like the text to be in localized properties files, however I can't 
 seem to leverage anything in Wicket for this.  Localizer expects a component 
 to be passed to its getString methods, which I do not have a reference to.
 
 Anyone have ideas or done similar?
 
 
 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
 

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



Re: New App - Best Practices

2010-10-03 Thread 7zark7

There's no best practices any more :-)

Wicket/Spring/Hibernate is simple and lots of examples.
Hibernate with JPA is super-easy to work with.

If you want something different, NoSQL such as CouchDB is nice, 
especially if you need to store binary attachments, etc.


My current stack is Wicket/Spring/CouchDB using Scala - but the only 
100%, mathematically-proven to be superior technology in this is Wicket ;-)



On 10/3/10 4:40 PM, Francisco Diaz Trepat - gmail wrote:

Hi I've tested wicket before it was in the apache incubator and found
it to be awesome, since then we have adopted it and I have been
migrating all legacy applications for my company for the last 3 years
aprox.

Now I have to build a small app to manage small accounting and
logistics for my wife's Business

She is opening a small printing shop for small business labels, such
as wine bottle labels, clothing labels, bags, etc.

At work I use wicket with an ingenious CORBA server, courtesy of the
legacy applications.

Now I am free to do whatever I want. This is the worst part. :-)

I would like to help out and test maybe wicket 1.5 and some good
database solution.

Can you share some comments or recommendations on what to do?
For Instance, I once read about Active Objects, I pretty much liked
the idea and built some prototypes, but now the site is exactly the
same and found their latest released is from 2008. So that is no so
edgy...

I don't wish to use hibernate, but could be some other object
relational mapping, even hibernate if you insist... :-)

So, ideas on what to use?

UI = Wicket.
 + 1.4?
 + 1.5?
middle layer?
Persistence?

Thanks in advance,
f(t)

-
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: announcing Granite - a Wicket-Scala-DB4O web application stack

2010-09-23 Thread 7zark7

Looks great, thanks for the link.

+1 on CouchDB, et al vs only DB4o,
Wicket+Scala+Couch is a really nice stack


Thanks

On 9/21/10 11:42 PM, Thomas Kappler wrote:

On 09/22/10 03:41, Sam Stainsby wrote:

Today we officially announced our project to provide a Wicket-DB4O-Scala
web application stack:

http://sustainablesoftware.com.au/blog/?p=77

I’m pleased to announce a new web application framework, called Granite,
and an associated set of reusable libraries, called Uniscala. Please note
that this is a work in progress: we are not announcing a release yet, or
even a beta. A number people have started asking about the project, and
so I felt it would be helpful to let the wider world know what is going
on.

Granite is a lightweight framework for the rapid development of web
applications. It is based on the very cool and richly featured Apache
Wicket web framework. Granite uses an embedded object database that
avoids the need for SQL or Object-Relational Mappers (ORMs), and, in the
Wicket tradition, is proud of, if not smug about, its distinct lack of
external XML configuration files.


Hey,

I find that quite exciting.

Now that you've done the hard work of fitting a non-relational store
into a Wicket-based framework, do you think it would be hard to
substitute other data stores such as Redis, CouchDB, BDB for DB4O?

-- Thomas




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



Re: learn from my security mistake with getString

2010-07-24 Thread 7zark7
properties files and/or Spring configuration files

Sent from my iPod

On Jul 23, 2010, at 2:32 PM, Fernando Wermus fernando.wer...@gmail.com wrote:

 All we know that. On the other hand it is very practice to solve it in that
 way. What tools or framework do you use instead?
 
 On Fri, Jul 23, 2010 at 5:25 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:
 
 wicket property files are meant for externalizing ui strings, not
 configuration values :)
 
 -igor
 
 On Fri, Jul 23, 2010 at 12:12 PM, Jim Pinkham pinkh...@gmail.com wrote:
 I was just looking around for my dunce cap after noticing this little
 gotcha
 - and I thought of this forum instead to share my moment of
 not-so-brilliance:
 
   public LoginForm(final String id) {
   ... other stuff ...
   add(new FormComponentFeedbackBorder(user.feedback).add(new
 TextField(user).setRequired(true)));
   passwordField = new PasswordTextField(password);
   passwordField.setRequired(true);
   add(new
 FormComponentFeedbackBorder(password.feedback).add(passwordField));
   }
   protected void onSubmit() {
   String password=getString(password).trim();
   if (password.equalsIgnoreCase(getPassword())) {
   ((AuctionSession)getSession()).setAdmin(true);
   ((AuctionSession)getSession()).setUserName(getUser());
   if (!continueToOriginalDestination())
   setResponsePage(getApplication().getHomePage());
   } else
   passwordField.error(invalid user/password);
   }
   }
 
 Pretty basic, I know.  Maybe you have a page like this in your Wicket
 app?
 
 
 The mistake I wanted to share is that I'm using the same name for the
 password wicket:id, and the string property in MyLoginPage.properties,
 which just has a line that says password=super_secret_whatever.
 (Actually,
 it's ${profile.password} and I have different maven profiles for
 different
 versions of the app, but that's another story).
 
 Anyway, imagine my suprise when I accidentally left the password blank by
 mistake - the required error message uses the same property and shows the
 password to the wide world in the feedback message:
 'super_secret_whatever'
 is required.  Hah!(Yup, it's been in production for quite a while
 like
 this...)
 
 Just wanted to share that one with y'all - may all your mistakes be
 entertaining and/or educational...
 :)
 
 -- Jim.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
 -- 
 Fernando Wermus.
 
 www.linkedin.com/in/fernandowermus

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



Re: Animated page switch possible?

2010-07-21 Thread 7zark7
Folks I think there is a valid usage here for mobile device apps which use 
animations between panels.  I've run into this myself.

Granted a webapp is not native, but some clients do desire a close to native 
experience and this is a nice touch.

Sent from my iPod

On Jul 21, 2010, at 12:48 PM, James Carman ja...@carmanconsulting.com wrote:

 If not, hit them with this...
 
 These are not the page switching animations you're looking for.  Move along.
 
 On Wed, Jul 21, 2010 at 3:38 PM, Per Newgro per.new...@gmx.ch wrote:
 Ok thats a point.
 
 Thanks
 Per
 
 -
 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
 

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



GMap2 and adding LocalSearch

2010-06-26 Thread 7zark7

I'm having trouble using GMap2 and adding a LocalSearch control:

http://www.google.com/uds/solutions/localsearch/index.html

Looks to be a one liner in Javascript:

map.addControl(new google.maps.LocalSearch());



But given the class heirarchy and JS generation used, not sure how I 
would do this.


Has anyone done this our could give advice?


Thanks

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