• 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: Trying to create a dynamic url with the components action?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to create a dynamic url with the components action?


  • Subject: Re: Trying to create a dynamic url with the components action?
  • From: Lachlan Deck <email@hidden>
  • Date: Sun, 6 May 2007 15:12:54 +1000

Hi James,

On 06/05/2007, at 8:30 AM, James Cicenia wrote:

I am needing to create my own URLs dynamically that call a components method.
How do I do this?

I assume you've a reusable component you're wanting to drop on a page?

Say I have a component that renders the url that is for the delete method in that component?

perhaps something like this is what you're after.

-- html --
<webobject name="CanDelete"><webobject name="DeleteAction">...</ webobject></webobject>


-- wod --
CanDelete: WOConditional {
	condition = hasDeleteableParent;
}
DeleteAction: WOHyperlink {
	action = deleteAction;
}

-- java --
public WOActionResults deleteAction() {
	return deleteableParent().deleteRecord();
	// or
	return performParentAction( "relevantKey" );
}

public YourInterface deleteableParent() {
return parent() instanceof YourInterface ? ( YourInterface )parent () : null;
}


public boolean hasDeleteableParent() {
	return deleteableParent() != null;
}

with regards,
--

Lachlan Deck



_______________________________________________
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


  • Follow-Ups:
    • Re: Trying to create a dynamic url with the components action?
      • From: James Cicenia <email@hidden>
References: 
 >Trying to create a dynamic url with the components action? (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: "Clean" SQL (Avoid multiple reference to a table)
  • Next by Date: Re: Trying to create a dynamic url with the components action?
  • Previous by thread: Trying to create a dynamic url with the components action?
  • Next by thread: Re: Trying to create a dynamic url with the components action?
  • Index(es):
    • Date
    • Thread