Wicket Problems On Ubuntu

2009-03-17 Thread carloc
   at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
[17/03/09 16:02:25:399 PHT] 0022 SystemOut O INFO  - RequestLogger  
   
-
time=266,event=BookmarkablePage[com.ccti.carnelian.web.login.LoginPage],response=BookmarkablePage[org.apache.wicket.markup.html.pages.InternalErrorPage],sessionid=wi9V1WyrCDNUDypiztDpp8q,sessionsize=1247,sessionstart=Tue
Mar 17 16:02:25 PHT
2009,requests=1,totaltime=266,activerequests=1,maxmem=2196M,total=203M,used=203M
[17/03/09 16:02:27:396 PHT] 0022 SystemOut O ERROR - MarkupCache
   
- Unable to read markup from
file:/opt/IBM/WebSphere/AppServer/profiles/AppSrv02/installedApps/sxi-ubuntu2Node01Cell/courier-management_war.ear/courier-management.war/WEB-INF/classes/com/ccti/carnelian/web/login/LoginPage.html
sun.io.MalformedInputException


Carloc
-- 
View this message in context: 
http://www.nabble.com/Wicket-Problems-On-Ubuntu-tp22554217p22554217.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: sessionsize of requestlogger

2009-01-12 Thread carloc

Another observation that I noted is that components contain a reference to
their raw markup.
The markup which I used to code it. It is actually stored in the
httpsession.

Is This Correct?
For example, I see this in my debugger.





var $sxi = jQuery.noConflict();
$sxi(function() {

jQuery('#list1a').accordion({autoheight: false});
})



  









    


carloc wrote:
> 
> Hi Everyone,
> 
> RequestLogger  -
> time=103,event=Interface[target:AjaxPagingNavigationLink(userListForm:userGroupContainer:userGroupCheckGroup:ajaxPagingNavigation:navigation:9:pageLink),
> page: com.ccti.base.web.usergroup.VedUserGroupPage(2), interface:
> IBehaviorListener.onRequest],response=PageRequest[com.ccti.base.web.usergroup.VedUserGroupPage(2)],sessionid=kdrq2wp0eaea,sessionsize=212417,sessionstart=Mon
> Jan 12 23:24:44 CST
> 2009,requests=14,totaltime=7024,activerequests=1,maxmem=66M,total=18M,used=14M
>   
> 
> sessionsize=212417
> 
> I'm particularly interested of the sessionsize that is being logged by the
> requestlogger.
> I was wondering what size does it contain?
> 
> In One of My List Pages,
> It increases by about 72000 when I put in an ajaxpagingnavigator.
> 
> I was just wondering what things are put into the session?
> One thing that bothers me though is I tried using a
> LoadableDetachableModel in my dataview.
> It returned the almost the same sessionsize for a dataview in which I used
> a CompoundDetachableMOdel.
> 
> I tried viewing the page map using eclipse's debug, I can see that it
> keeps a reference to the previous page, so does it mean that Wicket always
> keeps the last page available in the HttpSession? or does it keep the
> current page in the session.
> 
> If I try exploring the session, I can see that the
> loadableDetachableModels model object cannot be viewed.
> And the compoundpropertymodel's attributes can be viewed.
> 
> As far as I can see, the wicket components consume significant session
> size . Please correct me if I am wrong.
> 
> 
> So question is,
> 
> What Page Does Wicket Store in its HttpSession? How Many Pages Does It
> Store?
> What consumes significant session size in wicket?
> Is it bad to keep a reference to the previous pages in instance variables
> of new pages?
> 
> Carlo
> 

-- 
View this message in context: 
http://www.nabble.com/sessionsize-of-requestlogger-tp21416562p21420242.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: sessionsize of requestlogger

2009-01-12 Thread carloc

As an added observation, sessionsize of deployment mode is much lower than in
development mode.

Is there any reason to this?


carloc wrote:
> 
> Hi Everyone,
> 
> RequestLogger  -
> time=103,event=Interface[target:AjaxPagingNavigationLink(userListForm:userGroupContainer:userGroupCheckGroup:ajaxPagingNavigation:navigation:9:pageLink),
> page: com.ccti.base.web.usergroup.VedUserGroupPage(2), interface:
> IBehaviorListener.onRequest],response=PageRequest[com.ccti.base.web.usergroup.VedUserGroupPage(2)],sessionid=kdrq2wp0eaea,sessionsize=212417,sessionstart=Mon
> Jan 12 23:24:44 CST
> 2009,requests=14,totaltime=7024,activerequests=1,maxmem=66M,total=18M,used=14M
>   
> 
> sessionsize=212417
> 
> I'm particularly interested of the sessionsize that is being logged by the
> requestlogger.
> I was wondering what size does it contain?
> 
> In One of My List Pages,
> It increases by about 72000 when I put in an ajaxpagingnavigator.
> 
> I was just wondering what things are put into the session?
> One thing that bothers me though is I tried using a
> LoadableDetachableModel in my dataview.
> It returned the almost the same sessionsize for a dataview in which I used
> a CompoundDetachableMOdel.
> 
> I tried viewing the page map using eclipse's debug, I can see that it
> keeps a reference to the previous page, so does it mean that Wicket always
> keeps the last page available in the HttpSession? or does it keep the
> current page in the session.
> 
> If I try exploring the session, I can see that the
> loadableDetachableModels model object cannot be viewed.
> And the compoundpropertymodel's attributes can be viewed.
> 
> As far as I can see, the wicket components consume significant session
> size . Please correct me if I am wrong.
> 
> 
> So question is,
> 
> What Page Does Wicket Store in its HttpSession? How Many Pages Does It
> Store?
> What consumes significant session size in wicket?
> Is it bad to keep a reference to the previous pages in instance variables
> of new pages?
> 
> Carlo
> 

-- 
View this message in context: 
http://www.nabble.com/sessionsize-of-requestlogger-tp21416562p21418393.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



sessionsize of requestlogger

2009-01-12 Thread carloc

Hi Everyone,

RequestLogger  -
time=103,event=Interface[target:AjaxPagingNavigationLink(userListForm:userGroupContainer:userGroupCheckGroup:ajaxPagingNavigation:navigation:9:pageLink),
page: com.ccti.base.web.usergroup.VedUserGroupPage(2), interface:
IBehaviorListener.onRequest],response=PageRequest[com.ccti.base.web.usergroup.VedUserGroupPage(2)],sessionid=kdrq2wp0eaea,sessionsize=212417,sessionstart=Mon
Jan 12 23:24:44 CST
2009,requests=14,totaltime=7024,activerequests=1,maxmem=66M,total=18M,used=14M  

sessionsize=212417

I'm particularly interested of the sessionsize that is being logged by the
requestlogger.
I was wondering what size does it contain?

In One of My List Pages,
It increases by about 72000 when I put in an ajaxpagingnavigator.

I was just wondering what things are put into the session?
One thing that bothers me though is I tried using a LoadableDetachableModel
in my dataview.
It returned the almost the same sessionsize for a dataview in which I used a
CompoundDetachableMOdel.

I tried viewing the page map using eclipse's debug, I can see that it keeps
a reference to the previous page, so does it mean that Wicket always keeps
the last page available in the HttpSession? or does it keep the current page
in the session.

If I try exploring the session, I can see that the loadableDetachableModels
model object cannot be viewed.
And the compoundpropertymodel's attributes can be viewed.

As far as I can see, the wicket components consume significant session size
. Please correct me if I am wrong.


So question is,

What Page Does Wicket Store in its HttpSession? How Many Pages Does It
Store?
What consumes significant session size in wicket?
Is it bad to keep a reference to the previous pages in instance variables of
new pages?

Carlo
-- 
View this message in context: 
http://www.nabble.com/sessionsize-of-requestlogger-tp21416562p21416562.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: Getting Previous Page (Help)

2009-01-11 Thread carloc

Is This A Possible Approach

logger.debug(getPageMapEntry().getNumericId() + "");
logger.debug(getCurrentVersionNumber() + "");
sxiForm.add(new Link("backButton") {

@Override
public void onClick() {
// TODO Auto-generated method stub
setResponsePage(getPageMap().get(pageId, 
pageVersion));
}

});

Instead of passing the page, I passsed the page id and the page version.
That's what I used to retrieve the previous page?

Seems to work since session size remained at 60k
Before it would double in the 2nd page.


carloc wrote:
> 
> Hi,
> 
> We have this application and each page has a wizard like functionality in
> which you filll up this page first, and then go to the next page.
> 
> Each page I have has about 50k used in memory according to the
> RequestLogger.
> 
> The current solution I have right now to go to previous page is to pass
> the instance of the current page and store it as an instance variable in
> the next page.
> 
> As I traverse from one page to another, my session usage goes up
> drastically since each page I have stored has an access to its previous
> page.
> 
> At this rate I have sessionusage of about 300k in some situations which we
> cannot afford because of a lot of users.
> 
> I looked at secondlevelache sessionstore and it has a
> secondlevelcachepagemap which I wanted to use but can't because it is
> private.
> 
> If I would be able to have another method of fetching the previous page,
> then I can keep my session size to be about 50k per page.
> 
> What's the most efficient way of doing this?
> 
> Thanks
> 
> Carlo
> 

-- 
View this message in context: 
http://www.nabble.com/Getting-Previous-Page-%28Help%29-tp21402283p21402447.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



Getting Previous Page (Help)

2009-01-11 Thread carloc

Hi,

We have this application and each page has a wizard like functionality in
which you filll up this page first, and then go to the next page.

Each page I have has about 50k used in memory according to the
RequestLogger.

The current solution I have right now to go to previous page is to pass the
instance of the current page and store it as an instance variable in the
next page.

As I traverse from one page to another, my session usage goes up drastically
since each page I have stored has an access to its previous page.

At this rate I have sessionusage of about 300k in some situations which we
cannot afford because of a lot of users.

I looked at secondlevelache sessionstore and it has a
secondlevelcachepagemap which I wanted to use but can't because it is
private.

If I would be able to have another method of fetching the previous page,
then I can keep my session size to be about 50k per page.

What's the most efficient way of doing this?

Thanks

Carlo
-- 
View this message in context: 
http://www.nabble.com/Getting-Previous-Page-%28Help%29-tp21402283p21402283.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



SessionStore and Detachable Models

2008-09-18 Thread carloc

hi everyone, 

if i use the secondlevelcachesessionstore wicket writes session state into
the disk
instead of the httpsession right? It is also the one that is used by
default.

so is it safe for me to not use abstractdetachablemodels and just use
compoundpropertymodels since memory is not that big a concern anymore
-- 
View this message in context: 
http://www.nabble.com/SessionStore-and-Detachable-Models-tp19548105p19548105.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]



Jquery Attached Behaviors Disappearing During Ajax Calls

2008-04-30 Thread carloc

Hi,

I'm using JQuery together with Wicket. I have this problem that whenever I
update a component through ajax, the behaviors I attached using jquery
disappear already.

For example I have a textbox which has this

$('textbox').click(function() {
alert('hello')
})

This would work while the textbox has not yet been updated.
But whenever the component has been replaced by Wicket

target.addComponent(textbox)

It will be replaced by a new component and the behavior that was binded is
no longer there.

Is there a workaround to this?

Thanks
Carlo
-- 
View this message in context: 
http://www.nabble.com/Jquery-Attached-Behaviors-Disappearing-During-Ajax-Calls-tp16977307p16977307.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket, Hibernate and Models

2008-03-13 Thread carloc

What should I use when I am accessing hibernate?
Should I use a ListView or should I use a refreshing view?\
In the api it says to use refreshingview instead of using listview when
using database collections
what is better to use?


carloc wrote:
> 
> Hi everyone,
> 
> I have been reading wicket in action recently and I have seen pitfalls of
> hibernate section.
> I was wondering about the stuff about hibernate and memory leaks due to
> hibernate proxy objects maintaining a reference to the session with
> them
> 
> 
> Am I doing this wrong then?
> @SpringBean
> private UserService userService;
> 
> add(new ListView("user", userService.findUsers() {
> })
> 
> is this wrong? I'm using it directly meaning it will be stored in the page
> store right?
> 
> should i be doing this instead?
> 
> LoadableDetachableModel model = new LoadableDetachablemodel() {
> Object load() {
>return usrService.findUsers()
>}
> 
> }
> }
> 
> add(new ListView("listView", model)) {
> }
> 
> this is to avoid storing the users in the session...
> will doing the first one actually result in a memory leak?
> 
> thanks
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket%2C-Hibernate-and-Models-tp16025532p16028751.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]



Wicket, Hibernate and Models

2008-03-13 Thread carloc

Hi everyone,

I have been reading wicket in action recently and I have seen pitfalls of
hibernate section.
I was wondering about the stuff about hibernate and memory leaks due to
hibernate proxy objects maintaining a reference to the session with them


Am I doing this wrong then?
@SpringBean
private UserService userService;

add(new ListView("user", userService.findUsers() {
})

is this wrong? I'm using it directly meaning it will be stored in the page
store right?

should i be doing this instead?

LoadableDetachableModel model = new LoadableDetachablemodel() {
Object load() {
   return usrService.findUsers()
   }

}
}

add(new ListView("listView", model)) {
}

this is to avoid storing the users in the session...
will doing the first one actually result in a memory leak?

thanks
-- 
View this message in context: 
http://www.nabble.com/Wicket%2C-Hibernate-and-Models-tp16025532p16025532.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]



Wicket Tester And OpenSessionInView

2008-03-02 Thread carloc

Hi ,

I seem to be getting this Exception when I run integration tests using
WicketTester...

I use lazy objects through the opensessioninviewfilter. 
How can I get WicketTester to use this filter?
Is there anyway that this could be resolved?

 org.hibernate.LazyInitializationException: could not initialize proxy - no
Session
-- 
View this message in context: 
http://www.nabble.com/Wicket-Tester-And-OpenSessionInView-tp15793421p15793421.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]



wicket Jquery Weird Behavior

2008-03-02 Thread carloc

Hi guys I've just found this out...

When I use the $ function of jquery directly within my page, it's causing my
page to be cosntructed twice.
I included something like

$(function() {
   $('#leftFrame').css('z-index', 200);
});

It's causing my page to reload twice.
I was trying to find out what's causing my page to have multiple queries and
it turns out to be this.
I even placed logs in the constructor to see if it was called twice and it
was actually called twice.

Anyone experienced this ?
I used jQuery.noConflict() and the problem was solved

Does it have something to do with Wicket using $ also?

Carlo
-- 
View this message in context: 
http://www.nabble.com/wicket-Jquery-Weird-Behavior-tp15792923p15792923.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Markup Reloading

2008-03-02 Thread carloc

This is what I did and it seems to work alreadyl.

addComponentInstantiationListener(new IComponentInstantiationListener() 
{

public void onInstantiation(Component component) {
// TODO Auto-generated method stub
System.out.println("HELLO");

get().getMarkupSettings().getMarkupCache().clear();
}

});

igor.vaynberg wrote:
> 
> if wicket is in development mode it will reload resources on the fly.
> if this is not working for you then something is not properly
> configured, eg when you save your .css file your ide does not copy it
> out of src folder into classes folder...
> 
> -igor
> 
> 
> On Sat, Mar 1, 2008 at 9:57 AM, carloc <[EMAIL PROTECTED]> wrote:
>>
>>  Hi Guys,
>>
>>  I've noticed that everytime I want to change something in my markup I
>> would
>>  need to restart
>>  the server as the changes don't take effect immediately. Is there
>> anything I
>>  can do to avoid this behavior?
>>  I'm trying to adjust my css and  i'm spending more time restarting the
>>  server...
>>
>>  Thanks
>>  Carlo
>>  --
>>  View this message in context:
>> http://www.nabble.com/Markup-Reloading-tp15779009p15779009.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]
> 
> 
> 

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


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



Re: Markup Reloading

2008-03-01 Thread carloc

It's being transferred properly. I've noticed that when I run it on Europa
tomcat server it works properly. However server is reloaded in the
background everytime it is run.
When I use the embedded jetty server witht eh wicket start application, I've
noticed that it has something to do with the cache. When I try to switch
from browser to browser, the changes effect properly. HOwever, clearing the
cache of firefox for example won't do a thing. I would need to change to
konqueror 
or something to see my changes.

What application server launcher do you recommend or something?



igor.vaynberg wrote:
> 
> if wicket is in development mode it will reload resources on the fly.
> if this is not working for you then something is not properly
> configured, eg when you save your .css file your ide does not copy it
> out of src folder into classes folder...
> 
> -igor
> 
> 
> On Sat, Mar 1, 2008 at 9:57 AM, carloc <[EMAIL PROTECTED]> wrote:
>>
>>  Hi Guys,
>>
>>  I've noticed that everytime I want to change something in my markup I
>> would
>>  need to restart
>>  the server as the changes don't take effect immediately. Is there
>> anything I
>>  can do to avoid this behavior?
>>  I'm trying to adjust my css and  i'm spending more time restarting the
>>  server...
>>
>>  Thanks
>>  Carlo
>>  --
>>  View this message in context:
>> http://www.nabble.com/Markup-Reloading-tp15779009p15779009.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Markup-Reloading-tp15779009p15784702.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]



Markup Reloading

2008-03-01 Thread carloc

Hi Guys,

I've noticed that everytime I want to change something in my markup I would
need to restart
the server as the changes don't take effect immediately. Is there anything I
can do to avoid this behavior?
I'm trying to adjust my css and  i'm spending more time restarting the
server...

Thanks
Carlo
-- 
View this message in context: 
http://www.nabble.com/Markup-Reloading-tp15779009p15779009.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: ReloadingWicketFilter

2008-02-27 Thread carloc

THanks, 
I'll try again but I'm getting exceptions maybe I didn't do it correctly
yet.

Carlo

igor.vaynberg wrote:
> 
> it has examples in its javadoc afaik
> 
> -igor
> 
> 
> On Wed, Feb 27, 2008 at 10:40 AM, carloc <[EMAIL PROTECTED]> wrote:
>>
>>  Hi everyone,
>>
>>  I just would like to ask how I can use the reloadingwicketfilter.
>>  I get an exception that the markup file cannot be located everytime i
>> use
>>  the reloading wicketfilter
>>
>>  thanks
>>  --
>>  View this message in context:
>> http://www.nabble.com/ReloadingWicketFilter-tp15719950p15719950.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ReloadingWicketFilter-tp15719950p15722761.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]



Wicket Tester And Code Output

2008-02-27 Thread carloc

Hi,

 I'm using Wicket Tester to render my pages, is there a way by which I can
see the code that is rendered?
For example I have,

wicketTester.startPage(new HomePage());
assertRenderedPage(HomePage.class);

I want to be able to see the html contents being printed in the console..

like


  
  HOme Page


-- 
View this message in context: 
http://www.nabble.com/Wicket-Tester-And-Code-Output-tp15722731p15722731.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]



ReloadingWicketFilter

2008-02-27 Thread carloc

Hi everyone, 

I just would like to ask how I can use the reloadingwicketfilter.
I get an exception that the markup file cannot be located everytime i use
the reloading wicketfilter

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


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



Re: Wicket And EasyMock

2008-02-24 Thread carloc

Actually wickettester works fine with a normal button but doesn't work with
an indicating ajax button.
-- 
View this message in context: 
http://www.nabble.com/Wicket-And-EasyMock-tp15666876p15666962.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]



Wicket And EasyMock

2008-02-24 Thread carloc

Hi I'm trying to use wicketTester and FormTester together with easymock.
I seem to be getting a lot of notserializableexceptions and my form won't
submit properly.
Is there anything that I should do?

ERROR - Objects- Error serializing object class
com.ccti.bo.login.LoginPage [object=[Page class =
com.ccti.bo.login.LoginPage, id = 0, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: org.easymock.internal.ObjectMethodsFilter
Field hierarchy is:
  0 [class=com.ccti.bo.login.LoginPage, path=0]
private com.ccti.service.user.UserService
com.ccti.bo.login.LoginPage.userService [class=$Proxy0]
  protected java.lang.reflect.InvocationHandler
java.lang.reflect.Proxy.h [class=org.easymock.internal.ObjectMethodsFilter]
<- field that is not serializable
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:342)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:610)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:533)
at
org.apache.wicket.util.io.SerializableChecker.checkFields(SerializableChecker.java:610)
at
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:533)
at
org.apache.wicket.util.io.SerializableChecker.writeObjectOverride(SerializableChecker.java:678)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
at
org.apache.wicket.util.io.IObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:125)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
at 
org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1085)
at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageStore.java:197)
at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.storePage(DiskPageStore.java:806)
at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.put(SecondLevelCacheSessionStore.java:332)
at org.apache.wicket.Session.requestDetached(Session.java:1364)
at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1091)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1334)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:384)
at
org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:372)
at
org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:248)
at 
com.ccti.bo.login.LoginPageTest.testFailedLogin(LoginPageTest.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.io.NotSerializableException:
org.easymock.internal.ObjectMethodsFilter
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrd

Re: Harnessing Data From Components

2008-02-13 Thread carloc

Thanks For The Reply,

Rating Panel is not a FormComponent right? So am I correct in saying that
the model gets updated during the Ajax Requests ? Cause every click on the
button triggers an ajax request.

Thanks


igor.vaynberg wrote:
> 
> or you can bind the model to a property, and then when a component is
> rendered it will use the value in that property, when it is submitted
> it will set the value to that property - that way it is all completely
> transparent.
> 
> see PropertyModel, the wiki has a great page that explains how models
> work...
> 
> -igor
> 
> 
> On Feb 12, 2008 7:02 AM, Maurice Marrink <[EMAIL PROTECTED]> wrote:
>> Data in wicket components is wrapped in models.
>> You can ask a component for its model: getModel() and then ask the
>> model for its data: getObject().
>> Or you can use the shortcut getModelObject() on a component.
>> Setting data is done in a similar way.
>>
>> Maurice
>>
>>
>> On Feb 12, 2008 3:11 PM, carloc <[EMAIL PROTECTED]> wrote:
>> >
>> > hi everyone,
>> >
>> > I would like to ask how I could actually get data from the different
>> > components in the wicket examples...
>> > For example in the YUI selection or in the RatingPanel...
>> >
>> > What will my code look like if I have a submit button and I want to
>> know the
>> > rating?
>> > (e.g. how many stars were pressed)
>> >
>> > I can display the components properly but I can't get data from them...
>> > Same as with the other examples...
>> >
>> > What is the best way to do this?
>> > --
>> > View this message in context:
>> http://www.nabble.com/Harnessing-Data-From-Components-tp15433918p15433918.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Harnessing-Data-From-Components-tp15433918p15452757.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]



Wicket Ideal Bandwidth

2008-02-13 Thread carloc

Hi guys,

What do you think will be the ideal bandwidth to use when you are using
Wicket?
Will it work good on a 128kbps connection?

what's the beset bandwidth that you could recommend?

carlo
-- 
View this message in context: 
http://www.nabble.com/Wicket-Ideal-Bandwidth-tp15452645p15452645.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]



Harnessing Data From Components

2008-02-12 Thread carloc

hi everyone,

I would like to ask how I could actually get data from the different
components in the wicket examples...
For example in the YUI selection or in the RatingPanel...

What will my code look like if I have a submit button and I want to know the
rating?
(e.g. how many stars were pressed)

I can display the components properly but I can't get data from them...
Same as with the other examples...

What is the best way to do this?
-- 
View this message in context: 
http://www.nabble.com/Harnessing-Data-From-Components-tp15433918p15433918.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Page Store And Clustering

2008-02-10 Thread carloc

Hi Mr. Johan,

Thanks for the reply.
Appreciate it.

carlo


Johan Compagner wrote:
> 
> just the default one is ok
> 
> We have 2 page stores:
> 
> 
> HttpSessionStore (this is the one that is default in 1.2)
> 
> SecondLevelCacheSessionStore (this one is default in 1.3)
> 
> And the second level cache session store has multiply ways to store the
> pages throug the IPageStore implementation
> 
> For that we have current DiskPageStore as the default and that one is also
> clusterable. But one could make another one (for a database if needed)
> 
> johan
> 
> 
> 
> 
> On Feb 9, 2008 11:49 AM, carloc <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi,
>>
>> Please correct me if i'm wrong, i've read that there are three types of
>> pages stores namely
>> HttpSession
>> Database
>> and DiskStore
>>
>> What type of page store should I use if I am to design my application to
>> be
>> ready for clustering?
>>
>> Will disk store be still safe to use?
>>
>> Thanks
>>
>> Carlo
>> --
>> View this message in context:
>> http://www.nabble.com/Page-Store-And-Clustering-tp15370507p15370507.html
>> Sent from the Wicket - User mailing list archive at
>> Nabble.com<http://nabble.com/>
>> .
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Page-Store-And-Clustering-tp15370507p15405599.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]



Page Store And Clustering

2008-02-09 Thread carloc

Hi,

Please correct me if i'm wrong, i've read that there are three types of
pages stores namely
HttpSession
Database
and DiskStore

What type of page store should I use if I am to design my application to be
ready for clustering?

Will disk store be still safe to use?

Thanks

Carlo
-- 
View this message in context: 
http://www.nabble.com/Page-Store-And-Clustering-tp15370507p15370507.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Conversion Error Messages

2007-11-22 Thread carloc

Thanks it worked.


Martijn Dashorst wrote:
> 
> From Wicket in Action, chapter 7:
> 
> A failed conversion will be registered as a validation error using the
> resource key (for the feedback message) 'IConverter' and
> 'IConverter.' (substitute the type name with the conversion
> type,
> such as Long or ZipCode).
> 
> 
> Martijn
> 
> On Nov 22, 2007 10:18 AM, carloc <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi Guys,
>>
>> I would like to ask help on something.
>> I have a text box which accepts the field which is supposed to be a
>> double.
>> everytime that a user enters a field that isn't a double the error
>> message
>> 'Field is not a valid double' appears. However I want it to display a
>> different error message this time. I'm having trouble fixing it.
>> How I can I make it display that 'Field is not a valid amount' ?
>>
>> Thanks a lot.
>> --
>> View this message in context:
>> http://www.nabble.com/Conversion-Error-Messages-tf4855219.html#a13893418
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.0-rc1 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Conversion-Error-Messages-tf4855219.html#a13894178
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Conversion Error Messages

2007-11-22 Thread carloc

Hi Guys,

I would like to ask help on something.
I have a text box which accepts the field which is supposed to be a double.
everytime that a user enters a field that isn't a double the error message
'Field is not a valid double' appears. However I want it to display a
different error message this time. I'm having trouble fixing it.
How I can I make it display that 'Field is not a valid amount' ?

Thanks a lot.
-- 
View this message in context: 
http://www.nabble.com/Conversion-Error-Messages-tf4855219.html#a13893418
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Applet Question

2007-09-29 Thread carloc

Hooray!!!
it worked perfectly.

Thanks a lot.



Craig Tataryn wrote:
> 
> Hi Carlo, the syntax of your archive attribute looks a big suspect.
> Normally what you would do is create a publicly accessible folder,
> something called "applet" and stick your imageviewer.jar file there.
> Then you would change your archive attribute to read:
> archive="/applet/imageviewer.jar".
> 
> Craig.
> 
> On 9/27/07, carloc <[EMAIL PROTECTED]> wrote:
>>
>> Hi Everyone,
>>
>> I'm trying to load an applet in wicket.
>> The code looks like this
>>
>> > archive="uk.co.mmscomputing.application.imageviewer.jar" width=100%
>> height=100% >
>> 
>>
>> If I paste this code in my index.html page which is not run by wicket,
>> the
>> code runs properly,
>> however if I try to put it in a wicket page, the code does not run.
>>
>> In the java console of firefox it says that it can't find the specified
>> file.
>>
>> How do I embed an applet in my wicket page?
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/Applet-Question-tf4531635.html#a12932157
>> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Applet-Question-tf4531635.html#a12953749
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Applet Question

2007-09-27 Thread carloc

Hi Everyone, 

I'm trying to load an applet in wicket.
The code looks like this




If I paste this code in my index.html page which is not run by wicket, the
code runs properly,
however if I try to put it in a wicket page, the code does not run.

In the java console of firefox it says that it can't find the specified
file.

How do I embed an applet in my wicket page?
Thanks
-- 
View this message in context: 
http://www.nabble.com/Applet-Question-tf4531635.html#a12932157
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Wicket Dialogs

2007-09-24 Thread carloc

Is there any component in wicket similar to this component?
Something like wicket dialogs

http://developer.yahoo.com/yui/examples/container/panel_clean.html
-- 
View this message in context: 
http://www.nabble.com/Wicket-Dialogs-tf4507886.html#a12856206
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Button Command Design Pattern

2007-09-23 Thread carloc

great,
i'm able to catch most exceptions in one place.

thanks


igor.vaynberg wrote:
> 
> i wouldnt say it is an antipattern.
> 
> -igor
> 
> 
> On 9/23/07, carloc <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi guys I was just wondering if this is an antipattern in wicket.
>> Instead of using anonymous Button classes, I created a Button Command
>> Class
>> which I override.
>> I also created a class which indicates the button that I need.
>> I did this so I can be sure that I will be able to catch all the default
>> exceptions that exist.
>> Also any change in the button implementation I'll only change in one
>> place.
>>
>> Is this an anti pattern?>
>> I call it in my pages through this command
>>
>> add(new CCTIButton("ajax-button", this, buttonCommand));
>>
>>
>> public abstract class ButtonCommand implements Serializable {
>> public abstract void onSubmit();
>> public abstract void onError();
>> }
>>
>>
>> public class CCTIButton extends IndicatingAjaxButton {
>>
>> private ButtonCommand buttonCommand;
>>
>> public CCTIButton(String id, Form form, ButtonCommand
>> buttonCommand) {
>> super(id, form);
>> this.buttonCommand = buttonCommand;
>> }
>>
>> @Override
>> protected void onSubmit(AjaxRequestTarget target, Form form) {
>> // TODO Auto-generated method stub
>> try {
>> buttonCommand.onSubmit();
>> } catch(Exception e) {
>>
>> }
>>
>> }
>>
>> @Override
>> protected void onError(AjaxRequestTarget target, Form form) {
>> // TODO Auto-generated method stub
>> buttonCommand.onError();
>> }
>> --
>> View this message in context:
>> http://www.nabble.com/Button-Command-Design-Pattern-tf4504772.html#a12847315
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Button-Command-Design-Pattern-tf4504772.html#a12847966
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Button Command Design Pattern

2007-09-23 Thread carloc

Hi guys I was just wondering if this is an antipattern in wicket.
Instead of using anonymous Button classes, I created a Button Command Class
which I override.
I also created a class which indicates the button that I need.
I did this so I can be sure that I will be able to catch all the default
exceptions that exist.
Also any change in the button implementation I'll only change in one place.

Is this an anti pattern?>
I call it in my pages through this command 

add(new CCTIButton("ajax-button", this, buttonCommand));


public abstract class ButtonCommand implements Serializable {
public abstract void onSubmit();
public abstract void onError();
}


public class CCTIButton extends IndicatingAjaxButton {

private ButtonCommand buttonCommand;

public CCTIButton(String id, Form form, ButtonCommand buttonCommand) {
super(id, form);
this.buttonCommand = buttonCommand;
}

@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
// TODO Auto-generated method stub
try {
buttonCommand.onSubmit();
} catch(Exception e) {

}

}

@Override
protected void onError(AjaxRequestTarget target, Form form) {
// TODO Auto-generated method stub
buttonCommand.onError();
}
-- 
View this message in context: 
http://www.nabble.com/Button-Command-Design-Pattern-tf4504772.html#a12847315
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Versioning Problems With DataTable, Spring Hibernate

2007-09-22 Thread carloc

I already solved it.

I overrided the process() method of the form and caught the exception there.


carloc wrote:
> 
> Hi guys, I need clarity on this...
> 
> This is what my detachable model
> public CCTIDetachableModel extends Loadable DetachableModel {
> 
> private String id;
> private Integer version;
> private Dao dao;
> 
> public Object load() {
> MyObject myobj = dao.get(id);
> if (version == null) {
>   version = myobj.getVersion();
> }
> else  if (!myobject.getVersion().equals(version)) {
>   throw new MyVersionMismatchException(MyObject.class, id, version);
> }
> 
> return myobj;
>   }
> }
> 
> I use an AjaxDefaultDataTable or DefaultDataTable on my page.
> 
> So the record appears appropriately with the approprirate checkboxes
> corresponding to each model.
> Each checkbox is mapped to a detachable model.
> 
> Everytime I click the delete button which is an IndicatingAjaxButton,
> The exception is thrown how ever I'm not able to catch the exception it on
> the onSubmit() method of my 
> button.
> 
> It doesn't enter the onSubmit or the onError() method of the
> indicatingajaxbutton.
> 
> The process never seems to enter the onSubmit() method of my indicating
> ajax button instead it goes directly to the DetachableModel where the
> exception is thrown giving me no chance to catch the exception.
> 
> How do I resolve this?
> 
> Here's the stacktrace
> 
> com.ccti.exception.common.VersionMismatchException
>  at
> com.ccti.web.query.QueryDetachableModel.load(QueryDetachableModel.java:31)
>  at
> org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:111)
>  at org.apache.wicket.Component.getModelObject(Component.java:1265)
>  at
> org.apache.wicket.markup.html.form.CheckGroup.convertValue(CheckGroup.java:154)
>  at
> org.apache.wicket.markup.html.form.FormComponent.convertInput(FormComponent.java:1112)
>  at
> org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1016)
>  at
> org.apache.wicket.markup.html.form.Form$15.validate(Form.java:1651)
>  at
> org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:152)
>  at
> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:400)
>  at
> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:387)
>  at
> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:365)
>  at
> org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:980)
>  at
> org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1647)
>  at org.apache.wicket.markup.html.form.Form.validate(Form.java:1638)
>  at org.apache.wicket.markup.html.form.Form.process(Form.java:792)
>  at
> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:764)
>  at
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:126)
>  at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:163)
>  at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:282)
>  at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:100)
>  at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
>  at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1019)
>  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1094)
>  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1173)
>  at org.apache.wicket.RequestCycle.request(RequestCycle.java:483)
>  at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:277)
>  at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:129)
>  at
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
>  at
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>  at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>  at
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
>  at
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
>  at
> org.mortbay.jetty.servlet.ServletHandler.handle(Servl

Versioning Problems With DataTable, Spring Hibernate

2007-09-19 Thread carloc

Hi guys, I need clarity on this...

This is what my detachable model
public CCTIDetachableModel extends Loadable DetachableModel {

private String id;
private Integer version;
private Dao dao;

public Object load() {
MyObject myobj = dao.get(id);
if (version == null) {
  version = myobj.getVersion();
}
else  if (!myobject.getVersion().equals(version)) {
  throw new MyVersionMismatchException(MyObject.class, id, version);
}

return myobj;
  }
}

I use an AjaxDefaultDataTable or DefaultDataTable on my page.

So the record appears appropriately with the approprirate checkboxes
corresponding to each model.
Each checkbox is mapped to a detachable model.

Everytime I click the delete button which is an IndicatingAjaxButton,
The exception is thrown how ever I'm not able to catch the exception it on
the onSubmit() method of my 
button.

The process never seems to enter the onSubmit() method of my indicating ajax
button instead it goes directly to the DetachableModel where the exception
is thrown giving me no chance to catch the exception.

How do I resolve this?
-- 
View this message in context: 
http://www.nabble.com/Versioning-Problems-With-DataTable%2C-Spring-Hibernate-tf4484198.html#a12787468
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Question With Detachable Models

2007-09-15 Thread carloc

Somehow, it seems that transient objects are stored in the session.
WHen I try to look at the session in eclipse's debug mode, 
I can actually see my User object in there even though I marked as
transient.

I'm not really sure about this behavior though.


Kent Tong wrote:
> 
> 
> Jonathan Locke wrote:
>> 
>> 
>> Your QueryDetachableModel will break under clustering.  The transient
>> "instance" Object will become null when the container deserializes it and
>> your load method will be unable to reload the object.  
>> 
>> If you're using these QueryDetachableModels, yes, the object instance is
>> being stored in your session.  But no, it will not be replicated
>> correctly.
>> 
> 
> Are you sure about that? If the default item reuse strategy is used, new
> models and new items will 
> be created just before the page is rendered.
> 
> In addition, as the object instance is marked as transient, it shouldn't
> be stored in the session.
> 

-- 
View this message in context: 
http://www.nabble.com/Question-With-Detachable-Models-tf4446686.html#a12696938
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Question With Detachable Models

2007-09-15 Thread carloc

Thanks for replying
Yup thanks

I was debugging it and I was able to see it in the session object. meaning
that it is still stored in my object.
I changed the implementation to loading the object.

Now I changed it to loading it from a facade bean.

Thanks


Jonathan Locke wrote:
> 
> 
> I should also add this: although you can do what you will in Wicket, it is
> generally better to use models consistently and reload your objects from
> the DB (this isn't so bad in practice as a lot of the time reloads will
> just hit ehcache or whatever you're using to cache query results and hook
> the object back up again in no time).  It also shrinks the serialization
> overhead and replication bandwidth required to move your objects around in
> the cluster (and with SoftReferenced instance objects it could also
> decrease your non-reclaimable memory load if that matters).  But it is
> also generally helpful to work with reloadable models because they
> automatically avert the more common stale data issues you'll run into.  In
> a multi-user system, this is helpful.  If you've got a Label whose model
> is a PropertyModel on a reloadable PersonModel and someone else changes
> the PersonModel, the expression being retrieved from the model will
> auto-update.  If the label is directly holding the POJO and it's not
> reloadable, the label will continue to display the stale data forever.
> 
> 
> Jonathan Locke wrote:
>> 
>> 
>> Your QueryDetachableModel will break under clustering.  The transient
>> "instance" Object will become null when the container deserializes it and
>> your load method will be unable to reload the object.  
>> 
>> If you're using these QueryDetachableModels, yes, the object instance is
>> being stored in your session.  But no, it will not be replicated
>> correctly.
>> 
>> If you really want to make the memory impact disappear as well as the
>> clustering bandwidth, you would need to use a transient SoftReference and
>> take the hit of implementing a load method which reads your object from
>> some kind of object storage (or cache).
>> 
>> There is no free lunch.  You are ultimately stuck with a tradeoff: either
>> use the memory and/or bandwidth OR be prepared to pay the price of
>> loading the object from storage.
>> 
>> 
>> carloc wrote:
>>> 
>>> Hi, I would like to ask this.
>>> 
>>> Are my objects still being stored in the session when I use this kind of
>>> query.
>>> I don't requery the objects using a  detachable model.
>>> 
>>> package com.ccti.web.query;
>>> 
>>> import org.apache.wicket.model.LoadableDetachableModel;
>>> 
>>> public class QueryDetachableModel extends LoadableDetachableModel {
>>> private transient Object instance;
>>> 
>>> public QueryDetachableModel(Object instance) {
>>> this.instance = instance;
>>> }
>>> @Override
>>> protected Object load() {
>>> // TODO Auto-generated method stub
>>> return instance;
>>> }
>>> 
>>> }
>>> 
>>> Here's how my DataProvider looks like.
>>> 
>>> 
>>> public class QueryDataProvider extends SortableDataProvider {
>>> 
>>> /**
>>>  * 
>>>  */
>>> private transient QueryCommand queryCommand;
>>> 
>>> public QueryDataProvider(QueryCommand queryCommand) {
>>> this.queryCommand = queryCommand;
>>> }
>>> 
>>> /* (non-Javadoc)
>>>  * @see
>>> org.apache.wicket.markup.repeater.data.IDataProvider#iterator(int, int)
>>>  */
>>> public Iterator iterator(int first, int count) {
>>> // TODO Auto-generated method stub
>>> 
>>> setQueryLimits(first, count);
>>> return queryCommand.execute();
>>> }
>>> 
>>> /**
>>>  * @param first
>>>  * @param count
>>>  */
>>> private void setQueryLimits(int first, int count) {
>>> // can't be set anywhere else but here.
>>> queryCommand.setPageIndex(first);
>>> queryCommand.setPageSize(count);
>>> }
>>> 
>>> public IModel model(Object object) {
>>> // TODO Auto-generated method stub
>>> return new QueryDetachableModel(object);
>>> }
>>> 
>>> public int size() {
>>> // TODO Auto-generated method stub
>>> return queryCommand.queryCount();
>>> }
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Question-With-Detachable-Models-tf4446686.html#a12690353
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Question With Detachable Models

2007-09-14 Thread carloc

Hi, I would like to ask this.

Are my objects still being stored in the session when I use this kind of
query.
I don't requery the objects using a  detachable model.

package com.ccti.web.query;

import org.apache.wicket.model.LoadableDetachableModel;

public class QueryDetachableModel extends LoadableDetachableModel {
private transient Object instance;

public QueryDetachableModel(Object instance) {
this.instance = instance;
}
@Override
protected Object load() {
// TODO Auto-generated method stub
return instance;
}

}

Here's how my DataProvider looks like.


public class QueryDataProvider extends SortableDataProvider {

/**
 * 
 */
private transient QueryCommand queryCommand;

public QueryDataProvider(QueryCommand queryCommand) {
this.queryCommand = queryCommand;
}

/* (non-Javadoc)
 * @see 
org.apache.wicket.markup.repeater.data.IDataProvider#iterator(int,
int)
 */
public Iterator iterator(int first, int count) {
// TODO Auto-generated method stub

setQueryLimits(first, count);
return queryCommand.execute();
}

/**
 * @param first
 * @param count
 */
private void setQueryLimits(int first, int count) {
// can't be set anywhere else but here.
queryCommand.setPageIndex(first);
queryCommand.setPageSize(count);
}

public IModel model(Object object) {
// TODO Auto-generated method stub
return new QueryDetachableModel(object);
}

public int size() {
// TODO Auto-generated method stub
return queryCommand.queryCount();
}
-- 
View this message in context: 
http://www.nabble.com/Question-With-Detachable-Models-tf4446686.html#a12687511
Sent from the Wicket - User mailing list archive at Nabble.com.


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