cancel
Showing results for 
Search instead for 
Did you mean: 

Dispatch mechanism

alpha
Champ in-the-making
Champ in-the-making
Hi there,

i am working in an alfresco extension project, and i am newbie in this forum.
I have questions about the dispatch mechanism (http://wiki.alfresco.com/wiki/Dispatch_Mechanism) about things i do not understand.

if i take this example :
<config evaluator="node-type" condition="fm:forums">
      <navigation>
         <override from-view-id="/jsp/browse/browse.jsp" to-view-id="/jsp/forums/forums.jsp" />
         <override from-outcome="browse" to-view-id="/jsp/forums/forums.jsp" />
         <override from-outcome="showSpaceDetails" to-view-id="/jsp/forums/forums-details.jsp" />
      </navigation>
</config>
questions : what is the first line code for?
is there any requirements for the attribute condition? if i put
condition="foo:foot"
, do i have to define something before?

any help is appreciated!
Thanks
1 REPLY 1

gavinc
Champ in-the-making
Champ in-the-making
The condition attribute is required. This line is basically saying apply this block of configuration when a node that has a type of "fm:forums" has been clicked on in the UI.

If you put "foo:foot" in the condition then you must have set up a new type in a custom data model, see http://wiki.alfresco.com/wiki/Data_Dictionary_Guide.

The dispatch mechanism comes into play when a node is clicked in the UI. Basically before displaying the next page a check is done (via the configuration above) to see whether the deault page has been overridden. This means you can have custom views on a type by type basis.

If you create a Forum space via the Advanced Space Wizard and then click on the space in the browse view you'll notice the view is slightly different than the default view. It is the configuration above that caused the change.

Hope that helps.