cancel
Showing results for 
Search instead for 
Did you mean: 

Custom web-client-config.xml

limarin
Champ in-the-making
Champ in-the-making
Hi,

If I need to add another language to the drop down list in the login page, I must add the following to web-client-config-custom.xml:

<config evaluator="string-compare" condition="Languages">
   <languages>
      <language locale="fr_FR">French</language>
   </languages>
</config>

But, I need to remove configuration in condition="Action Wizards". Remove any transformers, actions and conditions.

For this, it is necessary to modify the original file web-client-config.xml?

Another question…

Testing, I remove transformers:

<!– The list of transformers to show in the transform actions –>
      <transformers>
         <!–transformer name="application/vnd.oasis.opendocument.text"/–>
         <!–transformer name="application/vnd.oasis.opendocument.presentation"/–>
         <!–transformer name="application/vnd.oasis.opendocument.spreadsheet"/–>
         <!–transformer name="application/rtf"/–>
         <!–transformer name="text/html"/–>
         <transformer name="application/pdf"/>
         <!–transformer name="text/plain"/–>
         <transformer name="text/xml"/>
         <!–transformer name="application/x-shockwave-flash"/–>
         <!–transformer name="image/gif"/–>
         <!–transformer name="image/jpeg"/–>
         <transformer name="application/msword"/>
         <transformer name="application/vnd.excel"/>
         <!–transformer name="application/vnd.powerpoint"/–>
      </transformers>

and this is ok, I create a rule and in the drop down list in the page the eliminated transformers are not visualized.

But also I remove conditions in the drop down list in the page the eliminated conditions continue being visualized. Why?

<condition-handlers>
         <handler name="compare-mime-type" class="org.alfresco.web.bean.rules.handlers.CompareMimeTypeHandler" />
         <handler name="compare-property-value" class="org.alfresco.web.bean.rules.handlers.PropertyValueHandler" />
         <handler name="has-aspect" class="org.alfresco.web.bean.rules.handlers.HasAspectHandler" />
         <!–handler name="in-category" class="org.alfresco.web.bean.rules.handlers.InCategoryHandler" /–>
         <handler name="is-subtype" class="org.alfresco.web.bean.rules.handlers.IsSubTypeHandler" />
               </condition-handlers>
     
At the moment, I have solved it removing the bean in the file action-services-context.xml

<bean id="in-category" class="org.alfresco.repo.action.evaluator.InCategoryEvaluator" parent="action-condition-evaluator">
        <property name="nodeService">
            <ref bean="nodeService" />
        </property>
        <property name="dictionaryService">
            <ref bean="dictionaryService" />
        </property>
    </bean>
   
Another solution?

Thank you very much
3 REPLIES 3

gavinc
Champ in-the-making
Champ in-the-making
Hi,

To remove items from the configuration you can use the replace="true" attribute on the config element i.e. if you have the following in your web-client-config-custom.xml it will completely override the whole block from  web-client-config.xml:


<config evaluator="string-compare" condition="Action Wizards" replace="true">

Bear in mind this overrides the whole config section so anything you want to keep you will need to re-define in your file.

As for the condition you need to override a Spring config file. Basically you need to tell the repository that the in-category condition is not public.

Look for the bean called "in-category" in action-services-context.xml. You need to add the following to this bean definition:

<property name="publicCondition">
   <value>false</value>
</property>

It's better to override this rather than changing our file, have a look at for details on doing this: http://wiki.alfresco.com/wiki/Repository_Configuration

Have a look at the bean called "has-version-history" for an example of the above.

Hope this helps.

limarin
Champ in-the-making
Champ in-the-making
Hi,

In the web-client-config-custom.xml I have used the replace="true" attribute on the config element to remove items from the configuration.

Too, in 1.3 it is now very easy to add my own menu items, I add the new action to web-client-config-custom.xml

But, how to remove an action?

Example:

web-client-config-actions.xml

<!– Actions for a space in the Browse screen –>
<action-group id="space_browse">
    <show-link>false</show-link>
    <style-class>inlineAction</style-class>
   
    <action idref="preview_space" />
    <action idref="cut_node" />
    <action idref="copy_node" />
    <action idref="details_space" />
</action-group>

I need remove action "preview_space"
        
<!– Actions for a space in the Browse screen –>
<action-group id="space_browse">
    <show-link>false</show-link>
    <style-class>inlineAction</style-class>
   
    <action idref="cut_node" />
    <action idref="copy_node" />
    <action idref="details_space" />
</action-group> 

For this, it is necessary to modify the original file web-client-config.xml?

Thanks.

gavinc
Champ in-the-making
Champ in-the-making
You can hide individual actions by using the hide attribute:

<action idref="action_to_hide" hide="true" />