Adding customization fields in JPDK portlet

we need to create a portlet which can be customized to add more than one set of 4 fields. Everytime a new set is added the 4 fields will repeat. Also we want ot give user opton of adding more sets. A set can be considered as an object and we basically need a collection of objects as portlet customization. I saw name value pair customization object but can that handle lists?

Hi,
The NameValuePersonalization Object can only persist simple data types (char,short, int, String) or arrays of basic data types (String[], int[], float[]). It cannot personalize user defined java objects onto file preference store. Having said that, you will have to devise a way so that you can personalize your objects onto preference store by mapping to the preference store data types mentioned above. Consider this example,
class UserProfile{
String userName;
String userId;
//getter methods for member variables
UserProfile[] up //up is an array of UserProfile objects that you need to persist on the preference store. Since, UserProfile is a user defined object, it cannot be persisted as is.
class MyPersonalizationObject extends NameValuePersonalizationObject{
public static final String NAME = "NAME";
public static final String USERID = "USERID";
public static final String EQUALS = "=";
public static final String DELIMITER = ",";
//extending the NVPO to store your custom object
void storeUserProfiles(UserProfile[] up, String userProfileKey)
int count = up.length;
String[] upToStringArray = new String[count]; //create a string array to map each UserProfile object to an element in the String Array i.e. up[0] ----> upToStringArray[0]
String name = null;
String id = null;
StringBuffer sb = new StringBuffer(100);
for ( int i = 0; i < count ; i++ )
name = up.getUserName();
id = up[i].getUserId();
sb.append(NAME).append(EQUALS).append(name).
.append(DELIMITER).append(USERID).equals(id);
//eg. NAME=john,USERID=100 is the content of an array element
upToStringArray[i] = sb.toString();
sb.setLength(0);
//now persist this String Array on preference store
putStringArray(userProfileKey, upToStringArray);
//fetch UserProfile from preference store
UserProfile[] getUserProfiles(String userProfileKey)
//listing the steps
//retrieve the string array
for each element in the array
first stringtokenize it on DELIMITER
then stringTokenize the elements got in the previous step on EQUALS
extract name, id values
construct UserProfile object by passing the value got above
//return the array of UserProfile objects
Hope this is of help.
Regards,
Abhinav

Similar Messages

  • Render custom Customize Link in JPDK V2

    Hi
    I need to render my own 'Customize' link, that will invoke my EditDefaults JSP, using JPDK V2 (JSP portlet). Could someone please help. I could not find an API call that would do that.
    Regards
    Harry

    Hi
    I am not sure I asked my question clear enough.
    I need to render this:
    <font class="PortletHeaderLink">Customize</font> 
    I.e. the customize link, but not inside the portlet header.
    Do I need to do this:
    out.println(iframe.getResource(pr, iFRAME_MESSAGES, "CUSTOMIZE"));
    If so, I am not sure how to build up the following for my jsp. (It's just a JSP using the default renderer)
    String RESOURCE_PATH = "oracle.pdk.utils.iframe.";
    String iFRAME = RESOURCE_PATH + "iFrame";
    String iFRAME_MESSAGES = RESOURCE_PATH + "iFrameMessageBundle";
    Thanx
    Harry
    Please find an article "Adding Customization to Java Portlets" and "Adding Extra Render Modes to
    Java Portlets" in PDK.zip explains to render Edit and Edit Defaults Also Developer Services iframe portlets uses JSP to add customize mode
    using JSP.
    Link
    http://portalstudio.oracle.com/pls/ops/community.comm_folder_download.get_item?p_folderid=233480&p_itemid=279865&p_caid=233

  • Raise event from a JPDK portlet

    Hi,
    I'm using iAS 10g, Release 10.1.2.0.2.
    I want to pass some parameters to a Discoverer portlet.
    Currently I've accomplished this through a Simple Parameter Form, but there are some limitations:
    -only 5 parameters
    -parameters cannot be dynamically loaded
    So the only solution I could think of is to create a JPDK portlet with a form where I enter the required parameters. The portlet has an event and some output parameters. Than map the event output to the page parameters.
    However, I don't know how to raise the event.
    Is there a way to accomplish that? Or can you point me in another direction than the JPDK portlet?
    Please advise.
    Thanks,
    Cristiana.

    i am not really sure but i remember that you cant interact with events in that version its available in 10.1.4 version
    how about creating page parameters on that page, then link it from anotherwhere by adding the parameters at the end of the url.

  • Load transaction datas on customize fields

    Hi experts
    A hard question for me need some hits.
    A Transaction datasource has been enhanced and added some customize fields in extraction structure. If there are only some new transaction data on customize fields, how to load these data into delta queue?

    HI,
    Need few details.
    1)Do you mean you had just enhanced the data source by including the new fileds from extract structure to comm structure.
    or
    2) you had enhanced the data source by appending new fileds ? if you had appended new fileds you need to write code in cmod Fm to populate the values to the added fileds.
    next make sure the newly updated fileds are selected for the 1st case and for case 2 you need to make sure the option "field only know in exit" is checked along with the selection option.
    once done...replicate the data and the newly changed fileds will be visible in BW side map the corresponding fileds and load the data.
    use repair full request to load data in to BW along with the historical data.
    Note: If you want to load the historical data then you need to delete the setup tables and load the data. then from next time when the delta is scheduled then u can see the records in the delta queue.
    Regards
    KP
    Edited by: prashanthk on Dec 15, 2010 4:58 PM

  • [b]Change layout of customization renderer of a portlet[/b]

    Urgent...
    I follow "Adding customization to Java Portlets PDK Release 2" to render portlet content.
    1. How can I change the layout of the customization page?
    - remove the bannner, header, footer
    2. Retain the "Apply", "Ok" and "Cancel" button in the customization page?
    I had tried to add <renderCustomize>false</renderCustomize> in provider.xml to remove the header and footer, but it also remove all buttons.
    3. How can I code the buttons in my program that have the same functions as default one?
    Thanks!

    Here's a simple example. Selecting the black logo and using refine edge create a layer mask. Now in the upper layer all that is necessary is to pick a colour and, with paint pot selected, click anywhere in the logo for an instant change. From hero to wuss in a click of a mouse.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Added new field to cube but data not passed from DSO

    Hope someone can help.
    (BI 7.0) We added new fields into a cube. The fields already existed in the DSO. When we ran the process chain in development for the first time after making this change, we notice that the 'historical' data for these fields is populated in the cube. When we do this in our quality system only new data passed to the cube is updated. In development in the sub-chain DTP request we see all previous requests listed under selections. In quality it is only the latest request. The only difference is that the DeltaInit flag in the DTP request in development is ticked (extraction mode) - but not in quality. Does anyone know whyb this is?

    hi peter,
    Adding fields to cube doesn't affect delta status...The delta DTP should be able to handle delta requests automatically.
    I guess in you quality system, the cube already got all requests updated from ODS before you importing the change request. And in develop system none of the requests in ODS were updated before the change.
    Regards,
    Frank

  • Adding new field to data source -can not see them

    Experts,
    I have added 4 fields to the data source 0FI_AA_11 .
    I can able to see these fields in the append structure or in RSA2,but i can not able to see in RSA6.I reactivated append structure ,still i can not see these fields in RSA6.
    Please advice me how can i see them in RSA6.

    Hi Manoj,
       Have a look, similar post:
    Re: not able to see new fields in datasource
    Hope it Helps
    Srini

  • Added new field to ALV but not  displaying the ouput

    Hi guys,
    I'm adding one more column to be displayed on an old existing program that uses REUSE_ALV_FIELDCATALOG_MERGE to generate the ALV fieldcat.
    DATA : BEGIN OF itab OCCURS 0,
      matnr LIKE eina-matnr,
      extwg LIKE mara-extw,
      matkl LIKE mara-matkl,
      mtart LIKE mara-mtart,
      maktx LIKE makt-maktx,
      lifnr LIKE eina-lifnr,
      wglif LIKE eina-wglif,
    <span style="color:red">idnlf like eina-idnlf,          " <----
    new field</span>
      name1 LIKE lfa1-name1,
      profl LIKE mara-profl,
    END OF itab.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = sy-cprog
          i_internal_tabname     = 'ITAB'
          i_client_never_display = ''
          i_inclname             = sy-cprog
         i_bypassing_buffer     = 'X'
        CHANGING
          ct_fieldcat            = t_cat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    I've added in a new field inside the ITAB internal table, but it wouldn't appear in the t_cat, only all the old fields will appear. What have i done wrong?

    Hi
      Facing similar kind of issue.. added one field to the existing internal table. This is not getting populted by the field catalog merge FM. Tried with the suggested solution also of running programs BALVBUFDEL,
    BCALV_BUFFER_DEL_SHARED then logging off  and logging in..
    But the newly added field is not getting populated. Any suggestions would be of great help.
    Regards,
    sridevi S

  • Adding new field to Remote Cube

    Hello,
    We have an existing remote cube that we are trying to add a new field to in 7.0.  I've already added the field to the datasource, unhidden it, and tested it in RSA3.  Now i'm trying to bring it into BW and add it to the remote cube.  I right clicked on the source system under the data target and chose Replicate Metadata however the new field does not show up anywhere.  What am i doing wrong?  Does a remote cube work differently?  How do i get my new field over from R3?
    Regards,
    TMS

    That's the problem.  The R3 field does not show up in the datasource in BW so it can be moved over to the transfer structure.  As you know when you replicate metadata, the new datasource fields appear and can be mapped into the transfer structure.  That is not the case for this remote cube.  The new field is not there.

  • Adding new field to Customer master sales data area sales tab

    Hello everyone,
    I am new to module pool so seeking some help from experts here.
    I have a requirement were in I have to add a new field to the customer master (VB02) sales area data sales tab.
    I found that there is no screen exit.Is there any other way of doing it?
    could you please provide me with a step by step procedure of doing it.
    With Regards,
    Karishma.

    Hi,
    How did you look for screen exit? Have you also tried it in BADI? 'Coz normally, adding custom fields to a standard screen has to be implemented in exits.
    I haven't worked with VB* screens yet so I can not give you a some possible exits. But you can do some debugging. I think there's an available code in the net that searches for exits/screen exit (ask Mr.Google). You can also ask him how to search BADI in debugging mode. I remember it's TCode SE24 then look for cl_exithandler class, get_instance method. Then look for exit_name variable.
    Hope this helps.

  • Adding new fields to the data flow

    Hi,
    I am currently planning to add some new fields in one DSO and map it (with info source) in the update rules.
    Will adding new fields to Info source - Comm. structure affect all the update rules connected to it?
    The info source is connected to multiple DSO.
    (The data source is currently under enhancement for these fields). Once this is done, we have to replicate it to BW.
    Thanks,
    Naveen

    yes.
    Once the enhancement is done for data source in r/3 side, you will have to replicate the datasource in BW.
    Adding new fields will deactivate the update rules. You have to map the same in update rule and activate the same.
    This will require activation of  transformations, update rules, etc for related DSOs. Try to find out the where used list for the DSO where you want to add the new objects. Then check each objects whether these are activate after the changes. If these are inactive, you will have to activate all the objects.
    Cheers
    Chanda

  • SRM 7.0 -Adding Custom fields in Contract Item screen at particular positn

    Hi,
    We have a requirement to add new custom fields in the Contract Item screen at required position, in Left and right side container.
    We have tried the following methods but have not been able to achieve the same. Kindly help!
    1) Added new field in Context through enhancemnt in the Details screen View of Contract , Binded the field to the field in structure INCL_EEW_PD_ITEM_CSF_CTR and add the field to teh Layout - Using this method, The field is not saved to the table.
    2) Added the field to meta data table /SAPSRM/V_MDF_IC - This is positionng the field on teh right container at the bottom. We want to position it on left side.
    Kindly help to understand where we are going wrong.
    Thanks in advance,
    Regards
    Prasuna.

    Hi Prasuna,
    Sorry ..You are right..I was looking at some other WDC related to contract data..It you map the CUFs to /SAPSRM/S_CLL_CTR_ITEM which has the include structure INCL_EEW_PD_ITEM_CSF_CTR then it should work fine.
    If you do this, are you able to view the new fields on the screen?
    you mentioned that you are not able to save the data to the table.
    Include your fields in INCL_EEW_PD_ITEM_CSF as well because if you add CUF to any of those doc types, you also have to add those CUF to the global structure for CUF documents.
    Also Check if you fields are there in structures BBPS_CTR_CUF_ITEM,BBPS_CTR_UI_ITEM and BBPS_CTR_ITEM.
    Check whether you have implemented the BADI's like BBP_DOC_CHECK_BADI ,BBP_DOC_CHANGE_BADI and BBP_DOC_SAVE_BADI . check out the structures (whether they having the CUFS) used in those if you have implemented any of them .
    Regards
    Lavanya
    Edited by: LAVANYA CHAVA on Aug 25, 2010 10:10 AM

  • Adding Summary Fields

    Good Morning Everyone,
    We would like to add summary Fields.
    1)
    Double click on the Data Model icon on the Object Navigator
    Click on the Summary Column tool on the Data Model Editor's left hand toolbar
    Double Click on CS_1
    and so on
    2)use SUM at Report Wizard :
    After researches, we founded Creating summary / formula columns in data model does not show them in paper layout. We learnt the report wizard, and choose to display the summary / formula column in one of the steps.
    Following Report Wizard and will see SUM option;
    http://nycapex.webs.com/apps/photos/photo?photoid=95360469
    We have hard time in both ways.
    If you have experience in Adding Summary Fields, please share with us.
    Thank in advance,
    NY
    Edited by: New Yorker on Aug 17, 2010 7:44 AM

    Your screen shot shows that you have nothing selected as a summary. So, there is nothing to display in the layout. What is your exact problem? The available fields don't look like you can SUM them, so the option is not available.
    we founded Creating summary / formula columns in data model does not show them in paper layoutIf you add them later on, you can manually add them in the layout.
    Edited by: InoL on Aug 18, 2010 1:53 PM

  • Adding a field to an sql statement in Oracle Reports error ORA-00933

    We have been requested to add a field that already exists in the table referred to by the sql statement in Oracle Reports Builder. The report was set up by a consultant about 3 yrs ago and we don't really have much skill in this area. What is happening when I try to modify the SQL statement, either adding a field or deleting a field to the SELECT statement, causes an error message preventing the statement from being saved. The only way out of the error message is to click Cancel. The error message is
    ORA-00933:SQL command not properly ended
    ORDER BY Program ==> NAME
    Even adding or deleting a space anywhere in the SQL statement causes the error (not adding any new fields). A coworker found that if we comment out the ORDER BY, the statement will accept the new field in the SELECT section, however then we lose the order by functionality. I would like to add one additional field before the FROM. Not sure if any additional data are needed. Thank you.
    SELECT p.person_uid PIDM_KEY, p.id_number ID,
                   p.full_name_lfmi name,            
                    p.BIRTH_DATE, p.GENDER Sex,
                    Decode(a.residency,'D',p.Primary_ethnicity,'F')  Ethn,
                    a.academic_period TERM,        
                    CASE WHEN :p_group_by = 'PROGRAM' THEN a.program
                                 ELSE ' '
                    END AS Program,
                    a.COLLEGE, a.degree, a.major, ' ' rule,
                    a.STUDENT_POPULATION,a.STUDENT_LEVEL,    a.application_status Status,  a.application_status_date app_sts_dte,
                    ad.decision_date1 Last_Dec_Date,
                    ad.decision1||' '||ad.decision2||' '|| ad.decision3||' '|| ad.decision4||' '|| ad.decision5 Decisions,
                    /*  Deposit Date uses the last term entered in :p_term parameter string */
                    (SELECT MAX(deposit_effective_date) FROM usf_as_deposit WHERE account_uid = a.person_uid &term_clause group by account_uid)   AS "DEPOSIT DATE",     
                    ph.phone as PHONE,
                    CASE WHEN PS.FIRST_CONTACT IN ('NET','PAP','COM','COP') THEN PS.First_Contact
                     ELSE CASE WHEN ps.latest_contact IN ('NET','PAP','COM','COP') THEN PS.Latest_Contact
                                ELSE '  '
                                END
                    END AS FIRST_CONTACT,
                    DECODE(:p_address,'Y',REPLACE(adr.street1||' '||adr.street2||' '||adr.street3||' '||adr.city||','||adr.state||' '||adr.nation||' '||adr.zip,'  ',' '),' ') as  address, adr.nation, adr.state,
                    goremal_email_address email, a.residency, a.application_date, p.primary_ethnicity, c.cohort
    FROM MST_ADMISSIONS_APPLICATION A,
               MST_PERSON p,mst_pre_student PS,  Admissions_Cohort c, usf_v_phone_pr_ma ph,
               MST_admissions_decision_slot AD, usf_v_email, usf_v_address_dr_lr_ma_pr adr
    WHERE a.PERSON_UID = p.person_uid
            AND a.curriculum_priority  = 1
            AND a.person_uid = ps.person_uid
           AND a.person_uid = ad.person_Uid(+)
           AND a.person_uid = goremal_pidm(+)
           AND a.person_uid = adr.pidm(+)
           AND a.person_uid = ph.pidm(+)
           AND ph.rnum(+) = 1
           AND a.person_uid = c.person_uid(+)
           AND a.academic_period = c.academic_period(+)
      &Where_Clause
           /*    TAKE OUT FOLLOWING LINE AFTER DATA IS CLEANED UP  */
            AND NOT(p.id_number = '00000000'   OR SUBSTR(p.id_number,1,1) = 'B'  OR UPPER(p.full_name_lfmi)  LIKE '%TESTING%')
           AND  a.application_status_date >= NVL(:p_as_of_date,sysdate-8000)
           AND a.academic_period = ad.academic_period(+)
            AND a.application_number = ad.application_number(+)
            AND a.degree <> 'ND'    /*   AND a.college <> 'LW'                         --  Does not need non-degree and law students    */
           &Cohort_Clause 
    ORDER BY Program  &ORDER_CLAUSE

    Hi Denis,
    I tried your suggestion. The good thing is that adding the comma allowed me to be able to add a.campus to the select statement, unfortunately, another error message happened.
    ORA-00936: missing expression SELECT p . person_uid PIDM_KEY ,
    p . id_number , p . full_name_lfmi name , p . BIRTH_DATE , p . GENDER Sex ,
    Decode ( a . residency , 'D' , p . Primary_Ethnicity , 'F' ) Ethn , a . academic_period TERM ,
    CASE WHEN : P_group_by = 'PROGRAM THEN a I started over and tried only putting in the comma and get the same message even though I didn't add campus. After that, removed the comma which led to the ORA-00933 error message. So once again, I had to close the file without saving, in order for the report to run at all.

  • Error while adding user fields to user table using vb6.0

    Hi,
    I am adding a user tables using vb6.0 using DIAPI.
    I am able to add the user table successfully.
    I am getting the following error when i am adding the fields to the table.
    "The metadata object for this object cannot be updated, since it's ref count is bigger than 0."
    My code is as follows:
        oUserFieldsMD.TableName = TABLE_NAME_ITEM_LOCN
        oUserFieldsMD.Name = vTableFields(0, lCount)
        oUserFieldsMD.Description = vTableFields(1, lCount)
        oUserFieldsMD.Type = vTableFields(2, lCount)
        oUserFieldsMD.EditSize = CLng(vTableFields(3,lCount))
        lRetCode = oUserFieldsMD.Add
    This error does not come up when i try to add the field to my table using the vb sample provided by SAP.
    Your help will me much appreciated.
    Thanks.

    Hi Satish,
    The problem is that you added the table and the objetc that you used to add the table is not freed properly. You need to free the object and then the reference count to that table will be 0 - which will enable you to add the fields
    e.g
    Dim pUTables As SAPbobsCOM.UserTablesMD
    'Do your stuff
    Set pUTables = Nothing
    Dim pUFields As SAPbobsCOM.UserFieldsMD
    'Do your stuff
    Set pUFields = Nothing

Maybe you are looking for

  • My music won't sync and my songs were deleted.

    I had around 300 songs on iTunes and they would not sync to my ipod, then today I got on my computer to try again, and many of my songs were deleted from iTunes, but not from my iPod.

  • Illustrator CS4 crashes when starting

    Hi All! I need help with my Illustrator CS4. I recently installed it on my Macbook Pro running Yosemite and every time I try starting the software I get a message telling me that something is wrong with two of the plugins "PhotoshopExport.aip & Photo

  • Synchronize multiple tasks and multiple boards with X-series USB devices

    Hi all, I am trying to figure out how to synchronize multiple tasks across multiple X-series USB boards (6353, to be precise).  I have to run a digital output task AND an analog output task on each board.  All four tasks (the DO and AO on Board 1, an

  • ACROBAT PRO 7 HAD ONE TOUCH pdf -  IS THIS AN OPTION ON PRO 9?

    I seem not to have the ability to scan directly to PDF via my scanner as I did with Pro 7. Are my only options to start in Acrobat and "create"

  • Convert type dats to oracle type date

    Hi guys, I have abap field data: begin of itab occurs 0,         dat type dats, end of itab. how can I convert abap field dat into oracle type DATE, so I can insert dat into that oracle field? thanks, nihad Edited by: nihad omerbegovic on Mar 25, 200