Simple Types and Context Attributes
Hello All,
Can someone be kind enough to explain the difference between using a context attribute and a Simple Type ? For example... what's the difference (and I am sure there is ) between a context attribute "Name" that is declared to be of String type and a simple type "Name" that is of built-in type String ?
from
Kwok Wei
Some links on SimpleTypes and its usage.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/value help in web dynpro applications.pdf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/internationalization of web dynpro applications.pdf
Regards, Anilkumar
Similar Messages
-
Hi
can any one tell me Difference between simple types and structure ?
Thanks,
KiranHi Ravi,
As my concern there is difference between simple type and structure.
1SIMPLE TYPEit behave as TYPE proprty of value attibute .suppose you will create on value attribute as simAtt.then you can put that simple type in your attribute TYPE property .actualy it treated as data type like string,integer........
one more thing you want to change data type in your application then you will create SIMPLE TYPE..then put it TYpe property of value Attribute
Ex--you want to change the format of double value using "," then you will change only by using simple type.
STRUCTURE---Basically it use for creating for context value node in any context of controller(View,component )if you creat one structure then add number of attribute .when you create context value node then you binding the structure then automatically it will populate with value node as structure name and attribute .
SIMPLE TYPE---only put as Data type of Attribute and simple type also use within Structure at time of creation
STRUCTURE---you can use for DAta type of Apptibute..
thanks
Jati -
Lifespan of Request, Session and Context Attributes
I'm studying for the SCWCD exam and am hoping to clarify a few points on the lifespan of attribute objects bound to the various request, session and context web scopes.
Do request attributes persist as long as the request is being handled by some servlet? In other words, once the response is committed are those objects unbound and destroyed?
Similarly, I'm assuming session attributes are unbound and destroyed when the session either times out or is explicitly terminated.
Lastly, for context attributes, which are available to the entire web application, are these simply available
until explicitly removed?
Thanks.Request: available until the HttpServletRequest object goes out of scope (at the end of the doService or associated methods). The attributes here are basically just stored in a HashMap in that object
Session: available until the session no longer exists, which occurs when the session times out (NOT when the user closes their browser), or when the session is terminated by the server code
Context: Available until the container stops, such as upon a JVM restart
NOTE: Specific objects in all three contexts can be removed and added at any time by the server code -
How to force simple tags and null attributes to appear when using SQL/XML?
Hello everybody:
I'm developing a non-schema based XMLType view.
When the XML document is generated, i noticed two things I need to manage in order to achieve the desired result:
1. Oracle generates a <tag></tag> pair for each XMLELEMENT defined; in my case, some tags need to appear as <tag/>... how do I do? Is it possible when using schema based XMLType views? Is it possible while using a non-schema approach?
2. When using XMLATTRIBUTE('' AS "attribute") or XMLATTRIBUTE(NULL AS "attribute"), no one attribute with label "attribute" and null value appears at the output; how do I force to Oracle DB to render those attributes which are with no values (needed to render those attributes as another parsing code will await for all the items)?
3. Some tip about how to route the output to an XML text disk file will be appreciated.
Thanks in advance.
Edited by: Enyix on 26/02/2012 11:21 PM
Edited by: Enyix on 26/02/2012 11:22 PMHello odie_63, thanks for your reply:
Reasons why needed single tags are these two next: Needed to generate a single XML file from 50,000,000 rows, where the XML ouput matches not only row data but another default values for another elements and attributes (not from database but using strings and types with default values); by using start and end tag, the generated file is as much twice bigger than using single tags; second, needed a very precise presentation for all the document.
For generating that document, currently focus is based on using a batch process relying on Spring Batch with using a single JDBC query where a join happens between two tables. From my point of view, that approach uses: database resources, network resources, disk resources, and processing resources, including the price of making the join, sending to network, creating objects, validating, and making the file (Expending too much time generating that XML file). That processs currently is in development.
I think possibly another approach is delegating the complete generation of that file to the database using its XML capabilities. My current approach following your recomendations is to generate a clob where I will put all the XML and putting it into a table. It leads me to another issues: Considering limitations on memory, processing and disk space, needed to append a single row-as-xml into the clob as soon as possible, and putting the clob inside the field as soon as possible, or putting the clob inside the field, and appending into it as the data is generated; so How do I manage the process in order to achieve that goals?. Seen these issues aren't related to my original question, so I'll open a new post. Any help will be apreciated.
Thanks again in advance. -
Problems with Symple Types and Contexts
Hello Experts,
I have a problem. I want to bind a Context in a TableColumn. For this, the property - type of the Context is bind to an SymplyType (which I filled with data).
But when I Run the Application the table don't show me the input.
What should I do?
Thanks
Best regardsFirst of all I will fill the first Column like the following:
Activities
Football
Baseball
Golf
Polo
Soccer
So these are only TextView-Elements
The Symple Type is filled like this:
Value Description
Football Football
Baseball Baseball
Golf Golf
Polo Polo
Soccer Soccer
What should I do?
Best regards
Marcus -
Simple type enumeration access
Hello colleagues,
while creating a data dictionary type, you can define an enumeration with keys and description texts. Additionally you can let the WD generator to create the class representation for this enumeration. So you can use it in your code.
The generated enumeration only provides the key constant value (enum.getName()) but doesn't bring the description text. Is there any "official way" to read it in code providing certain locale?
I know, you can create a context attribute of this simple type and go for the following expression:
wdContext.nodeTableLine().getNodeInfo().getAttribute("attr").getSimpleType().getSVServices().getModifiableSimpleValueSet()
but I can't imagine the WD doesn't provide any context independent way for this simple operation.
Regards
DimitriHi
I donu2019t want to populate the list of the enumeration. The list is defined at design time. I just want to read key descriptions of the enumeration programmatically and I donu2019t want to use the context for that.
To your comment: if you use an input field with an enumerated data dictionary type, only the key of the enumeration will be shown in the field.
Regards
Dimitri -
I declared in the context an element for having a custom simple type defined by me.
I use this type for a drop down element.
I filled this simple type dynamically in the controller init.
How can i access in another view all the elements (that i have filled in the controller init method) for this simle type, not only the selected key??
Thnak you,
FlorinFlorin,
1. Create same attribute in component controller.
2. Move your code for dynamic value set to component controller init
3. Map any original view context attribute and context attribute of any additional view(s) to attribute in component controller.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com -
Hi,
The version of my NetWeaver Developer Studio is 2.0.9
This Version does not support com.sap.ide.webdynpro.uielementdefinitions.Resource type for Context Attribute.(in which resource is missing)
My task is to upload and parse a XML file.
How to replace this type?
Thanks,
RPNHi
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=typeofValueAttribute++&cat=sdn_all
Chech this link
Regards
Ruturaj -
Webdypro simple types are vanished with model reimport
Hi All,
My webdynpro project consists of user defined simple types and models(SAP ABAP). when i re-import model ( which already exists in project ) , all the simple types in my project are deleted and all my context mapping to particular simple types are showing compile time errors. I have to recreate all simple types and do context mapping again.
Any one can help me how can i solve this problem.
Thanks
AravindaBefore re-import the model you have to preserve existing model biding in controller contexts. There are two things you should take care about.
1. In controller contexts all metamodel entity files should be deleted.
2. non-model-specific files should be readonly.
There is one blog on this, which describes <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2508">How To Reimport Web Service Models in Web Dynpro for Java</a> , although it tell you about web services but it applies for model reimports as well.
Regards,
Nitin -
Read enumaration list of simple type
Hi,
I want to read enumaration list of simple type and compare it with user input. Simple type is not bound to any attribute.
How can I read enumeration list values?
Regards,
ApurvaHi,
Thanks for replies.
I wanted to use simple type as storage space for Enumeration list. So, I can refer to this list and fill values from this list as required in the valueset.Not all values, based on some condition, some of the values in the list, will be added in the dropdown.
Now, if I cant refer to simple type without creating attribute, I will have to create redundant attribute just to access Enumeration list values.
Can I avoid it? Is there any better way of achieving this?
Regards,
Apurva -
Hi All,
I have create simple type which is of type integer. And i have set the maximum and minimum length for the simple type which is bounded with the input field. When i try to display it, it displayes with ",".
Example 70,000,000.
My require is to remove the commas in between the number. Is there solution for this.
Regards,
Revathy Madhavan.Hi Revathy,
the display of numbers is localized, here in germany I see "70.000.000". So whenever you change the behaviour, consider that you skip the automated localization provided by sap.
That said: Open your simple type and go to the "Representation" Tab. in the right upper corner, enter "#" into the field format.
Problem solved.
If you want to know more, read the java api of NumberFormat which describes various options for Number presentations based on String patterns.
Jan -
Hi,
I have created a simple type and deployed. Now, when i am trying to edit,it is in read-only mode.How can i edit the description of simple type?
(Valuable answers will be awarded with points).
Thank you,
ArpithaHi Arpitha,
Well do you require to change the value at runtime or design time?
For designtime:
WebDynpro explorer->Dictionary->local dictionary-->Data types->simple type--->ur simple type(Name).
Double click ur simple type(name), automatically the window will open then change the fields and close.
or goto the WD Explorer and to the dictionary and open it you'll get the simpletype.Now here you can change it as per your requirement.
Please clarify if it's at runtime.
Regards
Amit -
Hi ,
I need to change the properties of the simple type that we have defined in the dictionary , We are using JDI .I have navigated to the dictionary --> rclick on the simple type --> selected EDIT --> Added the files to the activity --> now when i double click on the simple type and try to change the properties it is giving the following message :
This simple type cannot be changed because the file xxx.xlf is read only .It is possible that the file has not been chacked out from DTR
Any idea why i am getting this error .Hi Maksim,
When i do that it is allowing me to change the file , but when i try to save it i am getting the following error
<b>cannot save language C:\Documents and Settings\test\.dtc\0\DCs\abb.com\report\Report_webDyn\_comp\src\packages\abb\com\report\web\dictionary\velement\LastTransIn.dtsimpletype.xlf
Please check the files e.g. for writeability / existence.</b> -
Reg. checkbox by group and simple types
Hi,
I have checkbox by group UI elemnet.
I have binded the text property of the checkbox by group to a context attribute and its type property is selected from a simple type.
In the view layout on NWDS its showing the label names which i hav given in the simple type. but when i deploy it and run it in browser its just showing only one check box. its not showing the label names.
how to get the label names, using simple types. i,m able to get it using code.
how to get it by simpletype???
thanks, sureshhi,
in case of check boxes, it will not work with
a simple type
write code similar to this according to your requirement
in wdDoModifyVIew();
if(firstTime){
String[] names = {"one","two","three"};
for(int i=0;i<names.length;i++){
IPrivateCheckView.IXElement nelem =wdContext.nodeX().createXElement();
wdContext.nodeX().addElement(nelem);
nelem.setName(names);
where X is a node ,
Name is attribute under node X
of type string
bind the texts property of the check box group to the Node X
Regards,
Satya.
Edited by: Satya on Nov 7, 2008 8:34 AM -
Data storage in a context node and in a context attribute.
Hi All,
I want to know how exactly the data is stored in context node (internal table) and in context attribute (single value) in memory during the runtime.
Regards,
Yugesh AHi Andrea,
Sorry I got it wrong , for lr_comp you will have to take reference from controller IMPL class.
DATA:
lr_entity TYPE REF TO cl_crm_bol_entity,
lr_comp TYPE REF TO ( component controller IMPL class),
lv_ref_guid TYPE crmt_object_guid,
lr_collection TYPE REF TO cl_crm_bol_bo_col,
lr_bdc type ref to if_crm_ui_data_context,
comp_controller type cl_bsp_wd_component_controller.
lr_comp ?= me->comp_controller.
IF lr_comp IS BOUND.
TRY.
lr_entity ?= lr_comp->ZTYPED_CONTEXT->ZBTCUSTOMERH->collection_wrapper->get_current( ).
lv_ref_guid = lr_entity->get_property_as_string( iv_attr_name = 'REF_GUID' ).
CATCH cx_sy_ref_is_initial.
ENDTRY.
ENDIF.
Hope it helps.
Regards,
Manjeet Singh.
Maybe you are looking for
-
How to work with low quality offline media efficiently?
I have a late 2013 rMBP with an NVIDA GPU that is a fantastic platform for editing when I am travelling. The downside is that it doesn't have allot of storage and when I have high bit rate material it can struggle. I often shoot DNxHD 220 on an Atomo
-
Post Author: usamaalam CA Forum: General Hello everybody,I am showing up answers for each question in the form of a pie chart. The pie chart shows what percentage of each answer was selected by different users. I am showing up the percentage of count
-
Program to populate idoc WP_PLU02
Hi, Do you know which is the program to populate the standard idoc WP_PLU02. Thanks. Sónia
-
I'm looking for a simple, quick way to import sound effects I have created into Mainstage and simply assign them to keys on my MalletKAT. I know there must be a simple, direct method which I cannot seem to discover. I have wav files and want to assig
-
Como activar el teclado numerico en un teclado Apple USB o Apple Wireless
Hola, tengo un problema con los atajos de teclado en InDesign. No logro hacerlos. Alguien sabe como?