Event handling across master/detail regions.

Hi,
I have a table displaying a few targets in the master region and the details of the selected target are shown in an other region. The selected target is passed as an input parameter to the dependent region.
Both these regions are displayed in one page. Is there a way to make the first row auto selected in the master region table and show it's contents in the dependent region ?
The trouble here is that the selected row target needs to be passed as an input parameter to the dependent region. Is there a way to fire a table selection listener after the master region has been rendered ?
Currently, we display the first region table with no rows selected. When the user selects a row, the table selection listener updates the input parameter to the detail region which then gets refreshed.
Thanks
Shankar

Hi Frank,
This is the contents of the pageDef where I'm including the master(first one) and detail regions(second one). The highlighted parameter('cohTargetName') is the selected target input parameter to the detail region.
Once the user selects a table row, I set the selected target value in emas_model_coherence_CoherenceGroupModel.selectedTarget.
Can you provide me with an example of defining this parameter in terms of the first row of the table ?
Thanks
Shankar
<pageDefinition>
<executables>
<taskFlow id="coherenceGroupRegion"
taskFlowId="WEB-INF/as/coherence/emas-coherence-group-taskflow#emas-coherence-group-taskflow"
Refresh="ifNeeded"
xmlns="http://xmlns.oracle.com/adf/controller/binding">
<parameters>
<parameter id="targetName" xmlns="http://xmlns.oracle.com/adfm/uimodel"
value="#{emas_model_coherence_CoherenceGroupModel.targetName}"/>
<parameter id="targetType" xmlns="http://xmlns.oracle.com/adfm/uimodel"
value="#{emas_model_coherence_CoherenceGroupModel.targetType}"/>
<parameter id="refreshTime" value="${viewScope.sdk_pagetemplate_model.contextHeader.timeStamp}"/>
</parameters>
</taskFlow>
<taskFlow id="coherenceNodeTableRegion"
taskFlowId="WEB-INF/as/coherence/emas-coherence-nodeTable-taskflow#emas-coherence-nodeTable-taskflow"
Refresh="ifNeeded"
xmlns="http://xmlns.oracle.com/adf/controller/binding">
<parameters>
*<parameter id="cohTargetName" xmlns="http://xmlns.oracle.com/adfm/uimodel"*
*value="#{emas_model_coherence_CoherenceGroupModel.selectedTarget}"/>*
<parameter id="targetName" xmlns="http://xmlns.oracle.com/adfm/uimodel"
value="#{emas_model_coherence_CoherenceGroupModel.targetName}"/>
<parameter id="targetType" xmlns="http://xmlns.oracle.com/adfm/uimodel"
value="#{emas_model_coherence_CoherenceGroupModel.targetType}"/>
<parameter id="refreshTime" value="${viewScope.sdk_pagetemplate_model.contextHeader.timeStamp}"/>
</parameters>
</taskFlow>
</executables>
<bindings/>
</pageDefinition>

Similar Messages

  • Master / Details Regions with yui Calendar

    I have a Calendar of Events that I need to display.  I have put a yui Calendar in my Master Region, and need it to control the Details Region.  I can get the Details Region to show a single event per day.
    Is there a way to let the Details Region show multiple Events if they are scheduled on the same date?
    I do not have access to an external web server to post my page to, but here is the code to the Master/Details Region on my site:
    <div id="sidebar2">
        <div id="yuicalendar1"></div>
    <script type="text/javascript">
    // BeginWebWidget YUI_Calendar: yuicalendar1   (function() {
        var cn = document.body.className.toString();
        if (cn.indexOf('yui-skin-sam') == -1) {
          document.body.className += " yui-skin-sam";
      })();  var inityuicalendar1 = function() {
        var yuicalendar1 = new YAHOO.widget.Calendar("yuicalendar1");    // The following event subscribers demonstrate how to handle
        // YUI Calendar events, specifically when a date cell is
        // selected and when it is unselected.
        // See: http://developer.yahoo.com/yui/calendar/ for more
        // information on the YUI Calendar's configurations and
        // events.
        // The YUI Calendar API cheatsheet can be found at:
        // http://yuiblog.com/assets/pdf/cheatsheets/calendar.pdf
        //--- begin event subscribers ---//
        yuicalendar1.selectEvent.subscribe(selectHandler, yuicalendar1, true);
        yuicalendar1.deselectEvent.subscribe(deselectHandler, yuicalendar1, true);
        //--- end event subscribers ---//
    yuicalendar1.cfg.setProperty("title", "Calendar of Events", false);    yuicalendar1.render();
      }  function selectHandler(event, data) {
      // The JavaScript function subscribed to yuicalendar1.  It is called when
      // a date cell is selected.
      // alert(event) will show an event type of "Select".
      // alert(data) will show the selected date as [year, month, date].
      var formattedDateString = data[0][0][1] + "/" + data[0][0][2] + "/" + data[0][0][0];
      var r = dsCalendar.findRowsWithColumnValues({"Date": formattedDateString }, true);
      var region = Spry.Data.getRegion("classDetail");
      if(r){
       dsCalendar.setCurrentRow(r.ds_RowID);
       region.setState("showClass", true);
       } else {
        region.setState("ready", true);
      };  function deselectHandler(event, data) {
      // The JavaScript function subscribed to yuicalendar1.  It is called when
      // a selected date cell is unselected.
      };      // Create the YUI Calendar when the HTML document is usable.
      YAHOO.util.Event.onDOMReady(inityuicalendar1);
    // EndWebWidget YUI_Calendar: yuicalendar1
    </script>
    <div spry:detailregion="dsCalendar" spry:setrow="dsCalendar" id="classDetail">
    <div spry:state="showClass">
    <table width="100%" border="0" cellpadding="1">
       <tr>
         <td colspan="2"><h4>{Class}</h4></td>
        </tr>
       <tr>
        <td colspan="2">{Description}</td>
        </tr>
       <tr>
         <td>{Location}</td>
         <td>{Date}</td>
       </tr>
    </table>
        </div>
        <div spry:state="ready">
    There are no classes on this date. Please select another date.
    </div></div>
      <!-- end #sidebar2 --></div>
    And, here is the code to my "schedule.htm" file:
    Class
    Logo
    Description
    Location
    Date
    Dreamweaver CS4 Intermediate
    Take your skills to the next level with this training.
    Austin, TX
    12/15/2008
    InDesign CS4 Advanced
    This class is for experienced users that want to go beyond the basics.
    Phoenix, AZ
    12/18/2008
    Flex CS4 Data Services
    Learn about Live Cycle Data Services in this training.
    Austin, TX
    12/19/2008
    Flash CS4 Rich Content Creation
    From beginning to intermediate, learn how to animate with the latest tools.
    Austin, TX
    12/30/2008
    Photoshop Advanced
    Experienced Photoshop users will learn how to use advanced tools for image manipulation.
    Phoenix, AZ
    12/20/2008
    Dreamweaver CS4 Intermediate
    Take your skills to the next level with this training.
    Austin, TX
    12/01/2008
    InDesign CS4 Advanced
    This class is for experienced users that want to go beyond the basics.
    Phoenix, AZ
    12/08/2008
    Flex CS4 Data Services
    Learn about Live Cycle Data Services in this training.
    Austin, TX
    12/25/2008
    Flash CS4 Rich Content Creation
    From beginning to intermediate, learn how to animate with the latest tools.
    Austin, TX
    12/26/2008
    Photoshop Advanced
    Experienced Photoshop users will learn how to use advanced tools for image manipulation.
    Phoenix, AZ
    8/21/2009
    Short Course
    Seminar where the engineers come together to discuss TxDOT.
    Austin, TX
    8/26/2009
    Long Course
    Around the cementary, down to the high school, and back.
    Wolfforth, TX
    8/21/2009
    No Class
    No classes on this date.
    n/a
    Notice on the schedule.htm file, there are some classes that have the same date.  I would like the Details region to show multiple classes based on the date.  Is that even possible?
    Thanks!

    @strick,
    Don't know if you got this sorted out already, but I'll add an answer since I looked here when trying to figure this out.
    I had the same problem.
    You can get this to do what you want in two steps:
    1.)  Just below the line in your code that reads
    var formattedDateString = data[0][0][1] + "/" + data[0][0][2] + "/" + data[0][0][0];
    add the following code:
    function myFilterFunc(dataSet, row, rowNumber)
    // Filter all rows with date = selected date
    if (row['Date'] == formattedDateString){
    return row;   }
    else {
    return null;}
    // Filter the data.
    dscalendar.filter(myFilterFunc);
    2.) Just after the line in your code that reads
    <table width="100%" border="0" cellpadding="1">
    add the following code:
    <tr spry:repeat="dscalendar">
    Ok, one last step for the code that you've listed here.  You should be able to get rid of all the <tr> tags except for the outermost ones.  So, it could
    look like this:
    <table width="100%" border="0" cellpadding="1">
       <tr spry:repeat="dscalendar">
        <td colspan="2"><h4>{Class}</h4></td>
        <td colspan="2">{Description}</td>
        <td>{Location}</td>
        <td>{Date}</td>
       </tr>
    </table>
    You can see a working example of this at http://www.coloradogreenline.com/YUISpryCalendar/sprytest6.html.  October 13, 2009 has more than one event scheduled.  This one doesn't display the data in table format, but you can still it working.
    Hope this helps.

  • How Do I: Bind a YUI Calendar Widget to a Spry Master Detail Region?

    Hello All,
    Does anyone know how to bind a YUI Calendar widget to a Spry
    master detail region? I have the dataset, yui calendar inserted but
    no clue how to bind the two so my dataset populates the calendar
    (Highlights dates that have a event) and when a date in the
    calendar is clicked it shows in the details section.
    I have found a tidbit or two via google but they don't deal
    with the new yui cs4
    widget. I have seen some video on adove tv that touches on
    inserting the yui calendar into a spry dataset but not how to bind
    the two together...
    Any thoughts on this would be greatly appreciated.

    You have to write some code that sets up a select callback on
    the YUI side of things, and then set the current row of the data
    set that matches that date.
    Something like this:
    var cal1 = new YAHOO.widget.Calendar("cal1","YUICal1");
    cal1.render();
    cal1.selectEvent.subscribe(function(type, args, obj)
    // Get the selected date string from cal1.
    var selectedDate = cal1.getSelectedDates()[0].getDate();
    // Find the first row in the data set that has the
    // selected date in it's "date" column.
    var row = ds1.findRowsWithColumnValues({"date":
    selectedDate}, true);
    // If we have a matching row, make it the current row for
    the data set.
    if (row)
    ds1.setCurrentRow(row.ds_RowID);
    }, cal, true);
    --== Kin ==--

  • 'Next' and 'Previous' buttons in master/detail region

    Hi,
    I've managed to successfully create a master/detail region
    which is basically a very simple photo gallery.
    The left column shows the thumbnails, and when I click on
    them it shows the full-size version in the right column.
    I've been trawling userguides and forums for hours now, and I
    just can't work out how I can put a 'next' and 'previous' button
    beneath the large image enabling the viewer to move to the next
    image.
    I'm guessing it might be something to do with setRowNumber,
    but I'm just not sure.
    I'm pulling my (receding) hair out on this one, so any help
    or useful links would be much appreciated!
    My (basic) code below
    <div spry:region="dsGT" id="thumbholder">
    <div id="thumb" spry:repeat="dsGT"><img
    src="onlinegallery/thumbs/{@path}" width="50" height="50"
    spry:setrow="dsGT"></div>
    </div>
    </div>
    <!--End Navigation Div-->
    <div id="copy">
    <div id="fullimage">
    <div spry:detailregion="dsGT">
    <img src="onlinegallery/main/{@path}" />
    </div>
    Many thanks!

    They make a call to JavaScript, I'm guessing you knew that?
    I'm 96.7% JS illiterate, so I'm incapable of explaining it.
    You have to download the Spry Framework, unpackage it, look
    in the Demos folder, then look in the Gallery folder. Gallery.js, i
    think, is where that JS call goes to in order to switch out the
    next/prev image.
    the download is here:
    http://labs.adobe.com/technologies/spry/

  • Problem w/ Nested Datasets and Master/Detail regions

    Hi, I'm being using spry for a couple of applications and
    really love it. This is the first time I've tried to utilize a
    nested dataset and I'm having some difficulty loading the nested
    data. I'm getting a js 'Object does not support this property or
    method' error in IE and a 'Failed to retrieve data set (dsCreds)
    for spry:repeat' in FF.
    I've tried to map examples to my application but of course
    it's slightly different. I have a master/detail region dynamically
    generated from a .php file and part of the detail region has the
    nested dataset. Maybe (hopefully) it's something obvious. I've
    broken out a test case that demonstrates what's happing - If anyone
    could take a look I would be extremely grateful!
    The .htm file is on:
    htm
    file
    The .PHP file that generates the dynamic XML is on:
    PHP
    file
    A sample .XML (generated from the .PHP file is
    Sample XML
    file
    Even without the Nested set getting generated the
    Master/Detail section works fine.
    Thanks so much for any help!
    Edit - Apologies for all the inline css - still developing
    :)

    Hi,
    The dataset name in the NestedDataSet constructor does not go
    in quotes.
    Try var dsCreds = new Spry.Data.NestedXMLDataSet(dsAgents,
    "credentials/cred");
    and see if that helps.
    Don

  • Image mapping and Master Detail Regions in CS3

    Excellent advice to leave a url. I think I am having a similar problem with conceptualizing datasets for utilization with image mapping. I obviously cannot use the Get Schema via the Attach New Data set icon because I have rendered my own Master region. I am working with CS3. I will launch the site and ask for help from the url.
    Here is:
    http://www.atmfoods.net16.net/
    I need help with this. With the phasing out of tabulated layouts for div based layouts I run into quite a few snags attempting to work around deprecation of tags issues. What am I trying to do here:
    1. Get my spry menu to drop down in the child table and not the parent table aligned top left.
    2. Use image mapping of the thumbnail images in integration with datasets and spry Master/Detail regions, even if hand coded to achieve, for a larger image and data on each thumbnail on an accordion spry widget. I am thinking grid systems for the future of my works and hope to achieve some relative command of grid systems. Without gridlock.

    Hi,
    The dataset name in the NestedDataSet constructor does not go
    in quotes.
    Try var dsCreds = new Spry.Data.NestedXMLDataSet(dsAgents,
    "credentials/cred");
    and see if that helps.
    Don

  • Error handling in master detail form

    Hi Guys,
    Apex 4.2.1
    I use the custum error handling of apex to customize the errror message.
    I add a row in the detail form with a dupicate key which is handled by the error function
    after submiiting the master record the error message is correct displayed but the row which generates the error is gone from the details.
    How to keep the record in the details visible?
    Thanks

    Hello 942793 -- Do you have a name / nickname? -- We still don't know how to address you,
    Say, could you tell us -- because sometimes different versions have different capabilities:
    Full APEX version number,
    Full database version number,
    APEX web browser architecture (EPG, OHS, or APEX listener)
    Browser(s) and version(s) used,
    Operating System with version number and architecture (32/64 bit),
    [If you mentioned these before we don't have access to that info in this thread.]
    Also, are you using ARP (Automatic Row Processing) for this Master-Detail or have you programmed your own updates?
    Did you use an APEX wizard to create the Master-Detail or have you written you own code for the Master-Detail?
    To the problem:  In short, APEX is ensuring update consistency by preventing an update of a record/row that has changed since the code retrieved it.  So, one needs to figure out where/why it changed and what to do about it.
    ?  Is this Master-Detail part of you application fairly simple?  Could you put just that part out on apex.oracle.com for folks to look at?  That can speed resolution of these, sometimes difficult, update problems.
    Regards,
    Howard

  • Help needed for implementing master details region on the search page

    Hi All,
         I am new to Jdeveloper and OAF. I need to develop a sales order search page, for which the VO query is
         SELECT ch.order_number order_number
         , ch.attribute97 order_detail
         , ch.attribute14 sold_to
         , ch.attribute50 business_group
         , ch.source_doc_type source_doc_type
         , ch.line_number line_number
         , ch.transaction_amount transaction_amount
         , ch.split_pct||'%' split_percentage
         , jrs.NAME resource_name
         , jrr.resource_number resource_number
         , ch.processed_date processed_date
         , cq.NAME quota_name
         , ch.attribute34 transaction_type
         , ch.attribute35 order_type
         , ch.attribute51 product_line
         , ch.attribute54 city
         , ch.attribute55 state
         , ch.attribute56 district
         , ch.attribute57 area
         , ch.attribute61 salesrep_number
         , ch.attribute62 region
         , ch.attribute64 sales_org
         , ch.attribute68 terr_order_type
         , ch.attribute58 market_indicator
         FROM cn_commission_lines_all cl
         , cn_commission_headers_all ch
         , cn_quotas_all cq
         , jtf_rs_salesreps jrs
         , jtf_rs_resource_extns jrr
         WHERE cl.direct_salesrep_id = cl.credited_salesrep_id
         AND cl.commission_header_id = ch.commission_header_id
         AND cl.quota_id = cq.quota_id
         AND ch.direct_salesrep_id = jrs.salesrep_id
         AND jrr.resource_id = jrs.resource_id
         AND (NVL(ch.source_doc_type,'X') = 'EVEREST' OR NVL(ch.source_doc_type,'X') = 'SAP')
    AND (NVL(ch.attribute50,'X') = 'EMG' OR NVL(ch.attribute50,'X') = 'LSCA')
    I have 3 query parameters business_group, source_doc_type and sales order number.
    The results region should look like,
    Header region with order_number,order_detail,sold_to,business_group and the source_doc_type columns.
    The remaining fields go into the details region.
    Highly appreciate if anyone could help me on this.
    Regards,

    Hi,
    When I have a messagestyle layout for my header, I am not able to find the items in this region for the querycriteriamap. I need to populate the header region with values entered in the search region.
    For example: I create the OrderNumber messagestyledtext item in the messagecomponent layout of the header region. In simplesearchmappings, for the querycriteriamap, I am not able to find this item in the drop down for Results Item property.
    Please help me to understand.
    Regards,

  • Event handling across classes

    I have a (newbie?) question regarding event handling:
    I have a database class which has an update method and invokes a databaseGUI class to display the data:
    /// databaseClass instantiated as DatabaseClass dataConn = new DatabaseClass()
    public class DatabaseClass {
         Public void updateData {
         // write values to database
         Public void showData {
            thisDBGUI = new databaseGUI();
            // populate screen with data from database through database GUI class
            // add a button to the interface via addUpdateButton method of databaseGUI class
            thisDBGUI.addUpdateButton();
    /// databaseGUI class
    public class databaseGUI extends JFrame implements ActionListener {
         public void addUpdateButton() {
            buttonPanel = new JPanel();
            updateButton = new JButton ("Udpate Record");
            updateButton.addActionListener(this);
            buttonPanel.add(okUpdate);
         public void actionPerformed(ActionEvent e) {
             // need to call dataConn.updateData method
    }Please forgive the incomplete snippets; everything displays perfectly and the code executes fine EXCEPT I do not know to use the actionPerformed method to execute the updateDatabase method on the dataConn instance. Any help is greatly appreciated!
    David Erickson

    Personally, I would move the actionlistener into the DatabaseClass.I agree, but I would do it a different way (just due to personal preference):
    public class databaseGUI extends JFrame {   
         public void addUpdateButton(DatabaseClass dbc) {
              buttonPanel = new JPanel();
              updateButton = new JButton ("Udpate Record");
              updateButton.addActionListener(dbc);
              buttonPanel.add(okUpdate);    
         }Then, just pass a reference to "this" when you call databaseGUI's constructor.
    I just like this method better because the GUI object is still setting up the entire GUI on its own. Personal preference, no more.

  • Event handling across unrelated classes

    I have a widget type of package that holds some classes that are basically JPanels with appropriate components on them. Specifically, JCheckBox, JComboBox, that kind of thing. These JPanels are used by multiple applications that describe some graphics, so one JPanel allows a user to set properties on Lines, one JPanel allows a user to set properties on Areas, that kind of thing. Several of these are put together in a JTabbedPane, which is another class in this package (this thing can be customized for what is needed).
    The applications themselves use what they need for their particular thing. Here's the question. I designed this thinking that I can have these pre-created panels of what I need, and add the listeners in the application. For example, something like this:
    tabbedPanePanel.getLinePanel().getColorCombo().addItemListener(new ItemListener......);
    When I do this as described in the application, when the colorCombo box is changed, it doesn't trip the event (I was in debug tracing through). Obviously my design is flawed, but I don't know how to change it to make it work. There are two things I need help with improvement.
    First, how can I use these re-usable widgets, when the actions are different depending on the application, and the items that the actions would affect are specific to the applications?
    Second, what would a better design paradigm be for better encapsulation, and performance for these actions (item listeners and such) and the widgets themselves?
    Thank you,
    Valeri

    Think in terms of gathering data instead of actions. That is, each panel gets some user input. Put all the user input in some sort of data object, and provide a method that returns the data object. E.g. Imagine a color panel that lets the user enter R, G, and B:
    public class ColorPanel extends JPanel {
             // TextFields....
            public Color getColor() {
                     // returns a color based on the values in the text fields
    }It is important not to put any OK or Cancel buttons in the panels. You save the OK and Cancel buttons for another main panel that is application specific. When the OK button is pressed, you collect the data and apply it.

  • Problem with apply changes on master-detail with respect to date handling

    dear sir,
    i have one tabler where in i have created from_Date and to_date as varchar2(30) each. I stored the from date as 'dd-mon-yyyy hh24:mi' I had written before header process for calculating no of days between from_Date and to_Date using the said format. If to_Date is null then first i store the value as
    to_char(sysdate,'dd-mon-yyyy hh24:mi') and then convert it as to_Date(substr(to_Date,1,17),'dd-mon-yyyy hh24:mi'). this calculation of days procedures works fine in sql command mode.
    when i am handling through master-detail page i works fine when there is null value inf to_Date vc2 column. if i store using date picker dd-mon-yyyy hh24:mi, the data is getting stored but subsequent edit through master detail give error as ora-01722 unable to fetch row. Manually if i set the to_Date as null pages works fine. I spent lots of time and unable to understand the mistake i do.
    if anybody could help me, i will be much obliged.
    thanking you,
    yours
    dr.s.raghunatha

    I think the best would be if you create an example on apex.oracle.com and I will debug it.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • Details region error whit no records in master

    hi,
    I set up a master/details region and it works fine.
    I can update the data in the master region sending some
    parameters to the server so it is possible that there are no
    records in the XML file sent by the server.
    In this case the details region (that has in the dataset.URL
    a reference like dsMaster::id to bound its records with the master)
    shows an error message because there isn't any dsMaster::id
    available!!!
    How can I get around this???
    thanks
    Cescoh

    Hi Kin,
    I apologise for my so late replay.....
    The detail region is hitting the server and the message
    showed by the spry's debug window is:
    Spry.Data.XMLDataSet.LoadManager.CachedRequest.loadDataCallback(200)
    failed to load:
    index.php?page=XMLdata/spry_data_set&func=XMLorderDetail&order_id=
    Hold on............... I have found the solution just right
    now..... while writing to you.... it is a lack in the server side
    script!!!!! it doesn't provide a correct xml document because it
    doesn't have a check over the order_id parameter absence!!!!
    I fixed it !!!
    thanks a lot for your attention!!
    Bye
    Cescoh

  • Master Detail page. - Create Row.

    Hi
    I have created a master details search page using the following BC4J objects
    EmployeeEO - empId,name,deptno
    DepartmentEO - deptno,deptname
    EmpToDeptAO - using deptno
    EmployeeVO - contains all Attributes of EmployeeEO
    DepartmentVO -contaiins all Attribute of DepartmentEO
    EmployeeAM contains both VO
    The search page is working fine.
    In the Search page i have created a create button.When this click this button will be forwarded to create page.
    In the create page under the pagelayout region i have two table regions
    one Employee Details Entry and the second one deparment details entry.
    i have added apply button to the page.
    in Process request of controller i have invoked the two create(insert row) methods (one for employeeVO and another for departmentVO)which resides in AM.
    in process form request when apply button is pressed, i will commit the details.
    Employee details getting committed but department details is not getting committed.Its throwing some exception like the Fonreign Key constraint violated.
    but if i give some department no which is already existing in department table region both is getting committed.
    How to handle this problem.
    how to issue commit separately for master and detail.
    Am i clear with the explanation.
    Edited by: user10613877 on Dec 13, 2008 9:04 AM

    I guess you will also need a View Link between the the 2 VOs.
    Also the attributes that would be used to join, should be declared as Key Attributes. Here in your case, Dept_Id should be the key Attribute in both the VOs.
    You can refer this link.
    [master-detail mandatory steps|http://apps2fusion.com/at/ps/333-oa-framework-master-detail-region-mandatory-steps]

  • FLV Master Detail Gallery

    I'd like to use a master/detail region scenario with FLV's.
    Right now I've been using iframes and its sketchy at best. I want
    the user to click thumbnails which load an FLV video and text from
    an XML file.
    Here's what I've come up with this far:
    http://s254856054.onlinehome.us/tv/
    Any help would be greatly appreciated.
    Thanks,

    just load link to the video and use the appropriate tag for
    it, example XML
    <xml>
    <movie>
    <title>movie 1</title>
    <description>test movie</description>
    <thumbnail>images/movie1.gif</thumbnail>
    <video>video/video1.flv</video>
    </movie>
    </xml>
    the use spry region or repeat region for displaying video...
    how to display it? follow adobe product demo on spry folder, it
    similarly when you want to display image you would use
    <img src="$thumbnail" alt="$title" />
    do it with the flv and use the appropriate tag for it (i
    never use flv so i dunno which tag should used)
    if you want it only play when user click the thumb then set
    event for onclick in the image the call a function that can do
    loadUrl(); for that, example:
    <script>
    loadFlv(Url){
    document.getElementById("flv_viewer").href = Url;
    </script>
    where
    flv_viewer is the correct id for tag that will display flv
    object

  • Need help with master detail from different datasets

    I have xml data from three different datasets that I want to use in a master detail region. 
    So initially, a list of model codes is displayed. When the user clicks on a specific model, the model inputs appear in the detail region.  One of these inputs is a list of map units. I also want a real name description of the map unit to be displayed.  It's working for one map code, but not for all of them. 
    My question is: "How do I get the description to disply for each of the map codes?"
    Here is my code: 
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="/SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="/SpryAssets/SpryData.js" type="text/javascript"></script>
    <link href="/SpryAssets/SprySpotlightColumn.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    var DSpresence = new Spry.Data.XMLDataSet("/SpeciesReview/Copy of tblSppMapUnitPres.xml", "dataroot/Copy_x0020_of_x0020_tblSppMapUnitPres");
    var DSancillary = new Spry.Data.XMLDataSet("/SpeciesReview/ModelingAncillarywname.xml", "dataroot/Sheet1", {sortOnLoad: "CommonName", sortOrderOnLoad: "ascending"});
    var DSpresence2 = new Spry.Data.XMLDataSet("/SpeciesReview/Copy of tblSppMapUnitPres.xml", "dataroot/Copy_x0020_of_x0020_tblSppMapUnitPres[strSpeciesModelCode='DSancillary::strSpec iesModelCode']");
    var dsMUDescription  = new Spry.Data.XMLDataSet("/SpeciesReview/tblMapUnitDesc.xml", "dataroot/tblMapUnitDesc");
    var dsMUDescription2= new Spry.Data.XMLDataSet("/SpeciesReview/tblMapUnitDesc.xml", "dataroot/tblMapUnitDesc[intLSGapMapCode='{DSpresence2::intLSGapMapCode}']");
    </script>
    </head>
    <body>
    <div style="width: 100%">
    <div id="Species_DIV" spry:region="DSancillary DSpresence dsMUDescription" width="50%" style="float:left">
      <table id="DSancillary">
      <tr>
      <th>Species Code</th>
      </tr>
      <tr spry:repeat="DSancillary" "DSpresence" "dsMUDescription" spry:setrow="DSancillary" >
      <td>{strSpeciesModelCode}</td>
      </tr>
      </table>
        </div>
      <div id="Species_Detail_DIV" spry:detailregion="DSancillary DSpresence dsMUDescription" style="float:right; margin-top:20px; width: 40%">
        <table id="Species_Detail_Table"  >
          <tr width="100%">
          <th style="font-family:Verdana, Geneva, sans-serif; font-size:14px; background-color:#CCCCCC; font-weight:bold">Modeling variables used for {strSpeciesModelCode}</th>
          </tr>
            <tr>
              <td spry:if="'{memModelNotes}' != ''">Hand Model Notes: {DSancillary::memModelNotes}</td></tr>
               <tr>
                <td spry:if="'{DSancillary::ysnHydroFW}' == 1">HydroFW: {DSancillary::ysnHydroFW}<br />Buffer from flowing water:  {DSancillary::intFromBuffFW}<br />
                Buffer into flowing water:  {DSancillary::intIntoBuffFW}
                </td></tr>
                <tr>
                <td spry:if="'{DSancillary::ysnHydroOW}' == 1"> Buffer from open water: {DSancillary::intFromBuffFW}<br />Buffer into open water:  {DSancillary::intIntoBuffOW}</td></tr>
          <tr><td><br /></td></tr>
           <tr><th>Mapcode:</th></tr>
        <tr spry:repeat="DSpresence">
                <td spry:if="'{DSpresence::ysnPres}' == '1'">{DSpresence::intLSGapMapCode}</td><td spry:if= "'{DSpresence::intLSGapMapCode}'=='{dsMUDescription::intLSGapMapCode}'">{dsMUDescription: :strLSGapName}</td>
            </tr>
            <tr><td><ul>
                <li spry:repeat="DSpresence" spry:if="'{DSpresence::ysnPres}' == '1'">{DSpresence::intLSGapMapCode}{dsMUDescription::intLSGapMapCode}</li>
            </ul></td></tr>
        </table>
        </div>
    </div>
    </body>

    The best way to do this is to use xPath filtering. This http://labs.adobe.com/technologies/spry/samples/data_region/FilterXPath_with_params.html example will give you the general idea.
    The example uses a URL variable but there is no need for that if you use a procedure similar to
    function newXPath(cat){
      DSpresence.setXPath("dataroot/Copy_x0020_of_x0020_tblSppMapUnitPres[strSpeciesModelCode=' {DSpresence::strSpeciesModelCode}']");
        DSpresence.loadData();
    The function can be triggered with an onclick event placed on {strSpeciesModelCode}
    Gramps

Maybe you are looking for