thanks but I have a problem. this works as documented:
100 : pageConfiguration = 'CreatePerson' => displayPropertyKeys = ("[Page1]",
"(Name)", "firstName", "lastName", "[Page2]", "(Address)", "addressLine1",
"addressLine2", "personCity", "personState", "personZip", "login", "password",
"email", "startDate", "endDate", "current", "security.canCreateInvoice",
"security.canEditPerson") [com.webobjects.directtoweb.Assignment]
however, with the edit page, it blows up:
100 : pageConfiguration = 'EditPerson' => displayPropertyKeys = ("[Page1]",
"(Name)", "firstName", "lastName", "[Page2]", "(Address)", "addressLine1",
"addressLine2", "personCity", "personState", "personZip", "login", "password",
"email", "startDate", "endDate", "current")
[com.webobjects.directtoweb.Assignment]
Error: <com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException message
'<com.eltek.model.Person 0x69e18938> valueForKey(): lookup of unknown key:
'[Page1]'. This class does not have an instance variable of the name [Page1] or
_[Page1], nor a method of the name [Page1], _[Page1], get[Page1], or
_get[Page1]' object '<com.eltek.model.Person pk:"2">' key '[Page1]'>
Reason: <com.eltek.model.Person 0x69e18938> valueForKey(): lookup of unknown
key: '[Page1]'. This class does not have an instance variable of the name
[Page1] or _[Page1], nor a method of the name [Page1], _[Page1], get[Page1], or
_get[Page1]
I referenced the wiki and found:
http://wiki.wocommunity.org/display/documentation/Using+ERD2WWizardCreationPage
which seems to imply that this technique should work the same on create or edit
pages. I thought it was a typo, so I duplicated the rule for CreatePerson
(which is working) and reapplied it to EditPerson. Same problem.
any ideas?
On Sep 22, 2014, at 4:06 PM, Fabian Peters <[email protected]> wrote:
> Hi Ted,
>
> It's just a different format for specifying the tab:
> <http://jenkins.wocommunity.org/job/Wonder/javadoc/er/directtoweb/pages/ERD2WPage.html>
>
> You could rewrite it as:
>
> pageConfiguration = 'CreateLineItem' => displayPropertyKeys =
> (("chooseInventory","inventory"), ("editValues","cost","msrp"))
>
> Fabian
>
> Am 22.09.2014 um 19:43 schrieb Theodore Petrosky <[email protected]>:
>
>> ok where does this come from?
>>
>> pageConfiguration = ‘CreateLineItem’ => displayPropertyKeys =
>> (“[chooseInventory]”,”inventory”,”[editValues]”,”cost”,”msrp”)
>>
>> I am referring to the square brackets! I have never seen them used in a
>> displayPropertyKeys array.
>>
>> Maybe I am thinking of this wrong. What I thought I wanted was that when I
>> ask for a new line item, the attributes would be empty. If I chose a
>> selection from inventory, this objects values would get copied into the line
>> item. Of course I don’ t have to select from the inventory, I could just
>> start filling in the fields.
>>
>> On Sep 19, 2014, at 4:47 PM, Ramsey Gurley <[email protected]> wrote:
>>
>>> So you have
>>>
>>> Inventory
>>> -qty
>>> -cost
>>> -msrp
>>> ->>lineItems
>>>
>>> LineItem
>>> -cost
>>> -msrp
>>> ->inventory
>>>
>>> You could set that up as a wizard creation page, something like
>>>
>>> pageConfiguration = ‘CreateLineItem’ => displayPropertyKeys =
>>> (“[chooseInventory]”,”inventory”,”[editValues]”,”cost”,”msrp")
>>>
>>> Such that you have to choose the inventory item and then proceed with
>>> editing the other values. Then do the validationKeys thing for Modern to
>>> copy your values. (In ponder, you’d override the _nextStep method on your
>>> subclass of R2DDefaultBranchDelegate.)
>>>
>>> Then on save, you could adjust your inventory quantity in willInsert.. or
>>> maybe not. I don’t remember if willInsert is called a second time after a
>>> validation failure. (Or in ponder, you could override _save on your
>>> subclass of R2DDefaultBranchDelegate.)
>>>
>>> On Sep 19, 2014, at 12:42 PM, Theodore Petrosky <[email protected]> wrote:
>>>
>>>> I need to use a "select from inventory” kind of component. I have
>>>> inventory that has some attributes (quantity on hand, sell price, purchase
>>>> price, etc).
>>>>
>>>> I want to present the user with a popup that lists the inventory
>>>> (obviously this is a rather short list). When you select an inventory
>>>> object, the pertinent attributes are copied to the line item entity. I
>>>> want to copy these attributes to the line item as I may want to adjust
>>>> (override) the values on a single report. Or if the purchase price of an
>>>> inventory item changes, i do not want old reports (invoices) to show these
>>>> new values.
>>>>
>>>> I am using this as an example to show a perspective client, and to push
>>>> myself to learn more D2W. I think if I were in a regular wonder app, I
>>>> could cobble something together, but I want to learn more in D2W.
>>>>
>>>> Ted
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>>>>
>>>> This 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:
>> https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com
>>
>> This 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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]