hi!

to remove the need of tagged values twice, what do you think about creating a function let say getAttributesFromController():Collection within the StrutsControllerOperation which takes the controller and find all the attributes with the same name as the parameters of the operation?



[EMAIL PROTECTED] wrote:
hi Carlos,

I have been thinking about this too, but you can easily run into ugly problems this way ... it will take too long to explain, but bottom line is that the tagged value annotations belong to the transitions and not on the operation (conceptually speaking that is), the fact that something is validated is dependent also on _when_ it is supposed to be validated

in fact, we do not need to have these annotations on the operation arguments but for now I do this because it is much easier and performant for the metafacades

I will try to remove this later, lemme explain:
there are two types of tagged values that need to be copied right now:

1. field.type = select
will generate a getXXXBackingList method in the form interface

remember: each action has a form, and that form implements an interface for each operation to which it defers. the action form typically only contains the fields modeled in the transitions

the backing list can be detected automatically, by checking all action parameters with the same name and looking at their tagged values, if there is a 'select' type than we add it in the form interface too;
the problem is that ALL forms implementing this interface need to have that method implemented too, even if they are never supposed to use it (because it was not modeled like that on the action; so the action form would have an additional field that was never modeled) ... but that's not a problem, its something extra that in the worst case can confuse the developer



2. table.columns = x,y,z
makes it possible to generate a dummy implementation

this one is trickier, but I think it is possible to avoid this one too .. I don't know with 100% certainty yet what will happen with other parameters/page-variables with the same name, it can get quite complex if you have decision nodes and circular graphs for your use-cases


anyway, this is something I am working on ... I find it interesting to see that formal descriptions of process logic (using UML in this case) can lead to ambiguous situations w/ a technology such as Struts


more on this later :-)

-- Wouter

Carlos Cuenca <[EMAIL PROTECTED]> wrote:

  
Hi Wouter,


I had been looking at your changes, and there is one thing in the new 
version that does not convince me. It is about the needed of model 
attributes on Transitions and model them again in the controller 
operation. This is also a problem, because as you told to Stefan last 
28.9, one of the limitations of AndroMda for the UML is that it must 
have triggers on transitions and parameters on triggers.
My idea is that if an operation can be deferred only in one action 
State, you could change the method to take the parameters from the 
operation and not from the transition, in this way, also the tagged 
values should be specified on the parameters of the operation.
For the collections cases, if the operation return a collection and it 
is invoqued in an operation with an outgoing transition, then this will 
be mapped as a display tag....

I don't know if it is possible.....

Carlos



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

    

__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user


  

Reply via email to