It's a pretty lengthy page, but if you do a "Find" in your browser for "Replace Current" you'll eventually find the following information, under the Launch > Harness section:
Target — Define where the system will render the specified harness.
Replace Current — Replaces the current tab or dynamic container contents with the new harness.
Pop-Up Window — Displays the harness in a new browser window.
New Document — Opens the harness and replaces the current dynamic container contents.
Note that if the harness is launched outside a dynamic container, it always opens in a pop-up window.
With regards to the behavior you're seeing, does "Replace Current" work for you if you're launching the harness from somewhere other than a navigation rule? When you say that it doesn't work, what behavior do you see?
In response to your comment - " it seems that "New document" and "Replace Harness" would not matter, we can use both."
I think what matters here is whether you are using your Dynamic Container in a single document mode or multi-document mode.
When you use DC in the multidocument mode and specify 'New Document' - it should open the harness in a new tab in the container. If you use 'Replace Current', it should open the harness in the current tab in the container.
When you use DC in the single document mode, then 'Replace Current' and 'New Document' should behave the same.
Can you confirm that the DC is in multi-document mode and it still doesn't matter whether you use 'New Document' versus 'Replace Current'?
If you use DC in the single document mode, then 'Replace Current' and 'New Document' should behave the same. I don't expect to see a difference, the new document that you create will always replace the existing one in view. Have you tried out the multi-document mode and tested whether this statement holds true - "When you use DC in the multidocument mode and specify 'New Document' - it should open the harness in a new tab in the container. If you use 'Replace Current', it should open the harness in the current tab in the container."
Posted: 4 years ago
Updated: 4 years ago
Posted: 1 Feb 2016 4:21 EST Updated: 1 Feb 2016 4:41 EST
Another thing found with the replace harness is that, it works good on my portal i.e it loads in the work area, but when the same menu when used in my colleage's portal it replaces the entire screen instead of work area.
The only difference between my code and his code is that , he used dynamic container inside a container and I have used it directly without any container.
Which would be the right way to do it, if we follow his way then replace harness would not work and have to rely on New Document, and if we follow my way then New Harness and Replace Harness both works.
Or is it that I am missing something, which would actually get replace harness load in the work area instead of entire screen in my friends code.
I've been doing some testing over the past couple days to see if I could find an answer to your question. I did find that, in a tabbed scenario, "New Document" will open a new tab and "Replace Current" will put the harness you're launching into the currently displayed tab, but I don't think that answers your question. I've asked our community managers to see if we can get someone from a more specialized team to take look into this for you.
Can you let me know what is you requirement , because according to that we should choose the design.
For example ,When you are designing a portal then there are you are using the container directly harness of the portal or in that inside a section you are trying to use a DC.
As mentioned earlier when the multiDoc mode is used for DC , the replace current will replace the currently opened tab and replace this with the new content .
The new document mode will open the new tab and which can go for a maximum of 16 only(i.e how the PEga designer studio has been implemeted that after 16 new docs it shows a popup to close the other opened tabs)