• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: actions contained within WODynamicElement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: actions contained within WODynamicElement


  • Subject: Re: actions contained within WODynamicElement
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 3 Aug 2007 06:34:23 -0700

And unless you need some sort of very low level access to the bindings, there is really very little reason to go to the extra effort of a WODynamicElement. Stateless components are a better choice.

Chuck

On Aug 3, 2007, at 5:57 AM, 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@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >actions contained within WODynamicElement (From: Johann Werner <email@hidden>)

  • Prev by Date: Re: actions contained within WODynamicElement
  • Next by Date: Re: which blogs to read?
  • Previous by thread: Re: actions contained within WODynamicElement
  • Next by thread: Re: actions contained within WODynamicElement
  • Index(es):
    • Date
    • Thread