Re: [D2W] Using a custom component inside ermodernlook
Ramsey Gurley <[email protected]> Tue, 24 Sep 2013 09:31:47 -0700
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
Why does your Payment page extend ERD2WPage? D2W pages are designed to handle generic EOs. If you're making a page for a specific entity, you're doing it wrong :) Maybe you want to use embedded D2W here to make something like a payment dashboard instead?
On Sep 24, 2013, at 3:23 AM, Giancarlo Dessena wrote:
> Hi Ramsey,
>
> I have tried your suggestions and it did not workout.
> Also I think it's not addressing my actuall Problem.
> As I said I'm trying to make a custom component reachable through the ERModernLook.
> To do so I have added these entries to the NavigationMenu.plist
>
> {
> name = Root;
> children = ("Home","Avatars", "Payment","SystemMessages");
> },
> {
> name = "Payment";
> action = "session.navController.showPayment";
> },
>
> and Added the showPayment method to the MainNavigationController
> public WOComponent showPayment(){
> return D2W.factory().pageForConfigurationNamed(Payment.class.getName(),session());
> }
>
> Here my Payment component:
> public class Payment extends ERD2WPage {
> public Payment(WOContext context) {
> super(context);
> }
> }
>
> According to the wo wiki i just have to add the following rules to make the component reachable:
> pageConfiguration = 'Payment' => entity = "ActivePayment" [WO:com.webobjects.directtoweb.EntityAssignment]
> pageConfiguration = 'Payment' => task = "QueryAll" [WO:com.webobjects.directtoweb.Assignment]
> pageConfiguration = 'Payment' => templateNameForInspectPage = "Payment" [WO:com.webobjects.directtoweb.Assignment]
> pageConfiguration = 'Payment' => navigationState = "Payment" [WO:com.webobjects.directtoweb.Assignment]
>
> I am confused. why Do I have to use ListActivePayment in my pageconfigutation name?
>
> further explanations would be very helpful :)
>
> Greetings Carlo
>
>
> Am 23.09.2013 um 18:24 schrieb Ramsey Gurley <[email protected]>:
>
>>
>> On Sep 23, 2013, at 7:20 AM, Giancarlo Dessena wrote:
>>
>>> Hello everybody,
>>>
>>> I'm yet again stuck with a D2W/ERModernLook Issue.
>>> I am trying to add a normal component to my D2W project by following this little how to:
>>> http://wiki.wocommunity.org/display/documentation/Adding+a+Normal+WOComponent+Page+to+an+ERModernLook+based+application
>>>
>>> I have managed to create and edit everything according to the tutorial, but unfortunately I still get this error:
>>>
>>> java.lang.IllegalStateException:
>>> Couldn't find the dynamic page named com.mycompany.adminD2W.ui.components.payment.Payment in your DirectToWeb model.task and entity is null, it seems that one model, maybe ERDirectToWeb d2w.d2wmodel is not loaded!
>>>
>>> I think it has to do with the extra rules that had to be adder to make it work:
>>> pageConfiguration = 'Payment' => entity = "ActivePayment" [WO:com.webobjects.directtoweb.EntityAssignment]
>>> pageConfiguration = 'Payment' => task = "QueryAll" [WO:com.webobjects.directtoweb.Assignment]
>>> pageConfiguration = 'Payment' => templateNameForInspectPage = "Payment" [WO:com.webobjects.directtoweb.Assignment]
>>> pageConfiguration = 'Payment' => navigationState = "Payment" [WO:com.webobjects.directtoweb.Assignment]
>>
>>
>> Correction, ListActivePayment, etc. Get rid of these rules. You're breaking things :)
>>
>>>
>>> Especially this one looks fishy:
>>> pageConfiguration = 'Payment' => entity = "ActivePayment" [WO:com.webobjects.directtoweb.EntityAssignment]
>>>
>>> When I open the rule editor is shown as a com.webobjects.directtoweb.Assignment:
>>> <PastedGraphic-3.png>
>>> If I open it with a text editor instead I can clearly see the EntityAssignment class in the rule:
>>> <PastedGraphic-4.png>
>>>
>>> What could I possibly be doing wrong here? Is this even the right way to add a non D2W Component to the ERModernLook?
>>>
>>> Any Help is appreciated :)
>>>
>>> Greetings Carlo
>>>
>>> PS Fabian if you are reading this thank you for your input. I still have to go through your replies as I'am currently stuck with this issue here ;)
>>> ------------------------------------------------------------------------------
>>> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
>>> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
>>> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
>>> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk_______________________________________________
>>> Wonder-disc mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc
>>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> _______________________________________________
> Wonder-disc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wonder-disc
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk