cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing ow.css...

7joeblack8
Champ in-the-making
Champ in-the-making
Hi,



where could i find some examples?

expecially with some Highlighting and Priority Rules.

thx!
5 REPLIES 5

deko
Star Contributor
Star Contributor
Hi Black.Jack,

Priority Rule and Highlighting examples are not part of the ow.css file, but are included in ow_customizing.css in the same folder (designs/default20/css or designs/default40/css depending on the design you are using):


/* demo styles for highlighting */
.PriorityRuleStyle
{
    background: #fff388;
}
.PriorityRuleStyleLow
{
    background: #FFFF80;
}
.PriorityRuleStyleMed
{
    background: #F9C779;
}
.PriorityRuleStyleHigh {
    background: #FF8080;
}

Examples how to use these style classes in a plugin can be found for example in the dummy adapter owplugins.xml under WEB-INF/conf/dummy in the eFile management plugin:


<PriorityRules>
      <PriorityRule>
        <expression><![CDATA[object.ow_Filename='Baufinanzierung']]></expression>
        <styleclass>PriorityRuleStyleLow</styleclass>
      </PriorityRule>
      <PriorityRule>
        <expression><![CDATA[object.ow_Filename='BusinessPlan']]></expression>
        <styleclass>PriorityRuleStyleMed</styleclass>
      </PriorityRule>
      <PriorityRule>
        <expression><![CDATA[object.ow_Filename='Depotverwaltung']]></expression>
        <styleclass>PriorityRuleStyleHigh</styleclass>
      </PriorityRule>
    </PriorityRules>

As you might guess from this example, a style class defined in ow_customizing.css is applied for an entry, if the corresponding expression is fulfilled.

:!: The examples given just influence the background element, but you could affect also any other CSS elements, like font or alignment.

I hope these examples make Priority Rules easier to understand. Have a nice day!

7joeblack8
Champ in-the-making
Champ in-the-making
Hi, it seems quite easy!


so i tryed to put a new PriorityRules in the com.wewebu.ow.Search plugin.

i added something like this:

        <PriorityRules>
        <PriorityRule>
             <expression><![CDATA[object.D:test:mydocuments.test:docname='12345']]></expression>
        <styleclass>PriorityRuleStyleMed</styleclass>
      </PriorityRule>
    </PriorityRules>
    <ResultListViews>

but it won't show any higlight…

i find the customizing.css…there are the expected values of PriorityRuleStyleMed,High and Low.

what's wrong with my project?

thanks

EDIT: Accordingly to the developer manual, it seems this feature is available for the EFile PlugIn Only!! (page57). What a Shame!

How could i change a row color during a simple search?
Maybe the same rows binded to the "checkedout" state?

thanks in advance!

deko
Star Contributor
Star Contributor
Priority Rules can be applied to the following plugins:

  • com.wewebu.ow.server.plug.owbpm.OwBPMDocument

  • com.wewebu.ow.server.plug.owrecord.OwRecordDocument
Priority Rules are not working for the Search master plugin.

d_evil
Champ in-the-making
Champ in-the-making
Hi Black.Jack,

you can try to configure the highlighting attached file.
Had to zip it, could not upload as simple java file  :?:

But the problem I was facing is the escaping in priority rules definition,
here my example which is working:
 
<PlugIn type="ow_master">
    <Name>Search</Name>

<ViewClassName>com.wewebu.ow.server.plug.owsearch.SearchPriorityView</ViewClassName>

   <PriorityRules>
        <PriorityRule>
            <expression>
                <![CDATA[
                    object.cmis:contentStreamMimeType='application/msexcel' or
                    object.cmis:contentStreamMimeType='application/pdf' or
                    object.cmis:contentStreamMimeType='text/plain' or
                    object.cmis:contentStreamLength <= 100000
                 ]]>
            </expression>
            <styleclass>PriorityRuleStyleLow</styleclass>
        </PriorityRule>
        <PriorityRule>
            <expression>
                <![CDATA[object.cmis:contentStreamLength < 500000]]>
            </expression>
            <styleclass>PriorityRuleStyleMed</styleclass>
        </PriorityRule>
        <PriorityRule>
            <expression>
                <![CDATA[object.cmis:contentStreamLength > 500000]]>
            </expression>
            <styleclass>PriorityRuleStyleHigh</styleclass>
        </PriorityRule>
    </PriorityRules>

Regards,
D.evil

7joeblack8
Champ in-the-making
Champ in-the-making
Outstanding performance  :shock:


thanks!