The following comment has been added to this issue:

     Author: Sunondo Ghosh
    Created: Di, 31 Aug 2004 12:09 AM
       Body:
Sure, here are the diffs:

-----------------------------------------------------------------
In the BPM4Struts metamodel three methods were added:
1. isDisplayAreasMultiple (in StrutsAction class)
2. getDisplayAreas (in StrutsAction class)
3. getDisplayAreaIndex (in StrutsParameter class)

-----------------------------------------------------------------
New Tags in Bpm4StrutsProfile.java:
    public static final String TAGGED_VALUE_INPUT_DISPLAYAREAINDEX = 
"@andromda.struts.view.field.displayareaindex";
    public static final String TAGGED_VALUE_ACTION_DISPLAYAREASCOUNT = 
"@andromda.struts.action.displayareascount";


-----------------------------------------------------------------Methods in 
StrutsActionLogicImpl.java:

    public boolean handleIsDisplayAreasMultiple()
    {
        Object value = 
findTaggedValue(Bpm4StrutsProfile.TAGGED_VALUE_ACTION_DISPLAYAREASCOUNT);
        if ( (value == null) || (Integer.parseInt(value.toString()) <= 1) )
                return false;
        return true;            
    }

    public Collection handleGetDisplayAreas()
    {
        Object value = 
findTaggedValue(Bpm4StrutsProfile.TAGGED_VALUE_ACTION_DISPLAYAREASCOUNT);
        if (value == null) 
                return Collections.EMPTY_LIST;
        Collection displayAreas = new ArrayList();
        int displayAreasCount = Integer.parseInt(value.toString());
        for (int i=0; i<displayAreasCount; i++)
                displayAreas.add(new Integer(i));
        return displayAreas;
    }


-----------------------------------------------------------------Method in 
StrutsParameterLogicImpl.java:

        public int handleGetDisplayAreaIndex() 
    {
        Object value = 
findTaggedValue(Bpm4StrutsProfile.TAGGED_VALUE_INPUT_DISPLAYAREAINDEX);
        if (value == null) 
                return -1;
        return Integer.parseInt(value.toString());      
    }

-----------------------------------------------------------------
Changes in StrutsActionJsp.vsl:

#if ($action.displayAreasMultiple)
            <table>
                <tbody>

##### Start Sunondo customization
                        <tr>
#foreach ($displayArea in $action.displayAreas)    ### For looping thru all the 
display area numbers
#set ($displayAreaCount = $velocityCount)
                            <td>
                                <table>
                                        <tbody>
##### End Sunondo customization

#foreach ($field in $nonTabbedActionParameters)

#if ( ($field.widgetType != "hidden") && ($field.displayAreaIndex == 
$displayAreaCount) )    #### 2nd clause to if condition added by Sunondo
                    <tr>
                        <td>
                            <bean:message key="$field.messageKey"/>#if ($requiredness) 
*#end
                        </td>
                        <td>
#renderFormField($action $field "                           ")
                        </td>
                    </tr>
#end
#end

##### Start Sunondo customization
                                        </tbody>
                                </table>
                            </td>
#end
                        </tr>
##### End Sunondo customization


---------------------------------------------------------------------
View this comment:
  http://team.andromda.org:8080/jira/browse/BPM-62?page=comments#action_10181

---------------------------------------------------------------------
View the issue:
  http://team.andromda.org:8080/jira/browse/BPM-62

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: BPM-62
    Summary: Patch for new feature to display fields in multiple display areas
       Type: Improvement

     Status: Open
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: Bpm4Struts Cartridge

   Assignee: Wouter Zoons
   Reporter: Sunondo Ghosh

    Created: Mo, 30 Aug 2004 6:44 AM
    Updated: Di, 31 Aug 2004 12:09 AM

Description:
I am submitting a new feature for BPM4Struts which will allow fields to be displayed 
in multiple display areas. Only two changes are needed in the model to use this 
feature:

1. Use the tag @andromda.struts.action.displayareascount
on the transition to specify the number of display areas on the screen.
e.g. @andromda.struts.action.displayareascount = 2

2. Use the tag @andromda.struts.view.field.displayareaindex
on the parameter to specify the index of the display area to be used for that 
parameter.
e.g. @andromda.struts.view.field.displayareaindex = 1

The implementation is to use multiple tables based on the the displayareascount within 
an outer table. Each of the inner tables displays the fields which match its index 
count.

I am including the files that were modified for this patch.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://team.andromda.org:8080/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to