Skip to Content

How to delete WD component usage?

Hello SDN.

We have a WDJ application consists of two WD components: one component is the list of business objects (ListComp) and the second one is the screen with object's attributes (ScreenComp). The application separated to two components since ScreenComp has to be reusable. ListComp used ScreenComp with "onDemand" flag. ScreenComp has a lot of fields and table fields with OVS. For OVS we have developed separate WD comp (GenericSH) and some Java classes which help us to cofigure OVSes. GenericSH is used in ScreenComp with flag "manual". OVSes configured in Component controller of ScreenComp.

OVSes configured and created with usage.createComponentUsageOfSameType() while ScreenView is called. OVSes deleted with usage.deleteComponent() when user leaves ScreenView.

But if user leaves ScreenView and then calls this view again the following error occured:

Cannot create object with the name workKind and rolenameComponentUsages because it already exists.

(workKind is the name of the OVS usage)

So how we can properly delete component usage and then create it again?

We're working with NW 7.31

Regards,

Lev

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 11, 2014 at 04:34 PM

    i think you should use createComponent

    Add a comment
    10|10000 characters needed characters exceeded

    • I thought about this. But the problem is there not two OVSes, two were for example. In fact there are 20 fixed OVSes and some OVSes for dynamically generated fields. I'm just curious what problems with createComponentUsageOfSameType(). Is it limits of WD framework to delete such usages or I miss something. Is it good way to create usage with this method and name+current timestamp (just to be sure it will be unique)?

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.