To delete this dynamically created symbol
Hello,
I dynamically created a symbol :
var vid = sym.createChildSymbol("video_holder", "Stage");
vid.getSymbolElement().html("<iframe src='//player.vimeo.com/video/44150607' width='500' height='281' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>");
vid.getSymbolElement().css({"margin":"auto", "top":"100px"});
the I want another button to remove that Symbol from Stage :
vid.deleteSymbol(); or sym.getSymbol("video_holder").deleteSymbol();
How to do it ?
thanks forever !
s.
1) About sym.getComposition().getSymbols().
It returns an array. So you have to browse it.
2) About vid.
This is the same name but two different variables.
Because they are only available within their own code panel.
To go further, see: http://learn.jquery.com/javascript-101/
You have to read: "scope" and "closures".
PS : je viens de voir que la vidéo est en français. Vous parlez français ?
Similar Messages
-
How to get a dynamically created symbol to delete itself on click?
Here's the setup...
I want to have a dynamically created symbol appear upon click of a hotspot. In this case, you click on a pulsating hotspot and a popup box appears.
Here's the code I'm using for that.
//Create an instance element of a symbol as a child of the given parent element
var mySymbolObject = sym.createChildSymbol("gardern_toxins_popup","stage");
So we have the symbol "garden_toxins_popup" from my library placed dynamically on the page. I would like to assign an action to the pop-up itself that allows you to remove the symbol from the stage upon click.
I feel silly for not being able to figure this out. I tried iterations of this bit of code...
//Get the stage from the composition level, get the symbol
sym.getComposition().getStage().getSymbol("garden_toxins_popup").delete();
...but it doesn't work.
So I tried thinking like I was back in Flash and tried the following...
this.parent.removeChild(this);
But no joy on that as well. Is there something I haven't addressed in this logic or am I going about it in the wrong way? Thanks!Hi, chirpieguy-
You'll want to use the deleteSymbol() API.
http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html
BTW, you should use the capitalized "Stage" to add it to the Stage - the lower case stage has a special meaning with Animate and might not give you what you want..
sym.createChildSymbol("gardentoxins", "Stage");
In the symbol itself, create a click event on a container div, then:
sym.deleteSymbol();
That being said, you don't need to dynamically create and delete an object. What you can do is to use hide() and show() on an element and use the coordinates of your click to change the CSS value of top/left of this object so that you don't have to do the object management I highlighted above.
Hope that points you in the right direction.
-Elaine -
Get the ID of a dynamically created symbol from library, INSIDE another symbol.
Hi everyone,
I'm trying to get the id from a dynamic created symbol from library.
When dynamically creating the symbol directly on the stage (or composition level), there's no problem.
But I just can't get it to work when creating the symbol inside another symbol.
Below some examples using both "getChildSymbols()" and "aSymbolInstances"
// USING "getChildSymbols()" /////////////////////////////////////////////////////////////////////////
// ON THE STAGE
var m_item = sym.createChildSymbol("m_item","Stage");
var symbolChildren = sym.getChildSymbols();
console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
// INSIDE ANOTHER SYMBOL
var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
var symbolChildren = sym.getSymbol("holder").getChildSymbols(); // Am i using this wrong maybe?
console.log(symbolChildren.length) // returns 0 so can't get no ID either
// USING "aSymbolInstances"" //////////////////////////////////////////////////////////////////////////
// ON THE STAGE
var m_item = sym.createChildSymbol("m_item","Stage");
console.log(sym.aSymbolInstances[0]); // ok (i guess) x.fn.x.init[1] 0: div#eid_1391854141436
// INSIDE ANOTHER SYMBOL
var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
console.log(sym.getSymbol("holder").aSymbolInstances[0]); // Javascript error in event handler! Event Type = element
In this post http://forums.adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you an array with all "names" when you create symbols"
Could it be this only works on the stage/ composition level only and not inside a symbol?
The following methods to achieve the same are indeed possible, but i simply DON'T want to use them in this case:
1) Storing a reference of the created symbol in an array and call it later by index.
2) Giving the items an ID manually on creation and use document.getElementById() afterwards.
I can't believe this isn't possible. I am probably missing something here.
Forgive me I am a newbie using Adobe Edge!
I really hope someone can help me out here.
Anyway, thnx in advance people!
Kind Regards,
Lester.Hi,
Thanks for the quick response!
True this is also a possibility. But this method is almost the same of "Giving the items an ID manually on creation and use document.getElementById() afterwards".
In this way (correct me if i'm wrong) you have to give it an unique ID yourself. In a (very) big project this isn't the most practical way.
Although I know it is possible.
Now when Edge creates a symbol dynamically on the Stage (or composition level) or inside another symbol it always gives the symbol an ID like "eid_1391853893203".
I want to reuse this (unique) ID given by Edge after creation.
If created on the stage directly you can get this ID very easy. Like this;
var m_item = sym.createChildSymbol("m_item","Stage");
var symbolChildren = sym.getChildSymbols();
console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
I want to do exactly the same when created INSIDE another symbol.
var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
Now how can I accomplish this? How can I get the Id of a dynamically created symbol INSIDE another symbol instead of created directly on the stage?
This is what i'm after.
Thnx in advance! -
Address dynamically created symbol
Hi - wondering how I can get the name of a dynamically created symbol (using CreateChildSymbol) so i can hide move and otherwise affect the symbols i have created.
any ideas?
thanks!This recent thread might help you out:
http://forums.adobe.com/message/5691752#5691752
Thanks,
-Elaine -
Addressing dynamically created symbols
I'm not sure what's the best way to address a specific dinamically created symbol because I don't see in Edge's API any way to get the symbol's instance name. The .getSymbol() method would be the easiest way to do it, but it takes the symbol "instance" name and I don't know which one it is. When I use .createChildSymbol() I just pass the symbol "type" name and the parent element name to be put inside but nothing about the symbol instance name that's been created. The .getChildSymbols() method doesn't help much because it retrieves "all" direct children instances found, and I have more than one and of different types.
I need to get one specific symbol among several I created dinamcally, so how should I do it best?
I'm thinking about using .getChildSymbols() and loop through them all, get the DOM of each symbol with .getSymbolElement(), then use the "class" attribute to at least identify the different types of children symbols retrieved. I now have a subset of children-brothers (symbols of the same type = class) and I can walk through them. At this point, my only hope to distiguish them is the z-index parameter I passed when I created the symbols using .createChildSymbol().
One other option would be to "save" the returned handler to each symbol created with .createChildSymbol() in an object like this { symbol: handler, name: "any name", created: "date/time", ... } and save them in an array of objects.
Any better ideas?Hi juicy_life,
store it into a symbol variable instance that I know will persist (the stage, maybe)
Looks like a global variable
It's just annoying you can get a symbol manually added to your edge animation by its "name" using .getSymbol(), but there is not an easy way to use that function with a dinamically created symbol
May be are you also an AS3 coder used to search through the display list accessing display objetc containers either by index (getChildAt()) or by name (getChildByName()).
mySym.aSymbolInstances will give you an array with all "names" when you create symbols with .createChildSymbol().
Thank you for this helpful information. I didn't know about it.
"name" (ID), something like this: #eid_1379485757227_mySymType
For a manually instantiated symbol symB, nested in symA, itself instantiated in the Stage Symbol, the fully qualified name (ID) is Stage_symA_symB.
It's useful to write a global function for the behavior (on click for example) shared by a group of buttons, provided you adopt a naming convention btn1, btn2, etc. Passing the event objet to that function, you can then recover the number of the clicked button via
evt.target.getAttribute("ID").substr()
This abstraction avoids duplicating the same code (differing only by the button number) on each button.
Gil -
How to delete a dynamically created context node ?
Hi
I have created a context node dynamically and have added the check boxes to the node.
But when i am refreshing the page it is giving me the following excepiton:
com.sap.tc.webdynpro.progmodel.context.ContextException: DataNodeInfo(DwdReportView.Person): duplicate name for attribute attr1
I am writing the following code in wdDoExit() method so that the node is invalidated and all dynamically added nodes and attributes are destroyed from the metadata.
The code is :
wdContext.getContext().reset(false);
or
wdContext.getContext().reset();
or
wdContext.nodeName().invalidate();
I have tried all the above mentioned code snippets but it is still giving me the same exception.
Please help me resolve this issue.
Thanks in advance.
Regards
ShailyShally,
A better forum to place your question is the forum.
To your question: the wdDoExit() method is only called once i.e. when the view is destroyed from memory. Just like the wdDoInit() mehtod is called only once at initialisation of the view.
Try refactoring your code, so that upon initialising of your context, the old version of it is removed.
Hope this helps.
Regards,
Alain -
How to control dynamically created symbols
Hi, I'm new in edge but thanks to adobe forum that helped me a lot.
I'm trying to use ".createChildSymbol" to bring my symbols from the library to my stage. And in each symbol I have an OUT label, so every time a new symbol is called by a particular button, the last one plays from OUT label and new one appears at the same place.
It's all easy for two symbols and I do not need to set any vaiable for them. But I have almost 180 symbols, and a menu of buttons to call them, so every button needs to play the OUT label of the current symbol and also plays the new one and make it as the current one.
I would be truly thankful if someone help me to fix this problem.
sym.test = sym.createChildSymbol("test", "Stage");
sym.getComposition().getStage().setVariable("current", "test");
var current = sym.getComposition().getStage().setVariable("current");
sym.current.getSymbolElement().css({position:'absolute', display:'inline-block', top:167, left:91});Ok, lets take a look at the code. I've changed the symbol names so it becomes a little more friendly.
So, I have an array of 4 animations ("animation1", "animation2", "animation3", "animation4") and an array of 4 buttons ("button1", "button2", "button3", "button4"). The names of the symbol instances are the things you have to change.
This is the code that goes inside Stage/compositionReady
var current_animation = null; // Index in array_options: 0=a, 1=b, 2=c, 3=d
var current_animation = null; // Index in array_options: 0=a, 1=b, 2=c, 3=d
var request_animation = null; // Index in array_options: 0=a, 1=b, 2=c, 3=d
var array_animation = ["animation1", "animation2", "animation3", "animation4"];
var array_buttons = ["button1", "button2", "button3", "button4"];
// Called by timeline.complete/location event inside each Animation
sym.playRequest_animation = function(){
sym.getSymbol("animationContainer").getSymbol(array_animation[request_animation]).play('lead_in');
current_animation = request_animation;
// Called on button click
sym.btnClick_animation = function(request_myAnimation) {
request_animation = request_myAnimation;
if(current_animation != null){
sym.getSymbol("animationContainer").getSymbol(array_animation[current_animation]).play('lead_out');
sym.getSymbol(array_buttons[current_animation]).play('option_exit');
else{
sym.playRequest_animation();
This bit of code goes at the trigger "click" inside all buttons:
sym.getComposition().getStage().btnClick_animation(0); // 0 index of array = a —> button1
sym.getComposition().getStage().btnClick_animation(1); // 1 index of array = b —> button2
sym.getComposition().getStage().btnClick_animation(2); // 2 index of array = c —> button3
sym.getComposition().getStage().btnClick_animation(3); // 3 index of array = d —> button4
There's also this code that enables the page, upon load, to open the first animation, therefore animating the first button (and disabling it) - it's located at the trigger "section_lead_in" wich only exists inside button1:
sym.getComposition().getStage().btnClick_animation(0); // 0 index of array = a
Finally, this block of code goes inside all animations and are located at 2000ms - during the process where the active animation as almost left the scene:
sym.getComposition().getStage().playRequest_animation();
Notice that, for the sake of organization, I have all my animations inside a symbol called "animation_Container".
Again, if you want, I can give you a hand with your files. Just post it.
Download the file again for an updated version.
P.S. I hope I didn't forget anything... -
We have all of our data in a Microsoft SQL server database and would like to load fabric options, and then color choices, based on this data. As fabrics are added, and/or color choices are updated, we would like Edge Animate to update automatically, without having to open the project and add/change options. Ultimately we would like to build an interactive designer that would then send all of the user's selections to us in an order. Is this possible?
There is no like, but contains
contains(LAST_NAME,'A') -
How to delete Dynamically created input field UI Element
Hi all,
I want to delete dynamically created input field and label.
Is there any method please tell.
Thanks in advance
HemalathaHi,
In the WDEVENT parameter of the action handler you can find the event id.
***Variables
DATA:
lv_selected type string. "Selected tab value
***Structure and internal table for the Events and messages
DATA:
lt_events type WDR_EVENT_PARAMETER_LIST,
ls_events type WDR_EVENT_PARAMETER.
***Field symbols
field-symbols: <fs_value> type any. "Attribute value in events table
***Move the event table to lt_events
lt_events = wdevent->parameters.
read table lt_events into ls_events with key name = 'SAVE'. "Button Id
if sy-subrc eq 0.
assign ls_events-value->* to <fs_value>.
if sy-subrc eq 0.
lv_selected = <fs_value>.
endif. "IF sy-subrc eq 0.
endif. "IF sy-subrc eq 0.
Regards,
Lekha. -
Hi Everyone,
It would be great if you can help me with the below.
Few days ago one of our content db went into suspect mode. Our DB team had resolved the issue. But one of the sites that was created probably around the same time is no more available. When I try to create a site on the same URL, I get the following
error.
Another site already exists at <URL>. Delete this site before attempting to create a new site with the same URL
When I try to delete the site or if I try to view the details of the site using Central Administration, I can find the site, but it doesn't display any details like Title, DB Name etc.
If I use stsad -o enumsites command to list ll the site, for the given site I get the following error:
<nativehr>0x80070002</nativehr><nativestack></nativestack>There is no Web named <URL>.
I am not even able to delete it using Powershell.
Please suggest.
Thanks,
UttkarshYou might be dealing with orphaned site. Go through the following blog post and see if it helps you delete the orphaned sites.
http://www.cjvandyk.com/blog/Lists/Posts/Post.aspx?ID=299
Amit -
This[id] doesn't see dynamically created objects????
Hey all!
If i have
<mx:Canvas id="TopCanvas" initialize="Init()">
<mx:Canvas id="VisibleCanvas" >
</mx:Canvas>
</mx:Canvas>
<fx:Script>
function Init(){
var NewO = new Canvas();
NewO.id="InvisibleCanvas";
TopCanvas.addChild(NewO);
if (this["VisibleCanvas"]){
//We can see non-dynamically created canvas
if (this["InvisibleCanvas"]){
//ERROR we cannot see the new one!
Help please! How to access dynamically created Canvases via their id? I know i can save linkage to them in array, but i need to do it through id.
Cheers!If you set the id property on a dynamically created instance, you can check
the id of an instance later if it happens to be a target of an event, for
example. But it will not be assigned to a variable in the document.
By default, MXML generates a non-dynamic class so you can't add properties
to it at runtime. You can set the name property and search the immediate
parent by calling getChildByName, but if the parent is not the document, you
still can't search the document. -
How to Position of a dynamically created child symbol.
Hello Everyone,
I created symbols instances on the stage by
for(alpha = 0; alpha < 5; alpha++)
sym.createChildSymbol("rect", "Stage");
Now I wanted to set the position of each symbol - The probelm is I don't know the names of the symbols instances that has been created. so I tried the following
childSymbols = sym.getChildSymbols();
for(k = 0; k < 5; k++)
childSymbols[k].css({"position":"relative","left":k*50});
it did not position the child symbols where i need it to be..
HOWEVER, when I tried to apply css to an element inside the symbol it worked.
for(k = 0; k < 5; k++)
childSymbols[k].$("Rectangle2").css({"position":"relative","left":k*50});
Please can anyone help..y = 0;
x = 30;
$.getJSON('slides.json', function(data){
for(alpha = 0; alpha < 5; alpha++){
var s = sym.createChildSymbol("rect", "Stage");
s.getSymbolElement().css({
"top": x+"px",
"position":"absolute",
"right": y*315+20+"px"
x+=100;
// y+=100;
}//for -
Appending values to dynamically created fieldsymbol
Hi ,
I have a requirement to append values to dynamically created fieldsymbols
from internal table .
I am using the following code but it dosnt work
<F4> declared as line of <dyn_table>.
loop at it_tab into wa_tab .( this contain the data to be appended to dyn fieldsymbol)
loop at it_fieldcat into wa_fieldcat. ( this contains the fieldnames )
case wa_final_fieldcat-FIELDNAME.
when 'AAA'.
v_field_name = 'AAA.
when 'BBB'.
v_field_name = 'BBB'.
endcase.
ASSIGN COMPONENT v_field_name of STRUCTURE wa_tab to <F4>.
endloop.
append <f4> to <dyn_table>
********************************************8
But only get one value i.e field BBB value appended to
<dyn_table>.
is there any way i can do the append to field symbol looping through internal
table ?
thanks
raji done it in alv so take the part you need .
1) to create dynamic table : CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
also create dynamic fieldcatalog .
2) you can pull data just one time from the DB to dynamic table
so i take the data in regulare it table and in the and i put it
in the dynamic table
hope i help , if you didnt understand some part , say so .
DATA : LT_FCAT TYPE LVC_T_FCAT ,
lo_struct TYPE REF TO data,
LV_STRUC_NAME TYPE TABNAME VALUE 'YMM_ST_TNUOT_MLY'.
REFRESH ls_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = LV_STRUC_NAME
I_BYPASSING_BUFFER = 'X'
CHANGING
CT_FIELDCAT = IT_COLUM_HEADER
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE e402(mo) WITH lv_struc_name.
EXIT.
ENDIF.
DATA INDX(3) .
IF G_COUNETR_NUMBER_OF_KOSTL > 0 .
DO G_COUNETR_NUMBER_OF_KOSTL TIMES.
INDX = SY-INDEX.
SHIFT INDX LEFT DELETING LEADING SPACE.
CONCATENATE 'KOSTL' INDX INTO LS_FCAT-FIELDNAME.
LS_FCAT-INTTYPE = 'I'.
LS_FCAT-COL_POS = 27 + SY-INDEX .
CONCATENATE TEXT-028 INDX INTO LS_FCAT-COLTEXT.
LS_FCAT-OUTPUTLEN = 10.
APPEND LS_FCAT TO IT_COLUM_HEADER.
ENDDO.
ENDIF.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_COLUM_HEADER
IMPORTING
EP_TABLE = GT_TABLE
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
ASSIGN GT_TABLE->* TO <DYN_TABLE>.
*--> Arbeitsbereich dynamisch erzeugen
CREATE DATA LO_STRUCT LIKE LINE OF <DYN_TABLE>.
ASSIGN LO_STRUCT->* TO <WA>.
LOOP AT IT_COLUM_HEADER INTO LS_FCAT.
IF LS_FCAT-FIELDNAME NE 'MANDT'.
ADD 1 TO LS_FCAT-COL_POS.
PERFORM TRANSLATE_HEADER.
MODIFY IT_COLUM_HEADER FROM LS_FCAT.
ENDIF.
ENDLOOP.
============= assigning to dynamic table
DATA : FIELD(10) ,
INDX1(3) .
DATA: WA_DREF TYPE REF TO DATA.
DATA : FS_SUM_GL LIKE LINE OF IT_YMM_ST_TNUOT_MLY.
CREATE DATA LP_DATA LIKE LINE OF <DYN_TABLE>.
ASSIGN LP_DATA->* TO <LS_LINE>.
LOOP AT IT_YMM_ST_TNUOT_MLY.
MOVE-CORRESPONDING IT_YMM_ST_TNUOT_MLY TO <LS_LINE>.
INSERT <LS_LINE> INTO TABLE <DYN_TABLE>.
ENDLOOP .
DATA L_COUNTER_ROLL TYPE I .
LOOP AT <DYN_TABLE> INTO <LS_LINE> .
MOVE-CORRESPONDING <LS_LINE> TO FS_SUM_GL.
CLEAR : FIELD , INDX1 , L_COUNTER_ROLL .
L_COUNTER_ROLL = 1 .
LOOP AT IT_EKKN WHERE EBELN = FS_SUM_GL-EBELN.
AND EBELP = FS_SUM_GL-EBELP.
IF SY-SUBRC = 0 .
INDX1 = L_COUNTER_ROLL.
SHIFT INDX1 LEFT DELETING LEADING SPACE.
CONCATENATE 'KOSTL' INDX1 INTO FIELD .
ASSIGN COMPONENT FIELD OF STRUCTURE <LS_LINE> TO <FS1>.
<FS1> = IT_EKKN-KOSTL .
MODIFY <DYN_TABLE> INDEX SY-TABIX FROM <LS_LINE> .
L_COUNTER_ROLL = L_COUNTER_ROLL + 1 .
ENDIF.
ENDLOOP .
ENDLOOP . -
Problem with embeding the same view in dynamically created view container
Hello Experts,
I am getiing a dump when i try to embed the same view inside the dynamically created view container of
dynamically created tabs of a tabstrip
The requirement go like this, i have 2 views in which i have have to embed the 2nd view to view1 where i have an empty
tabstrip without tabs. During runtime i create tabs as well as view containers accordingly and then try to embed view2 in tabs.
I have put the below mentioned code in HANDLEIN,
DATA: lref_vcntlr TYPE REF TO if_wd_view_controller,
lref_comp TYPE REF TO if_wd_component_usage,
lv_embed_pos TYPE string.
lref_vcntlr = wd_this->wd_get_api( ).
lv_embed_pos = 'FILE_PERS_EDIT/VC_GENERAL'.
TRY.
CALL METHOD lref_vcntlr->do_dynamic_navigation
EXPORTING
source_window_name = 'FILE_PERSISTENCE_WND' " Window
source_vusage_name = 'FILE_PERS_EDIT_USAGE_1' " Source View usage
source_plug_name = 'TO_EDIT_LAYOUT' " Outbound plug
target_view_name = 'PERS_EDIT_LAYOUT' " Second view to be embedded
target_plug_name = 'IN' " Second view inboun plug
target_embedding_position = lv_embed_pos
RECEIVING
component_usage = lref_comp.
CATCH cx_wd_runtime_repository .
ENDTRY.
wd_this->fire_to_edit_layout_plg( ).
This works fine for the first time.
However onaction tab select i change the embeding position( 'FILE_PERS_EDIT/view container name of different tab') of the view2 an try to embed view2 in a different tab.
At this point i get a dump stating View2 already present in the window 'FILE_PERSISTENCE_WND' of component.
I think, the view2 embediing has to be removed before i add the view2 in a different tab
Kindly let me know how to remove view2 embedding from tab1 before i add a view2 to a different tab or is there any other
means to handle this problem?
Thanks & Best Regards,
Srini.Hello Srini,
I found a solution to your problem, because I had a similar task.
In WDDOINIT I changed the method do_dynamic_navigation to if_wd_navigation_services_new~prepare_dynamic_navigation:
DATA:
l_view_controller_api TYPE REF TO if_wd_view_controller.
l_view_controller_api = wd_this->wd_get_api( ).
TRY.
CALL METHOD l_view_controller_api->if_wd_navigation_services_new~prepare_dynamic_navigation
EXPORTING
source_window_name = 'WDW_MAIN'
source_vusage_name = 'VW_SUB_USAGE_1'
source_plug_name = 'TO_VW_CONTENT'
target_component_name = 'ZTEST_DYNAMIC'
target_view_name = 'VW_CONTENT'
target_plug_name = 'DEFAULT'
target_embedding_position = 'VW_MAIN/VC_TAB.VW_SUB/TAB1_VC'
RECEIVING
repository_handle = wd_this->g_rep_handle.
CATCH cx_wd_runtime_repository .
ENDTRY.
wd_this->fire_to_vw_content_plg( param1 = 'TAB1' ).
In the action I first deleted the navigation targets, then navigated to the empty-view and last I called my target view:
DATA:
lv_position TYPE string,
l_view_controller_api TYPE REF TO if_wd_view_controller,
lr_view_usage TYPE REF TO if_wd_rr_view_usage,
lr_view_***_t TYPE wdrr_vca_objects,
lr_view_*** LIKE LINE OF lr_view_***_t.
l_view_controller_api = wd_this->wd_get_api( ).
lr_view_usage = wd_this->g_view->get_view_usage( ).
lr_view_usage->delete_all_navigation_targets( plug_name = 'TO_VW_CONTENT' ).
CLEAR lv_position.
CONCATENATE 'VW_MAIN/VC_TAB.VW_SUB/' old_tab '_VC' INTO lv_position.
TRY.
l_view_controller_api->if_wd_navigation_services_new~do_dynamic_navigation(
source_window_name = 'WDW_MAIN'
source_vusage_name = 'VW_SUB_USAGE_1'
source_plug_name = 'TO_EMPTYVIEW'
target_component_name = 'ZTEST_DYNAMIC'
target_view_name = 'EMPTYVIEW'
target_plug_name = 'DEFAULT'
target_embedding_position = lv_position ).
CATCH cx_wd_runtime_repository.
ENDTRY.
CLEAR lv_position.
CONCATENATE 'VW_MAIN/VC_TAB.VW_SUB/' tab '_VC' INTO lv_position.
TRY.
wd_this->g_rep_handle = l_view_controller_api->if_wd_navigation_services_new~prepare_dynamic_navigation(
source_window_name = 'WDW_MAIN'
source_vusage_name = 'VW_SUB_USAGE_1'
source_plug_name = 'TO_VW_CONTENT'
target_component_name = 'ZTEST_DYNAMIC'
target_view_name = 'VW_CONTENT'
target_plug_name = 'DEFAULT'
target_embedding_position = lv_position ).
CATCH cx_wd_runtime_repository.
ENDTRY.
wd_this->fire_to_vw_content_plg( param1 = tab ).
Ann.: I my example, I had 3 views: VW_MAIN which embedds VW_SUB. VW_SUB has the tabs in it and VW_SUB embedds VW_CONTENT.
BR,
Roland -
Dynamically creating a Record Group based on Previously entered Record Grou
Forms [32 Bit] Version 10.1.2.3.0 (Production)
Hi,
I know how to dynamically create a record group based on a query and putting the code in When new form instance.
My query is. I have a form which has multiple Record Groups and the user wants to dynamically create subsequent groups based on previous groups.
For example
I have a record group with selects a Location,
when the user selects the Location from a list of values
the 2nd record group called 'Cost Centres' will have to filter out only those with the locations selected above.
How can I populate the 2nd record group at run-time when I do not know what site the user will select?
If I simply populate in when new form instance as in location and just select everything, the list of values populates.
CC field is a LIST ITEM and the list style is a POP LIST, it is not required.
I have put the code in the Location field in the when-list-changed trigger.
I am getting this error:
frm-41337: cannot populate the list from the record group
here is the code:
DECLARE
v_recsql Varchar2(1000); -- The SQL for creating the Record Group.
v_recgrp RecordGroup; -- Record Group
v_status Number; -- Return Value of Populate_Group function.
c_where VARCHAR2(1000);
BEGIN
IF :location = '1' THEN
c_where := ' substr(cost_centre,1,2) in (''01'',''02'')';
ELSIF :location = '2' THEN
c_where := ' substr(cost_centre,1,2) in (''02'',''03'')';
ELSIF :location = '3' THEN
c_where := ' substr(cost_centre,1,2) in (''01'',''11'',''07'')';
ELSE
c_where := ' 1=1'; --EVERYTHING
END IF;
v_recsql := 'SELECT cost_centre, description FROM cost_centres where '||c_where;
-- Create the Record Group
v_recgrp := CREATE_GROUP_FROM_QUERY('v_recgrp', v_recsql);
IF NOT ID_NULL(v_recgrp)
THEN -- No Error, record group has been successfully created.
-- Populate Record Group
v_status := POPULATE_GROUP('v_recgrp');
IF v_status = 0
THEN -- No Error. Record Group has been Populated.
POPULATE_LIST('block.CC', 'v_recgrp');
END IF; -- IF v_status = 0
-- Delete the Record Group as it is no longer needed.
DELETE_GROUP('v_recgrp');
END IF; -- IF NOT ID_NULL(v_recgrp)
END;thanks for your assistance.Hi,
Once record status gets change for block you can not populate/repopulate the list item. Keep those list items as non-database item with different names and create different items as database orignal items. Than assign the values in WHEN-LIST-CHANGE trigger to the actual database items.
-Ammad
Maybe you are looking for
-
[solved] Problem with OSSv4 and Pragha/Consonance
Hi all, I am getting some problems having Pragha/Consonance work with oss: $ pragha -a oss -g /dev/dsp -m /dev/mixer ao_oss ERROR: Unrecognized channel name "samplerate INT" in channel matrix "samplerate INT" ao_oss WARNING: Input channel matrix inva
-
Budget error while creating delivery from sales order
hi Gurus, System is throwing error PB603 "Item 004 WBS element ABC-XXX budget exceeded" while creating delivery from sales order. I am picking material from unrestricted plant stock (not in project stock). I am also confused as sales order has 3 line
-
Error while updating lookup table through PSI
Hi, I am trying to update a lookuptable through PSI using following code : $lookupTableGuid = $svcPSProxy.ReadLookupTables($EPMTYString, 0 , 1033).LookupTables | where {$_.LT_NAME -eq $Lookuptablename} $lookuptable = $svcPSProxy.ReadLookupTablesbyUi
-
K9N2 SLI Platinum Blue Screen of Death when installing Windows XP
My hardware includes: • MSI K9N2 SLI Platinum Motherboard • Corsair XMS2 TWIN2X4096-6400C5 • GeForce 9800 GT 512MB GDDR3 • AMD Phenom X4 9850 Quad Core Processor, Black Edition 2.5GHz 4MB Cache 2000MHz [4000 MT/s] FSB • Ther
-
Workstation hangs during boot from OVM Server CD
Newbie here. Downloaded OVM and created bootable CD just this afternoon. The hardware is a Dell Precision 390 with 4gB RAM; 64bit technology (Intel EM64T); BIOS at 2.2.0; Intel Matrix Storage Manager (RAID5). Virtualization Technology option is "on".