Re: Wicket Offline Applications

2009-05-02 Thread Carlo Camerino
hmm, you have a point here.however, every requirement is different.

I know that it may sound weird, but still I believe that it depends on the
nature of the application.
There are lots of types of applications that banks use.
Some I know would have to always have a central server managing it.

There are different types of Technical Architectures that we cater for in
our applications.
There are some applicationms that always require online mode regardless adn
there are applications that the user just
needs to be able to view customer information ,etc


actually it's hard to decide here.
on the downside, I heard that GWT consumes a lot of resources on the client
side, it's also a consideration.

Failsafe servers are of course an option but again, the network is still a
factor here.
For example a very slow connection to the central server makes my
productivity a lot less.
Some places suffer from low bandwidth, unreliable networks, etc...

I saw the value of distributed or offline applications that uses
synchronization.
It will be harder for the developers of course sicne they have to cater to
two modes.
On Sun, May 3, 2009 at 1:55 PM, Vladimir K  wrote:

>
> I would install failsafe cluster rather satisfying every client request
> about
> offline workability. You may end up implementing all the front-end and
> middle-end features in offline mode :)
>
> I believe offline mode should be used with care. The email applications are
> by nature offline. If you are certain that what the user does is offline by
> nature - implement it. If you have concerns that it should be involved into
> transaction (I mean a bit wider meaning than DB transaction) - implement it
> online and think about fail-safe servers.
>
> Concerning front-end and middle-end, AFAIK, every unit of work is a
> transaction which is done with multi-level authorization, including
> business
> authorization. You either implement all the authorization offline (insecure
> at all, and impossible in some cases) or defer authorization untill online
> mode (non-transactional). If a request of some client was satisfied (in
> offline mode) and then hasn't passed online authorization (for instance it
> violates some limits which can be thruly calculated on the server side
> only), you will have to call the client and tell him your appologises (or
> not directly you, then the bank. but the bank will then call you and tell
> you something awesome).
>
> Or just tell me the name of the bank. I will never become its client :)
>
>
> Carlo Camerino wrote:
> >
> > it's not for the public to use. but rather for people within the banks.
> > internal applications. sometimes central connection is not available.
> >
> > On Fri, May 1, 2009 at 9:37 PM, James Carman
> > wrote:
> >
> >> Are you sure a banking application would be the right place for a
> >> gears-based implementation?  Wouldn't it be kinda important to make
> >> sure the main server knows where everything is, when money is
> >> concerned?
> >>
> >> On Fri, May 1, 2009 at 4:04 AM, Carlo Camerino 
> >> wrote:
> >> > Hi,
> >> >
> >> > Is there any project which has Wicket And Google Gears Integration?
> >> > Wicket has really done a lot of us in speeding up development time.
> >> Coming
> >> > from a struts we saw the power of Wicket in terms its reusability and
> >> i've
> >> > noticed that
> >> > wicket already did most of the tasks that we would have to manually do
> >> using
> >> > struts application, like session timeouts, redirects, etc
> >> >
> >> >  One of our main concerns however are that clients
> >> > are asking for our applications to be available even if the network is
> >> down
> >> > or if the central server is down..
> >> > Currently we implemented our applications in a distributed fashion
> >> wherein
> >> > every branch ( Remote Location)  has its own server.
> >> > However, this has implications of cost and administration issues.
> >> > However, if offline mode is enabled we can just begin syncing right.
> >> >
> >> > I think that Wicket WIth Google Gears Application will make it even
> >> better .
> >> >
> >> >
> >> > I think this is really a plus when it comes to marketing it to
> >> customers.
> >> > Most of the applications that we create our banking applications and
> >> any
> >> > downtime is costing our clients.
> >> >
> >> > Hopefully we can also do this to offload the central servers and to
> put
> >> > processing into client machines.
> >> >
> >> > One large problem I see though is that most code wil have to be moved
> >> to
> >> the
> >> > Browser Layer.
> >> > I'm thinking of how to create a wicket application which is mostly run
> >> by
> >> > java classes work on the client side.
> >> > Looks as if there will be a lot of code changes...
> >> > I'm not really sure if it would be a totally different programming
> >> model.
> >> >
> >> > Anyone out there tried to integrate Gears And Wicket
> >> >
> >> > Carlo
> >> >
> >>
> >> 

Re: Wicket Offline Applications

2009-05-02 Thread Vladimir K

I would install failsafe cluster rather satisfying every client request about
offline workability. You may end up implementing all the front-end and
middle-end features in offline mode :)

I believe offline mode should be used with care. The email applications are
by nature offline. If you are certain that what the user does is offline by
nature - implement it. If you have concerns that it should be involved into
transaction (I mean a bit wider meaning than DB transaction) - implement it
online and think about fail-safe servers.

Concerning front-end and middle-end, AFAIK, every unit of work is a
transaction which is done with multi-level authorization, including business
authorization. You either implement all the authorization offline (insecure
at all, and impossible in some cases) or defer authorization untill online
mode (non-transactional). If a request of some client was satisfied (in
offline mode) and then hasn't passed online authorization (for instance it
violates some limits which can be thruly calculated on the server side
only), you will have to call the client and tell him your appologises (or
not directly you, then the bank. but the bank will then call you and tell
you something awesome).

Or just tell me the name of the bank. I will never become its client :)


Carlo Camerino wrote:
> 
> it's not for the public to use. but rather for people within the banks.
> internal applications. sometimes central connection is not available.
> 
> On Fri, May 1, 2009 at 9:37 PM, James Carman
> wrote:
> 
>> Are you sure a banking application would be the right place for a
>> gears-based implementation?  Wouldn't it be kinda important to make
>> sure the main server knows where everything is, when money is
>> concerned?
>>
>> On Fri, May 1, 2009 at 4:04 AM, Carlo Camerino 
>> wrote:
>> > Hi,
>> >
>> > Is there any project which has Wicket And Google Gears Integration?
>> > Wicket has really done a lot of us in speeding up development time.
>> Coming
>> > from a struts we saw the power of Wicket in terms its reusability and
>> i've
>> > noticed that
>> > wicket already did most of the tasks that we would have to manually do
>> using
>> > struts application, like session timeouts, redirects, etc
>> >
>> >  One of our main concerns however are that clients
>> > are asking for our applications to be available even if the network is
>> down
>> > or if the central server is down..
>> > Currently we implemented our applications in a distributed fashion
>> wherein
>> > every branch ( Remote Location)  has its own server.
>> > However, this has implications of cost and administration issues.
>> > However, if offline mode is enabled we can just begin syncing right.
>> >
>> > I think that Wicket WIth Google Gears Application will make it even
>> better .
>> >
>> >
>> > I think this is really a plus when it comes to marketing it to
>> customers.
>> > Most of the applications that we create our banking applications and
>> any
>> > downtime is costing our clients.
>> >
>> > Hopefully we can also do this to offload the central servers and to put
>> > processing into client machines.
>> >
>> > One large problem I see though is that most code wil have to be moved
>> to
>> the
>> > Browser Layer.
>> > I'm thinking of how to create a wicket application which is mostly run
>> by
>> > java classes work on the client side.
>> > Looks as if there will be a lot of code changes...
>> > I'm not really sure if it would be a totally different programming
>> model.
>> >
>> > Anyone out there tried to integrate Gears And Wicket
>> >
>> > Carlo
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-Offline-Applications-tp23329675p23352910.html
Sent from the Wicket - User 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



LoadableDetachableModel onDetach() event

2009-05-02 Thread Mauro Ciancio
Hi everybody,

  The detach() code for LoadableDetachableModel is this:

public void detach()
{
if (attached)
{
attached = false;
transientModelObject = null;

onDetach();
}
}

  I have to invoke a model's method which releases resources, but it has
been set to null.
How could I do this?

I have to keep an extra reference to my object. Is not this better?:

onDetach(transientModelObject);
attached = false;
transientModelObject = null;


Just a thought.

Thanks!
Greetings,
-- 
Mauro Ciancio


Re: Validation on Beans

2009-05-02 Thread Igor Vaynberg
there is a project in wicket-stuff that integrates hibernate validator
with wicket, have a look there.

-igor

On Sat, May 2, 2009 at 4:34 PM, J  wrote:
> hi,  I'm using Wicket, Spring and Hibernate, and would like to have bean
> validation declaratively defined in the beans instead of in Wicket UI
> components. Hibernate has a bean validation framework called "Hibernate
> Validator", and Spring has validation framework that is part of the third
> party "Spring-Modules". Both use validation by annotating the beans.
>
> I like this approach, but how can I use it with Wicket?
>
>
> Cheers,
> J
>
> -
> 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



Validation on Beans

2009-05-02 Thread J
hi,  I'm using Wicket, Spring and Hibernate, and would like to have bean 
validation declaratively defined in the beans instead of in Wicket UI 
components. Hibernate has a bean validation framework called "Hibernate 
Validator", and Spring has validation framework that is part of the 
third party "Spring-Modules". Both use validation by annotating the beans.


I like this approach, but how can I use it with Wicket?


Cheers,
J

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



DojoIntegerSlider

2009-05-02 Thread Christoph Grün

Hello,

I am using Wicket 1.4 and the DojoIntegerSlider
http://wicketstuff.org/confluence/display/STUFFWIKI/Dojo+Integer+Slider.
I have attached the library wicketstuff-dojo-1.3.0-snahpshot.jar.

I am getting following error, are there some compatibility issues?

Br, Christoph

-
java.lang.NoSuchMethodError:
org.apache.wicket.markup.html.form.TextField.add(Lorg/apache/wicket/behavior
/IBehavior;)Lorg/apache/wicket/Component; at
org.wicketstuff.dojo.markup.html.form.sliders.DojoIntegerSlider.createSlider
(DojoIntegerSlider.java:62) at
org.wicketstuff.dojo.markup.html.form.sliders.DojoIntegerSlider.(DojoI
ntegerSlider.java:52) at web.Start.(Start.java:33)




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



a question regarding generics

2009-05-02 Thread Eyal Golan
Hi,
We use at work Wicket 1.3.4 (going to 1.3.5) soon so we don't have any
generic issue.
I've created a Wicket project at home with 1.4_rc2 just to check it out (and
do some testings).
I've created a From and it asks for  which is the model object type.

I checked some discussions, especially
http://www.nabble.com/generics-to18083910.html#a18083910 .
But I bit confused.

As I understand, if I have a bean that will be used in a
CompoundPropertyModel, then I should put this as the T parameter, right?
If I don't use a special model or a type in that model, what should I put?
'Object'?

It's very easy for me to understand the generics for the IModel, but for the
component, I'm still lost.

I know it was discussed many time, but I would thank for any comment.


Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


Re: Re: listview and windowmodal

2009-05-02 Thread pickeu
Wow, i'm not at home to test now, but it seems so obvious  how did i missed 
that ...

i'm looking for so complex solutions where it's so simple in wicket.

thx again for your fast replies. 


Message d'origine
>Date: Sat, 02 May 2009 19:47:41 +0200
>De: Per Newgro 
>A: users@wicket.apache.org
>Sujet: Re: listview and windowmodal
>item.add(new AjaxLink("updateuser") {
>  @Override
>  public void onClick(AjaxRequestTarget target) {
>modal1.setModel(item.getModel()); // <-- set the "selected by item" bean 
> here
>modal1.show(target);
>  }
>});
>
>
>-
>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: listview and windowmodal

2009-05-02 Thread Per Newgro

item.add(new AjaxLink("updateuser") {
 @Override
 public void onClick(AjaxRequestTarget target) {
   modal1.setModel(item.getModel()); // <-- set the "selected by item" bean here
   modal1.show(target);
 }
});


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



Re: Problem with Link,PopupSettings and dynamic window names

2009-05-02 Thread Mathias Nilsson

The class you want to edit must implement Serializable. 
-- 
View this message in context: 
http://www.nabble.com/Problem-with-Link%2CPopupSettings-and-dynamic-window-names-tp23344323p23347345.html
Sent from the Wicket - User 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



Re: Re: listview and windowmodal

2009-05-02 Thread pickeu
>Create the modalwindow outside of listview (in page). Set the the user 
>provided by item to the modal window.
>That should do the trick.
>
>Cheers
>Per

thx,

But how can i set the user in the modal window excepted during the 
setPageCreator ?



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



Re: listview and windowmodal

2009-05-02 Thread Per Newgro

pic...@netcourrier.com schrieb:

hi, i'm a beginner in Wicket and i'm trying this framework.

first i'm building un CRUD application for users.

I have a UserBasePage listing all users using a listView.
each line is made of the name of the user and an edit link.

All i want to do is to edit the user properties in a modal window. i can use an 
instance of WindowModal for each user, but i feel i made a mistake : too much 
memory consuption.
Is there a way to create only one modal window and use it for all my users ?

right now, i'm trying something like this but the modal window is only 
populated with le last user (it's obvious, but i have the feeling i'm missing 
something but i can't find what ... ):

--

final ModalWindow modal1;

public UserPage() {

   ListView lv = new ListView("menu", new ListModel()) {
@Override
protected void populateItem(ListItem item) {
final User user = (User) item.getModelObject();

modal1.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
log.debug("create page");
return  new UserEditPage(user);
}
});


item.add(new AjaxLink("updateuser") {
 @Override
 public void onClick(AjaxRequestTarget target) {
 modal1.show(target);
 }
 });

}
};

--

thx,

Pickeu


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

  
Create the modalwindow outside of listview (in page). Set the the user 
provided by item to the modal window.

That should do the trick.

Cheers
Per

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



listview and windowmodal

2009-05-02 Thread pickeu
hi, i'm a beginner in Wicket and i'm trying this framework.

first i'm building un CRUD application for users.

I have a UserBasePage listing all users using a listView.
each line is made of the name of the user and an edit link.

All i want to do is to edit the user properties in a modal window. i can use an 
instance of WindowModal for each user, but i feel i made a mistake : too much 
memory consuption.
Is there a way to create only one modal window and use it for all my users ?

right now, i'm trying something like this but the modal window is only 
populated with le last user (it's obvious, but i have the feeling i'm missing 
something but i can't find what ... ):

--

final ModalWindow modal1;

public UserPage() {

   ListView lv = new ListView("menu", new ListModel()) {
@Override
protected void populateItem(ListItem item) {
final User user = (User) item.getModelObject();

modal1.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
log.debug("create page");
return  new UserEditPage(user);
}
});


item.add(new AjaxLink("updateuser") {
 @Override
 public void onClick(AjaxRequestTarget target) {
 modal1.show(target);
 }
 });

}
};

--

thx,

Pickeu


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



Problem with Link,PopupSettings and dynamic window names

2009-05-02 Thread Tobias Gierke

Hi,

In my application I have a "edit " link that opens a 
popup-window where the user can actually edit "". Giving the 
window a generic title (like just "Edit" ) would be confusing when 
multiple pop-ups are open so I tried to make the popup-window title read 
"Edit " instead.


My problem: The generated JavaScript looks ok but whenever I click on 
the edit link the popup window that opens just shows the "Page expired" 
page.



Thanks in advance,

Tobias


P.S. Here's what I (conceptually) try to do ( Wicket 1.3.5 ). The actual 
code is slightly different and more complex but DOES work when I omit 
the PopupSettings#setWindowName() call.


public class EditComponent extends Panel {

  private final class EditForm extends Form {

 private ThingToEdit thingToEdit;
 private Link editLink;

 protected EditForm(ThingToEdit someThing) {

super("form");

setThingToEdit( someThing );

   // link that opens a new pop-up window
   // where more complex properties
   // of  be edited
editLink = new Link("editLink") {

public void onClick() {
setResponsePage( new EditSomethingPage( 
thingToEdit ) );
}  
 };


 editLink.setPopupSettings( createPopupSettings( someThing ) );
 add( "link" , editLink);
 /* more TextFields etc. for performing simple updates */
 }

 private static PopupSettings createPopupSettings(ThingToEdit 
thing) {

return new PopupSettings().setWindowName("Edit "+thing);
 }

 protected void setThingToEdit(ThingToEdit aThing) {
   this.thingToEdit = aThing;
   if ( editLink != null ) {
   editLink.setPopupSettings( createPopupSettings( aThing ) 
);
   }

 }

  }
 
  public EditComponent(String id,List thingsToEdit) {

super( id );
   
final EditForm editForm =  new EditForm  );
   
/* render  list of thingsToEdit where clicking on an item 
will call editForm.setThingToEdit(  ) */

  }
}
  


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



Re: Does javascript:onload get executed on each ajax update ?

2009-05-02 Thread taha siddiqi
Found the answer

IHeaderResponse.renderOnDomReadyJavascript()

regards
Taha

On Sat, May 2, 2009 at 11:45 AM, taha siddiqi  wrote:
> Hi All,
>
> I have to execute some code every time a form gets loaded. When I load
> the form in a non-ajax way it works but in an ajax call it fails to
> run the script.
>
> I have added an IHeaderContributor which contributes using
> TextTemplateHeaderContributor.forJavaScript.
>
> The script is uploaded on dom ready. Actually using jQuery $(function(){}
>
> Thanks in advance
> Taha
>

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