incubator-isis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: Apache Isis with custom ui
Date Thu, 17 May 2012 19:46:19 GMT
Hi Sudipto,

Great to see that you've been working with and bending the framework to
your needs.

The way to get these changes made permanent is to raise a JIRA ticket, and
then to attach a patch of your changes.  You should be able to use svn diff
to do this.  Then I'll take a look through it, and if we're happy then
we'll make the commit.  From what you've described below, they sound
reasonable.

Thanks again for your work and interest,

Cheers
Dan



On 17 May 2012 11:32, Sudipto Majumder <smajumder82@gmail.com> wrote:

> Hi Dan,
>
> Since I got some time I was looking at ways to customize the HTML viewer
> UI. Say, I want to change the login page. Here is what I did.
>
> I changed the access modifier of the method *renderPrompt() *of the class *
> org.apache.isis.viewer.html.servlet.LogonServlet* from *private* to *
> protected*, extended that servlet and introduced my own servlet overriding
> the *renderPrompt()* method and made change in the *web.xml* accordingly to
> point to my servlet for the url pattern */logon.htmlviewer*.
>
> I also made my own login form by extending the class *
> org.apache.isis.viewer.html.component.html.LogonFormPage* and overriding
> the *writeContent()* method and used this class inside the
> *renderPrompt() *method
> mentioned earlier.
>
> Further I needed some *public* getter methods for the attributes *user,
> password, registerLink, error* in class
> *org.apache.isis.viewer.html.component.html.LogonFormPage
> *and *pathBuilder, styleSheet, siteHeader, siteFooter* in class *
> org.apache.isis.viewer.html.component.html.AbstractHtmlPage*.
>
> The logic I have not changed anything but only the html part inside
> the *writeContent()
> *method and my purpose was solved.
>
> The point I am trying to make is that if you provide some public getter
> methods in many of your framework classes encapsulating the private
> attributes and make some of the methods less restrictive (at least
> protected would do), then it will be much easier to extend your framework
> code and make UI customizations. Please let me know your thought on the
> same.
>
> Thanks,
> Sudipto.
>
>
> On Thu, May 10, 2012 at 5:49 PM, Dan Haywood
> <dan@haywood-associates.co.uk>wrote:
>
> > Hi Sudipto
> > that's great to hear.
> >
> > Of course, as I'm sure you're aware, the JQM is incomplete - there is
> still
> > no support for invoking actions, for example.  Feel free to pick it up
> and
> > add that functionality if you wish.
> >
> > By the way, the JQM will break once I get back to the JSON viewer and
> > update it to the latest version of the Restful Objects spec [1].  Just so
> > you are aware...  However,  the JQM code is currently quite small, so
> > updating it shouldn't be too difficult.
> >
> > Cheers
> > Dan
> >
> > [1] http://restfulobjects.org
> >
> > ~~~~~~~~~~~
> >
> > On 10 May 2012 13:13, Sudipto Majumder <smajumder82@gmail.com> wrote:
> >
> > > Thanks Dan, I took your advice and looked at the JQueryMobile POC that
> > you
> > > did. I copied the code and changed to point my service and it worked
> > fine.
> > > I think going forward, I will concentrate on JQuery and JSON for the
> time
> > > being as it will provide me opportunity to segregate the UI part and
> have
> > > better control on it.
> > >
> > > On Tue, May 8, 2012 at 5:04 PM, Dan Haywood <
> > dan@haywood-associates.co.uk
> > > >wrote:
> > >
> > > > Hi Sudipto,
> > > >
> > > > Great to hear that you're looking to Isis playing a part in your
> > > company's
> > > > toolset.
> > > >
> > > > With respect to config file changes, you'll find that they are scoped
> > by
> > > > viewer.  So, the HTML viewer reads from viewer_html.properties,
> whereas
> > > the
> > > > Wicket viewer reads from viewer_wicket.properties.  (In fact, both
> also
> > > > read from viewer.properties if it exists, and all components read
> from
> > > > isis.properties.  So you can scope configuration as required).
> > > >
> > > > That said, your best bet right now to demonstrate customisation is
> > > probably
> > > > the Scimpi viewer, which is maintained principally by Robert
> Matthews,
> > > the
> > > > original architect of Naked Objects framework (Isis' predecessor).
>  The
> > > > documentation for Scimpi is, admittedly, a little out of date.
> >  However,
> > > > the viewer itself pretty mature.  Indeed, Robert has built a
> commercial
> > > > product with it; the screenshots [1] show what you can do with
> Scimpi.
> > > >
> > > > The other thing to keep in mind is that later this year I expect the
> > JSON
> > > > viewer (Restful interface) to be completed up to the v1.0  of the RO
> > > > specification [2].  Not only will this provide a full RESTful API for
> > > > bespoke applications, I also expect that at least one generic
> > Javascript
> > > UI
> > > > to be written.  Indeed, I've already done a proof-of-concept using
> > > > JQueryMobile, as per our online demo [3].
> > > >
> > > > As for the Wicket viewer, I do intend to revive this, but in the
> > meantime
> > > > I'd be very happy to receive and apply any patches you might have
> made.
> > > >
> > > >
> > > > Hope that helps
> > > >
> > > > Dan
> > > >
> > > >
> > > >
> > > > [1]  http://planchaser.com/about-screenshots.html
> > > > [2]  http://restfulobjects.org/
> > > > [3]  http://mmyco.co.uk:8180/isis-onlinedemo/doc/index.html
> > > >
> > > > On 8 May 2012 11:31, Sudipto Majumder <smajumder82@gmail.com> wrote:
> > > >
> > > > Hi Dan,
> > > > >
> > > > First of all thank you for replying to my previous query regarding
> > > > > hibernate integration. Since there is no support now, I have
> decided
> > to
> > > > > stick with the sql object store that is provided instead.
> > > > >
> > > > > I want to showcase the capability of Isis framework as a domain
> > driven
> > > > > design tool in my organization. I have built a small application
> from
> > > > > scratch and data is being stored fine. The only issue is the ui
> > part. I
> > > > > have changed some images and stylesheet in the html viewer but
> still
> > > that
> > > > > is not good enough. Since it is only a proof of concept, I am not
> > > trying
> > > > > for any fancy ui but some basic customization. I have read in the
> > isis
> > > > > website that for html viewer, customization is really limited, but
> I
> > > have
> > > > > no knowledge of wicket viewer and not sure how much customization
> is
> > > > > possible there.
> > > > >
> > > > > I was looking at the framework source code today and felt if you
> > allow
> > > > > overriding the controller servlet and webcontroller class, some
> level
> > > of
> > > > > customization is possible. But the problem there is many of the
> > access
> > > > > levels are private so sub-classing does not help much.
> > > > >
> > > > > Do you support any configuration for doing some changes any other
> > way?
> > > > For
> > > > > example, if I intend to alter the welcome message which I found in
> > the
> > > > > Welcome java class, can I do so by doing some configuration changes
> > in
> > > > > viewer_html.properties? If you can provide some pointers on such
> > > > > customizations, it will be very helpful. I believe the
> documentation
> > on
> > > > > that is still not available.
> > > > >
> > > > > I do not want to increase overhead by integrating any other ui
> > > framework,
> > > > > but are there any framework that is supported for seamless
> > integration?
> > > > >
> > > > > Lot of questions :) but some pointers at least will be great to
> have.
> > > > >
> > > > > Thanks,
> > > > > Sudipto.
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message