ABAP: Get parent container
Hello,
In my action handler method I have an ID of the element that triggered this event, lets call it ELEMENT_A.
I need to get UI element (let's call it container_element) that contains ELEMENT_A.
I know that this container_element is type of cl_wd_transparent_container.
How can this be done?
Thank you.
Hi Georgy,
You could get reference to the UI element and then use GET_PARENT method to get the container. Ofcourse, you should use VIEW for this.
I have successfully used the following code to get refernce of a dropdown in a table. On similar lines, I guess you could get the container refernce.
data wd_table_cell_editor type ref to cl_Wd_view_element.
data wd_table_column type ref to cl_wd_table_column.
wd_table_cell_editor ?= wd_this->m_view->get_element( ID ).
wd_table_column ?= wd_table_cell_editor->get__parent( ).
DATA: THE_TABLE_CELL_EDITOR type ref to CL_WD_DROPDOWN_BY_KEY,
dropdown_value type string.
THE_TABLE_CELL_EDITOR ?= wd_table_column->GET_TABLE_CELL_EDITOR( ).
CALL METHOD THE_TABLE_CELL_EDITOR->GET_SELECTED_KEY
EXPORTING
CONTEXT_ELEMENT =
CONTEXT_NODE_PATH_NAME =
RECEIVING
VALUE = dropdown_value.
I have declared M_VIEW as an attribute(TYPE REF TO IF_WD_VIEW) in my view and used the following code in WDDOMODIFYVIEW method.
if first_time = abap_true.
wd_this->m_view = view.
endif.
Regards,
Srini.
Similar Messages
-
Get parent container size in renderer?
Hi,
I'm trying to add a variable number of same-sized Canvas
squares to the HorizontalList below:
<mx:HBox width="100%" height="50%" >
<mx:HorizontalList height="100%" width="60%"
dataProvider="{myData}"
itemRenderer="renderers.Topic" >
</mx:HorizontalList>
<mx:Canvas height="100%" width="40%" >
</mx:Canvas>
</mx:HBox>
I want the squares to be proportional such that as the app is
resized, the squares also grow or shrink in size. My item renderer
gets the size of the parent HorizontalList (via
BaseListData.owner.width) in order to calculate the dimensions of
each canvas square; as the app is resized, the size of the parent
changes and my square's dimensions are recalculated. However, it
seems that the size of the parent container isn't know until I
render some content but I can't render content until I know the
amount of real estate available in the parent. I missing something
basic here, right?
Thanks, GarryTurn it around. Instead of having the item renderer calculate
its width based on it's parent's width, have the HorizontalList set
the size of its children in updateDisplayList(). -
ABAP: Get super container of DROP_DOWN_BY_KEY
Hello,
I have some dynamic behavior on the screen that I am working on:
Transparent containers generated dynamically. Each of newly generated containers has a DROP_DOWN_BY_KEY.
When a user selects an item from that DROP_DOWN_BY_KEY I need to get reference to a container where this DROP_DOWN_BY_KEY is in.
Parameter WDEVENT of type CL_WD_CUSTOM_EVENT can access the following methods:
CONSTRUCTOR
GET_NAME
GET_BYTE
GET_CHAR
GET_FLOAT
GET_INT
GET_OBJECT
GET_STRING
GET_CONTEXT_ELEMENT
GET_DATA
Which one should be used to get reference to the container?
Is there a different way?
Thank you.Hello Armin,
It is a looooong way to wite it all up.
Shortly, there is a DROP_DOWN_BY_KEY that generates elements (input fields, DROP_DOWN_BY_KEYs, etc.). Each drop down should be able to change some elements that correspond to this drop down.
In order to know which elements shold be modified/touched I need to have a reference from each drop down to elements that correspond to each of the drop downs.
For example:
DROP_DOWN_ONE: element one, element two, element three
DROP_DOWN_TWO: element five, element six, element seven
DROP_DOWN_THREE: element eight, element nine element ten
DROP_DOWN_FOUR: element eleven, element twelve, ...
Each drop down with corresponding elements resides in individual transparent container.
so when a user selects some option from DROP_DOWN_THREE it should access only the following elements:
element eight, element nine element ten
I was thinking to get those elements from action since they reside in individual containers. Something like:
actionNAME->getParentUIElement ...
Thank you. -
Get Parent container to change child height on resize Event
Ok,
I've created a composite component called ResizableTextArea.
The parent is an extended class of Canvas called ResizableCanvas.
The child is an extended class of TextArea called myTextArea.
In myTextArea, there's an update function that makes the
textarea change it's height based on explicit height (how many
lines it actually has). when you add text, the height expands for
the new text. When you delete, the textarea's height shrinks to
contain the text. Beautiful.
Now, the parent, ResizeableCanvas, has a button that let's me
drag the width. The child's width is set to 100% of parent so it
resizes along with it. However, no matter what I try, when I resize
the parent canvas, the child textarea will not update its height.
I've tried everything I know and some, but nothing triggers
the change. Please assist!Sure, just focus on the last class, ResizableTextArea. Canvas
on the outside, Textarea on the inside. -
Nifty tip: How to get display container parent references to compile. (AS3)
Hello,
I appreciate the help I've received in this forum and wanted
to give back a little bit (am not familiar enough with AS3 yet to
answer questions).
Today I encountered a tricky problem in referencing a parent
container. The class structure was something like this:
class wrapper extends Sprite {
function wrapper() {
var displayChild = new displayChild();
addChild( displayChild );
function parentFunction() {
//Code here
class displayChild {
function childFunction() {
parent.parentFunction();
This code compiled and ran properly in standard mode. The
problem was that this type of structure wouldn't compile in strict
mode. It gave an error:
1061: Call to a possibly undefined method parentFunction
through a reference with static type
flash.display:DisplayObjectContainer.
The fix was to reference the parent like this:
function childFunction() {
var parentObj = parent;
parentObj.parentFunction();
However after putting this fix into three or four functions I
decided to make parentObj a global. Believe it or not, the
following wouldn't compile:
class displayChild {
var parentObj = parent;
In other words, the compiler would only accept the fix if the
parentObj reference was in a function.
Why would this be? Any takers?
It turns out that the parent object doesn't exist until the
constructor has completed running. We encountered this in Flash MX
when using embedded movie clips too. A movie clip or any display
object (in AS3) doesn't exist until it is completely loaded. If it
doesn't exist it doesn't have a parent. So the parent reference is
invalid at compile time. It is only valid at runtime. When we call
a function at runtime, the parent exists so we can assign it to
parentObj and use it to call the parent.
Luckily the compiler is forgiving enough to allow the
statement:
var parentObj = parent;
even though parent is undefined. But of course the compiler
has to allow this, otherwise it wouldn't allow us to assign any
undefined values to a variable.
Hope this is helpful to someone!
Cheers,
MarkHi,
Try this:
RootUIElementContainer - GridLayout, colCount=1, width=500px.
Goup1 - FlowLayout, colSpan=1, width=100%.
Group2 - FlowLayout, colSpan=1, width=100%.
Regards,
Satyajit.
Message was edited by: Satyajit Chakraborty -
Hi All ,
I have created a sample project using a link button which when clicked opens up an TitleWindow which has an iframe and a text area in a hbox
When you execute the application ,
Click the link button
The Popup window opens up showing the title window with the close button
Click the close button of the title window
The Title window is removed and the iframe and the text area are not visible
Do this a couple of times
You can notice that the iframe is still visible even when the title window is closed
Can someone explain me how this issue can be resolved and also explain me why the iframe(child container) is still visible when the title window(parent container) is not visible.
Main Application file
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
width="100%" height="100%" creationPolicy="all"
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical" creationComplete="init()"
xmlns:containers="containers.*">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
import containers.PopUpBrowser;
public function doRequest():void
var requestPopup:PopUpBrowser = PopUpManager.createPopUp(this, PopUpBrowser) as PopUpBrowser;
PopUpManager.addPopUp(requestPopup,this);
requestPopup.x = 220;
requestPopup.y = 50;
]]>
</mx:Script>
<mx:Text fontSize="14" fontWeight="bold" text="Click the link button below to open the Title Window" />
<mx:Spacer height="100"/>
<mx:LinkButton label="Click me" fontSize="16" fontWeight="bold" click="doRequest()"/>
</mx:Application>
PopUpBrowser.mxml Component
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow
xmlns:mx="http://www.adobe.com/2006/mxml"
close="removeMe()"
showCloseButton="true"
styleName="myTitleWindowStyle"
width="850" height="500"
title="Klout User Profile"
paddingTop="1" paddingBottom="1"
paddingLeft="1" paddingRight="1"
xmlns:generic="com.serendio.voom.components.generic.*"
xmlns:flexiframe="http://code.google.com/p/flex-iframe/"
horizontalScrollPolicy="off"
verticalScrollPolicy="off" >
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
public function removeMe():void
PopUpManager.removePopUp(this);
]]>
</mx:Script>
<mx:HBox width="100%" height="100%">
<flexiframe:IFrame source="http://www.google.com" id="iFrame" width="50%" height="100%"/>
<mx:TextArea text="Open and close the title window few times and watch the iframe remain visible even when the title window is closed"
fontSize="14" width="50%" height="80%"/>
</mx:HBox>
</mx:TitleWindow>
Thanks,
AjanthaHey,
This is working fine for me with the current 4.5 Flex, Firefox 3.6.12, IE8. On what browser you are getting this error.
Thanks,
Jayagopal. -
Hi all,
Is there any method to get parent component (container) of a jcomponent?Did you think to look at the API? Some method names are obvious. Other are not. The least you can do is try. All you had to do was find any method with the word "parent" in it.
-
Datagrid Scrolling Problem.. Does not fit into Parent Container..
Hi All,
I have a module and module contains only one datagrid. I am adding this module to tab navigator dynamically in the next index. I am using Text as Item renderer in the datagrid and the row height will change depending upon the data diplyed on the Text. When the data populate in datagrid the datagrid going beyond the containers layout. i.e height is not fit into parent container. I am using Canvas as parent container .. Please find the below attached pictures and you will get to know what is my problem?
Please help me to get out from this issue.. It is urgent..Thanks for quick reply
Here I am adding this module to canvas and the canvas is also dynamic . As you said "customize the measure() method in Text control and return the correct measuredHeight based on the explicitWidth." what is the relation between Text control height and datagrid? Datagird should take it's parent container width and heights. I am newbie to this Flex.. can you please explain it briefly. And if you have any Other way to do this please tell me .. it is very helpful to me.. Can you please post cusomized measure method if possible. please -
Problem with Jtree to xml tranform..how to set/get parent of a node?
Hi,
I am trying to develop xml import/export module.In import wizard, I am parsing the xml file and the display it in Jtree view using xml tree model which implements TreeModel and xml tree node.I am using jaxp api..
It is workin fine.
I got stuck with removal of selected node and save it as a new xml.
I am not able to get parent node of selected node in remove process,itz throwing null.I think i missed to define parent when i load treemodel.Plz help me out..give some ideas to do it..
thanks
-bala
Edited by: r_bala on May 9, 2008 4:44 AMthere's no way anyone can help you without seeing your code.
-
HashSet get() and contains() methods, by value or reference?
All the tutorials I've seen on HashSets use Strings as the object type. With Strings, it seems the get() and contains() methods work by value, not by reference.
<CODE>
String s1 = "dog";
String s2 = "cat";
String s3 = "dog";
HashSet<String> set = new HashSet<String>();
set.add(s1);
System.out.println(set.contains(s1)); //true;
System.out.println(set.contains(s2)); //false
System.out.println(set.contains(s3)); //true
</CODE>
But when I use a custom object, it works by reference:
<CODE>
MyClass c1 = new MyClass("dog", 1);
MyClass c2 = new MyClass("cat", 1);
MyClass c3 = new MyClass("dog", 2);
MyClass c4 = new MyClass("dog", 1);
HashSet<MyClass> myClassSet = new HashSet<MyClass>();
myClassSet.add(c1);
System.out.println(myClassSet.contains(c1)); //true
System.out.println(myClassSet.contains(c2)); //false
System.out.println(myClassSet.contains(c3)); //false
System.out.println(myClassSet.contains(c4)); //false
</CODE>
("MyClass" is a simple class that holds a String and an int).
Is there any way I can get the set to select by value rather than reference for objects that aren't String?
If so, is it possible that the value test could be customised, so that, for example, the above will return true if the String in MyClass is the same, regardless of the int value?803559 wrote:
With Strings, it seems the get() and contains() methods work by value, not by reference.
String s1 = "dog";
String s2 = "cat";
String s3 = "dog";
System.out.println(set.contains(s1)); //true;
System.out.println(set.contains(s2)); //false
System.out.println(set.contains(s3)); //true
Is there any way I can get the set to select by value rather than reference for objects that aren't String?Warning: Never use the term "by reference" around Java geeks. It makes 'em go all green at the gills and they start muttering about 'bloody C++ crossovers'.
However, as DrClap pointed out, you've mis-diagnosed the problem:
System.out.println(s1 == s1);
System.out.println(s1 == s2);
System.out.println(s1 == s3));would print out the exact same results.
For an explanation why, Google "Java String pool" or try [url http://stackoverflow.com/questions/3297867/difference-between-string-object-and-string-literal]here.
If so, is it possible that the value test could be customised, so that, for example, the above will return true if the String in MyClass is the same, regardless of the int value?Absolutely. But, as others have said, you'd need to override equals() and hashCode().
Winston -
How can i centre two side by side divs vertically so they both are in the centre of there parent /containing div? One of the divs is larger than the other so i would want the smaller one to centre inside a parent div like so:
Grey= parent/container (Width of both orange and red div)
Orange= Div 1
Red= Smaller div- centralised (hopefully)If you wanted to go completely "Not for IE8 or lower" and use some of the often overlooked viewport units, it could be very responsive to browser resizing...
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title> VW, it's not just a car for Mac users...</title>
<style>
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
#gray {
background-color:gray;
width:80vw;
margin:0 auto;
height:40vw;
font-size:2vw;
#red {
width:50%;
height:50%;
background-color:red;
margin-top:12.5%;
float:left;
#orange {
background-color:orange;
width:50%;
height:100%;
float:left;
</style>
<!--[if lt IE 9]>
<link href="IE-only.css" rel="stylesheet" type="text/css">
<![endif]-->
</head>
<body>
<div id="gray">
<div id="orange"></div>
<div id="red"></div>
</div>
</body>
</html> -
I have a panel (which contains buttons) which is added in another panel and this another panel is also added in another tab container and the tab is in a JFrame. Now, in panel which contains buttons, there is a button- CLOSE. Now,how can I dispose the parent (may be grand parent) container- JFrame from that class of panel (button panel).
HA HA...........but if the parents dont have the capability to save themselves and give the child a means to kill them..what to do? I just want to know HOW CAN A CHILD DO THAT so that I can take some measures for saving the parents....lol..
-
Get Parent node from Base member
Hi ,
My user select base member from CV .
I want parent node for that base member .
I am using =EVPRO( App name , memmber id , "PARENTH1" ) .
I am not getting parent member from this funcation .
Pls let me know any other way for this ?
regards,
PSRHi,
EVPRO for getting the value for PARENTH1 of any member should work. Please check whether you have included all the parameters of this function inside double quotes.
EVPRO("APPNAME","MEMBER_ID","PROPERTY")
Hope this helps,
Regards,
G.Vijaya Kumar -
Hi,
I am trying to migrate 6i libraries to 10g in Orcle forms, in one of the pll it is using below procedure.
In this it is calling wi_api_utility.get_parent_window procedure, which is part of d2kwutil.
Now I have to use webutil instead of d2kwutil, becuase d2kwutil will not supported for webforms.
Is there any same procedure avaialble in webutil to replace win_api's get_parent_window?
If anyone knows solution for this please help me.
Thanks.
PROCEDURE Window_On_Top (Window_Name IN WINDOW) is
hWnd PLS_INTEGER;
hParent PLS_INTEGER:=1;
iRC PLS_INTEGER;
BEGIN
hWnd := to_number(get_window_property(Window_Name,WINDOW_HANDLE));
hParent := win_api_utility.get_parent_window(hWnd,TRUE,FALSE);
IF hParent <> 0 THEN
hWnd := hParent;
END IF;
iRC := i_SetwindowPos(fh_SetWindowPos,hwnd,-1,0,0,0,0,19);
END;Hi,
Solved.
If alias name of parent databank always remains same, then you can directly use +"{{db.aliasName.ColumnName}}"+
Otherwise, to get parent databank alias name use
ScriptPackage parentScript= utilities.getCurrentVUSer().getParentUser().scriptPackage;
ArrayList<String> parentDB = parentScript.getDatabankAliases();
+info(eval("{{db."+ parentDB.get(0) + ".ColumnHeader}}"));+
Regards,
*Deepu M* -
Get parent Collectionset in create Collection
Hi All,
In Create Collection, How to get parent collectionset.
Thanks,
DungI think you want to post this in the Photoshop Lightroom forum (this is the Lightroom SDK forum, for plugin authors).
Or have I misunderstood the question? (collection:getParent() to get parent in lua code).
Or are you trying to call the catalog function to create a collection, but don't know what to use for parent collection set? If this is the case, then you will have to create a collection set if you can't find something suitable to act as parent (e.g. a selected collection set obtained from catalog:getActiveSources()). Reminder: parent parameter is optional - if omitted, then collection will be created in root of catalog (or publish service) - that's another option.
Most of my plugins that create collections create a collection set in the root, named after the plugin, and put all sub-collections/sets in it.
Maybe you are looking for
-
How to remove all PC Suite components from my PC?
1. PC Suite (ver. 7.0.7) doesn't seen my phone (5300), but PC plug'n'play do. 2. I've try to remove PC Suite with PC Cleaner 3.2, but forgot remove PC Suite in Windows Control Panel (Windows XP SP2). 3. And now I cannot install PC Suite again, 'couse
-
Font problem in Kindle for Mac
I am having a dastardly problem with the Kindle for Mac software. The text gets compressed into a single black blotch of text. (See this image for a screen shot: http://flic.kr/p/9r6kqw I am at a loss. I have uninstalled and reinstalled. I have valid
-
Play leading zero in generated prompt`
UCCX 7.0 Collecting ABA/Routing number from customer and reading back to them in a generated prompt: generator type - number constructor type - number, play full (false) It is then read to the customer via an Explicit Confirmation. However the playb
-
How can I customize the Single Sign On Page? Or do I have to create a new page in order to customize it? Thanks, -Stephanie
-
GI against cost center for consignment materials using BAPI_GOODSMVT_CREATE
Hi ALL, Can anyone help me what are the necessary fields i need to pass in the BAPI_GOODSMVT_CREATE for issuing goodsagainst cost center from consignment bucket. I passed SPEC_STOCK as 'K' in the debugg mode for consigment materials but it didn't wor