As the WODynamicGroup is in a private package (com.webobjects.appserver._private.WODynamicGroup) it is not listed in the "official" WO Reference so I think I am not the only one who did not know about its existence. It adds to the WODynamicElement mainly two interesting methods:
public WOActionResults invokeChildrenAction(WORequest aRequest, WOContext aContext); public void takeChildrenValuesFromRequest(WORequest aRequest, WOContext aContext);
As Peter hinted these two methods will take over the duty to pass all necessary messages to any children elements that are enclosed by the dynamic element. Perhaps these findings can help someone else too.
Thanks again for your help! jw Am 06.08.2007 um 14:04 schrieb Johann Werner:
I changed it to a stateless, nonsynchronizing element already as Chuck suggested and it works as expected now. I thought of using WODynamicElement for all elements that do not contain other elements (and where appropriate of course) whereas to use a stateless, nonsynchronizing WOComponent for all other cases from now on. But I will gice it a try in making my component extend a WODynamicGroup in the next days and report back. Would be great to be able to switc back to dynamic elements as they seem to be favorably from the point of view of performance and memory (this is implicated in Chuck's book at least).jw Am 06.08.2007 um 03:21 schrieb Peter Vandoros:Try making your dynamic element extend WODynamicGroup instead. I think this element will pass on the messages correctly. Like a WOComponent does.Regards Peter Johann Werner wrote:Hi list,I am trying to create some of the components I use in my app as dynamic elements. Though being quite successful I encountered a problem I could not resolve: I created a dynamic component "JWTable" that writes a html table tag and will have child elements in it. Now I wrapped that element within a WOForm and added some submit buttons as child elements of JWTable:<webobject name = "WOForm1"> <webobject name = "JWTable1"> … <tr> <td> <webobject name = "WOSubmitButton1" /> <webobject name = "WOSubmitButton2" /> </td> </tr> </webobject> </webobject> JWTable1 : JWTable { } WOForm1 : WOForm { multipleSubmit = true; } WOSubmitButton1 : WOSubmitButton { action = doOne; value = "1"; } WOSubmitButton2: WOSubmitButton { action = doTwo; value = "2"; }Unfortunately when clicking a button the invokeAction of the main component (that has the corresponding action methods implemented) calls the invokeAction of the dynamic element (as the submit buttons are children of it). But this results into the situation that the action methods are not found and null is returned instead.Is there any way to make WO call the actions in the parent without hardcoding the functions (as then it wouldn't be a generic component anymore)? Calling something as context.component ().invokeAction(…) doesn't help as this will bounce back the call leading to an infinite loop. I did not find any example that covers this case. Or do I have to implement JWTable as stateless component instead?jw-------------------------------------------------------------------- ----_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/peter% 40etechgroup.com.auThis email sent to [EMAIL PROTECTED]-- Peter Vandoros Software Engineer Etech Group Pty Ltd Level 3/21 Victoria St Melbourne VIC 3000 Australia Ph: +61 3 9639 9677 Fax: +61 3 9639 9577 ----------------------------------IMPORTANT: This e-mail message and any attachments are confidential and may be privileged. If received in error, please reply to this message and destroy all copies and any attachments. You should check this message and any attachments for viruses or defects. Our liability is limited to resupplying any affected message or attachments. For more information about Etech Group, please visit us at http://www.etechgroup.com.au._______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/werner% 40isd.uni-stuttgart.deThis email sent to [EMAIL PROTECTED]_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/werner% 40isd.uni-stuttgart.deThis email sent to [EMAIL PROTECTED]
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
