Re: Presented Wicket to my Company...

2007-09-28 Thread Gumnaam

Well here's our story, if it helps you.

Traditionally we had a JSP+Struts+EJB2 model for all our projects.

For our current project we decided to jump on the JEE5 bandwagon, and
started out with JSF+EJB3 (SLSB)+ JPA,

Now JSF and JSPs don't mix well, so we choose Facelets, and instead of 
struts we
decided to use Seam, as that was the only available glue between the Web 
and EJB tier.


So we had to learn JSF, Seam, Facelets, EJB3 and JPA. Now seam is no 
good without
Stateful Session Beans so we had to change our SLSBs to Stateful Session 
Beans, and
we had all sort of problems with Extended Persistence Context, not to 
mention, most developers

hated Seam as it was very buggy in those days (late 2006, early 2007).
We also had a remote EJB3 API layer, and JPA managed entities 
(especially the ones with

lazy loading relationships) don't mix too well with remoting.

And even after learning all these new technologies, our web pages, were 
still lacking all the

fancy AJAX stuff. Now we had to learn Icefaces or ajax4jsf .

Every body hated every aspect of this development model.

Now we have a much saner development environment. Wicket + EJB3 (bcoz we 
still need remoting) +
Spring + iBatis. If we didn't need that EJB remoting layer I would drop 
EJB3 like a hot potato.


My advice, don't worry about the industry standard thing, if you have 
good developers ,

then go with Wicket.

The first time I hooked up AjaxFallBackDefaultDataTable with my Spring 
DAO + iBatis, It nearly
brought tears to my eyes. Using iBaits I am able to do 
sorting,filtering,paginating all in the Database,
(as it should be done, instead of storing huge datasets in memory and 
doing it in code), and the
DataTable Component gives me all the hooks to plug this in so smoothly. 
Can't think how I would

have managed this with JSF and JPA.

So use Wicket for Web and iBatis for ORM. :)

















robert.mcguinness wrote:

...to tell you the truth, it impressed the developers but I didn't get that
feeling from the top brass.  I am pretty sure we will move towards
Seam/JSF/Facelets (we have a presentation on that tech next week given by
another developer) since it is standard.

Has anyone here worked with the Seam tech?  All the examples I have seen
(including Facelets) is nothing but tag soup with scriptlets in the page
(albeit small).  The configuration for a Seam project seems like a pain and
was also told that the JSF/Seam/Faclets jsp pages can be previewed in a
browser (something I thought was so clever about Wicket html pages...and I
was under the impression that Wicket was the only tech that allowed true
separation of concerns; allowing the web designer to work independenly of
the programmer with no duplication of work between the two).  Maybe I'm
blind to Wicket and I'm overlooking Seam and the techs related to it?  


I've worked with Freemarker and Struts before and Wicket feels like
natural web development.  I thought I covered all the great concepts about
Wicket: Ajax, Templating, Inheritance, Reusable Components, OO Concepts…etc…

Bah…just venting.  I’m going to have to win the votes of the developers. 
I’ll keep everyone posted.  Thanks amigos!


- rm3

  



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



modal window rendering not quite smooth

2007-09-09 Thread Gumnaam

has any one noticed that the modal window when opens up ,
shows the contents of the parent page, before showing it's actual content.
The time for which it shows parent page's content depends on how much
time it takes to fetch it's content via ajax.
Is it possible to show a busy indicator in the modal window, while it 
fetches

the contents, rather than showing parent pages content ?

thanks

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



Using ClientProperties Object for User selectable Timezone.

2007-08-21 Thread gumnaam
Currently ClientProperties object has a getTimeZone() method, that 
uses BrowserInfoPage's response, to calculate a client's Timezone.

Would it be too much trouble to add a setTimeZone() method, so that
the TimeZone property is user settable ?

I can save a user's preferred timezone, in a user profile object and store that 
in 
a session. But the wicket-datetime java classes, depend on the 
ClientProperties.timeZone
field, to properly convert dates to--fro between the server and client 
timezones.

So the best place to store a user's preferred timezone seems to be the 
ClientProperties object .

thanks

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



Re: Editable DataTeble

2007-08-20 Thread Gumnaam


One thing to keep in mind about AjaxEditableLabel in wicket 1.3 is that the
cancel functionality doesn't work well in firefox.
See this for details
https://issues.apache.org/jira/browse/WICKET-520
in essence, once you are in edit mode in firefox, there is no way to 
cancel the edit,

other than to navigate out of the page.

thanks


fero wrote:

Thanks, I think I will use AjaxEditableLabel more often;)

Fero


Eelco Hillenius wrote:
  

On 8/19/07, fero [EMAIL PROTECTED] wrote:


I see, but I don't know how to do editable labels. I could not find it
among
wicket/wicket-extensions classes. Plz tell me how to do them.
  

See org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel.

You could use it like:

 item.add(new AjaxEditableLabel(componentId,new PropertyModel(rowModel,
propertyExpression) ));

Up to you what you like best though :)

Eelco

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



Redirected after BrowserInfoPage and mounted Pages.

2007-08-20 Thread gumnaam
Short description :-
When using mounted pages, wicket redirects to wrong URL, after BrowserInfoPage, 
which
is called by Session.get().getClientInfo(), when gatherExtendedBrowserInfo is 
true in
RequestCycleSettings.

Long description :-

I need to determine the Client's time zone in my webapplication.
So I have set getRequestCycleSettings().setGaterExtendedBroserInfo(true) in my 
application class.

And in my BasePage.java's (which is the super class for all my pages) 
constructor 
I have set getSession().getClientInfo(), to trigger the redirect to 
BrowserInfoPage as per the javadocs.

My webapp context is /scheduler/ and my wicket application is mapped to /app/ 
(i.e. /scheduler/app/ ).
I have kept all my pages in one package and mounted that package to /pages, 
ie.
the pages are accessed via http://host/scheduler/app/pages/XYZPage etc.

When I submit the request to
http://host/scheduler/app/

This is what happens (I have recorded the HTTP traffic via wireshark).
GET http://host/scheduler/app/
Temporary Redirect to http://host/scheduler/app/pages/HomePage (this is my home 
page).
GET http://host/scheduler/app/pages/HomePage
Temporary Redirect to http://host/scheduler/app/pages/../;jsessionID=.. 
(this is the BrowserInfo Page).
GET http://host/scheduler/app/;JSESSIONID=.  (get the browser info page).
POST to browser info page.
Temporary redirect to http://host/scheduler/app/pages/../../app/pages/HomePage 
(redirect from browser info page, after it has populated ClientProperties).


The problem is that last redirect is wrong. 
The path http://host/scheduler/app/pages/../../app/pages/HomePage 
translates to http://host/app/pages/HomePage

i.e. I lose the webapp context path (/scheduler/) because of the path being 2 
levels up.
and I get a 404 after that.

I suspect the culprit is the 
throw new RestartResponseAtInterceptPageException(new 
BrowserInfoPage(getRequest().getRelativePathPrefixToContextRoot() + 
getRequest().getURL()));


In WebRequestCycle.java.

The getRelativePathPrefixToContextRoot() is computed wrongly 
as /scheduler/app/../.. instead of /scheduler/app/.. because the context root 
is /scheduler/ and not /

Any thoughts on how to fix this ?

thanks
bhaskar


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



Re: Editable DataTeble

2007-08-19 Thread Gumnaam

well, there's the editable tree table,

http://wicketstuff.org/wicket13/nested/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.ajax.builtin.tree.EditableTreeTablePage

Else, you can add AjaxEditInPlace Label component, to your cells.


fero wrote:

Hi,
is it possible to make an editable DataTable? I want that user can change or
add an information into the table and it will be transfered through
PropertyModel to my object behind the row in the table. I am trying
everything and googling for it, but still nothing.

Thanks a lot 


Fero
  



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



Previous Page ref. in PageParameters

2007-08-04 Thread Gumnaam

Can a ref. to the previous page be passed via PageParameters.

What I am trying to do  is have a BookmarkablePage
The PageParameters if contain a ref. to previous field,
will display a go back link.

I can pass the prev page as a ref. in the constructor, but then the page is
not bookmarkable,
I need to pass some sort of ref. to the current page, via PageParameters
and look it up in the next page's constructor.
some thing like
PrevPage p = getPageMap.get(pageParams.getString(prevPage))

any thoughts.

thanks


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



DownloadLink for an external URL

2007-08-02 Thread gumnaam
I see that DownloadLink can be used to stream a File.

What I want to do is use DownLoadLink to redirect to  an external URL
that should be streamed (i.e. File Save box should pop up).

I can't use ExternalLink as the external URL's location is not pre determined,
also the external URL's location lookup is a costly so I don't want to do it 
unless
the User clicks on a link.

So in my case I do some thing like

class DownloadUrlLink {

 onClick() {

  URL externalUrl = getExternalURL(); //this is a costly operation, so I don't 
want to do it unless user clicks the Download link.
 getRequestCycle().setRequestTarget(new RedirectRequestTarget(url.toString()));
 
}

}

The URL points to a rather large gzipped XML file about 11MB in size.
But instead of popping up a File Save dialog, the browser starts to display the 
XML file.
and CPU usage jumps up to 100%, on account of the file being this large.

Is there a way to force the browser to pop up a FileSave dialog when using 
RedirectRequestTarget

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