Main Content

Magnolia Community Forums: Get help with Magnolia: How to add a custom column in Tasks section on Pulse in Magnolia


  • magnolia_training
    magnolia_training
    Full name:
    Posts: 6
    Last post: Nov 14, 2017 8:54:24 AM
    Registered on: Jun 12, 2014
    How to add a custom column in Tasks section on Pulse in Magnolia
    #1 by magnolia_training on Nov 14, 2017 8:54:24 AM

    Good morning, i am a fairly new person at Magnolia and i have the need to improve a web by showing more data at the Task section of Pulse in Magnolia, to be able to do that i need to create a couple of columns but after trying to find some information at Magnolia documentation y have only been able to find this "[url=https://documentation.magnolia-cms.com/display/WIKI/Add+custom+column+to+Inbox]Add custom column to Inbox[/url]", but unfortunately is outdated and the Inbox class that makes reference is not used anymore in the newers versions of Magnolia.

    Could somebody help me and explain to me how to create these columns at the Tasks section of Pulse in Magnolia?, or point me in the rigth direction?.

    Im using the Magnolia version 5.3, thanks in advance for the help.

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    How to add a custom column in Tasks section on Pulse in Magnolia
    #2 by FbSegovia on Nov 14, 2017 8:57:27 AM

    Good morning, i am a fairly new person at Magnolia and i have the need to improve a web by showing more data at the Task section of Pulse in Magnolia, to be able to do that i need to create a couple of columns but after trying to find some information at Magnolia documentation y have only been able to find this "Add custom column to Inbox", but unfortunately is outdated and the Inbox class that makes reference is not used anymore in the newers versions of Magnolia.

    Could somebody help me and explain to me how to create these columns at the Tasks section of Pulse in Magnolia?, or point me in the rigth direction?.

    Im using the Magnolia version 5.3, thanks in advance for the help.

  • marvink2
    marvink2
    Full name: Marvin Kerkhoff
    Posts: 45
    Last post: Nov 22, 2017 9:14:20 AM
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #3 by marvink2 on Nov 14, 2017 9:37:28 AM

    First of all some small questions:

    1. Do you use a Maven Setup / Java Setup to change Class files or are you using light modules only?
    2. Probably you can explain a bit more about your problem. We understand that you want to add a column but it would also good to know what will be displayed and where is the data for this tasks stored?

    If you want to overwrite the Java classes you should have a look at the configuration app under /modules/ui-admincentral/config/pulse/presenters. There you can define your javaclass which should extend the original one. In your new class you need to find a way to overwrite the TasksListViewImpl. This should be possible through dependency injection in the constructor. Write your own SegoviaTasksListViewImpl and extend the TasksListViewImpl. After that you can extend the constructTable() method.

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #4 by FbSegovia on Nov 14, 2017 10:04:09 AM

    Sorry if a didnt explained well enough. I am using a Maven Setup and the values that i want to show are the name of the page or asset that the Task is aiming at and the repository in wich this page or asset is. what i want is for the columns to be shown when you open the Pulse Task Inbox, and not in the destil view that you get when you click on a Task. i still dont know very well how to implement changes in an specific class and then upload them could you please direct me at some short of example?, it needs his own VersionHandler and proyect or could i upload it inside another proyect?.

    thank you for your patience and help in advance.

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #5 by FbSegovia on Nov 14, 2017 10:26:58 AM

    First of all some small questions:

    1. Do you use a Maven Setup / Java Setup to change Class files or are you using light modules only?
    2. Probably you can explain a bit more about your problem. We understand that you want to add a column but it would also good to know what will be displayed and where is the data for this tasks stored?

    If you want to overwrite the Java classes you should have a look at the configuration app under /modules/ui-admincentral/config/pulse/presenters. There you can define your javaclass which should extend the original one. In your new class you need to find a way to overwrite the TasksListViewImpl. This should be possible through dependency injection in the constructor. Write your own SegoviaTasksListViewImpl and extend the TasksListViewImpl. After that you can extend the constructTable() method.


    I tried to create a new class that extends TasksListViewImpl and i found that it is a final class wich means i cannot extend it, so how can i change the TaskViewImpl without changing the code of the TaskViewImpl directly?.

    thanks and sorry again if i am a little hardheaded.

  • marvink2
    marvink2
    Full name: Marvin Kerkhoff
    Posts: 45
    Last post: Nov 22, 2017 9:14:20 AM
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #6 by marvink2 on Nov 14, 2017 12:07:59 PM

    Hi Fancisco,

    no worry, everyone is starting with something new and does not know everything.

    You can't extend this class because it's final that's true. I am not sure why it's final but the probaby easiest way is to copy the whole class and make a new one which extends extends AbstractPulseListView implements TasksListView. This is the practicle approach whit one disadvantage that you can have issues by updating magnolia in the future, because you have more selfmade code then you need. To be honest the code behind that TaskBar is not the best and extending this functionality is not that easy, then on other peaces of magnolia. I had similar issues in the past.

    Could you try to use my approach and have a look if this fits for your needs? I know it's not the nicest one.

    Do you need further examples?

    And if you have a bit of time:
    Where would you prefer to see that in the magnolia documentation to improve documentation quality for the future?

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #7 by FbSegovia on Nov 14, 2017 12:36:47 PM

    First thanks marvink2 for your time, i would recommend to put the explnation in Tasks, beacuse there there is only a little reference to how the tasks are shown and in the explanation of the TaskView its a little confusing.

    On the other hand, i have tried as you sugested but i dont seem to be able to pull it off, and i think its becuse i dont call the class in the rigth way.

    I created the nodes of "pulse" and "presenters" in the location /modules/ui-admincentral/config and then added the property of my class but it doesnt seem to be working.

    Should i have created folders instead?, should i create some short of reference to that point in the VersionHandler?.

    Thanks again for your time.

  • marvink2
    marvink2
    Full name: Marvin Kerkhoff
    Posts: 45
    Last post: Nov 22, 2017 9:14:20 AM
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #8 by marvink2 on Nov 14, 2017 1:36:33 PM

    To address the class you need to change the property value from the existing class to your new one. If you want to have this config change in your git repo you just need to bootstrap the node or add a task in your moduleversionhandler.

    You don't need to add ne nodes or folders to add your class.

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #9 by FbSegovia on Nov 14, 2017 2:02:04 PM

    The problem is that i dont find the location where the class TasksListViewImpl is used (or pulse in general) in the magnolia configuration, i tried looking for it but i have been unable to find it, the direction you told me before "modules/ui-admincentral/config/pulse/presenters" in my magnolia (V5.3) stops at config, inside of it there is no pulse node or folder i will have to create it if need it. Also im a little green when creating a task in the moduleversionhandler so im trying to make it through magnolia configuration and when i have checked that the pulse is working like i wan it, then create the task so it can be installed properly.

    Could you pinpoint me where is located the property of the pulse class so i can replace it?
    thanks again.

  • marvink2
    marvink2
    Full name: Marvin Kerkhoff
    Posts: 45
    Last post: Nov 22, 2017 9:14:20 AM
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #10 by marvink2 on Nov 14, 2017 2:20:38 PM

    Hi Francisco,

    there is no config for TasksListViewImpl as i mentioned you need to extend the presenter first and inject your TasksListViewImpl class in the extended presenter class. If you have problems with moduleversionhandlers no problem you can also use bootstrapping

    https://documentation.magnolia-cms.com/display/DOCS54/Bootstrapping

    We use this most often because it's a headegg to manage everything through java code.

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #11 by FbSegovia on Nov 14, 2017 3:14:05 PM

    The presenter that you are saying its the one from my proyect?, should I extend mine using the one of the Pulse Task? (Custom extends TaskDetailPresenter ?), if that is the case should i use TaskDetailPresenter or another one less specific of Pulse.

    On ther other hand, thank you for the link, unfortunately the bootstrapping documentation its from Magnoli v5.4 so i understand that previus version cant use bootstrapping and i am using V5.3. I suppose that means that i will have to use the task of VersionHandler?.

    thank you again.

  • marvink2
    marvink2
    Full name: Marvin Kerkhoff
    Posts: 45
    Last post: Nov 22, 2017 9:14:20 AM
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #12 by marvink2 on Nov 14, 2017 3:22:01 PM

    Hi Francisco,

    why TaskDetailPresenter? i had referenced to info.magnolia.ui.admincentral.shellapp.pulse.task.TasksListPresenter in my previous posts.

    You can use Bootstrapp since 4.x i guess.

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #13 by FbSegovia on Nov 14, 2017 3:35:26 PM

    Ok, will try with that presenter, sorry i didnt get rigth away have a little confusion there.

    Then its posible to use the bootstrapp way since V 4.0 i though that the version at the documentation acted as some sort of limit to know where certain parts of magnolia had been implemented and from when they could be used?.

    The only thing left i suppose then would be the rigth way to implement my class theres any documentation that helps me clarify the correct configuration tree of pulse so i can make the correct reference in configuration or VersionHandler.

    Thank you for your patienece.

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #14 by FbSegovia on Nov 14, 2017 4:31:21 PM

    Hi Francisco,

    why TaskDetailPresenter? i had referenced to info.magnolia.ui.admincentral.shellapp.pulse.task.TasksListPresenter in my previous posts.

    You can use Bootstrapp since 4.x i guess.


    I know im being a little obtuse but TasksListPresenter is also a final class i cant extend it either way so i cant take the path you recomend, is there a way that allows the inclusion of changes creating a class? or are all the class final and wont allow me to extend them i would have to resort to change the core pulse each time i change the version of magnolia that im using?

    Thank you again for your patience

  • fuchs.florian
    fuchs.florian
    Full name: Florian Fuchs
    Posts: 1
    Last post: Nov 15, 2017 1:51:29 PM
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #15 by fuchs.florian on Nov 15, 2017 1:51:29 PM


    I know im being a little obtuse but TasksListPresenter is also a final class i cant extend it either way so i cant take the path you recomend, is there a way that allows the inclusion of changes creating a class? or are all the class final and wont allow me to extend them i would have to resort to change the core pulse each time i change the version of magnolia that im using?


    When I added a column to the task list view, I copied and modified this classes to my own needs:
    - TaskQuery
    - TaskQueryDefinition
    - TaskListViewImpl

    To provide my own implementation for these classes, I configured the IoC container of magnolia in the module descriptor. (see https://documentation.magnolia-cms.com/display/DOCS/Dependency+injection+and+inversion+of+control)

    e.g to replace TaskListView:

    <components>
    <id>admincentral</id>
    <component>
    <type>info.magnolia.ui.admincentral.shellapp.pulse.task.TasksListView</type>
    <implementation>de.myown.implementation.TasksListViewImpl</implementation>
    </component>
    <type-mapping>
    <type>info.magnolia.ui.admincentral.shellapp.pulse.task.TasksListView</type>
    <implementation>de.myown.implementation.TasksListViewImpl</implementation>
    </type-mapping>
    ..add component, type-mapping for TaskQueryDefinition, TaskQuery..
    </components>


    This is one of the very few places, where magnolia is not easily extensible. You may have to adapt your code, if Magnolia changes something fundamentally in this area with an update.
    You could start by copying the original classes and modify them slightly, to see if your own implementation is used.

    Regards,
    Florian

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Re: How to add a custom column in Tasks section on Pulse in Magnolia
    #16 by FbSegovia on Nov 23, 2017 5:07:19 PM

    Thank you Florian,

    I created a new module with the classes that you said, but in the end i had to add a few more to make it work. Then i changed the reference for the TaskListPresenter to mine and it works, unfortunately i has far more classes than i should be reasonable.

    Classes changed:
    - TaskQuery
    - TaskQueryDefinition
    - TaskListViewImpl

    Class Presenter:
    -TaskListPresenter

    Added classes to complete the internal process of TaskQuery and TaskQueryDefinition
    -TaskQueryFactory
    -TaskContainer

    Added classes to import functionality:
    -AbstractPulseListView
    -PulseListFooter

    These are far more classes than i should need but i cant see how to eliminate even one of then without losing my functionality. Could anyone explain to me how to reduce them? i think that AbstractPulseListView and PulseListFooter should at least be posible because i have only added them to complete the funcionality of the Listener in TaskListViewImpl because i told me i couldnt cast it to info.magnolia.ui.admincentral.shellapp.pulse.task.TasksListView.Listener.

    Thank you in advance for your trouble.

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/