learning how to navigate dhis2 sourcecode and flow

Hi Guys

I have picked interest in the DHIS2 project, currently am trying to learn the code flow so that i can get actively involved in the development process and contribute towards the development of some modules at a later stage.

this is my understanding of the code flow using struts mvc

···

when a user logs in, execution goes to the InitAction.java action class.
but then in the action class i cant find the code that generates the objects sent to velocity pages.(main.vm&mainForm.vm)

here is the mapping in the struts xml file

/main.vm
  <param name="page">/dhis-web-dashboard-integration/mainForm.vm</param>
  <param name="hideMenu">true</param>
  <param name="stylesheets">style/dashboard.css</param>

  <param name="javascripts">javascript/dropdown.js</param>
</action>

please could some one let me know where the code generating the objects sent to velocity is located!

thanks in advance!


Regards
David Nyaika
Software Developer(SCJP,SCWCD Certified)

IICS Technologies, Muyenga
Phone:+256706353274
Skype:davie2086
Email: davie2086@gmail.com

Its in InitAction.java

···

On Mon, Mar 4, 2013 at 4:48 PM, Nyaika David <davie2086@gmail.com> wrote:

<action name="index" class="org.hisp.dhis.dashboard.action.InitAction">
      <result name="success" type="velocity">/main.vm</result>
      <param
name="page">/dhis-web-dashboard-integration/mainForm.vm</param>
      <param name="hideMenu">true</param>
      <param name="stylesheets">style/dashboard.css</param>
      <param name="javascripts">javascript/dropdown.js</param>
    </action>

--
Morten

Hi Morten

i have looked in the InitAction.java file and main.vm respectively, but i dont see how the “maintenanceModules” list in the code snipet below is passed to the file main.vm from InitAction.

Note: am looking at the dhis-web-dashboard-integration module

#if( $maintenanceModules.size() > 0 )

#end

···

regards

David

On Mon, Mar 4, 2013 at 5:21 PM, Morten Olav Hansen mortenoh@gmail.com wrote:


Regards
David Nyaika
Software Developer(SCJP,SCWCD Certified)

IICS Technologies, Muyenga
Phone:+256706353274
Skype:davie2086

Email: davie2086@gmail.com

On Mon, Mar 4, 2013 at 4:48 PM, Nyaika David davie2086@gmail.com wrote:

/main.vm
  <param name="page">/dhis-web-dashboard-integration/mainForm.vm</param>
  <param name="hideMenu">true</param>
  <param name="stylesheets">style/dashboard.css</param>




  <param name="javascripts">javascript/dropdown.js</param>
</action>

Its in InitAction.java

Morten

Hi Morten

i have looked in the InitAction.java file and main.vm respectively, but i dont see how the “maintenanceModules” list in the code snipet below is passed to the file main.vm from InitAction.

Note: am looking at the dhis-web-dashboard-integration module

#if( $maintenanceModules.size() > 0 )

#end

···

regards

On Tue, Mar 5, 2013 at 10:05 AM, Nyaika David davie2086@gmail.com wrote:

Hi Morten

i have looked in the InitAction.java file and main.vm respectively, but i dont see how the “maintenanceModules” list in the code snipet below is passed to the file main.vm from InitAction.

Note: am looking at the dhis-web-dashboard-integration module

#if( $maintenanceModules.size() > 0 )

#end


Regards
David Nyaika
Software Developer(SCJP,SCWCD Certified)

IICS Technologies, Muyenga
Phone:+256706353274
Skype:davie2086

Email: davie2086@gmail.com

regards

David

On Mon, Mar 4, 2013 at 5:21 PM, Morten Olav Hansen mortenoh@gmail.com wrote:


Regards
David Nyaika
Software Developer(SCJP,SCWCD Certified)

IICS Technologies, Muyenga
Phone:+256706353274

Skype:davie2086

Email: davie2086@gmail.com

On Mon, Mar 4, 2013 at 4:48 PM, Nyaika David davie2086@gmail.com wrote:

/main.vm
  <param name="page">/dhis-web-dashboard-integration/mainForm.vm</param>
  <param name="hideMenu">true</param>
  <param name="stylesheets">style/dashboard.css</param>





  <param name="javascripts">javascript/dropdown.js</param>
</action>

Its in InitAction.java

Morten

Look at XWorkPortalModuleInterceptor (and follow the thread from there).

···


Morten

On Tue, Mar 5, 2013 at 10:05 AM, Nyaika David davie2086@gmail.com wrote:

Hi Morten

i have looked in the InitAction.java file and main.vm respectively, but i dont see how the “maintenanceModules” list in the code snipet below is passed to the file main.vm from InitAction.

Note: am looking at the dhis-web-dashboard-integration module

#if( $maintenanceModules.size() > 0 )

#end

regards

David

On Mon, Mar 4, 2013 at 5:21 PM, Morten Olav Hansen mortenoh@gmail.com wrote:


Regards
David Nyaika
Software Developer(SCJP,SCWCD Certified)

IICS Technologies, Muyenga
Phone:+256706353274

Skype:davie2086

Email: davie2086@gmail.com

On Mon, Mar 4, 2013 at 4:48 PM, Nyaika David davie2086@gmail.com wrote:

/main.vm
  <param name="page">/dhis-web-dashboard-integration/mainForm.vm</param>
  <param name="hideMenu">true</param>
  <param name="stylesheets">style/dashboard.css</param>






  <param name="javascripts">javascript/dropdown.js</param>
</action>

Its in InitAction.java

Morten