Follow by Email

Thursday, June 12, 2014

Spring Roo add an empty option to a combo

Spring roo by default creates a combo box with widgetType "dijit.form.FilteringSelect" applied on it , this combo box doesn't contain an empty option.

To add an empty option to it please follow the below steps

In your java code when you are preparing a List for that combo box try to add first option with

code =0 and value = -- Not Selected

and then add all the other options in that list.

A simple java code snipet I am using is

ComboDTO comboDTO=new ComboDTO();
comboDTO.setDescription("--Not Selected--");

list.add(comboDTO); //This is the list which will be used to populate values in combo box

The option having the code = 0 will be shown as the first element in your combo box. Now if you want it to be mendatory field implement your Validator in and check if the option slected in combo has code=0 send an error back

Sample code for checking the value and sending error back from validator is like below

  errors.rejectValue("fieldCode", "required.fieldCode");
 This way you can have a combo box with an empty option and can check the validity at server side.

Unfortunatly I couldn't find a way to show dojo type notification at client end if the user has not selected a valid option in the combo box. But this is working for me now.


Wednesday, June 11, 2014

Documentum getting list of workflow performers

Below queries can be used to get the details about

  • What happend during a wrokflow
  • Which user performed which task
  • How long a task was waiting to be processed e.t.c.

  1. Use the below query to get the process ids related to your templete
            select * from dm_process where object_name like '%DBP%';
2. Use the Below query to get  the completed workflow ids related to a process id

select * from dmc_completed_workflow where process_id = 'my_process_id';

 3. Use the below query to get the information related to a completed workflow

select * from dmc_completed_workitem where workflow_id in (select workflow_id from dmc_completed_workflow where process_id = 'my_process_id' )

order by workflow_id, act_seqno;

Wednesday, June 4, 2014

Spring roo Customize Dojo Editor

I wanted to add more extensions to the dojo editor in my spring roo application , below is what I did

IN editor.tagx

I added the required plugins to be added to Editor like below

<script type="text/javascript">

and I added the decoraiton like below

//**Added by sajjad as recomended in

new Spring.ElementDecoration({elementId : '_${sec_field}_id_', widgetType : 'dijit.Editor', widgetAttrs : {disabled: ${disabled},extraPlugins: ['viewsource','fullscreen']}}));