Dynamic node Creation Problem
Hi all,
I am trying to create a node through Java code bellow is the code
IWDNodeInfo graph = wdContext.nodeGraph().getNodeInfo();
for(int i=0;i<10;i++)
int nodeNumber = i+4;
IWDNodeInfo seriseNode = graph.addChild("Serise"+nodeNumber,null,true,false,false,false,false,false,null,null,null);
seriseNode.addAttribute("S"+nodeNumber+"_size","com.sap.dictionary.double");
seriseNode.addAttribute("S"+nodeNumber+"_xVal","com.sap.dictionary.double");
seriseNode.addAttribute("S"+nodeNumber+"_yVal","com.sap.dictionary.double");
//seriseNode.addAttribute("S"+nodeNumber+"_tooltip","com.sap.dictionary.string");
IWDNode node = wdContext.nodeGraph().getChildNode("Serise"+nodeNumber,IWDNode.NO_SELECTION);
IWDNodeElement nodeElem = node.createElement();
nodeElem.setAttributeValue("S"+nodeNumber+"_xVal",new Double(0));
nodeElem.setAttributeValue("S"+nodeNumber+"_yVal",new Double(0));
nodeElem.setAttributeValue("S"+nodeNumber+"_size",new Double(0));
node.addElement(nodeElem);
IWDNode node = wdContext.nodeGraph().getChildNode("Serise4",IWDNode.NO_SELECTION);
node.getCurrentElement().getAttributeAsText("S4_size");
now it is giving me null pointer exception at last line any idea why it coming.
Thanks
Hi,
This problem is solved but now there is another problem,
I am creating a Node and attributes at runtime and want to bind to a business graphics UI element bellow is the code for that
IWDPoint se_point = (IWDPoint) view.createElement(IWDPoint.class,"Series"+seriseNumber+"_Point");
se.setPoint(se_point);
se.getPoint().bindValueSource("Graph.Serise"+seriseNumber);
se.setLabel(supp.getSupplier_Name());
IWDNumericValue numXVal = (IWDNumericValue) view.createElement(IWDNumericValue.class,"S_"+seriseNumber+"numXVal");
numXVal.bindValue("Graph.Series"+seriseNumber+".S"+seriseNumber+"_xVal");
numXVal.setType(WDValueTypeEnumeration.X);
numXVal.setValue(supp.getXcord());
and it gives bellow error for last line in the code
com.sap.tc.webdynpro.progmodel.context.ContextException: Node(GraphView.Graph): no child node 'Series1' at index -1
Can any one help in this
Thanks
Similar Messages
-
Dynamic node creation from RTTI structure and dynamic mapping
Hi,
I'd like to create a dynamic node in my component controller then map this node to a node in my view and bind it to a dynamic table.
I create the dynamic node in my component controller using the add_new_child_node method :
CALL METHOD root_node_info->add_new_child_node
EXPORTING
name = 'MY_TABLE'
static_element_rtti = struct_type
is_static = ABAP_true
RECEIVING
child_node_info = node_info
Then I use the add_new_mapped_child_node method to map the node in the view :
* Map the context node dynamically
wa_path = 'COMPONENTCONTROLLER.MY_TABLE'.
insert wa_path into table tab_mapping_path.
stru_mapping_info-controller = 'COMPONENTCONTROLLER'.
stru_mapping_info-path = tab_mapping_path.
lo_node_info = wd_context->get_node_info( ).
CALL METHOD lo_node_info->add_new_mapped_child_node
EXPORTING
child_name = 'MY_TABLE'
mapping_info = stru_mapping_info
receiving
child_node_info = lo_dyn_node_info
The child node is created in my view context but it doesn't have any attribute or static element RTTI.
Do I have to add each attribute with the add_attribute method and then the add_new_mapped_child_node method will copy them over?
Regards,
PierreProblem solved, the path was not good :
* Map the context node dynamically
* wa_path = 'COMPONENTCONTROLLER.MY_TABLE'.
* insert wa_path into table tab_mapping_path.
stru_mapping_info-controller = 'COMPONENTCONTROLLER'.
* stru_mapping_info-path = tab_mapping_path.
append 'COMPONENTCONTROLLER' to stru_mapping_info-path.
append 'MY_TABLE' to stru_mapping_info-path.
lo_node_info = wd_context->get_node_info( ).
CALL METHOD lo_node_info->add_new_mapped_child_node
EXPORTING
child_name = 'MY_TABLE'
mapping_info = stru_mapping_info
receiving
child_node_info = lo_dyn_node_info
Regards,
Pierre -
Hi experts,
I am creating a node dynamically in WDDOINT and creating an input field in WDDOMODIFYVIEW , but am getting an error "attribute not found". Am pasting below my code...
Code in WDDOINT of a view :
data lr_par_node type ref to IF_WD_CONTEXT_NODE_INFO.
data lr_node type ref to IF_WD_CONTEXT_NODE_info.
data lr_node_info1 type ref to IF_WD_CONTEXT_NODE_INFO.
data lr_node1 type ref to IF_WD_CONTEXT_NODE.
data lr_attribute type WDR_CONTEXT_ATTRIBUTE_INFO.
data lt_child_node_map type wdr_context_child_info_map.
*****to get context parent node information
lr_par_node = wd_context->get_node_info( ).
*****to get child node of the parent
lt_child_node_map = lr_par_node->get_child_nodes( ).
*****check for the existence of node
read table lt_child_node_map transporting no fields with table key name = `RESULT`.
if sy-subrc = 0.
" REMOVE_CHILD_NODE
lr_par_node->remove_child_node( `RESULT` ).
endif.
*****inserting new node in context
CALL METHOD lr_par_node->ADD_NEW_CHILD_NODE
EXPORTING
NAME = 'RESULT'
* IS_MANDATORY = ABAP_FALSE
* IS_MANDATORY_SELECTION = ABAP_FALSE
IS_MULTIPLE = ABAP_TRUE
IS_MULTIPLE_SELECTION = ABAP_TRUE
* IS_SINGLETON = ABAP_FALSE
IS_INITIALIZE_LEAD_SELECTION = ABAP_false
* STATIC_ELEMENT_RTTI =
IS_STATIC = ABAP_TRUE
* ATTRIBUTES =
* IS_RANGE_NODE =
RECEIVING
CHILD_NODE_INFO = lr_node.
lr_node1 = wd_context->get_child_node( name = 'RESULT' ).
lr_node_info1 = lr_node1->GET_NODE_INFO( ).
*********Adding attribute
lr_attribute-NAME = 'TEST_GROUP'.
lr_attribute-TYPE_NAME = 'PLNNR'.
lr_attribute-NODE_INFO = lr_node_info1.
CALL METHOD lr_node_info1->ADD_ATTRIBUTE
EXPORTING
ATTRIBUTE_INFO = lr_attribute.
clear lr_attribute.
Code in the WDDOMODIFYVIEW :
method WDDOMODIFYVIEW .
if first_time = abap_true.
data : lt_header_block type zcdp_tt_mfte_header.
lt_header_block = WD_COMP_CONTROLLER->MT_HEADER_BLOCK.
DATA :lr_container TYPE REF TO cl_wd_uielement_container,
lr_input TYPE REF TO cl_wd_input_field,
lr_caption type ref to CL_WD_CAPTION,
lr_column type ref to CL_WD_TABLE_COLUMN,
lr_trans_cont TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
data lr_lbl type ref to CL_WD_TEXT_VIEW.
******to get root element container
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_trans_cont ?= VIEW->GET_ELEMENT('TRANS_CONT_HEADER_BLOCK').
* Created one transparent container in the view.......
CALL METHOD CL_WD_TEXT_VIEW=>NEW_TEXT_VIEW
EXPORTING
* CONTEXT_MENU_BEHAVIOUR = E_CONTEXT_MENU_BEHAVIOUR-INHERIT
* CONTEXT_MENU_ID =
* DESIGN = E_DESIGN-STANDARD
* ENABLED = 'X'
* H_ALIGN = E_H_ALIGN-AUTO
* ID =
* LAYOUT = E_LAYOUT-NATIVE
* SEMANTIC_COLOR = E_SEMANTIC_COLOR-STANDARD
TEXT = 'TEST'
* TEXT_DIRECTION = E_TEXT_DIRECTION-INHERIT
* TOOLTIP =
* VIEW =
* VISIBLE = E_VISIBLE-VISIBLE
* WIDTH =
* WRAPPING =
RECEIVING
CONTROL = lr_lbl
cl_wd_matrix_head_data=>new_matrix_head_data(
element = lr_lbl ).
lr_trans_cont->ADD_CHILD( lr_lbl ).
CALL METHOD CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD
EXPORTING
BIND_VALUE = 'RESULT.TEST_GROUP'
ENABLED = 'X'
* EXPLANATION =
ID = 'ABCD'
RECEIVING
CONTROL = lr_input.
cl_wd_matrix_data=>new_matrix_data(
element = lr_input ).
lr_trans_cont->ADD_CHILD( lr_input ).
endif.
endmethod.
Pls help me in this.....
Thanks
Aisurya.Hi,
looking at code it seems that you are adding textview and inputfield. please check in debugging if the correct context node/attribute is being created and you are providing its reference while adding UI elements.
Thanks,
Chandra -
Dynamic Table creation Problem
Hi All,
I have a requirement to create tables dynamically based on data coming from backend .
The problem is there can be muliple tables created based on data.and I need to fill each row of tables correspondingly.Row and column values might very for each and every tables.
Other issue is how will I attach a selection listener to any column created dynamically.
It will be useful if anyone can provide some example for implementing same.
Thanks in Advance.Hi,
1. You don't add a selection listener to a column but the table. The selection listener is a MethodExpression that points to a managed bean method. You can manually create a MethodExpression from FacesContext --> Application --> ExpressionFactory (for this you need FacesContext --> ELContext). Once you have the MethodExpression you can call the setter on RichTable
2. For querying the data, you can build tables based on Arrays. So queue the data in an array and you will be good to go. The question however is, what is the object type to put into the array and this I don't know because I no nothing about how the data arrives in your managed bean
However, since tables rows are not stuffed cell-by-cell you need to provide a row object
Frank -
Hai all,
I am new to the Dynpro. i have to create 'n' number of drop down at dynamically. The values of 'n' only known at runtime, that is fetch from database.
Basically each dropdown must have one node and one attribute. So i have to create 'n' number of nodes. Each drop down have different values.
I created some node at runtime using the following code.
for(int j=0;j<count;j++){
IWDNodeInfo node = wdContext.getNodeInfo
().addChild ("Roles"+j,null,true, true,false,
false,false,true,null,null,null);
node.addAttribute(roles[j].toString
(),"com.sap.dictionary.string");
This is done inside the wdDoInit() method.
Then i have to fetch the node one by one and load values from database and finally bind into the drop down inside the wdDoModifyView() method.
I tried the following code,but i don't know whether is it correct way or not.
if (firstTime) {
IWDTransparentContainer container =
(IWDTransparentContainer) view.getElement
("RootUIElementContainer");
container.createLayout(IWDMatrixLayout.class);
for(int rolecunt=0;rolecunt<size;rolecunt++){
IWDNode node = wdContext.currentContextElement().node().getChildNode("Roles"+rolecunt,rolecunt);
IWDNodeElement nodeElement1 = node.getCurrentElement();
thanks in advance,
Mukesh Mani.Hai Noufal,
Thanks for your reply. I couldn't get you. From your suggestion i created dropdown only in domodify() like this,
IWDDropDownByIndex dropDownList = (IWDDropDownByIndex)
view.createElement (IWDDropDownByIndex.class, "inp");
How to bind node attribute into the above drop down. Before i created 'n' number of nodes in
wdinit() method using the following code.
for(int j=0;j<count;j++){
IWDNodeInfo node =
wdContext.getNodeInfo().addChild(
"Roles"+j,
null,
true,
true,
false,
false,
false,
true,
null,
null,
null);
// for(int k=0;k<count;k++){
node.addAttribute(roles[j].toString(),"com.sap.dictionary.string"); -
Hi,
I am trying to implement a dynamic JSF menu, by coding for it in a request bean, and have hit a stumbling block with regards to adding a panelMenu to another panelMenu. I understand how to add outputLink and outputText to the menu and even how to add another panelMenu to the menu.
Here is the code:
HtmlPanelMenu panelMenu = new HtmlPanelMenu();
panelMenu.setId("menuMain");
panelMenu.setStyleClass("panelMenu");
HtmlPanelMenu subMenu = new HtmlPanelMenu();
subMenu.setId("subMenu");
HtmlOutputText text1 = new HtmlOutputText();
text1.setValue("Enquiry Menu");
text1.setId("text1");
subMenu.getChildren().add(text1);
HtmlOutputLinkEx outputLink1 = new HtmlOutputLinkEx();
outputLink1.setId("link1");
outputLink1.setValue("enquiry.faces");
HtmlOutputText text2 = new HtmlOutputText();
text2.setId("authoritiesLinkText");
text2.setValue("Branch Enquiry");
outputLink1.getChildren().add(text2);
subMenu.getChildren().add(outputLink1);
panelMenu.getChildren().add(subMenu);When I try to run the page I get the following error:
javax.servlet.ServletException: nested menu's require a menu owner - some item that is contained in a f:facet with name = "header"
This is running on Websphere v7. I can see from the specification that the outputText for the submenu (text1) should have a surrounding facet, but I cannot find such an object anywhere. I have tried using FacetTag but this doesn't work as it hasn't got a children property to attach the outputText to it.
Am I missing something or is it that this is the wrong way?
Any help would be appreciated!
Steve
Edited by: Steve-Waterfall on Oct 22, 2009 1:37 PM
Edited by: Steve-Waterfall on Oct 22, 2009 1:38 PMAhhh you were nearly there
try
HtmlPanelMenu panelMenu = new HtmlPanelMenu();
panelMenu.setId("menuMain");
panelMenu.setStyleClass("panelMenu");
HtmlPanelMenu subMenu = new HtmlPanelMenu();
subMenu.setId("subMenu");
HtmlOutputText text1 = new HtmlOutputText();
text1.setValue("Enquiry Menu");
text1.setId("text1");
here is the key
subMenu.getFacets().put("header",text1);
HtmlOutputLinkEx outputLink1 = new HtmlOutputLinkEx();
outputLink1.setId("link1");
outputLink1.setValue("enquiry.faces");
HtmlOutputText text2 = new HtmlOutputText();
text2.setId("authoritiesLinkText");
text2.setValue("Branch Enquiry");
outputLink1.getChildren().add(text2);
subMenu.getChildren().add(outputLink1);
panelMenu.getChildren().add(subMenu); -
Dynamic Node bind to attribute of type "STRING_TABLE"
Hi ,
I want to create dynamic node which is bind to attribute of type "STRING_TABLE'.
Basically I want to create this node for inserting dynamic "TEXT EDIT' UI elements in my view .
can sm1 help me in this regard.Seems like you should be able to use the API: cl_wd_dynamic_tool=>create_nodeinfo_from_struct.
The real question is do you really need to create the node dynamically. Why not just create a node that has the string_table attribute in it. Make the node 1:n or 0:n. Bind this node to a RowReapter or MultiPane UI element. Then as a child of the RowReapter/MultiPane you place your textEdit UI element. This way, you will render dynamically how ever many textEdits as there are elements in your node. No need for dynamic node creation. -
Problem with Dynamic Node & UI Elements
Hi,
The scenario is to create an Questioaire.Since the number questions which I get from R/3 may vary, I have created the Dynamic Node which is mapped with Dynamic set of Radio button Group by index for options & Dynamic text view for displaying Questions.. A New Dynamic Node will be created for each set of Questions .The Number of questions displayed per page is controlled by the Static Counter Variable....
Now the issue is ,if i click back button the count will be initialized so again it needs to trigger the DoModifyView(). at that time It is arising an exception "Duplicate ID for view & Radio button ..." because while creating Dynamic node i used to have "i" value along the Creation of node name...
for(i=Count;i<i<wdContext.nodeQuestions().size();i++)
customnod=<b>nodeinfo.getChild("Questionaire"+i);</b>
if(customnod==null)
Its not possible to create a new node whenever i click the Back button.
At the same time i am not able to fetch the elements which had already created Dynamically...
How do i make the Next & back button work?
If anyone bring me the solution It would be more helpful to me.
Thanks in advance..
Regards,
MalarHi,
We can Loop through the Node Elements but how can we do Option Button Creation for each set of question Options?. At design time we can not have the radio buttons,because we do not know how many set of questions are available at the Backend. -
Creating a Dynamic Node for a Dynamic Graphic - Tutorial
Hi everyone,
I'm sharing my first tutorial, hope it'll be helpful for you.
In the Layout tab, it's possible to create an UI element "Business Graphic". It's a very simple tool that only requires a context node with a category attribute (that means, the values that will appear in the 'x' axis) and one or more series (each one with a color, generally a numerical value). It's possible to add a label for each series for better understanding of the Graphic.
Although it's a very powerful tool, there are some problems when we must create a graphic with N series and different labels. If the graphic use an ALV or internal table to fetch data, during runtime we can have more or less series. The definition of a static node and generic series is not enough in this case. That's why I'd like to present you this little tutorial to create a dynamic node that fetchs a dynamic graph:
In the WDDOINIT or Event Handler method that starts the application (once the data is available) we should create the dynamic node in the following way:
DATA: lr_node_info TYPE REF TO if_wd_context_node_info,
lt_attributes TYPE cl_abap_structdescr=>component_table,
attribute LIKE LINE OF lt_attributes,
struct_type TYPE REF TO cl_abap_structdescr,
lo_dyn_node TYPE REF TO if_wd_context_node.
* Let's suppouse we can LOOP at the data table, so we can fetch the
* category data type (for example company name, month, year, ...)
* and each series with a numeric type
attribute-name = 'CATEGORY'.
attribute-type ?= cl_abap_datadescr=>describe_by_name( 'STRING' ).
INSERT attribute INTO TABLE lt_attributes.
attribute-name = 'SERIE1'.
attribute-type ?= cl_abap_datadescr=>describe_by_name( 'I' ).
INSERT attribute INTO TABLE lt_attributes.
attribute-name = 'SERIE2'.
attribute-type ?= cl_abap_datadescr=>describe_by_name( 'I' ).
INSERT attribute INTO TABLE lt_attributes.
* Once we have all the attributs for the node, we create a formal structure
struct_type = cl_abap_structdescr=>create( lt_attributes ).
* Now we can get the context information to add a new node
lr_node_info = wd_context->get_node_info( ).
* Create the node
lr_node_info = lr_node_info->add_new_child_node(
name = 'GRPH_DYN'
IS_MANDATORY = ABAP_false
IS_MULTIPLE = ABAP_true
STATIC_ELEMENT_RTTI = struct_type
IS_STATIC = ABAP_false ).
* Now we should populates the node, I'll create a hardcoded table,
* simulating the internal table that you should already have
TYPES: BEGIN OF tw_alv,
category TYPE string,
SERIE1 TYPE i,
SERIE2 TYPE i,
END OF tw_alv.
TYPES: tt_alv TYPE STANDARD TABLE OF tw_alv.
DATA: lw_alv TYPE tw_alv,
lt_alv TYPE tt_alv.
lw_alv-category = 'Alfa'.
lw_alv-serie1 = 3.
lw_alv-serie2 = 8.
APPEND lw_alv TO lt_alv.
lw_alv-category = 'Beta'.
lw_alv-serie1 = 4.
lw_alv-serie2 = 4.
APPEND lw_alv TO lt_alv.
lw_alv-category = 'Gamma'.
lw_alv-serie1 = 1.
lw_alv-serie2 = 3.
APPEND lw_alv TO lt_alv.
* Now let's call the recently created node and bind the lt_alv table.
* Get node from context
lo_dyn_node = wd_context->get_child_node( name = 'GRPH_DYN' ).
* Bind table with ALV Container
CALL METHOD lo_dyn_node->bind_table
EXPORTING
new_items = lt_alv.
* It's always good to check if the table was succesfully binded.
* I refresh the lt_alv table and get the values from the node for controlling
REFRESH lt_alv.
lo_dyn_node->get_static_attributes_table( IMPORTING table = lt_alv ).
There are other ways of adding a node structure in the method add_new_child_node, but it works for me only with STATIC_ELEMENT_RTTI. The node is now created and has the data required for the graphic. Now, we should go to WDDOONMODIFYVIEW, or save the target view as a parameter, to create the graphic, bind the category and series and show it on the screen.
DATA: lr_graph TYPE REF TO cl_wd_business_graphics,
lr_cat TYPE REF TO cl_wd_category,
lr_series1 TYPE REF TO cl_wd_simple_series,
lr_series2 TYPE REF TO cl_wd_simple_series,
lr_container TYPE REF TO cl_wd_uielement_container,
lr_flow TYPE REF TO cl_wd_flow_data.
* Get the root element from the Layout or the specific
* container you have created for the graphic
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
* Creates a line busniess graph
lr_graph = cl_wd_business_graphics=>new_business_graphics(
BIND_SERIES_SOURCE = 'GRPH_DYN'
CHART_TYPE = cl_wd_business_graphics=>e_chart_type-lines
HEIGHT = 340
WIDTH = 750
ID = 'GRAPH' ).
* Create the flow data for the new UI Element business graphic
lr_flow = cl_wd_flow_data=>new_flow_data( element = lr_graph ).
* Set graph in the root container from the Layout tab
lr_container->add_child( lr_graph ).
* Bind the category from the dynamic node to the dynamic graphic
lr_cat = cl_wd_category=>new_category(
view = view
bind_description = 'GRPH_DYN.CATEGORY'
tooltip = 'Company Name' ).
lr_graph->set_category( lr_cat ).
* Bind the two series from the dynamic node to the dynamic graphic
lr_series1 = cl_wd_simple_series=>new_simple_series(
bind_value = 'GRPH_DYN.SERIE1'
label = 'Sales'
view = view
tooltip = 'Average Sales' ).
lr_graph->add_series( lr_series1 ).
lr_series2 = cl_wd_simple_series=>new_simple_series(
bind_value = 'GRPH_DYN.SERIE2'
label = 'Purchases'
view = view
tooltip = 'Average Purchases' ).
lr_graph->add_series( lr_series2 ).
Finally we have created our business graphic. Test the application and you'll see something like the attached image.
Hope you'll find it useful.
Daniel Monteros.Hi,
http://htmldb.oracle.com/pls/otn/f?p=26372
then ApEx>Trees and pick a level.
Use Help for more information.
I you think that tree could help I will put more explanation into help page.
Konstantin -
Create Multiple dynamic Node in Web Dynpro Abap
Hi Friends,
I need your help.My object is to create Multiple dynamic dropdown UI element.I am able to create this dynamic Dropdown element. But i need to assign default different values to this dropdown elements.So i created dynamic nodes for each dropdown and created attribute with same name as that of value table.
My issue is its giving me error as : -
Lower-Level Node with Name ZDCN_BRD_STATUS.ME Does Not Exist
Help me to rectify this error..
Regards,
SantoshHi,
This information is not enough for anybody to help you. Write more in detail about your code and where exactly in the code this error is coming.
One trial experiment can be that you split your problem into two or more level.
Create several nodes in your context with attribute and sample data.
Create Dynamic UI (DDBI) and Bind these attributes to your DDBI.
When it works perfectly, then tryout how to create the Node and attribute dynamically. This way you are not making it too complex to solve this problem. -
Hi Experts,
I am creating Dynamic nodes from Model's Node, each time I execute in the application a function module, the Dynamic nodes must be realeased from session and created again and then the application must also create the user interface elements dynamically as well, from those dynamic nodes. The problem is: When I come back to the initial view and navigates to the report's view, I mean, when there is a new execution of the function's module, The application throws the following error:
com.sap.tc.webdynpro.progmodel.context.ContextException: DataNodeInfo(EdoCtaDetView): duplicate name for child node Nodo0
Can I somehow eliminate the instances of the nodes in order to create new dynamic nodes in each execution of the function's module?
Regards,
BrigerHi Briger,
Well it's very easy... only you have to put in your source code the following lines, after you invalidate all the elements of your context:
IWDContext ctx = wdContext.getContext();
ctx.reset(false);
There is two kind of reset method. the reset() reset all the metadata and destroy dynamics node. reset(false), reset all metadata destroy dynamics node but keeps the nodes build at design time.
Regards,
MC -
Permissions issue - node creation
Today our application developed a new bug related to posting messages into a SimpleChatModel node. It tells us that the user does not have permission to create the node.
We have approximately 50 rooms and all of them have the nodes we need already in them. There is no node creation that takes place during normal operation of our application.
Now, we've been doing this type of posting (successfully posting chat messages into the SimpleChatModel with only Publisher-level permissions) all last week and over the weekend. It may be that we wrote a bug of course, but I couldn't help noticing that the timing coincided with Nigel's blog post introducing the new SDK. Is it possible that the volume of new LCCS users, or the use of new server-side permission techniques is related to our issue?
Thanks,
-MikeHironmay, I appreciate your input, I know I didn't really provide enough info but I wanted to see if there actually was a problem of which you were aware.
The behavior was better this morning - but the error has returned (no changes to our code have been made). So I suspect it is either a timing issue related to how elements of the swf load, or a bug in your service.
Here is some of the code we use to initialize the chat pod.
import com.adobe.rtc.sharedModel.descriptors.ChatMessageDescriptor;
import com.adobe.rtc.events.ChatEvent;
import com.adobe.rtc.sharedModel.SimpleChatModel;
[Bindable]
public var chatModel:SimpleChatModel;
private function init():void{
chatModel = new SimpleChatModel();
chatModel.sharedID = "myChat_SimpleChatModel";
sync();
chatModel.addEventListener(ChatEvent.HISTORY_CHANGE, onChatMsg);
this.addEventListener(KeyboardEvent.KEY_UP, onKeyStroke);
public function sync():void
chatModel.subscribe();
protected function submitChat(str:String):void
var cmd:ChatMessageDescriptor = new ChatMessageDescriptor();
cmd.msg = str;
chatModel.sendMessage(cmd);
chat_mesg_input.text = "";
that code is in an mxml file that defines the chat pod. the only other place in which we call sync() is reproduced with a small bit of context here:
if (_usersInRoom == "2" && !_synched) {
startPublication();
if (chatPod) {
chatPod.sync();
_synched = true;
this issue does not seem to be confined to any specific room(s) and we are using version 10.
Error: MessageManager.createNode : insufficient permissions to create node
at com.adobe.rtc.messaging.manager::MessageManager/http://www.adobe.com/2006/connect/cocomo/messaging/internal::createNode()[C:\work\branches \connect\1004\cocomoPlayer10\src\com\adobe\rtc\messaging\manager\MessageManager.as:253]
at com.adobe.rtc.sharedModel::CollectionNode/publishItem()[C:\work\branches\connect\1004\coc omoPlayer10\src\com\adobe\rtc\sharedModel\CollectionNode.as:615]
at com.adobe.rtc.sharedModel::SimpleChatModel/sendMessage()[C:\work\branches\connect\1004\co comoPlayer10\src\com\adobe\rtc\sharedModel\SimpleChatModel.as:377]
at ChatComponent/submitChat()[/Users/mschwab/work/GoodChat/flex/src/ChatComponent.mxml:31]
at ChatComponent/onKeyStroke()[/Users/mschwab/work/GoodChat/flex/src/ChatComponent.mxml:55] -
Hi,
I wrote the following code to create the tree in hierarchical manner.
The following code creates three tree nodes, where each node stores
the information(con, Meas, Child and Next). When i print the nodes using
print function, it was printed all 4's as contents of 'Meas' array in all nodes.
Why it was printed only 4's as contents of 'Meas' array in all nodes? I initallized 1's and 2's as contents of 'Meas' array in first two nodes. Can any one help me in fixing the problem?
Thanks in advance
by
sudhakar
public class Tree {
private Tnode root;
class Tnode {
String Con;
float [][]Meas;
Tnode Child;
Tnode Next;
Tnode(String cword, float [][]parameters) {
Meas = new float[6][5];
Meas = parameters;
Con = cword;
Child = null;
Next = null;
public void Tree() {
root = null;
public void insert(String data, float [][]meas) {
root = insert(root, data, meas);
private Tnode insert(Tnode node, String Con, float [][]meas){
if (node==null) node = new Tnode(Con,meas);
else if (Con.indexOf(node.Con)==0)
node.Child = insert(node.Child, Con,meas);
else node.Next = insert(node.Next, Con,meas);
return node;
public void print()
if(root!=null) print(root);
public void print(Tnode node)
if(node!=null)
if(node.Con!=null) System.out.println("Con ->" + node.Con);
show(node.Meas);
if(node.Next!=null) print(node.Next);
if(node.Child!=null) print(node.Child);
void show( float [][]Meas)
for(int i=0;i<6;i++)
for(int j=0;j<5;j++)
System.out.println("N.Meas["+i+"]"+"["+j+"]="+ Meas[i][j]);
public float[][] sum(float[][]s, float [][]N)
for(int i=0;i<6;i++)
for(int j=0;j<5;j++)
s[i][j] = s[i][j] + N[i][j];
return s;
public static void main(String []v)
Tree T = new Tree();
String str[]={"Comp/Int", "Comp/Int/Inf", "Comp/Int/Inf/Wpaper"};
float [][]s = new float[6][5];
for(int i=0;i<6;i++)
for(int j=0;j<5;j++)
s[i][j] = (float)1.0;
T.insert(str[0], s); // s contains all 1's
s = T.sum(s,s);
T.insert(str[1], s); // s contains all 2's
s = T.sum(s,s);
T.insert(str[2], s); //s contains all 4's
T.print(); //displays tree
}Thanks for reply. But i was stored the contents of float[][] array (s ,
which was passed from main method) in three seperate nodes. In
node creation process, i allocated memory for new float[][] array
(Meas) in constructor. Why all the float[][] arrays are pointing to s? Yes you did allocate a new float[][] but you don't use it:Tnode(String cword, float [][]parameters) {
Meas = new float[6][5];
Meas = parameters;kind regards,
Jos -
Reading XML file into Dynamic Node and Display its output as Table.
Hi All,
Following is the output of XML file:
<Company>
<Employee>
<Name>John</Name>
<Age>23</Age>
<***>Male</***>
<Location>Frankfurt</Location>
</Employee>
<Employee>
<Name>Tina</Name>
<Age>21</Age>
<***>Female</***>
<Location>Boston</Location>
</Employee>
<Department>
<Name>Sales</Name>
<HQ>Chicago</HQ>
<Emplyoees>2300</Employees>
</Department>
I'm able to read the output through DOM parser. But How do I convert this into dynamic node and display this in Web dynpro as Table?
Any pointers in this regard will be great help?
Thanks
SrikantHi Maksim,
I've used your example and its now helping as there is kind of agreement on that I'll be knowing the structure of Xml and I can fill the nodes.
But suppose if you have Xml has following structure :
<?xml version="1.0" encoding="utf-8"?><DATA>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CONTRACT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CREDIT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">EMPRESS</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PAYMENT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PRICE</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
</DATA>
How we will do in this case?
Can we have something similar using DOM? Also what is the best method for displaying data being sent in form of XML. And generalize it for cases like this.
Thanks
Srikant -
How to deal with the dynamic nodes ...in webdynpro abap
Hi Guys,
How to insert the dynamic nodes in the context controller...
Thanks
ChandraYou can use node_info to create a dynamic node or use CL_WD_DYNAMIC_TOOL to create dynamic nodes under a node
For Eg Struc_Node
fields A type char20,
fields B type char 20
For Eg : To Create Node under Context Node( Root Node).
data lv_node_info type ref to if_wd_context_node_info.
lv_node_info = wd_context->get_node_info( ).
CALL METHOD lv_node_info->add_new_child_node
EXPORTING
static_element_type = 'Struc_node
name = lv_node_name
is_static = abap_false
is_multiple_selection = abap_true
RECEIVING
child_node_info = lv_child_node_info.
or
CL_WD_DYNAMIC_TOOL=>CREATE_NODEINFO_FROM_STRUCT
Maybe you are looking for
-
Hi There, I'm setting up an application where I need to record users' voice every so often during the course of the users' interaction with the application. Recording is fine, and the quality is fine, but now my issue is understandng how Flash handl
-
Hi All Expert, Need some advice here. I have a E3500 machine recently and need to re-setup the OS as the OS has been removed from the machine. I have a null modem cable plug into the serial port A and connect to my IBM laptop. I have tried both hyper
-
Command-Line question. Delete all but particular folders
Hello. I need to create a batch file that will delete all folders within the "Users" folder except for the Administrator and Administrator.domainname. Can anyone help? Thanks
-
With "ThumbStrips" all the pages I looked at while browsing, can be seen in small pictures at the bottom of my screen to help me find want I to go back to by clicking on it to open it up again. February 2010, developers of "ThumbStrips" turned this a
-
Boot screen resolution does not match the login screen on retina
Boot screen resolution does not match the login screen on MBP retinas if you've set your resolution to hi-res thus resulting a flickering at login screen appearing instead of that nice login screen animation, due to I believe screen resolution change