Passing pareters between portlets on other pages

is there any posibility to do that? and if "yes" how to do that, maybe some examples... Thanks

Two possible approaches: Using the parameter service (see the PDK for details) or storing the parameter values persistently based on the session id and querying them back within the receiving portlet.

Similar Messages

  • Passing Parameters between Portlets or pages

    Hi,
    How can we pass the data from a Portlet in one page to another Portlet in a different Page??
    Requirement: I want a portlet which should take some parameters(basically a form),On submit should process the parameters and should forward the result to a Portlet in another page.
    Regards
    Yash

    Yash,
    You could use session variables to save information that can be used during the browser session. Example would be the form asks a user for their nickname. The user types in his nickname and hits the submit button. The form will then save the info in a session variable. Then any other portlet can open that session variable and get the info and use that info. Now if the browser is closed, the info in the session variable is lost. Check out this link:
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/PLSQL/DOC/PLDOC_9026/wwsto_api_session.html

  • Passing parameters between portlets (PL/SQL PDK)

    I'm new to the PDK, so forgive me if this is a dumb question. I need to develop a portal page containing a single search portlet, and then many other associated portlets which bring back various bits of data based on the result of the search.
    Is it possible to drive the content of other portlets on the same page by passing values from one to another and refreshing the whole page?
    null

    Neil,
    You can definitely pass parameters from one portlet to another in PL/SQL and we actually have a sample that you can take a look at. In the PDK, download the Parameter passing and CSS Example Provider sample. http://technet.oracle.com/products/iportal/files/pdkjan/index.html
    Click on PL/SQL
    One of the portlets demonstrates how to pass parameters to one portlet or all portlets on a page.
    Hope this helps,
    Sue

  • Portlet event link to pass parameter between portlets

    Ok list, I followed the documentation Adding Parameters and Events to Portlets
    PDK Release 2 (9.0.2 and later) and tried to make a portlet that pass parameter to another portlet using event link. I created the supposed parameter in the page and made the correct association to the receiving parameter portlet. The case is: The parameter is not caught in the receiving parameter page.
    This is my event link jsp code:
    <%
    String sImgPath = PropertiesReader.getProperty(PropertiesReader.KEY_IMAGES_PATH);
    PortletRenderRequest portletRequest = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    // The portlet definition in provider.xml includes the following:
    // - Event "submit" with event parameters "funcionalidade"
    String eventSubmit = EventUtils.eventName("submit");
    String eventParamFuncionalidade = EventUtils.eventParameter("funcionalidade");
    // Build up the list of parameters for the "submit" event
    NameValuePair[] eventSubmitParams = new NameValuePair[2];
    // Give the 'funcionalidade' event parameter the constant value 'chat'
    eventSubmitParams[0] = new NameValuePair(eventParamFuncionalidade, "chat");
    // The event name must be passed as a parameter on the URL
    eventSubmitParams[1] = new NameValuePair(eventSubmit, "");
    %>
    <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
    <TR><TD><a href="<%=PortletRendererUtil.constructLink(portletRequest,   portletRequest.getRenderContext().getEventURL(), eventSubmitParams, true, true)%>"><IMG SRC="<%= sImgPath + "menuButChat.gif" %>" BORDER="0"></a></TD><TR>
    </TRABLE>
    And this is my receiving parameter jsp code:
    <%
    String sFuncionalidade = "";
    PortletRenderRequest portletRequest = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    // Get the portlet definition - needed to get the public portlet parameters
    PortletDefinition portlet = portletRequest.getPortletDefinition();
    // Get the public portlet parameters
    ParameterDefinition[] parameters = portlet.getInputParameters();
    // Display all values for each of the public portlet parameters
    for (int currParameter = 0; currParameter < parameters.length; currParameter++)
    String name = parameters[currParameter].getName();
    out.println(" <p>name = " + name + "</p> ");
    // Get the parameter values
    String[] values = portletRequest.getParameterValues(name);
    // Display the parameter's values.
    if ( values == null )
    // Null array indicates no values for this parameter.
    out.println(" <p>values i null</p> ");
    else
    out.println(" values nco i null ");
    // Loop through each of the values and display non-null values on a separate line.
    for ( int j = 0; (values != null) && (j < values.length); j++ )
    sFuncionalidade = values[j];
    out.println(" <p>" + sFuncionalidade + "</p> ");
    %>
    And this is my portlet definition in provider.xml:
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>3</id>
    <name>MenuColaboracao</name>
    <title>Menu de Colaboragco</title>
    <shortTitle>Menu de Colaboragco</shortTitle>
    <description>Portlet de menu para funcionalidade de Comuicagco e Colaboragco.</description>
    <timeout>10000</timeout>
    <timeoutMessage>Portlet timed out</timeoutMessage>
    <showEdit>false</showEdit>
    <showEditDefault>false</showEditDefault>
    <showPreview>false</showPreview>
    <showDetails>false</showDetails>
    <hasHelp>false</hasHelp>
    <hasAbout>false</hasAbout>
    <acceptContentType>text/html</acceptContentType>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>false</renderContainer>
    <contentType>text/html</contentType>
    <showPage>/menuColaboracao.jsp</showPage>
    <pageParameterName>next_page</pageParameterName>
    </renderer>
         <event class="oracle.portal.provider.v2.DefaultEventDefinition">
         <name>submit</name>
    <description>Use this event to submit the form data to a page</description>
    <parameter class="oracle.portal.provider.v2.DefaultParameterDefinition">
    <name>funcionalidade</name>
    <displayName>funcionalidade</displayName>
    <description>Parbmetro que indica a funcionalidade a ser apresentada.</description>
    </parameter>
    </event>
    </portlet>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>4</id>
    <name>HomeController</name>
    <title>Home Controller</title>
    <shortTitle>Home Controller</shortTitle>
    <description>Portlet que controla a exibigco do jsp correspondente a opgco de menu selecionada.</description>
    <timeout>10000</timeout>
    <timeoutMessage>Portlet timed out</timeoutMessage>
    <showEdit>false</showEdit>
    <showEditDefault>false</showEditDefault>
    <showPreview>false</showPreview>
    <showDetails>false</showDetails>
    <hasHelp>false</hasHelp>
    <hasAbout>false</hasAbout>
    <acceptContentType>text/html</acceptContentType>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>false</renderContainer>
    <contentType>text/html</contentType>
    <showPage>/homeController.jsp</showPage>
    <pageParameterName>next_page</pageParameterName>
    </renderer>
         <inputParameter class="oracle.portal.provider.v2.DefaultParameterDefinition">
         <name>funcionalidade</name>
    <displayName>funcionalidade</displayName>
    <description>Parbmetro que indica a funcionalidade a ser apresentada.</description>
    </inputParameter>
    </portlet>
    Where do I miss ???
    Any help will be appreciated.
    Regards,
    Leandro.

    Leandro,
    Few things which you might want to cross check to see if we are
    on the right track :
    1. Page containing Parameter receiving portlet contains a
    paga parameter mapped on to its public parameter.
    As per your example, parameter receiving page should have a page
    parameter with name - "funcionalidade" - and portlet's corresponding
    parmeter should be mapped to this page parameter. This can be
    done through "Parameters" tab in the Page Properties screen.
    2. Page containing Parameter passing portlet contains proper event
    mapping.
    As per your example, we have an event called "submit". We should
    be able to see "submit" event under "MenuColaboracao" portlet.
    When this event is raised, select which page should receive the event
    data. As soon as a page is selected, this page's public parameters
    are displayed below. Beside that we must be able to see a choice box
    which displays four choices one of which would be "Event Output".
    Map this output to the event parameter.
    Hope it helps.
    -AMJAD.

  • Passing Data between portlets

    Hi,
    How can we pass the data from a Portlet in one page to another Portlet in a different Page??
    Requirement: I want a portlet which should take some parameters(basically a form),On submit should process the parameters and should forward the result to a Portlet in another page.
    Regards
    Yash

    Thanks Abhinav,
    I went through the eventform.jsp present in the JPDK.ear.I was able to run the same,But I still have some problems accesing the values that were passed.
    1. How to get the information in the second portlet when the form is submitted to other page.
    I checked whether data is being passed from one page to another by setting method="Get".The data is getting passed to the other Page.But I am not able to use the values in the Portlet. I tried using request.getParameter("parameter") in Portlet2,but it is not working.
    2. In the page properties of page 1, I set the SUBMIT event to get the same page back,this too is not working,it is directly taking me to Page2 when I click the SUBMIT button.How to specify it other than using page properties ->events
    3.I want to know where the information regarding the Pages are stored.
    Regards
    Yash

  • Passing parameters between portlets with in the same page

    Hello,
    I have created a Form and a report. The form allows a user to make some selection values, and then upon submit it passes the selected values to the report to query the database. The results from the query are displayed in a new - seperate - window from the form. Is there anyway to disaply the report results on the same page as the form that called the report? I guess I am trying to have a page with 2 portlets (a form, and a report). I want the user to be able to make a selection from the form portlet and pass that selection to the report portlet within the same page.
    Thanks,
    McKell

    Hi I received this info from an OSS named Mahantesh. I thought it was very helpful information for passing portlet parameters between a form and a report within the same page.
    Please check these steps to pass parameter from form to report:
    This article is based on demo tables EMP and DEPT.
    1. Create a report RPT_DEPT using the query 'Select * from dept where deptno= :deptno'
    2. Create a form FRM_EMP based on EMP table.
    3. Edit the form FRM_EMP => 'Formatting and Validation Options' section => click on DEPTNO field
    => Give the value for the 'Link' (under 'Display options') as 'javascript:runrep()' where runrep is the name<br>
    of javascript function that we are going to create later.
    4. In 'Form text' section, in the 'Footer Text' add the code for the runrep function as follows.
    <script>
    function runrep()
    var formObj = document.forms[0];
    var deptno;
    for (var i=0; i < formObj.length ; i++){
    if (formObj.elements.name == 'FORM_EMP.DEFAULT.DEPTNO.01'){
    //FORM_EMP is the form name
    deptno = formObj.elements[i].value;
    break;
    var url="/portal/page?_pageid=38,1,38_31678:38_31787&_dad=portal&_schema=<br>
    PORTAL&deptno=" + deptno;
    //modify the url according to your environment.<br>
    window.location=url;
    }<br>
    </script>
    5. Modify the URL in the above code with your page url on which form and report portlets have been placed.
    6. Goto Page properties => Parameters tab (Parameters and Events option should have been enabled at Pagegroup level).
    7. Create a page parameter and map it with report portlet parameter.
    8. Now run the page, enter deptno or query the form to get the deptno and click on the link next to deptno field. You should get report with corresponding deptno on the page.

  • Help!  Communication between portlets on diffrence pages

    I have two portal pages (A, B) including two portlets (A', B'). When click a link on portlet in page A, i want to redirect to page B and pass parameter to porlet B'.
    I tried using Portlet Event but it seem that they just only communicate with each other on the same page.
    Can anyone help me?
    Thanks very much!

    Ok.
    Assuming that you have configured portlet.xml with public-render-parameter associated to your portlet. For example:
    <portlet id="...">
    <supported-public-render-parameter>yourparam</supported-public-render-parameter>
    </portlet>
    <public-render-parameter>
            <identifier>yourparam</identifier>
            <name>yourparam</name>
    </public-render-parameter>And you created your page_parameter.
    Now in runtime when you add your portlet assign value from page parameter in parameters tab.
    In your portlet you can get your parameter with
    PortletRequest req = (PortletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();     
    String location = req.getParameter("yourparam");PD: Wiring by parameters is so "old", you can try with Contextual Events too :). I recommed you starting to know Contextual Events framework to wire information between task flows, portlets, ui components...
    Basically with contextual events you have to:
    1) Create a handler method.
    2) Create a Data Control from your Java Handler class.
    3) Publish in binding layer your method.
    4) Publish a event in your page.
    5) Configure Event map: event published - your method consumer
    Off doc about wiring: http://docs.oracle.com/cd/E14571_01/webcenter.1111/e10149/pages_wiring.htm#BABIIGDD
    I hope you'll achieve your goal :).
    Regards.

  • Pass Parameter between Portlets

    I have two reports, one each in their own portlet. Portlet(A) is a summary, Portlet B is the container for the report detail.
    I need to know how to create a link and pass a variable from portlet A to portlet B.
    1. Can this be done?
    2. How?
    3. Is a wizard available to configure this?
    Thank You.

    Thanks Jerry
    I've tried out your code and it works, though amongst other things I had to change the pageid of 117 to my specific pageid. This means the report processing is specific to the page I create it for.
    I'm glad to see you've now included the idea of accessing l_arg_names and l_arg_values via pl/sql code maintained in the wizard. This is much better than modifying generated code.
    The piece of code to generate the full argument name
    p_reference_path| |'.dept', wwv_30898.wwv_standard_util.string_to_table2(nvl(get_value('dept'), 10))will be useful though I've had no problems yet with my technique of just ignoring the reference path components of the argument name.
    My current technique is to create a form on a dummy procedure and process some pl/sql on the submit button:
    args.store_arg_in_session('session_ppn',
    p_session.get_value_as_varchar2(
    p_block_name => p_block_name,
    p_attribute_name => 'A_P_DUMMY'
    ));Once I've stored a value in "session_ppn" I can access that value in any report I like with code like this
    args.set_arg_if_null
    (l_arg_names,l_arg_values,'ppn',
    nvl(args.get_arg_in_session
    ('session_ppn'),'unknown'));In this case ppn is a bind variable in the sql statment.
    Then, the report will access the session variable wherever you run it, regardless of what page you put it on etc.
    I've tried similar techniques with forms but I can't get the form to re-access the session variable when the latter changes its value.
    However the ability to set and get session variables and access them in reports is very good. It greatly reduces the amount of keying required by users. Portal would be much less useful to me without it.
    I must admit I'm very impressed with Portal and with the support for it via this discussion.
    null

  • Passing parameters between portlets

    Hi , I have a page with two portlets : one , done with the wizard , is a form , the other one is another form , but is done with a JSP.
    My trouble is that with the second form , the one done with a JSP , I must insert into the database two values , one retrieved by the jsp itself , and the other one is a value of one field of the other form.
    My question is how can I get , from my jsp , that value coming from the other portlet ???
    Thanks
    max

    Hi,
    You can redirect to another page and pass parameters to it. For this, you need to know the pageid to which you have to redirect. Assign form action to
    http://machine:port/servlet/page
    PageServlet requires few other parameters (form fields) to redirect the control to the required page.
    You can get them by making a call to
    HttpPortletRendererUtil.htmlFormHiddenFields(pr,PortletRendererUtil.PAGE_LINK)
    This returns a string similar to the following.
    <INPUT TYPE="hidden" name="_pageid" value="54" />
    <INPUT TYPE="hidden" name="_dad" value="portal30" />
    <INPUT TYPE="hidden" name="_schema" value="PORTAL30" />
    Parse it for _pageid and change the value to the page you want to redirect. Print these contents inside your form. Once you submit the form, it'll redirect the control to the page you want with the parameters.
    --Sriram

  • Pass parameter to portlet from jspx page

    Hello guys, i have one question about portlet. Curently i have 2 application, 1 weblogic portal application and 1 portlet producer application. Both project was successfully setup. I already put 1 portlet created in the portlet producer into 1 page in the weblogic portal application. The problem is, how can i pass parameter from weblogic portal page (which i call the portlet) to the portlet. Thank you

    Hi,
    worth checking the WebCenter forum as both products seem to belong there: WebCenter Portal
    Frank

  • Header portlet issue: User settings not passed to Header portlet on "My Pages"

    I am trying to write a header portlet which reads User Settings (User preference). The settings are retrieved correctly and the header portlet works fine on a Community portlet but when browsing "My Pages" or "Knowledge Directory" the settings are not being passed to the header portlet. I have tried this on multiple portals and I get the same behavior. Can you kindly let me know the cause of the problem and help me fix this issue Thanks,Rakesh

    I was able to figure out setting the global display on the default pages, but I'm still stymied at how to set the display for the page portlets for user customizations. In instances where users have added a page portlet, only the portlet header is displayed. I've done the following to try to fix the situation:
    - Deleted and regenerated the page portlets
    - Refreshed the repository
    - Refreshed the display for individual user pages
    Nothing seems to work. This is a major showstopper for us: we are scheduled to go "live" with the 9.0.2.6 version on Friday, and we do not want to ask users to recustomize their pages.
    Windows; 9.0.2.6
    Thanks for all the help!
    Mary

  • Passing parameters between portletized ADF Faces applications, possible?

    Hello,
    In the developer guide, section 4.5.3 (http://download-east.oracle.com/docs/cd/B32110_01/webcenter.1013/b31074/jpsdg_pages.htm#CHDGGCGE) it says that you can synchronize portlets using an ADF Faces component value. However, that example do not use a value coming from a real portlet, the parameter come from a selectOneChoice define in the container page.
    Is there a way to achieve the same thing but with the selectOneChoice being placed in the WSRP 2.0 portlet? Basically the communication scheme is WSRP 2.0 to WSRP 2.0 which is something possible using URL parameters. However, the problem with JSF components is that they pass their values through a JavaScript launched POST submit so the values are never added to the URL and even worst, you cannot be sure of the generated parameter name as it depends on the context in which the component exists (mainly the presence of a parent NamingContainer) and the only way to know that parameter name for sure is to have a way to call component.getClientId(facesContext) which is impossible for the portlet container and therefore for the other portlets.
    To put it shortly, is there a way to send a navigation parameter from a portletized ADF Faces application to its container page beside using goButton and goLink (we need to keep the action/actionListener functionality)?
    Regards,
    Simon Lessard

    Can someone explain how to assign a value to a parameter in JSF like in the ParameterFormPortlet source code? Something in replacement of this :
        if (viewMode)
          // Set the new parameter values. These will be intepreted by the
          // container as navigational parameters as the names match the names of
          // the declared parameters.
          actionResponse.setRenderParameter(PARAMETER1, param1);
          actionResponse.setRenderParameter(PARAMETER2, param2);
          actionResponse.setRenderParameter(PARAMETER3, param3);
        }I mean, how to replace setRenderParameter to achieve the same thing inside a JSF binding bean for example. Is it possible via the PortletContext?
    Thanks in advance for any hint.
    Jean-Philippe

  • Passing parameter between portlets

    I have a page with 2 rows and the first row contains a portlet (form) which has just one field (dept_id) with lov attached to it. When a dept id is selected from the lov I need to retrieve the corresponding employee details in the portlet which is a form placed in the second row of the page.
    Following is the procedure I'm using it to set the selected dept id in the session object and this is being called from the onchange event of the dept_id field of first form.
    PROCEDURE p_select_new_dept (p_session in out portal30.wwa_api_module_session)
    IS
    v_dept_id DEPT.DEPT_ID%TYPE;
    v_Session portal30.wwsto_api_session;
    BEGIN
    v_dept_id := p_session.get_value_as_number(p_block_name=>'DEFAULT',
                             p_attribute_name=>'A_DEPT_ID');
    v_Session := portal30.wwsto_api_session.load_session('CONTEXT', 'SESS_DEPT');
    v_Session.set_attribute('DEPTID', v_dept_id);
    v_Session.save_session;
    END;
    and following is the code I have it in the ..before displaying page...section of the additional pl/sql tab
    of the Employee Details form (which is placed in the second row of the page as portlet)
    Declare
    v_RowID VARCHAR2(100);
    v_Session portal30.wwsto_api_session;
    v_dept_id DEPT.DEPT_ID%TYPE;
    BEGIN
    v_Session := portal30.wwsto_api_session.load_session('CONTEXT', 'SESS_DEPT');
    v_dept_id := v_Session.get_attribute_as_number('DEPTID');
    BEGIN
         SELECT rowidtochar(rowid)
         INTO v_rowid
         FROM DEPT
         WHERE DEPT_ID = v_dept_id;
    END;
    p_session.set_value (p_block_name=> 'DEFAULT', p_attribute_name=> '_ROWID'
                   ,p_value=> v_rowid);
    p_session.set_value (p_block_name=>'DEFAULT', p_attribute_name=>'_CALLED_FROM_LINK'
                   ,p_value=>'ROWID');
    PORTAL30.wwa_api_module_event.do_event('DEFAULT', 'QUERY_TOP', 1, 'ON_CLICK', True, '', p_session);
    p_session.save_session;
    END;
    When I run the page and selected the dept_id from the first portlet the employee details are retrieved for the previously selected dept_id and not for the currently selected dept_id.
    For eg., if I select 10 it is not retrieving any details for this dept_id and if select 20 then it retrieves the employee details for 10(previusly selected dept_id)..and so on..
    Can you tell me what I'm doing wrong?.
    Thanks
    -Krishnamurthy

    We need to use portlet events for sending parameters across different pages.
    Following documents can give you insight on this :
    1. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/PRIMER.PORTLET.PARAMETERS.EVENTS.HTML
    2. http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/DESIGNING.PAGES.USING.PDKJAVA.SAMPLE.EVENT.WEB.PROVIDER.HTML
    -AMJAD.

  • Pass Object Between Applet and JSP Page

    Hi all,
    How can I pass an Object(such as Vector, File), rather than just string to the Applet from a JSP page?
    Thank you.

    I used Base64Encoder and Base64Decoder from servlets.com utilities.
    * convert any serializable object to a String
    public synchronized static String objectToString(Serializable obj) throws Exception {
        ByteArrayOutputStream bos = new ByteArrayOutputStream(100);
        ObjectOutputStream oos = new ObjectOutputStream(bos);
        oos.writeObject(obj);
        byte[]bytes = bos.toByteArray();
        bos = new ByteArrayOutputStream(); //to save the encoded String
        Base64Encoder enc = new Base64Encoder(bos);
        enc.write(bytes);
        String encodedString = bos.toString();
        //close all
        enc.close();   
        oos.close();
        bos.close();
        return encodedString;
    * Recreates the object from the encoded String
    public synchronized static Object stringToObject(String str) throws Exception {
        ByteArrayInputStream bis = new ByteArrayInputStream(str.getBytes());
        Base64Decoder dec = new Base64Decoder(bis);
        ObjectInputStream ois = new ObjectInputStream(dec);
        Object obj = (Object)ois.readObject();
        ois.close();
        dec.close();
        bis.close();
        return obj;
    }

  • A sample question about parameter passing between portlets

    How can I pass parameter between portlets in one page using pdk API. Please give a demo. Thx

    In one portlet I send parameter using form: actionn="<%= UrlUtils.htmlFormActionLink(prr, UrlUtils.PAGE_LINK) %>"
    <input type="text" size="20" name="textname" value="">...
    Then I want to receive the parameter in another portlet. My code is:PortletRenderRequest prr = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    out.println( prr.getParameter("textname") );
    But why I can't receive the parameter successfully.
    Thanks for any help!!!

Maybe you are looking for

  • IPod not being recognized by iTunes or My Computer

    When I plug my iPod into my computer, it begins to charge, but iTunes doesn't recognize it and neither does My Computer. I have tried it on multiple computers and multiple USB cords, all with the same result. Also, when someone else plugged their iPo

  • Dreamweaver 6 how to use with jquery mobile

    How to install jquery mobile in Dreamweaver 6 - thanks!

  • Method is executing 2 times

    Hi, Every method of a standard webdynpro application is called 2 times including WDDOINIT of component controller. I tested it from se80 as well as from portal. It is a standard SAP Webdynrpo application. I put a break point in WDDOINIT of comp contr

  • Wireless printing on Lexmark X9350

    I have just got my new macbook white running Leopard and i cant get my lexmark x9350 printer to connect wirelessly. it worked fine on my old vista laptop. when i put the installer disk with the driver on it, it goes through the whole setup wizard but

  • Best option for switching hard drives?

    As said in previous posts, I'm going to be getting a new MBP soon. I've got a Time Machine backup of my current hard drive, but what would work better for the new MBP? Doing a full restore of the old hard drive to the new, or keep the new hard drive