You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by German Vivero <ge...@colonia-suiza.com> on 2015/04/09 15:43:52 UTC
Re: Displaying Chart in HomePage
Hi, sunand p, you can get chart working on HomePage? if yes, can you share
some snipet I have same problem, and I'm never write ComponentFactory.
2015-03-11 10:25 GMT+00:00 Martin Grigorov <mg...@apache.org>:
> Hi,
>
> Take a look at https://github.com/martin-g/isis-wicket-waveform.
> It is very similar project to what you need.
> -dom module has Waveform object
> -fixture module creates 3 WaveformObject (this is a domain entity)
> instances, each of them having an instance of a Waveform
> -webapp module defines a Component factory that renders Waveform
>
> Martin Grigorov
> Funemployed! Available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Mar 11, 2015 at 11:30 AM, sunand p <su...@gmail.com> wrote:
>
> > Hi Martin,
> >
> > I have limited knowledge on Apache Wicket, just digging in to the
> > WickedCharts isisaddons I found that we already have a ComponentFactory
> > called StandaloneValueAsWickedChartFactory which does what you say, isn't
> > it? Can I reuse it? If yes, how? Also the document
> >
> >
> https://isis.apache.org/components/viewers/wicket/customizing-the-viewer.html
> > gives me some hints but I really need a working example to understand on
> > how to customize Dashboard.
> >
> > Thanks,
> > Sunand
> >
> > On Sat, Mar 7, 2015 at 6:18 PM, Martin Grigorov <mg...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > Your view model should have a property that describes the chart, i.e.
> > > contains all needed information.
> > > Register a ComponentFactory (e.g. with ServiceLoader) that creates a
> > > component/Panel for the type of the view model. The component should
> > render
> > > the chart by using the provided data ( ViewModel#getObject())
> > > On Mar 7, 2015 1:41 PM, "sunand p" <su...@gmail.com> wrote:
> > >
> > > > Hi Dan,
> > > >
> > > > Just to clarify a little more my question is more of inside a view
> > model
> > > > instead of rendering the chart by an Action (which means at click of
> a
> > > > button) can i render the chart in the view itself. If it is related
> to
> > > the
> > > > second question you mentioned in the email please throw some light on
> > it
> > > as
> > > > to how to achieve it.
> > > >
> > > > - Sunand
> > > >
> > > > On Sat, Mar 7, 2015 at 4:30 PM, sunand p <su...@gmail.com>
> > wrote:
> > > >
> > > > > Thanks Dan, for the quick response my question was with respect to
> > the
> > > > > first one, will reply to this thread if I manage to render a chart
> in
> > > the
> > > > > Home Page.
> > > > >
> > > > > - Sunand
> > > > >
> > > > > On Sat, Mar 7, 2015 at 4:04 PM, Dan Haywood <
> > > > dan@haywood-associates.co.uk>
> > > > > wrote:
> > > > >
> > > > >> Isis basically just invokes the action that is annotated with
> > > @HomePage.
> > > > >> This action could return anything... a scalar, a list of objects,
> a
> > > > single
> > > > >> entity, a view model, and it'll be rendered as normal.
> > > > >>
> > > > >> Most likely you should create a view model for your dashboard, and
> > > have
> > > > >> the
> > > > >> @HomePage action return that. The todoapp in isisaddons uses this
> > > > >> technique [1]
> > > > >>
> > > > >> ~~~
> > > > >> There's then a separate but related question of how to have the
> view
> > > > model
> > > > >> render the charts in the way that you want (eg using our Wicket
> > > > >> ComponentFactory API).... but I'm not sure if that's the question
> > > you're
> > > > >> asking?
> > > > >>
> > > > >>
> > > > >> Dan
> > > > >>
> > > > >>
> > > > >>
> > > > >> [1]
> > > > >>
> > > > >>
> > > >
> > >
> >
> https://github.com/isisaddons/isis-app-todoapp/blob/fb8d92cf3c68fc2456d5010fe788b4faf2152590/dom/src/main/java/todoapp/dom/app/dashboard/ToDoAppDashboardService.java#L38
> > > > >>
> > > > >>
> > > > >> On 7 March 2015 at 10:27, sunand p <su...@gmail.com>
> wrote:
> > > > >>
> > > > >> > Hi All,
> > > > >> >
> > > > >> > Is there a way to render a chart in the Dashboard (Home Page)
> > > instead
> > > > of
> > > > >> > having it as an action and then rendering a chart. I know that
> > there
> > > > is
> > > > >> > limitation in scalar charts when attached to an entity but how
> > about
> > > > in
> > > > >> a
> > > > >> > Home Page?
> > > > >> >
> > > > >> > Any suggestions?
> > > > >> >
> > > > >> > - Sunand
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> >
>
Re: Displaying Chart in HomePage
Posted by German Vivero <ge...@colonia-suiza.com>.
That's could be nice, thank you.
El 10/04/2015 14:04, "sunand p" <su...@gmail.com> escribió:
> Hi,
>
> I couldn't find time to finish what I started. If I do I will let you know.
> On Apr 10, 2015 1:24 AM, "German Vivero" <ge...@colonia-suiza.com>
> wrote:
>
> > Hi, Dan I put a chart on DomainService, like in the addon example , and
> > work great, same for collection entity, that ok. but if annotate a
> > collection with @HomeView that's render a table and a summary but not a
> > chart.
> > Then try with an action that return a WicketChart, this action called
> from
> > Domain service work but not in homepage.
> > Then use e modelview and nothing.
> > Now want to try Martin aproach but I not finish to undertand how
> > ComponentFactory works.
> > tnk for your patience.
> >
> > 2015-04-09 19:41 GMT+00:00 Dan Haywood <da...@haywood-associates.co.uk>:
> >
> > > Another place to look is the wickedcharts addon [1]. And Martin has
> > > written a whole bunch of custom component factories recently for a
> client
> > > that some of us Isis committers were involved with...
> > >
> > > Cheers
> > > Dan
> > >
> > > [1] https://github.com/isisaddons/isis-wicket-wickedcharts
> > >
> > > On 9 April 2015 at 14:43, German Vivero <
> german.vivero@colonia-suiza.com
> > >
> > > wrote:
> > >
> > > > Hi, sunand p, you can get chart working on HomePage? if yes, can you
> > > share
> > > > some snipet I have same problem, and I'm never write
> ComponentFactory.
> > > >
> > > > 2015-03-11 10:25 GMT+00:00 Martin Grigorov <mg...@apache.org>:
> > > >
> > > > > Hi,
> > > > >
> > > > > Take a look at https://github.com/martin-g/isis-wicket-waveform.
> > > > > It is very similar project to what you need.
> > > > > -dom module has Waveform object
> > > > > -fixture module creates 3 WaveformObject (this is a domain entity)
> > > > > instances, each of them having an instance of a Waveform
> > > > > -webapp module defines a Component factory that renders Waveform
> > > > >
> > > > > Martin Grigorov
> > > > > Funemployed! Available for hire!
> > > > > Wicket Training and Consulting
> > > > > https://twitter.com/mtgrigorov
> > > > >
> > > > > On Wed, Mar 11, 2015 at 11:30 AM, sunand p <sunandonline@gmail.com
> >
> > > > wrote:
> > > > >
> > > > > > Hi Martin,
> > > > > >
> > > > > > I have limited knowledge on Apache Wicket, just digging in to the
> > > > > > WickedCharts isisaddons I found that we already have a
> > > ComponentFactory
> > > > > > called StandaloneValueAsWickedChartFactory which does what you
> say,
> > > > isn't
> > > > > > it? Can I reuse it? If yes, how? Also the document
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://isis.apache.org/components/viewers/wicket/customizing-the-viewer.html
> > > > > > gives me some hints but I really need a working example to
> > understand
> > > > on
> > > > > > how to customize Dashboard.
> > > > > >
> > > > > > Thanks,
> > > > > > Sunand
> > > > > >
> > > > > > On Sat, Mar 7, 2015 at 6:18 PM, Martin Grigorov <
> > > mgrigorov@apache.org>
> > > > > > wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > Your view model should have a property that describes the
> chart,
> > > i.e.
> > > > > > > contains all needed information.
> > > > > > > Register a ComponentFactory (e.g. with ServiceLoader) that
> > creates
> > > a
> > > > > > > component/Panel for the type of the view model. The component
> > > should
> > > > > > render
> > > > > > > the chart by using the provided data ( ViewModel#getObject())
> > > > > > > On Mar 7, 2015 1:41 PM, "sunand p" <su...@gmail.com>
> > wrote:
> > > > > > >
> > > > > > > > Hi Dan,
> > > > > > > >
> > > > > > > > Just to clarify a little more my question is more of inside a
> > > view
> > > > > > model
> > > > > > > > instead of rendering the chart by an Action (which means at
> > click
> > > > of
> > > > > a
> > > > > > > > button) can i render the chart in the view itself. If it is
> > > related
> > > > > to
> > > > > > > the
> > > > > > > > second question you mentioned in the email please throw some
> > > light
> > > > on
> > > > > > it
> > > > > > > as
> > > > > > > > to how to achieve it.
> > > > > > > >
> > > > > > > > - Sunand
> > > > > > > >
> > > > > > > > On Sat, Mar 7, 2015 at 4:30 PM, sunand p <
> > sunandonline@gmail.com
> > > >
> > > > > > wrote:
> > > > > > > >
> > > > > > > > > Thanks Dan, for the quick response my question was with
> > respect
> > > > to
> > > > > > the
> > > > > > > > > first one, will reply to this thread if I manage to render
> a
> > > > chart
> > > > > in
> > > > > > > the
> > > > > > > > > Home Page.
> > > > > > > > >
> > > > > > > > > - Sunand
> > > > > > > > >
> > > > > > > > > On Sat, Mar 7, 2015 at 4:04 PM, Dan Haywood <
> > > > > > > > dan@haywood-associates.co.uk>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > >> Isis basically just invokes the action that is annotated
> > with
> > > > > > > @HomePage.
> > > > > > > > >> This action could return anything... a scalar, a list of
> > > > objects,
> > > > > a
> > > > > > > > single
> > > > > > > > >> entity, a view model, and it'll be rendered as normal.
> > > > > > > > >>
> > > > > > > > >> Most likely you should create a view model for your
> > dashboard,
> > > > and
> > > > > > > have
> > > > > > > > >> the
> > > > > > > > >> @HomePage action return that. The todoapp in isisaddons
> > uses
> > > > this
> > > > > > > > >> technique [1]
> > > > > > > > >>
> > > > > > > > >> ~~~
> > > > > > > > >> There's then a separate but related question of how to
> have
> > > the
> > > > > view
> > > > > > > > model
> > > > > > > > >> render the charts in the way that you want (eg using our
> > > Wicket
> > > > > > > > >> ComponentFactory API).... but I'm not sure if that's the
> > > > question
> > > > > > > you're
> > > > > > > > >> asking?
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >> Dan
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >> [1]
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/isisaddons/isis-app-todoapp/blob/fb8d92cf3c68fc2456d5010fe788b4faf2152590/dom/src/main/java/todoapp/dom/app/dashboard/ToDoAppDashboardService.java#L38
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >> On 7 March 2015 at 10:27, sunand p <
> sunandonline@gmail.com>
> > > > > wrote:
> > > > > > > > >>
> > > > > > > > >> > Hi All,
> > > > > > > > >> >
> > > > > > > > >> > Is there a way to render a chart in the Dashboard (Home
> > > Page)
> > > > > > > instead
> > > > > > > > of
> > > > > > > > >> > having it as an action and then rendering a chart. I
> know
> > > that
> > > > > > there
> > > > > > > > is
> > > > > > > > >> > limitation in scalar charts when attached to an entity
> but
> > > how
> > > > > > about
> > > > > > > > in
> > > > > > > > >> a
> > > > > > > > >> > Home Page?
> > > > > > > > >> >
> > > > > > > > >> > Any suggestions?
> > > > > > > > >> >
> > > > > > > > >> > - Sunand
> > > > > > > > >> >
> > > > > > > > >>
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Re: Displaying Chart in HomePage
Posted by sunand p <su...@gmail.com>.
Hi,
I couldn't find time to finish what I started. If I do I will let you know.
On Apr 10, 2015 1:24 AM, "German Vivero" <ge...@colonia-suiza.com>
wrote:
> Hi, Dan I put a chart on DomainService, like in the addon example , and
> work great, same for collection entity, that ok. but if annotate a
> collection with @HomeView that's render a table and a summary but not a
> chart.
> Then try with an action that return a WicketChart, this action called from
> Domain service work but not in homepage.
> Then use e modelview and nothing.
> Now want to try Martin aproach but I not finish to undertand how
> ComponentFactory works.
> tnk for your patience.
>
> 2015-04-09 19:41 GMT+00:00 Dan Haywood <da...@haywood-associates.co.uk>:
>
> > Another place to look is the wickedcharts addon [1]. And Martin has
> > written a whole bunch of custom component factories recently for a client
> > that some of us Isis committers were involved with...
> >
> > Cheers
> > Dan
> >
> > [1] https://github.com/isisaddons/isis-wicket-wickedcharts
> >
> > On 9 April 2015 at 14:43, German Vivero <german.vivero@colonia-suiza.com
> >
> > wrote:
> >
> > > Hi, sunand p, you can get chart working on HomePage? if yes, can you
> > share
> > > some snipet I have same problem, and I'm never write ComponentFactory.
> > >
> > > 2015-03-11 10:25 GMT+00:00 Martin Grigorov <mg...@apache.org>:
> > >
> > > > Hi,
> > > >
> > > > Take a look at https://github.com/martin-g/isis-wicket-waveform.
> > > > It is very similar project to what you need.
> > > > -dom module has Waveform object
> > > > -fixture module creates 3 WaveformObject (this is a domain entity)
> > > > instances, each of them having an instance of a Waveform
> > > > -webapp module defines a Component factory that renders Waveform
> > > >
> > > > Martin Grigorov
> > > > Funemployed! Available for hire!
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > > On Wed, Mar 11, 2015 at 11:30 AM, sunand p <su...@gmail.com>
> > > wrote:
> > > >
> > > > > Hi Martin,
> > > > >
> > > > > I have limited knowledge on Apache Wicket, just digging in to the
> > > > > WickedCharts isisaddons I found that we already have a
> > ComponentFactory
> > > > > called StandaloneValueAsWickedChartFactory which does what you say,
> > > isn't
> > > > > it? Can I reuse it? If yes, how? Also the document
> > > > >
> > > > >
> > > >
> > >
> >
> https://isis.apache.org/components/viewers/wicket/customizing-the-viewer.html
> > > > > gives me some hints but I really need a working example to
> understand
> > > on
> > > > > how to customize Dashboard.
> > > > >
> > > > > Thanks,
> > > > > Sunand
> > > > >
> > > > > On Sat, Mar 7, 2015 at 6:18 PM, Martin Grigorov <
> > mgrigorov@apache.org>
> > > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Your view model should have a property that describes the chart,
> > i.e.
> > > > > > contains all needed information.
> > > > > > Register a ComponentFactory (e.g. with ServiceLoader) that
> creates
> > a
> > > > > > component/Panel for the type of the view model. The component
> > should
> > > > > render
> > > > > > the chart by using the provided data ( ViewModel#getObject())
> > > > > > On Mar 7, 2015 1:41 PM, "sunand p" <su...@gmail.com>
> wrote:
> > > > > >
> > > > > > > Hi Dan,
> > > > > > >
> > > > > > > Just to clarify a little more my question is more of inside a
> > view
> > > > > model
> > > > > > > instead of rendering the chart by an Action (which means at
> click
> > > of
> > > > a
> > > > > > > button) can i render the chart in the view itself. If it is
> > related
> > > > to
> > > > > > the
> > > > > > > second question you mentioned in the email please throw some
> > light
> > > on
> > > > > it
> > > > > > as
> > > > > > > to how to achieve it.
> > > > > > >
> > > > > > > - Sunand
> > > > > > >
> > > > > > > On Sat, Mar 7, 2015 at 4:30 PM, sunand p <
> sunandonline@gmail.com
> > >
> > > > > wrote:
> > > > > > >
> > > > > > > > Thanks Dan, for the quick response my question was with
> respect
> > > to
> > > > > the
> > > > > > > > first one, will reply to this thread if I manage to render a
> > > chart
> > > > in
> > > > > > the
> > > > > > > > Home Page.
> > > > > > > >
> > > > > > > > - Sunand
> > > > > > > >
> > > > > > > > On Sat, Mar 7, 2015 at 4:04 PM, Dan Haywood <
> > > > > > > dan@haywood-associates.co.uk>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > >> Isis basically just invokes the action that is annotated
> with
> > > > > > @HomePage.
> > > > > > > >> This action could return anything... a scalar, a list of
> > > objects,
> > > > a
> > > > > > > single
> > > > > > > >> entity, a view model, and it'll be rendered as normal.
> > > > > > > >>
> > > > > > > >> Most likely you should create a view model for your
> dashboard,
> > > and
> > > > > > have
> > > > > > > >> the
> > > > > > > >> @HomePage action return that. The todoapp in isisaddons
> uses
> > > this
> > > > > > > >> technique [1]
> > > > > > > >>
> > > > > > > >> ~~~
> > > > > > > >> There's then a separate but related question of how to have
> > the
> > > > view
> > > > > > > model
> > > > > > > >> render the charts in the way that you want (eg using our
> > Wicket
> > > > > > > >> ComponentFactory API).... but I'm not sure if that's the
> > > question
> > > > > > you're
> > > > > > > >> asking?
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> Dan
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> [1]
> > > > > > > >>
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/isisaddons/isis-app-todoapp/blob/fb8d92cf3c68fc2456d5010fe788b4faf2152590/dom/src/main/java/todoapp/dom/app/dashboard/ToDoAppDashboardService.java#L38
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> On 7 March 2015 at 10:27, sunand p <su...@gmail.com>
> > > > wrote:
> > > > > > > >>
> > > > > > > >> > Hi All,
> > > > > > > >> >
> > > > > > > >> > Is there a way to render a chart in the Dashboard (Home
> > Page)
> > > > > > instead
> > > > > > > of
> > > > > > > >> > having it as an action and then rendering a chart. I know
> > that
> > > > > there
> > > > > > > is
> > > > > > > >> > limitation in scalar charts when attached to an entity but
> > how
> > > > > about
> > > > > > > in
> > > > > > > >> a
> > > > > > > >> > Home Page?
> > > > > > > >> >
> > > > > > > >> > Any suggestions?
> > > > > > > >> >
> > > > > > > >> > - Sunand
> > > > > > > >> >
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Re: Displaying Chart in HomePage
Posted by German Vivero <ge...@colonia-suiza.com>.
Hi, Dan I put a chart on DomainService, like in the addon example , and
work great, same for collection entity, that ok. but if annotate a
collection with @HomeView that's render a table and a summary but not a
chart.
Then try with an action that return a WicketChart, this action called from
Domain service work but not in homepage.
Then use e modelview and nothing.
Now want to try Martin aproach but I not finish to undertand how
ComponentFactory works.
tnk for your patience.
2015-04-09 19:41 GMT+00:00 Dan Haywood <da...@haywood-associates.co.uk>:
> Another place to look is the wickedcharts addon [1]. And Martin has
> written a whole bunch of custom component factories recently for a client
> that some of us Isis committers were involved with...
>
> Cheers
> Dan
>
> [1] https://github.com/isisaddons/isis-wicket-wickedcharts
>
> On 9 April 2015 at 14:43, German Vivero <ge...@colonia-suiza.com>
> wrote:
>
> > Hi, sunand p, you can get chart working on HomePage? if yes, can you
> share
> > some snipet I have same problem, and I'm never write ComponentFactory.
> >
> > 2015-03-11 10:25 GMT+00:00 Martin Grigorov <mg...@apache.org>:
> >
> > > Hi,
> > >
> > > Take a look at https://github.com/martin-g/isis-wicket-waveform.
> > > It is very similar project to what you need.
> > > -dom module has Waveform object
> > > -fixture module creates 3 WaveformObject (this is a domain entity)
> > > instances, each of them having an instance of a Waveform
> > > -webapp module defines a Component factory that renders Waveform
> > >
> > > Martin Grigorov
> > > Funemployed! Available for hire!
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Wed, Mar 11, 2015 at 11:30 AM, sunand p <su...@gmail.com>
> > wrote:
> > >
> > > > Hi Martin,
> > > >
> > > > I have limited knowledge on Apache Wicket, just digging in to the
> > > > WickedCharts isisaddons I found that we already have a
> ComponentFactory
> > > > called StandaloneValueAsWickedChartFactory which does what you say,
> > isn't
> > > > it? Can I reuse it? If yes, how? Also the document
> > > >
> > > >
> > >
> >
> https://isis.apache.org/components/viewers/wicket/customizing-the-viewer.html
> > > > gives me some hints but I really need a working example to understand
> > on
> > > > how to customize Dashboard.
> > > >
> > > > Thanks,
> > > > Sunand
> > > >
> > > > On Sat, Mar 7, 2015 at 6:18 PM, Martin Grigorov <
> mgrigorov@apache.org>
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Your view model should have a property that describes the chart,
> i.e.
> > > > > contains all needed information.
> > > > > Register a ComponentFactory (e.g. with ServiceLoader) that creates
> a
> > > > > component/Panel for the type of the view model. The component
> should
> > > > render
> > > > > the chart by using the provided data ( ViewModel#getObject())
> > > > > On Mar 7, 2015 1:41 PM, "sunand p" <su...@gmail.com> wrote:
> > > > >
> > > > > > Hi Dan,
> > > > > >
> > > > > > Just to clarify a little more my question is more of inside a
> view
> > > > model
> > > > > > instead of rendering the chart by an Action (which means at click
> > of
> > > a
> > > > > > button) can i render the chart in the view itself. If it is
> related
> > > to
> > > > > the
> > > > > > second question you mentioned in the email please throw some
> light
> > on
> > > > it
> > > > > as
> > > > > > to how to achieve it.
> > > > > >
> > > > > > - Sunand
> > > > > >
> > > > > > On Sat, Mar 7, 2015 at 4:30 PM, sunand p <sunandonline@gmail.com
> >
> > > > wrote:
> > > > > >
> > > > > > > Thanks Dan, for the quick response my question was with respect
> > to
> > > > the
> > > > > > > first one, will reply to this thread if I manage to render a
> > chart
> > > in
> > > > > the
> > > > > > > Home Page.
> > > > > > >
> > > > > > > - Sunand
> > > > > > >
> > > > > > > On Sat, Mar 7, 2015 at 4:04 PM, Dan Haywood <
> > > > > > dan@haywood-associates.co.uk>
> > > > > > > wrote:
> > > > > > >
> > > > > > >> Isis basically just invokes the action that is annotated with
> > > > > @HomePage.
> > > > > > >> This action could return anything... a scalar, a list of
> > objects,
> > > a
> > > > > > single
> > > > > > >> entity, a view model, and it'll be rendered as normal.
> > > > > > >>
> > > > > > >> Most likely you should create a view model for your dashboard,
> > and
> > > > > have
> > > > > > >> the
> > > > > > >> @HomePage action return that. The todoapp in isisaddons uses
> > this
> > > > > > >> technique [1]
> > > > > > >>
> > > > > > >> ~~~
> > > > > > >> There's then a separate but related question of how to have
> the
> > > view
> > > > > > model
> > > > > > >> render the charts in the way that you want (eg using our
> Wicket
> > > > > > >> ComponentFactory API).... but I'm not sure if that's the
> > question
> > > > > you're
> > > > > > >> asking?
> > > > > > >>
> > > > > > >>
> > > > > > >> Dan
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > > >> [1]
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/isisaddons/isis-app-todoapp/blob/fb8d92cf3c68fc2456d5010fe788b4faf2152590/dom/src/main/java/todoapp/dom/app/dashboard/ToDoAppDashboardService.java#L38
> > > > > > >>
> > > > > > >>
> > > > > > >> On 7 March 2015 at 10:27, sunand p <su...@gmail.com>
> > > wrote:
> > > > > > >>
> > > > > > >> > Hi All,
> > > > > > >> >
> > > > > > >> > Is there a way to render a chart in the Dashboard (Home
> Page)
> > > > > instead
> > > > > > of
> > > > > > >> > having it as an action and then rendering a chart. I know
> that
> > > > there
> > > > > > is
> > > > > > >> > limitation in scalar charts when attached to an entity but
> how
> > > > about
> > > > > > in
> > > > > > >> a
> > > > > > >> > Home Page?
> > > > > > >> >
> > > > > > >> > Any suggestions?
> > > > > > >> >
> > > > > > >> > - Sunand
> > > > > > >> >
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Re: Displaying Chart in HomePage
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Another place to look is the wickedcharts addon [1]. And Martin has
written a whole bunch of custom component factories recently for a client
that some of us Isis committers were involved with...
Cheers
Dan
[1] https://github.com/isisaddons/isis-wicket-wickedcharts
On 9 April 2015 at 14:43, German Vivero <ge...@colonia-suiza.com>
wrote:
> Hi, sunand p, you can get chart working on HomePage? if yes, can you share
> some snipet I have same problem, and I'm never write ComponentFactory.
>
> 2015-03-11 10:25 GMT+00:00 Martin Grigorov <mg...@apache.org>:
>
> > Hi,
> >
> > Take a look at https://github.com/martin-g/isis-wicket-waveform.
> > It is very similar project to what you need.
> > -dom module has Waveform object
> > -fixture module creates 3 WaveformObject (this is a domain entity)
> > instances, each of them having an instance of a Waveform
> > -webapp module defines a Component factory that renders Waveform
> >
> > Martin Grigorov
> > Funemployed! Available for hire!
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Mar 11, 2015 at 11:30 AM, sunand p <su...@gmail.com>
> wrote:
> >
> > > Hi Martin,
> > >
> > > I have limited knowledge on Apache Wicket, just digging in to the
> > > WickedCharts isisaddons I found that we already have a ComponentFactory
> > > called StandaloneValueAsWickedChartFactory which does what you say,
> isn't
> > > it? Can I reuse it? If yes, how? Also the document
> > >
> > >
> >
> https://isis.apache.org/components/viewers/wicket/customizing-the-viewer.html
> > > gives me some hints but I really need a working example to understand
> on
> > > how to customize Dashboard.
> > >
> > > Thanks,
> > > Sunand
> > >
> > > On Sat, Mar 7, 2015 at 6:18 PM, Martin Grigorov <mg...@apache.org>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Your view model should have a property that describes the chart, i.e.
> > > > contains all needed information.
> > > > Register a ComponentFactory (e.g. with ServiceLoader) that creates a
> > > > component/Panel for the type of the view model. The component should
> > > render
> > > > the chart by using the provided data ( ViewModel#getObject())
> > > > On Mar 7, 2015 1:41 PM, "sunand p" <su...@gmail.com> wrote:
> > > >
> > > > > Hi Dan,
> > > > >
> > > > > Just to clarify a little more my question is more of inside a view
> > > model
> > > > > instead of rendering the chart by an Action (which means at click
> of
> > a
> > > > > button) can i render the chart in the view itself. If it is related
> > to
> > > > the
> > > > > second question you mentioned in the email please throw some light
> on
> > > it
> > > > as
> > > > > to how to achieve it.
> > > > >
> > > > > - Sunand
> > > > >
> > > > > On Sat, Mar 7, 2015 at 4:30 PM, sunand p <su...@gmail.com>
> > > wrote:
> > > > >
> > > > > > Thanks Dan, for the quick response my question was with respect
> to
> > > the
> > > > > > first one, will reply to this thread if I manage to render a
> chart
> > in
> > > > the
> > > > > > Home Page.
> > > > > >
> > > > > > - Sunand
> > > > > >
> > > > > > On Sat, Mar 7, 2015 at 4:04 PM, Dan Haywood <
> > > > > dan@haywood-associates.co.uk>
> > > > > > wrote:
> > > > > >
> > > > > >> Isis basically just invokes the action that is annotated with
> > > > @HomePage.
> > > > > >> This action could return anything... a scalar, a list of
> objects,
> > a
> > > > > single
> > > > > >> entity, a view model, and it'll be rendered as normal.
> > > > > >>
> > > > > >> Most likely you should create a view model for your dashboard,
> and
> > > > have
> > > > > >> the
> > > > > >> @HomePage action return that. The todoapp in isisaddons uses
> this
> > > > > >> technique [1]
> > > > > >>
> > > > > >> ~~~
> > > > > >> There's then a separate but related question of how to have the
> > view
> > > > > model
> > > > > >> render the charts in the way that you want (eg using our Wicket
> > > > > >> ComponentFactory API).... but I'm not sure if that's the
> question
> > > > you're
> > > > > >> asking?
> > > > > >>
> > > > > >>
> > > > > >> Dan
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> [1]
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> https://github.com/isisaddons/isis-app-todoapp/blob/fb8d92cf3c68fc2456d5010fe788b4faf2152590/dom/src/main/java/todoapp/dom/app/dashboard/ToDoAppDashboardService.java#L38
> > > > > >>
> > > > > >>
> > > > > >> On 7 March 2015 at 10:27, sunand p <su...@gmail.com>
> > wrote:
> > > > > >>
> > > > > >> > Hi All,
> > > > > >> >
> > > > > >> > Is there a way to render a chart in the Dashboard (Home Page)
> > > > instead
> > > > > of
> > > > > >> > having it as an action and then rendering a chart. I know that
> > > there
> > > > > is
> > > > > >> > limitation in scalar charts when attached to an entity but how
> > > about
> > > > > in
> > > > > >> a
> > > > > >> > Home Page?
> > > > > >> >
> > > > > >> > Any suggestions?
> > > > > >> >
> > > > > >> > - Sunand
> > > > > >> >
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>