History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: BPM-25
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Wouter Zoons
Reporter: Wouter Zoons
Votes: (View)
Watchers: (View)
Operations

If you were logged in you would be able to see more operations.
Bpm4Struts Cartridge

display tag dynamic link decorator

Created: 10/Aug/04 06:36 PM   Updated: 28/Aug/04 02:41 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. Zip Archive templates.zip (6 kb)



 Description   
[from Carlos]

I had modified the M2 version to include the Dynamic link functionality
for the display tag. This is done creating a TableDecorator Wrapper bult
in the controller class. (As the bean for the displayTag)
The solution is basically to add two tagged value to a <<FrontEndEvent>>
to map it with a incoming parameter Collection which is rendered as a
display tag. On this way there is syncronization between the model and
the generated code...When they are present, the displaytag will have a
dynamic link colum, when not, a normal form will be done ... no need to
change anything in the model.

two new stereotypes are implemented within the BPM4Struts profile:

public static final String TAGGED_VALUE_TABLE_TRANSITION =
"@andromda.struts.view.table.transition";
this is to indicate that a <<FrontEndEvent>> should be mapped within a
displaytag
    public static final String TAGGED_VALUE_TABLE_NAME =
"@andromda.struts.view.table.name";
the name of the displaytag (a incoming collection) in which this action
will be mapped

-two new methods to the StrutsAction Metafacade:
    getDisplayTagName: returns a valid incoming collection that it is
mapped as a display tag
    isDisplayTag: tells if an action is a displaytag action or not (in
case it is, it wont be mapped neither as a form nor as hyperlink)

... the methods implementation on the StrutsActionLogicImpl:
    public boolean handleIsDisplayTag()
        {
            Object value =
findTaggedValue(Bpm4StrutsProfile.TAGGED_VALUE_TABLE_TRANSITION);
            System.out.println(value);
            return isTrue(value == null ? null : value.toString());
        }

public String handleGetDisplayTagName()
        {

System.out.println(String.valueOf(this.findTaggedValue(Bpm4StrutsProfile.TAGGED_VALUE_TABLE_NAME)));
        return
String.valueOf(this.findTaggedValue(Bpm4StrutsProfile.TAGGED_VALUE_TABLE_NAME));
        }

then everything is processed with the templates attached.

 All   Comments   Change History      Sort Order:
Comment by Wouter Zoons [11/Aug/04 08:52 AM]
contains StrutsJSP.vsl, StrutsActionJsp.vsl and StrutsController.vsl

Comment by Wouter Zoons [13/Aug/04 10:03 AM]
I will not put the decorator in the controller because that way we would make the controller dependent on the display:* taglib

the decorator is getting its own template

Comment by Wouter Zoons [13/Aug/04 12:59 PM]
still need to commit, but this feature has been verified to work on the animal quiz
I will close this issue once everything is in CVS

Comment by Wouter Zoons [28/Aug/04 12:04 AM]
we can get rid of the decorator, I think it is a bad practice to have links rendered in that class; for calculations and special behavior it would be better suited