How to add field length constraints when using an existing JavaBean model

Within our current project we used a O/R mapping tool to generate our JavaBean model. For e.g.
<b>public class Person{
  private String name; ...getName() ...setName(...)
}</b>
The whole model is used within our Web Dynpro project. Now it's a requirement to implement field length constraints. Normally this is no problem using ISimpleType like the following:
<b>attributeInfo = wdContext.nodePerson().getNodeInfo().getAttribute
(IPrivate...IPersonElement.NAME);
ISimpleTypeModifiable type = attributeInfo.getModifiableSimpleType();
type.setLength(60);</b>
But we've got an runtime exception that it is not allowed to modify the models datatype:
com.sap.tc.webdynpro.progmodel.context.ContextException: AttributeInfo
<b>(Basics.Person.name): must not modify the datatype of a mapped attribute</b>
    at
com.sap.tc.webdynpro.progmodel.context.AttributeInfo.getModifiableSimpleType
(AttributeInfo.java:337)
The question is how could a workaround look like. Or is there nothing like that and we have to build a dictionary type tier upon our JavaBean model. Any ideas ?
thx,
s.w.

Sabine,
You may:
1. Import JavaBeans model
2. Create DDIC type with necessary constarints (string-based, max. length 60)
3. Open editor for target model class and change type of property.
See my blog /people/valery.silaev/blog/2005/06/29/apojo--almostplain-old-java-objects-as-model (section "Tweaking model classes") for details.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com

Similar Messages

  • Please can you explain how to add adobe flash player when using Mozilla ?

    I cannot view videos without them constantly stopping.
    I have been told that I need to use adobe flash player.
    When I try to load this, though, the download will not work.
    A message apprears to say I must turn Mozilla Firefox off.
    Please can you explain how I can get around this ?
    Please note, I am not very good with computers, so it would be good if you can make the instructions as basic as possible.
    Many thanks !
    Trev Stafford
    <sub>edit: removed your mail address from public display, since the only thing it will attract are spam bots. you will be notified per mail once somebody replies to the thread. (philipp)</sub>

    Download the non-IE version of Adobe Flash for your system here:
    https://support.mozilla.org/en-US/kb/keep-flash-up-to-date-and-troubleshoot-problems
    Close the browser, and temporarily disable your anti-virus
    Install the non-IE version of Adobe Flash
    Re-enable anti-virus
    See that you have the current version here
    http://www.adobe.com/software/flash/about/
    replaced unofficial third-party download site link.

  • Oracle Text: How to add/get stopwords list when using Oracle Text world lexer?

    I have a use case that we currently use Oracle Text World Lexer to index and search multilingual documents. As we know that World Lexer does the language auto detection. I would like to know the following questions:
    Is there anyway I can get the current document's language that Oracle Text detected?
    Is there anyway to get the language's stopwords list?
    Any thoughts and points will be appreciated.
    - Charles

    1. If you're using 12c, you can use ctx_doc.policy_languages. (https://docs.oracle.com/database/121/CCREF/cdocpkg011.htm#CCREF24102)
    2. If you want multiple stoplists based on each document's language, you have to use the multi-lexer. For world_lexer, there is one stoplist; since the stoplists are somewhat dynamic (you can add but not remove them), the most accurate way to fetch the list is using ctx_report.describe_index or ctx_report.create_index_script and parse the report.

  • HOW TO ADD GROUP BY CLAUSE WHEN USING Jbo:Datatable

    Would like to know if there are any provisions for adding a Group by clause so the data shown using DataTable Component cn be grouped.
    eg:
    Currently using DataTable component shows data as shown below.
    Dept Name
    10 ABC
    10 DEF
    10 PQR
    20 XYZ
    20 QQQ
    Can this be done as shown bewlow
    Dept Name
    10 ABC
    DEF
    PQR
    20 XYZ
    QQQ
    Thanks

    Hi Sashi,
    For a bc4j view object, the shape of the result set needs to be consistent. So, there can not be a groupby directly in the result set.
    However, that does not prevent you from inserting a calculated column that performs a similar calculation.
    Another mechanism might be to consider a master detail arrangement of the views where the master contains an aggregation of data from its children. You are then free to access and display this data as you choose.
    Hope this helps,
    Pete

  • How to add 'Save Layout' button when use OO ALV?

    thx

    Hi,
    Try passing this parameter :
    <b>
    wa_variant-report     = sy-repid.</b>
    *-- Display Report
      CALL METHOD o_alvgrid->set_table_for_first_display
        EXPORTING
          it_toolbar_excluding    = lt_excl_func
    <b>      is_variant                   = wa_variant</b>
          i_save                        = c_a
          is_layout                    = p_layout
        CHANGING
          it_outtab                     = p_output[]
          it_fieldcatalog               = p_fieldcat[]
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                         = 2
          too_many_lines                      = 3
          OTHERS                               = 4.
      IF sy-subrc <> 0.
        MESSAGE i050 WITH text-004.    " Error in Displaying
        LEAVE LIST-PROCESSING.
      ENDIF.

  • How do you add fields to your PDF using Adobe Acrobat

    how do you add fields to your PDF using Adobe Acrobat

    Hello Sara!
    Txs for your super quick reply.
    Yes, we do have the full version  for Adobe and when I am in tools and forms, what comes next?
    See attached picture of pdf…
    If you could help me with that, that would be great (the forums do not show any results…)
    Thanks, have a great day!
    Rilana
    [private information removed by moderator]
    P Please consider the environment before printing this email

  • How to add field value to the standard table

    Hi,
    How to add field value to the standard table?
    for example:
    when we go to TCODE SE16-> VBAK table -> on the selection screen if we press F4 against VBTYP we get all the available values for that field. How to add a new document Category value to this field so that it shows up in F4 help for that field.

    Hi Asif,
    I don't think it is possible and feasible for adding new field value to the field VBTYP because it is not possible through SPRO.
    If u see the domain of this field VBTYP we have fixed values provided by SAP. There is no value table for this. If u have value table then it will be updated through SPRO. But still if u really want to add some value u can do that by getting access key and add the value in the fixed values of the domain. But of no use other than simply displaying in F4. Because for what ever value u created here there will be no documents in VBAK or any table using this domain.
    Hope this is clear for u.
    Thanks,
    Vinod.

  • Hi,How to add field to sap Liquidity calculation module tables?

    Hi Experts,
            How to add field to sap Liquidity calculation module tables?
            and how to add a field to a particular transaction code using a customer exits.
    please tell me in detail.
    thanks inadvance,
    Regards,
    Rekha

    Hi Pranab,
    Please follow the below steps to create an extra field and write code for that field through Infoset.
    1-->Change in Infoset
    u2022Go to SQ02 , enter Infoset name and click on Change Button
    u2022Go to Extras (F5) button displayed on application bar.
    u2022In Extras tab, click on 'Create' icon to create additional field E_NAME1, give as type C (character) and give desired length and. Enter header description  as 'ShipToName'
    u2022Select this field i.e E_NAME1 in one of the field group of Infoset.
    u2022Go to Code section  (Shift+F8) of infoset, Select Record Processing Event and write your logic code (condition) in this code section:
    if vbpa-adrnr = space.
    E_NAME1 = kna1-name1.
    else.
    E_NAME1 = adrc-name1.
    endif.
    2-->Generate the Infoset.
    3-->Change in Query
    u2022Go to SQ01(in a new session), give your query name (by selecting your user group) and click on change button.
    u2022Check the field group in which you have added E_NAME1 field, then check E_NAME1 from Fields screen
    u2022Click on 'Basic List' button; give line (row no.) and sequence (column no.) for extra fields.
    u2022Execute/Test the Query, you will get desired result.
    Please let me know, if you need more information.
    Regards,
    Dinesh
    Edited by: Dinesh Tiwari on Oct 29, 2009 7:13 AM

  • How to ADD field in iview ?

    hi,
    in portal-iview i want to add a field.
    when i go to 'portal-content -> open the iview with right click -> preview' and then
    do ctrl-alt-right-mouse click i got to the customizing of the fields.
    i know how to HIDE fields there, but i don't know how to add fields ? in the list
    of the fields the necessary fields are available, BUT i only have to options:
    hide -> YES or NOT PERSONALIZED
    any ideas ?
    reg, Martin

    Gopal,
    the root element of this fields does NOT have the option 'decorate'.
    it is the quoata overview of ESS : sap.com/ess~quotas
    the top of the tree has option 'decorate', but this is above the necessary table where
    i select the data.
    my adrl is 
    martin.svik(at)denzel.at
    maybe we can 'change' some screenshots where you can send me yours and i can
    send you mine to explain it in a better way
    reg, Martin

  • How do I manage Lightroom photos when using 2 computers, keeping all edits made on either one?

    Based on http://forums.adobe.com/thread/1308132?tstart=0 I decided to add each question seperately:
    Hello, I'm quite interested in buying Lightroom 5.2. I tried the RC which ran out now. Yet, I have a several questions that I can't really find good conclusive answers to, that I'd like to get answered before buying LR. Please don't write maybe like this or that (assumptions), since I don't want to start my whole workflow and then realize that I have to change everything around, so please answer, if you know for sure that something works and you are, preferably, using that method too.
    This is the biggest question, where I mainly want a conclusive answer:  How do I manage Lightroom photos when using 2 computers, keeping all edits made on either one of them, using the same photos for editing. I won't use DNG. Details: I mainly use my older MacBook Pro, but would like to be able to use my PC as it's way better (Specs: i5 2500K, 16GB RAM, SSD, USB3, nVidia GTX 560 TI etc.). I have 2 external HDs that I could use, one for Backup and one for the actual Photos/Edits. I'll probably need to use it as my internal HDs are quite full, and I can't just delete stuff or move it to an (Developer programs, Lossless music, etc.).
    Based on this, how do I back up the whole thing e.g. Photos folder (all photos and edits, and preferably presets too)?

    I believe it should be possible to work cross-platform without having to relink files each time, or without having to keep exporting/importing the catalog, by keeping the single catalog and the image library on the one external drive which is then switched between systems as needed.
    Obvious first requirement is an external drive that is formatted in such a way (e.g FAT32) that it can be used on both platforms in read/write mode. Given that, if the catalog AND the images parent folder are both established at the same level in one overall parent folder, then it should be possible to take advatage of Lightroom's ability to use relative paths rather than absolute paths to detect the images, no matter if the drive is named (Mac) or lettered (PC). This is how "export as Catalog" works, i.e. it creates a "package", aka a parent folder, containing the catalog and a replica of the exported images folder hierarchy alongside the catalog. Take that "package" to another system (same OS or not) and "it just works" even if the drive letter is different or the OS is different....because the relative path from catalog to images is still the same.
    I haven't tested this cross-platform (though I have between different PC systems with different drive letters) so for me it's still just a theory, but there may be others who have done this successfully.

  • How do I close a JInternalFrame when using subclasses and a separate cla...

    The heading should be: How do I close a JInternalFrame when using subclasses and a separate class for the actionListener?
    I have just created a JInternalFrame appclication and now I want to structure up my code. I have a Superclass that contains the usual settings for the two JInternalFrame:s, and the two subclasses with frame specific information. Both the JInternalFrames use the same OK button. I want to have the actionListener outside the classes to avoid repetition of code. But the dispose()-function does not work properly, it does not close the opened JInternalFrame. What�s wrong?
    class Superclass extends JFrame
         JButton b= new JButton("ok");    
         Superclass()
    class Subclass1 extends Superclass
         Subclass1 ()
              add(ok);
           ok.addActionListener(new Listener());
    class Subclass2 extends Superclass
         Subclass2 ()
              add(ok);
           ok.addActionListener(new Listener());
    class Listener extends Superclass implements ActionListener
         public void actionPerformed(ActionEvent e)
                   dispose();
    }How do I controll in the Listener class that the button in Subclass1 is beeing pressed?

    First of all I think I misunderstood your question. You said you had two internal frames, so I thought you wanted to close the internal frame.
    It now looks to me like you want to close the entire JFrame, which makes the code even a little easier. Something like:
    JComponent component = (JComponent)event.getSource();
    JFrame frame = (JFrame)SwingUtilities.windowForComponent( component );
    frame.dispose();
    Ok, I will make a try:
    public static Container getAncestorOfClass(Class c, Component comp)
    w.getAncestorOfClass(w, this); Fiirst you need to learn the basics of reading the API.
    "getAncestorOfClass()" is a static method. That means you don't use a variable to invoke the method. You use the class itself.
    "w" is a variable, which is a JFrame, but that is not what the first parameter should be. The first parameter is a "Class".
    "this" will refer to your Listener class, but you need the Component that generated the ActionEvent.
    When I thought you wanted to close an internal frame then the code would have been something like:
    JComponent component = (JComponent)event.getSource();
    Container container = SwingUtilities.getAncesterOfClass( JInternalFrame.class, component );
    JInternalFrame internalFrame = (JInternalFrame)container;
    internalFrame.invokeSomeMethodHere();If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
    http://homepage1.nifty.com/algafield/sscce.html

  • HOW TO ADD FIELDS OF BSEG-ZFBDT & BSEG-ZBD1T

    hi frnds.
    currently iam working on SD MODULE I NEED the NET DUE DATE SO HOW TO DO THAT
    1 problem plz:
    HOW TO ADD FIELDS OF BSEG-ZFBDT & BSEG-ZBD1T
    TOGETHER
    one is date & other is numeric value so how?
    one is date & other is numeric value so how to add this 2 fields
    & finally i want to display the o/p in date format dd/mm/year
    THANKS IN ADVANCE.

    Hi Mahesh,
    one of the nice features of ABAP is that it takes care about month/year changes when adding days/month on a date.
    ADD lv_zbd1t TO lv_zfbdt.
    This should work fine. If not, try to convert zbd1t into an integer first.
    To get you preferred date output format try this:
    DATA: lv_datestring TYPE string.
    CONCATENATE lv_zfbdt+6(2) '/' lv_zfbdt+4(2) '/' lv_zfbdt(4)
    INTO lv_datestring.
    This isn't tested, but should give you a clue.
    Regards,
      ok

  • How to add fields to already loaded cube or dso and how to fill records in

    how to add fields to already loaded cube or dso and how to fill  it.can any one tell me the critical issues in data loading process..?

    This is sensitive task with regards to large volumes of data in infoproviders.
    The issue is to reload of data in case of adjusted structures of infoproviders.
    Indeed there are some tricks. See following:
    http://weblogs.sdn.sap.com/cs/blank/view/wlg/19300
    https://service.sap.com/sap/support/notes/1287382

  • How can we get ADFSecurity work when used in OC4J, OID and OAM?

    I am getting error in http server log "mod_oc4j: Response status=499 and reason=Oracle SSO, but failed to get mod_osso global context."
    But I am not using Oracle SSO and my client doesn't want to use it either, I am using OAM SSO(CoreIDSSO) in my configuration. Please read the details below.
    I am using ADFSecurity in an app that is protected by OAM. To migrate ADFSecurity permissions from
    system-jazn-data.xml to OID, I used JAZNMigrationTool to populate OID with Grantees and Permissions. OAM gives login page, and authentication works fine.
    But ADFSecurity is not working. ADFComponent Delete button is enabled even for roles that dont have permissions for the iterator delete.
    - The app works fine when I use without OAM. ADF Security permissions work fine.
    - The app works fine when used with OAM, but with ADFSecurity disabled (enforce=false).
    - When I enforce ADFSecurity alongwith OAM, ADFSecurity is not working.
    In the doc "Oracle Containers for J2EE Security Guide b28957", there is a mention of use of CoreIDPrincipal for permissions. Our OID Permissions entries show
    LDAPRealmRole for attribute orcljaznprincipal. I am not sure if this could be the reason.
    We have configured AccessServerSDK for the SOA instance and have policy for the urls in the policy manager. We have entries in orion-application.xml, orion-web.xml and system-jazn-data.xml as per the documentations.
    How can we get ADFSecurity work when used with OID and OAM?

    Have you been able to successfully integrate OAS with OAM & OID? We have similar requriement and so far we have not been able to get it working.
    We have application specific roles which we map to OID roles using orion-application.xml.
    Any pointers to achieve this would be greatly appreciated.
    thanks,
    Dipal

  • How to add an image over another using af:image

    How to add an image over another using af:image
    Thanks,
    Veera

    i have a image which is black strip. i have added that to af:image
    <af:image source="image1" id="image" />
    on the black strip, i need to add company logo.
    how to achieve it.
    Thanks,
    Veera.

Maybe you are looking for

  • Error while activating webservice-consumer-proxy

    Hi, I'm trying to generate a webservice-consumer-proxy from a Salesforce.com-WSDL-File. When trying to activate the proxy I receive an error-message from class CX_ESD_EXCEPTION stating "Beim Aktivieren des Proxys ist ein Fehler aufgetreten." (in engl

  • Migrating and Backing up Schemas (complex database structures)

    Hey guys, I need to figure out a way to back up and also migrate our Oracle database from our production schema to the dev schema and the other way around. We have bunch of config tables that drive how systems on our platform run, and when setting up

  • Purchase and Activation

    I bought the developer license and Apple have debited my credit card in the amount of $ 99.00. And until now Apple has not sent the confirmation email. Has anyone experienced this? Thanks Junior Santos

  • I'm desperate!

    I'll try to make this brief. Projects created in Final Cut Express HD don't work in Final Cut Pro. What do you do? I upgraded to Final Cut Pro thinking all my older projects could easily be updated. Now they all crash whenever I try to open them. Thi

  • Adobe Reader X embedded files in Power Point Presentation

    I receive power point presentations with embedded pdf files. After installing Reader X these files no longer open. I see that other people have this problem but i have yet to see anyone say they have solved the problem. I have switched off the protec