• 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: WODisplayGroup advice needed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WODisplayGroup advice needed


  • Subject: Re: WODisplayGroup advice needed
  • From: David LeBer <email@hidden>
  • Date: Thu, 24 Nov 2005 12:19:14 -0500

On 24-Nov-05, at 11:47 AM, Rick Innis wrote:

I'm using a WODisplayGroup to show a summary list of some records in my application. The records are basically application forms that have been completed on-line and need to be reviewed before further processing. WODisplayGroup works quite nicely for this because I can easily switch criteria to view different form types and scroll forward and backward through batches of forms. I'm using a WORepetition to display the summary lines, iterating over displayedObjects.

What I'm having a hard time with is identifying the object that's displayed in a particular row in the WODisplayGroup. What I want to do is provide a way to let the user go from the summary line to the full form.

Because you are using a WORepetion you really don't need to worry about he WODisplayGroup at all at this point. You should already have a reference to the Object you need.


Assuming the 'item' binding of your WORepetition is bound to 'recordItem'

Wrap a WOHyper link around some attribute in the WORepetition (ie: recordItem.recordNumber) and bind it's action binding to something like this:

public WOComponent editInFullForm() {
	FullForm nextPage = (FullForm)pageWithName("FullForm");
	nextPage.setRecord(recordItem);
	return nextPage;
}


However as I'm only displaying a summary list I can't use nextObject and previousObject, and there doesn't seem to be any way of easily relating a row on the screen to an object in the display group. My current approach is to use a form and submit button on each row, with a hidden field that identifies the object on that row. The button invokes an action in the WebObject that returns the page that displays the full form details. I've kludged together something that lets me retrieve the current index of displayGroup.displayedObjects thinking I could use that to retrieve the object from displayedObjects in the action method.

Problem is, in the action method displayGroup.displayedObjects returns an empty array. As does displayGroup.allObjects. Even if I stash 'em in an instance variable when the page is first displayed.

Could just be there's something simple and obvious I'm overlooking. Sure hope so :-)

HTH

--
;david

--
David LeBer
Codeferous Software
'co-defer-ous' adj. producing or containing code
site:   http://www.codeferous.com
blog: http://david.codeferous.com




Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: WODisplayGroup advice needed
      • From: Rick Innis <email@hidden>
References: 
 >WODisplayGroup advice needed (From: Rick Innis <email@hidden>)

  • Prev by Date: Re: newbie q: multiple fields insertion?
  • Next by Date: Re: WODisplayGroup advice needed
  • Previous by thread: WODisplayGroup advice needed
  • Next by thread: Re: WODisplayGroup advice needed
  • Index(es):
    • Date
    • Thread