How do I populate a popup window with data from the parent window

I am brand new to JSF so please help me. I have a JSF page where users enter some search criteria and it displays the results in a matrix table. I need to have a PRINT button or link on this page that pops up a new window that displays the same data but in a printer-friendly format.
The parent page is already created and works fine. Now, what is the best way to populate the same data in the popup? The data is stored in a hashmap and retrived by a managed bean with session scope. Below is the XHTML code for displaying the table in the parent page.
<tbody>
                         <c:forEach items="#{inventoryManagedBean.inventoryColors}" var="row">
                              <tr id="matrixColor">
                                   <c:forEach items="#{inventoryManagedBean.sizeList}" var="column" varStatus="cellStatus">
                                        <c:if test="#{cellStatus.index == 0}">
                                             <th width="70px"><h:graphicImage value="../graphics/styles/#{row.color}.jpg"
                                                  alt="#{row.color}" width="70" height="40"></h:graphicImage></th>
                                             <th width="100px"><h:outputText value="#{row.colorDescription}" />
                                             <h:outputText value="#{row.color}" /></th>
                                        </c:if>
                                        <td width="70px"><c:if
                                             test="#{inventoryManagedBean.inventoryMap[row.color][column.size] != null}">
                                             <c:if test="#{inventoryManagedBean.inventoryMap[row.color][column.size].label != '-1'}">
                                                  <span class="matrixText"><h:outputText
                                                       value="#{inventoryManagedBean.inventoryMap[row.color][column.size].label}"
                                                       title="#{inventoryManagedBean.inventoryMap[row.color][column.size].title}" /> </span>
                                                  <t:htmlTag value="br" rendered="#{userManageBean.user.loggedIn}" />
                                                  <a4j:region renderRegionOnly="false">
                                                       <h:inputText
                                                            value="#{inventoryManagedBean.inventoryMap[row.color][column.size].quantityOrdered}"
                                                            rendered="#{userManageBean.user.loggedIn}" maxlength="6" size="6">
                                                       </h:inputText>
                                                  </a4j:region>
                                             </c:if>
                                             <h:outputText value="Call"
                                                  rendered="#{inventoryManagedBean.inventoryMap[row.color][column.size].label == '-1'}" />
                                        </c:if> <h:outputText value="N/A"
                                             rendered="#{inventoryManagedBean.inventoryMap[row.color][column.size] == null}" /></td>
                                   </c:forEach>
                              </tr>
                         </c:forEach>

call javascript window.open("pagename"); & add some printer button there,
and put rendered attribute to button & in backing bean generate boolean getter setter for variable use same variable in jsp printer button in rendered attribute, in bean constructor pass some parameter throuh jsp page,
if parameter is match then it rendered attribute to true for button else not,
it means that in parent window you can not see printer button, but in same window in popup you will see printer button,
good luck
<h:commandButton rendered="#{bean.renderedButton}"/>
bean
private boolean renderedButton= false;(generate getter setter)
also pass parameter from UI to bean constructor

Similar Messages

  • I accidently closed my window with all my app tabs, now the only window that opens was a 2nd one I had open. How do I get back all my app tabs from the previous window, and why didn't it give me the usual warning you are closing more than one tab?

    I accidently closed the window with all my frequently used app tabs, now the only window that opens was an extra one I had opened. How do I get back all my app tabs from the previous window, and why didn't it give me the usual warning you are closing more than one tab? edit
    Details

    Then the (App) tabs from that window are lost unless you can restore an older copy of the sessionstore.js file (Time Machine?) that has that lost window.
    *http://kb.mozillazine.org/sessionstore.js

  • Table - populate one table with data from the list of another table

    Hello All,
    I am a newbie in Swing and am a book and few tutorials old.
    I am trying to achieve the following:
    (1) I populate Table1 (a JTable) with a list of data - each row consists of several columns. And I have a Table2 (also JTable) that is in the beginning empty.
    Both the tables (Table1 and Table2) are showed in the window.
    (2) Lets say, there's a button (JButton) in between the two tables.
    Now if I Select a row from Table1 and press the button, this row will be sent/copied to Table2.
    And this way I can choose different rows and pass the data to Table2.
    I have manages to make Table1 and put data in it ... but for the rest, I don't know where and how to begin.
    Would appreciate some ideas and tips.
    Thank you.

    Since you are using a button to start the copy process you don't need to worry about a ListSelectionListener or a MouseListener. You need to create a button with an ActionListener that does the following:
    a) Create an Array based on the size of the number of columns in the table
    b) get the index of the selected row
    c) populate the Array with data from the TableModel by using the table.getModel().getValueAt(...) method for each
    d) Now you can add the row of data to the other JTable by updating its model.
    DefaultTableModel model2 = (DefaultTableModel)table2.getMode();
    model.addRow( theArray );

  • I used time machine to restore on a formatted MAC. Now the HDD space has reduced by 100GB but I cannot see any of the files. How do I find and delete those 100GB data from the HDD?

    I used time machine to restore on a formatted MAC. Now the HDD space has reduced by 100GB but I cannot see any of the files. How do I find and delete those 100GB data from the HDD?

    dglenn9000 wrote:
    I created a new user account just to see if it was my user Library or if there was something wrong with my system. And the new user account is doing most of the same things so I will need to do a full restore anyway.
    Not necessarily. I'd suggest downloading and installing the "combo" update. That's a combination (thus the clever name) of all the updates to Leopard since it was first released, so installing it should fix anything that's gone wrong since then, such as with one of the normal "point" updates. Info and download available at: http://support.apple.com/downloads/MacOS_X_10_5_8_ComboUpdate Be sure to do a +Repair Permissions+ via Disk Utility (in your Applications/Utilities folder) afterwards.

  • I accidentally deleted the admin user and it wiped out everything, luckily it wasn't much, but is my computer going to be completely overloaded with data from the last user? for example, i had to redownload microsoft 2011 do i have little space now?

    i accidentally deleted the admin user and it wiped out everything, luckily it wasn't much, but is my computer going to be completely overloaded with data from the last user? for example, i had to redownload microsoft 2011 do i have little space now?

    i accidentally deleted the admin user and it wiped out everything, luckily it wasn't much, but is my computer going to be completely overloaded with data from the last user? for example, i had to redownload microsoft 2011 do i have little space now?

  • Refresh page with data from the Next Record in the Table through a Button

    Scenario: Record of a table “prototype” is made up of 8 columns,
    key_col,
    text_col,
    label1_col, label2_col, label3_col,
    check1_col, check2_col, check3_col,
    I have created the following items on a page:
    a) A Display Only item that is populated through a SQL query
    “SELECT text_col from prototype where rownum=key_seq.NEXTVAL “.
    b) Hidden item for the database columns “label1_col, label2_col, label3_col”
    Source type for the hidden items is of type SQL query, Source expression is:
    Select label1_col from prototype where rownum=key_seq.NEXTVAL ;
    Select label2_col from prototype where rownum=key_seq.NEXTVAL ;
    Select label3_col from prototype where rownum=key_seq.NEXTVAL ;
    (key_seq is a sequence).
    c) Checkbox item for the database columns “ check1_col, check2_col,check3_col"
    d) The labels for the above checkbox items are &label1_col. , &label2_col. , &label3_col.
    I have created a Save button to save the state of the checkboxes; (STATIC:;1 )
    I want the page to be refreshed with the data from the next record (Fields text_col, label1_col, label2_col, label3_col) through a “ Next” Button.
    Can I please know how I can achieve this?
    Thanks in advance

    If you need the value that is entered in the textbox as the email body, then try this..
    <html>
    <HEAD>
    <title>WebForm1</title>
    <script language="javascript">
    function mailHTML() {
    var content=document.getElementById('textBox').value;
    location.href="mailto:?body="+encodeURI(content);
    </script>
    </head>
    <body>
    <form name="theform" id="theform">
    <div name="body1"/>
    <input type="text" value="Test" id="textBox"/>
    <input type="button" value="Send Email" onClick="mailHTML()"/>
    </div>
    </form>
    </body>
    </html>

  • How configure a primavera web service to return data from the second database?

    Hi everyone,
    We have P6 with first WS deployed on a single server weblogic domain. The first WS return data from the first database instance.
    Then deployed advanced second WS on a separate weblogic domain server with a different port. Configured second WS with <WS2_INSTALL_HOME>/bin/dbconfig.sh, creating a new branch of a configuration that specifies a different second instance of the database. However, this configuration is ignored and second web services return data from the first database.
    We have one domain, which including next servers:
    Name / Host / Port / Deployments
    P6 / localhost / 0001 / P6(v8.3), p6ws1(v8.3)
    p6ws2 / localhost / 0002 / p6ws2(v8.3)
    Now we have two different file BREBootstrap.xml.
    P6 BREBootstrap.xml:
    <Database>
    <URL>jdbc:oracle:thin:@db1:1521:db1</URL>
    <UserName>pubuser</UserName>
    <Password>anycriptopass1</Password>
    <Driver>oracle.jdbc.OracleDriver</Driver>
    <PublicGroupId>1</PublicGroupId>
    </Database>
    <CfgVersion>8.330</CfgVersion>
    <Configurations>
    <BRE name="P6 Config_DB1" instances="1" logDir="anydir/P6EPPM/p6/PrimaveraLogs"/>
    </Configurations>
    p6ws2 BREBootstrap.xml:
    <Database>
    <URL>jdbc:oracle:thin:@db2:1521:db2</URL>
    <UserName>pubuser</UserName>
    <Password>anycriptopass2</Password>
    <Driver>oracle.jdbc.OracleDriver</Driver>
    <PublicGroupId>1</PublicGroupId>
    </Database>
    <CfgVersion>8.330</CfgVersion>
    <Configurations>
    <BRE name="P6 Config_DB2" instances="1" logDir="anydir/P6EPPM/ws2/PrimaveraLogs"/>
    </Configurations>
    ‘P6 Config_DB1’ and ‘P6 Config_DB2’ including Database property for 1 and 2 database respectively.
    How to configure a second web service to return data from the second database?
    Thanks in advance!
    Regards,
    Dmitry

    OK, so I got this to work this morning with Username Token Profile (with little help from Oracle Support).
    I followed your steps 1-4 but in step 2 I didn't add the -Ddatabase.instance=2 because I want to check to see if my code could swap between different instances.
    It appears for Username Token Profile to use Database Instance, you need to set it in the soap header.
    So my soap request looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <s:Header>
            <DatabaseInstanceId xmlns="http://xmlns.oracle.com/Primavera/P6/WS/Authentication/V1">2</DatabaseInstanceId>
            <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                <u:Timestamp xmlns:u='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' u:Id='uuid-327b6ed1-b26d-4a61-81d5-e326174c1961-3'>
                    <u:Created>2014-10-23T04:28:01.152Z</u:Created>
                    <u:Expires>2014-10-23T04:29:01.152Z</u:Expires>
                </u:Timestamp>
                <o:UsernameToken u:Id='uuid-327b6ed1-b26d-4a61-81d5-e326174c1961-3' xmlns:u='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'>
                    <o:Username>admin</o:Username>
                    <o:Password Type='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'>password</o:Password>
                    <o:Nonce EncodingType='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'>vJBQhCc28bAeszej7gOaiC2tVCQ=</o:Nonce>
                    <u:Created>2014-10-23T04:28:01.152Z</u:Created>
                </o:UsernameToken>
            </o:Security>
        </s:Header>
        <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <ReadProjects xmlns="http://xmlns.oracle.com/Primavera/P6/WS/Project/V2">
                <Field>ObjectId</Field>
                <Field>Id</Field>
                <Field>Name</Field>
                <Field>Status</Field>
                <Field>StartDate</Field>
                <Field>FinishDate</Field>
                <Field>DataDate</Field>
                <Filter>Id = 'EC00515'</Filter>
            </ReadProjects>
        </s:Body>
    </s:Envelope>
    This request pulled the project from the second instance.
    V/r,
    Gene

  • How to populate Adobe LiveCycle Designer generated  PDF Forms with data from Database in Windows app

    Hi
    I have a PDF template designed in Adobe LiveCycle Designer. This template has form fields which needs to be filled with data programmatically. I am using windows application in C#.Net 2005 in which I want to retrieve data from database and merge this data into PDF form in respective fields.
    How this can be achieved?
    I searched a lot & I found that we can process the XDP file generated from PDF to acheive this. I created the XDP file out of the PDF template created in designer. But I don't know how to merge data from database into that XDP file in respective fields and again convert this XDP file back to PDF programmatically. Can anybody help me ? This is urgent.
    Thanks in advance.
    Sambhaji

    Please ignore the above code.<br />The following one is correct one.<br />using System;<br />using System.Data;<br />using System.Configuration;<br />using System.Web;<br />using System.Web.Security;<br />using System.Web.UI;<br />using System.Web.UI.WebControls;<br />using System.Web.UI.WebControls.WebParts;<br />using System.Web.UI.HtmlControls;<br />using System.Text;<br />public partial class _Default : System.Web.UI.Page <br />{<br />    protected void Page_Load(object sender, EventArgs e)<br />    {<br />        Response.ContentType = "application/vnd.adobe.xdp+xml";<br />        StringBuilder responseString = new StringBuilder();<br />        responseString.Append("<?xml version='1.0' encoding='UTF-8'?>");<br />        responseString.Append("<?xfa generator='AdobeLiveCycleDesigner_V8.0' APIVersion='2.5.6290.0'?>");<br />        responseString.Append("<xdp:xdp xmlns:xdp='http://ns.adobe.com/xdp/'>");<br />        responseString.Append("<xfa:datasets xmlns:xfa='http://www.xfa.org/schema/xfa-data/1.0/'>");<br />        responseString.Append("<xfa:data>");<br /><br />        responseString.Append("<form1>");<br />        responseString.Append("<TextField1>Homer</TextField1>");<br />        responseString.Append("<TextField2>Simpson</TextField2>");<br />        responseString.Append("<field name ='DropDownList1'>");<br />        responseString.Append("<items save='1'>");<br />        responseString.Append("<text>1</text>");<br />        responseString.Append("<text>2</text>");<br />        responseString.Append("<text>3</text>");<br />        responseString.Append("</items>");<br />        responseString.Append("</field>");<br /><br />        responseString.Append("</form1>");<br /><br />        responseString.Append("</xfa:data>");<br />        responseString.Append("</xfa:datasets>");<br />        responseString.Append("<pdf  href='C:\\Test.pdf' xmlns='http://ns.adobe.com/xdp/pdf/' />");<br />        responseString.Append("</xdp:xdp>");<br /><br />        Response.Write(responseString);<br />        Response.Flush();<br />        Response.End();<br />    }<br />}

  • How to update a list in parent view with data from child view/window ?

    I have a view named AccountListView that displays some buttons and a list of accounts.Its viewmodel is called AccountListViewModel and has a collection : ObservableCollection<AccountViewModel>. What I'd like to acomplish: whenever I press the Add/Edit
    Button from the AccountListView to open a new window/usercontrol, i.e. AccountView and bind it to an instance of AccountViewModel that will have some fields to fill in and a Submit and Cancel buttons. How can I update the ObservableCollection<AccountViewModel>
    from  inside the child view, so when I click on the Submit button from AccountViewModel it will return an AccountViewModel object with the data I filled in and add it to the observablecollection. Would notifications from prism be the right way ? Should
    I include code from the AccountListViewModel and AccountViewModel ?

    The way to communicate between view models in Prism is to use the EventAggregator. You raise an event from view model A and subscribe and handle this event in view model B. I have written a blog post about it which should be helpful here:
    http://blog.magnusmontin.net/2014/02/28/using-the-event-aggregator-pattern-to-communicate-between-view-models/.
    In your case you could define an event that carries an AccountViewModel object and pass this one from view model A to view model B:
    public class AccountViewModelEvent : CompositePresentationEvent<AccountViewModel>
    Please refer to the blog post for more information and a complete code example.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • How can EBS 12.1.3 upgraded from 11.5.10 be refreshed with data from the live 11.5.10

    Hello Gurus,
    Early this year we upgraded an 11i EBS system to a 12.1.3 for testing and now accounting wants the data in the new 12i system to be refreshed with the most recent data from PROD (11i). Is this possible wihtout going through the entire upgrade process?
    Thanks
    Mathias

    Hi Mathias,
    For details about this concurrent program, please refer to:
    SLA: Upgrade Historical Subledger Transaction Accounting Program (XLAONDEUPG) (Doc ID 1376752.1)
    R12.0 and R12.1: FAQ for the SLA Upgrade: SLA Pre-Upgrade, Post-Upgrade, and Hot Patch (Doc ID 604893.1)
    New Functionality for SLA Upgrade Process for R12.1.2 (Doc ID 980112.1)
    What Do You Need To Know For A Successful Upgrade Of Oracle Payables? [VIDEO] (Doc ID 1471844.1)
    Thanks,
    Hussein

  • Sorting by last 12 months in a Chart with data from the last 24 months

    Hi Guru's
    I am trying to create a Trend chart which will show the trend percentage vs previous year.
    In the X -axis I have Month wich is currently sorted by Jan, Feb, Mar etc ...Dec.
    The problem is that I want to show the last 12 months instead, but since I need data for the last 24 months to do so, I am having problems with the chart to show correct sorting.
    If this month is Oct 2011, I would want the chart to show the follwoing in the x axis:
    Oct10, Nov10, Dec10, Jan11,Feb11, Mar11, Arp11, May11, Jun11, Jul11, Aug11, Sep11.
    The problem is that in order for me to create the diff between previous year/month, the chart will either show last 24 months or 12 months thus causing the previous years values to disapear.
    So far I have managed to create a variable that will tell the age of the values in a month. The Chart is filtered and will now only contain data for the last 24 months. I have a variable which calculates the diff for each month agains previuos years values.
    So far so god, but how can I solve so that values are are included in the chart and sorted by the last 12 months?

    I discovered the solution, appereantly it was as easy as using the IN operator:
    =[Year] Where ([vAgeMonths] <= 12) In ([Time].[Short month])
    Now I am able to sort this by year and then month. Sometimes it helps tinkering a bit and a sollution will reveal it self.

  • Accessing variables from Child window from the parent window

    Hi All,
    I am in the process of integration of payment gateway, here I am opening payment gateway page as a new window, and after payment is done then I need access one variable which is hidden variable ...any ideas

    Have a hidden field/js variable in the parent page. Add a Javascript function in parent page which would take a value as parameter and set in the parent page hidden field/js variable. In the child window, you can invoke the method from script block as window.opener.setValue(document.getElementById('CHILD_WINDOW_HIDDEN_FIELD_ID').value)
    For Javascript related questions, please visit Javascript forums.

  • Update multiple rows with datas from the same table

    i have a table like
    name version value1 value2
    2 A 4,31 3,5
    3 A 3,45 10
    2 B 6,97 12
    4 B 12 16
    so name + version is unique
    i have to update the datas value1 and value2 ( version A) with the datas from version B where the name ( VersionA) = name version B
    i.e the result should be
    name version value1 value2
    2 A 6,97 12
    3 A 3,45 10
    2 B 6,97 12
    4 B 12 16
    is it possible to do this in sql? ( sql. 8.1)

    ... if your table does not contain exactly what you expect you could get:
    'single row sub-query returns more than one row'
    To prevent that, put a unique index on (name, version). If this combination is not always unique, you will need to cater for the possibility in the update statement.

  • Start with dates from the past in the planning book

    I want to maintain some figures from the last 14 days in the past.
    And I want the planning book to show these 14 days, when I open the planning book.
    (I do not want to scroll back).
    In my Data view i have to define a Time Bucket profile for the future. (system demand)
    This profile I has defined with one day.
    The Time Bucket profile for the past are 21 days.
    When I start the planning book with the view, I see only one column with todays date.
    I want to see the past 14 days, and therefore I have to scroll back.
    Is it possible to start with the last 14 days?
    - By setting the Period information in the Data view tab?
    - By other settings?
    - By macro?

    Hi Per,
    You need to go for a developing an ABAP report. The development calls for updating the planning start date in the data view design mode.
    You can use function modules /SAPAPO/MSDP_PB_READ_DVIEW and /SAPAPO/MSDP_PB_SAVE_DVIEW_TAB.
    So the logic could be as follows:
    1. First develop a FM which will determine the planning start date as per your requirements. This has to be with respect to the system date. So this Function module should in effect subtract 14 days from system date and store in a date field.
    2. Using the FM  /SAPAPO/MSDP_PB_READ_DVIEW, this date can be updated in the data view / PLanning start date field.
    3. Using FM /SAPAPO/MSDP_PB_SAVE_DVIEW_TAB, you can save and generate the data view.
    After developing the program you need to schedule this in background so that the planning start date is calculated and stored automatically.
    You need to take care of one thing though. In case there are any macros developed in the data view/macro book, the start dates for macro execution will be changed as well. You need to tweak those as per your requirements.
    Hope this helps.
    Regards,
    Ashutosh

  • Can I limit where a child window can move inside the parent window?

    I was wondering if it is possible to define a region of the parent vi window that a child window must be contained within so that the child window cannot be drug over my vi buttons and controls on the side.
    Thanks

    For child window, take a look G Toolbox at:
    http://gtoolbox.yeah.net
    To limit window position, you've to catch the window move event, and
    check the window position, move it back if needed.
    Sprinter wrote:
    > I've had the same problem like cjs.
    > I think your answer (Labviewguru) is OK byt it isn't exactly what I and (I
    > think) cjs need.
    > I need the child window always was on the top of parent window (and only
    > parent window not other windows), even when the parent is being clicked and
    > is active.
    > The child window should minimize to the bottom of parent, not to the Windows
    > taskbar.
    > I know winutil.llb but it doesn't work exactly in required (by me
    > certainly) way.
    > If you have any other suggestions I'd be grateful.
    >
    > Gregor
    >
    >
    >
    > Uzytk
    ownik "cjs" napisal w wiadomosci
    > news:[email protected]..
    >
    >>I was wondering if it is possible to define a region of the parent vi
    >>window that a child window must be contained within so that the child
    >>window cannot be drug over my vi buttons and controls on the side.
    >>
    >>Thanks
    >
    >
    >

Maybe you are looking for