Two Comboboxes in Dashboard

Dear Experts,
I'm developing a dashboard whose query accepts two parameters.
So I have 2 combo boxes one for each parameter. Say One for Criteria and other for Percentage
Problem Is:
Say IF I select 10 in Percentage Combo and then Select Value in Criteria Combo It shows the chart with everything ok.
No If I don't change the Percentage combo and only select or change value in the Criteria combo it again gives me the correct result what ever is expected.
But If I keep the Value in Criteria combo box constant and only changes the percentage value,  it doesn't reflect any changes.
If I make change to Percentage combo as well as Criteria combo then it shows the result.
I don't understand what could be the problem for this behaviour.
Any inputs will be appreciated
Thanks

Hi
Just Noticed that problem is where we assign the cell to Trigger i.e. Under Usage tab. (I think.)
Regards

Similar Messages

  • How to combine two dimension in dashboard??

    Dear experts,
    I have a requirement that i need two combine two dimension in dashboard.
    Ex:-
    -  I have two different providers (Query1 and Query2) and both is having common dimension called Plant.
    - The plant from both query is having different values (for example, Query1 Plant = A,B,C and Query2 Plant = D,E,F,G)
    - Now I want the total list of plants from both query and list of plants will be used as filter on combo box in dashboard.
    Note: List of values for Plant (dimension) may increase or decrease from both query.
    Thanks and regards
    Vijay Muniraj

    Hi Vijay,
    How can you combine the 2 queries as a single query in dashboard?If i understood the query,use a Multiprovider for your requirement and get the combined results in single query and use Plant as single prompt in the dashboard(If you are getting data from BI).You cannot merge this behaviour in the dashboard.(In Web Intelligence you can merge it based on common dimension values only).
    Regards,
    Venkat

  • Two comboBox in a datagrid

    Hi All,
    When I create a new line in my grid I want to include two
    comboBox, the
    second comboBox related to the first one.
    I got it work partial, I can create the second combo on the
    fly but how can
    I insert the combo into the grid for specific row and column.
    The column is the same but the row change if I add one.
    Thanks
    JFB

    Yes? but how in a dynamic form?
    This is what I'm doing... my setCategory function fill the
    array for the
    second comboBox but this only work for one row in my datagrid
    because if I
    set the second row in my datagrid and I change the option in
    my first
    comboBox it change the values for all second comboBox values.
    Now I can create a new comboBox on the fly but if I say
    comboBox.id =
    "materialItem_cb" it doesn show in the datagrid.
    How can I do this? Please help... I'm trying different things
    without luck
    Tks
    JFB
    public function setCategory(tempCombo:ComboBox):void{
    acMaterialsItem.removeAll();
    for each (var item:Object in acAllItems) {
    if (item.itemCategoryID == tempCombo.selectedItem.id) {
    acMaterialsItem.addItem(item);
    <mx:DataGridColumn headerText="Category"
    dataField="itemCategoryID"
    editable="false" width="150">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:ComboBox id="category_cb"
    dataProvider="{outerDocument.acItemCategory}"
    labelField="label"
    change="outerDocument.setCategory(category_cb)"
    width="150"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <mx:DataGridColumn headerText="Material Description"
    dataField="materialItemID" editable="false" width="200">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox>
    <mx:ComboBox id="materialItem_cb"
    dataProvider="{outerDocument.acMaterialsItem}"
    labelField="label"
    width="200"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    "ntsiii" <[email protected]> wrote in message
    news:f98ags$h40$[email protected]..
    > This must be handled by your item renderer.
    >
    > Tracy

  • Grid filtering with textInput and TWO comboboxes...

    I am trying to combine some code based on Ben Forta's example
    and another I found on cflex.net. The idea is to have a text
    "as-you-type" search on a Grid, and also be filtered by not one,
    but two comboboxes, each pertaining to different columns of the
    grid. The code below works, but it is only 1 combobox and a
    textInput. How can I add the second combobox?
    Each piece of code works find on its own, but I'm just having
    trouble putting them all together. The second combobox's code is in
    block comment below.
    The rest of the application is like this: the grid is
    dgObjectList with dataProvider objectList. (ArrayCollection) It has
    objName, typeName, and courseName for columns. It is filtered via
    an inputText (for objName), and two comboBoxes cbTypeList and
    cbCourseList (for typeName and courseName). All three have
    change="objectList.refresh();"
    The resultHandler for the grid's data has:
    objectList.filterFunction=processFilter;
    And finally, here's the filter I have so far...any thoughts
    on getting the second combobox in there? The problem is once an if
    statement passes, the rest of the function doesn't run.
    quote:
    private function processFilter(item:Object):Boolean {
    var result:Boolean=false;
    dgObjectList.selectedIndex = -1;
    checkForDisplay();
    if(item.objName.length == 0 ||
    item.objName.toUpperCase().indexOf(searchText.text.toUpperCase())
    >= 0) {
    if(cbTypeList.selectedItem.typeName != "Show All") {
    return item.typeName == cbTypeList.selectedItem.typeName;
    } else if(cbTypeList.selectedItem.typeName == "Show All") {
    return true;
    /* Second ComboBox:
    if(cbCourseList.selectedItem.courseName != "Show All") {
    return item.courseName ==
    cbCourseListselectedItem.courseName;
    } else if(cbCourseList.selectedItem.courseName == "Show
    All") {
    return true;
    return result;

    Here is a complete working example.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="creationCompleteHandler(event);">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.events.FlexEvent
    [Bindable]
    public var theRegion: Array = [ {label:"State",
    data:1},{label:"North", data:"N"}, {label:"South", data:"S"} ];
    [Bindable]
    public var newPremise: Array = [ {label:"Premise",
    data:1},{label:"On", data:"ON"}, {label:"Off", data:"OF"},
    {label:"Military", data:"MI"} ];
    private var tmp_objectList:Array =
    {Premise: "On",Region: "North",objName: "Intro", typeName:
    "ColdFusion", courseName :"Intro To ColdFusion"},
    {Premise: "Off",Region: "South",objName: "Programming",
    typeName: "Flex", courseName:"Flex Programming"},
    {Premise: "Military",Region: "South",objName: "Development",
    typeName: "Apollo", courseName:"Apollo Development"}
    [Bindable]
    private var ObjectList:ArrayCollection;
    private function
    creationCompleteHandler(event:FlexEvent):void
    ObjectList = new ArrayCollection (tmp_objectList);
    ObjectList.filterFunction=processObjectListFilter;
    public function processObjectListFilter(item:Object):Boolean
    var result:Boolean=false;
    if (
    (txtFilter.text == '' || (item.objName != null &&
    String(item.objName).toUpperCase().indexOf(txtFilter.text.toUpperCase())
    >= 0)) &&
    (aRegion.selectedLabel == 'State' ||(item.Region != null
    item.Region.toUpperCase().indexOf(aRegion.selectedLabel.toUpperCase())
    >= 0)) &&
    (premisefilter.selectedLabel == 'Premise' ||(item.Premise !=
    null &&
    item.Premise.toUpperCase().indexOf(premisefilter.selectedLabel.toUpperCase())
    >= 0))
    result=true;
    return result;
    ]]>
    </mx:Script>
    <mx:ComboBox id="aRegion" dataProvider="{theRegion}"
    width="70" change="ObjectList.refresh();"/>
    <mx:ComboBox id="premisefilter"
    dataProvider="{newPremise}" width="85"
    change="ObjectList.refresh();" x="78"/>
    <mx:TextInput x="34" y="249" id="txtFilter"
    change="ObjectList.refresh();"/>
    <mx:DataGrid dataProvider="{ObjectList}" x="34" y="279"
    width="596">
    <mx:columns>
    <mx:DataGridColumn headerText="Region"
    dataField="Region"/>
    <mx:DataGridColumn headerText="Premise"
    dataField="Premise"/>
    <mx:DataGridColumn headerText="objName"
    dataField="objName"/>
    <mx:DataGridColumn headerText="typeName"
    dataField="typeName"/>
    <mx:DataGridColumn headerText="courseName"
    dataField="courseName"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Text x="34" y="223" text="Type As You Go Filters
    objName" color="#ffffff"/>
    </mx:Application>

  • Two values in Dashboard prompt

    Hi,
    How do i display two values in the dashboard prompt. In order to make the prompt more discriptive and easy to understand for the user i am trying to display both the processing period and the week number in the prompt but i want to pass only the the processing period to the reports. Can i do it?
    Thanks

    Hi,
    create a new logical column with concatenated values of date & week number and use this in prompts display. In RPD, keep processing date as a key column for the new column.
    In analysis, simply put a filter based on the key column as OBIEE will pass processing date only to the report.
    Let me know if you have any doubts.
    cheers.. Patrick.

  • How to restrict the filters' interaction between two (or more) dashboard pages?

    Hello,
    I work in OBIEE 10.1.3. and I don't have a lot of experiense with this product.
    I have a problem with report filters’ interaction between dashboard pages. I have created two pages in one dashboard and I navigate from page 1 to page 2. Reports from page 2 have more restrictive data filters (for example, Fiscal Month = Current Month & Fiscal Year = Current Year) than reports from page 1 (Fiscal Month <= Current Month & Fiscal Year = Current Year). If I start from the page 1 and then navigate to the page 2 by clicking on the column that is used for navigation all reports on both pages work fine. However, when I return to page 1 (by clicking on the page name) the data in the reports there is skewed, displaying only the data for Fiscal Month = Current Month. I checked the reports filters and they all get reset from (Fiscal Month <= Current Month) to (Fiscal Month = Current Month). I tried to resolve this by canging filters back to what they were, saving the report, and starting over, but it does not help.
    If anyone knows the solution for my problem, please respond to my post.
    Thank you,

    You can use this workaround:
    Page1: Fiscal Month : CASE WHEN 1=1 THEN 'Fiscal Month' END
    Make this field as 'is prompted' for all the reports in page1.
    For Page2:
    Fiscal Month : CASE WHEN 2=2 THEN 'Fiscal Month' END
    Make this field as 'is prompted' for all the reports in page2.
    This way OBIEE will treat them as two separate fields and the filters will not be messed up.

  • Is it ok to have two address book, dashboard, chess and other apps icons when I launch the launchpad?

    Im having a probles that when i use the launchpad there are two icons of some apps is that normal? and is it normal to have two folders of applications?

    cs6 is an older version of photoshop.  cc is the latest version.

  • How to get the values of 2 dynamic comboboxes in one jsp to another jsp?

    I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
    Select.jsp:
    <%@ page language="java" import="java.sql.*" %>
    <%!
         Connection con = null;
         Statement  st  = null;
         ResultSet  rs  = null;
         String     sql = null;
         void addItems(javax.servlet.jsp.JspWriter out, String sql)
           try{     
              rs = st.executeQuery(sql);
              while( rs.next() )
                   out.println("<option>" + rs.getString(1) + "</option>");               
         }catch(Exception e)
                   System.out.println(e);
    %>
    <HTML>
    <HEAD>
    <TITLE>JSP WITH  MULTIPLE FORMS</TITLE>
    <script language="javascript">
              function checking()
                        form1.submit();
         </script>
    </HEAD>
         <body>
             <center>
             <b><font size="5" color="#333399">Staff ID:</font></b></center>
                     <FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
                         <p align=center>
                         Details of Staff :  
                       <SELECT 1 NAME="type" onchange="checking();">
                                    <option> Administrator </option>
                              <option> OfficeAssistent </option>
                              <option> Clerk </option>
                                  </SELECT 1>
                          </p>
    </FORM>
                      <FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
                      <center>
                          <TABLE><TR><TD>Staff ID:</TD>
                                 <TD><SELECT 2 NAME="staff_id">
                    <%    
            String type = request.getParameter("type");
            try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
            catch (ClassNotFoundException ex) {
                   System.out.println(ex);
            catch (SQLException ex)
                System.out.println(ex);
         st  = con.createStatement();
         sql = "select staff_id from "+type+"";
         addItems(out, sql);
    %>
              </SELECT 2>
           </TD>
         </TR>
    </table></center>
    <h2> Details of <%= type + "s" %> </h2>
                         <center><input type=submit value=ok onclick="submit();"></center>
                  </FORM>
         </BODY>
    </HTML>
    welcome1.jsp
    <center><h1>WEL COME</h1></center>
    <%    
            String type = request.getParameter("type");
            String sid = request.getParameter("staff_id");
    %>
    <h2> Details of <%= type + "s" %> </h2>
    <h2> Details of <%= sid %> </h2>

    <SELECT 1 NAME="type" onchange="checking();">
                                    <option value = "0"> Administrator </option>
                              <option value = "1"> OfficeAssistent </option>
                              <option value = "2"> Clerk </option>
                                  </SELECT 1>

  • How Can I change a report with base in another in the same dashboard?

    Hi,
    I need to publish two reports in a dashboard, the first report is a list of values and the second report is a chart. When I click in a value of the first report, the second report must change with the value selected from the first report.
    I first created the first report, and I changed the column properties in the data format, I selected treat text as: "Custom Text Format", the Custom Text Format is:
    @[html]"<f ont class=Nav oncl ick=\"Ja vaScr ipt:GoNav(event, '/path/reporte2','TABLE','FIELD','"@"');\">"@"< /fo nt>";;@
    The second Report has the next filter: FIELD is equal to / is in @{NQ_SESSION.@}
    With this the first and second reports works well, however, when I include the two reports in dashboard, the second report is updated in another window not in the same section.
    How Can I change the second report in the same page or section where this the first report?
    Thanks
    Edwin Guerrero

    I am not sure whether this would work but worth a try. Create a third report which would call the 2nd report using iframe and GO URL. Name the iframe of the narrative view. And use the java script to update the iframe using objWin = window.open(<ur go url>, “biee”,”height=480,width=240,scrollbars=yes,resizeable=yes”);. I had used a similar method to integrate biee with mapviewer. You can check it out here http://oraclebizint.wordpress.com/2007/09/26/oracle-bi-ee-10133-and-mapviewer-step-by-step-integration-phase2-and-phase3/
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • Comboboxes are not set  on the 1st time a row is clicked in the dataTable

    I have somewhat the following setup:
    I have a DataTable that is filled with a listof objects, a actionListener is handeled when a row is clicked.
    Under the Table there are two ComboBoxes (lets call them Category and Item) that get their values from lists of Objects. The values of the list that backs the Item combo depend on the selected value of the Category combo.
    Lets assume the values look like this:
    CategoryA
    ---ItemA1
    ---ItemA2
    CategoryB
    ---ItemB1
    ---ItemB2
    Together with some textboxes, they should represent the values of the clicked row in the Table.
    Now the problem:
    When the comboboxes have a different value than the row that is be&iuml;ng selected the values of the comboboxes and textboxes are not set correctly until the 3rd time the row is clicked.
    It also doesn't go into the onClickMehod in the backing bean before the 3rd click. This is checked by a logger.
    an example:
    before clicking, the category combo is set to "CategoryB", the Item combo is set to "ItemB1" and the textboxes are empty. The row that is going to be clicked has as its category "CategoryA" and as its Item "ItemA1"
    1st click:
    the form still shows the values like they were before clicking, the log doesn't show that the method is triggered
    2nd click:
    the Item combo is set to "ItemA1", the category is still set to "CategoryB", the textBoxes are still empty. The log still doesn't show that the method is triggered
    3rd click:
    the Category combo is set to "CategoryA", the Item combo is set to "ItemA1", the textboxes also have their correct values.
    the code is as followed:
    JSP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head></head>
    <body>
    <f:view>
    <h:form binding="#{backingBean.pageLoad}">
    <h:dataTable binding="#{backingBean.dataTable}" columnClasses="COL1, COL1, COL2, COL2, COL3" value="#{backingBean.myObjects}" var="myObject" width="100%" headerClass="HEADING" rowClasses="ROW1, ROW2" rows="10">
    <h:column>
    <f:facet name="header">
    <h:commandLink actionListener="#{backingBean.sortDataList}" styleClass="rowHeader">
    <f:attribute name="sortField" value="getItemCategory" />
    <h:outputText value="Category"/>
    </h:commandLink>
    </f:facet>
    <h:commandLink shape="rect" styleClass="rowtext" value="#{myObject.item.itemCategory.description}" actionListener="#{backingBean.rowSelect}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:commandLink actionListener="#{backingBean.sortDataList}" styleClass="rowHeader">
    <f:attribute name="sortField" value="getItem" />
    <h:outputText value="Item"/>
    </h:commandLink>
    </f:facet>
    <h:commandLink shape="rect" styleClass="rowtext" value="#{myObject.item.name}" actionListener="#{backingBean.rowSelect}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:commandLink actionListener="#{backingBean.sortDataList}" styleClass="rowHeader">
    <f:attribute name="sortField" value="getDescription" />
    <h:outputText value="Certification"/>
    </h:commandLink>
    </f:facet>
    <h:commandLink shape="rect" styleClass="rowtext" value="#{myObject.description}" actionListener="#{myObject.description}"/>
    </h:column>
    <f:facet name="footer">
    <h:panelGroup style="text-align:right">
    <h:commandButton value="first" action="#{backingBean.pageFirst}" disabled="#{backingBean.dataTable.first == 0}" />
    <h:commandButton value="prev" action="#{backingBean.pagePrevious}" disabled="#{backingBean.dataTable.first == 0}" />
    <h:commandButton value="next" action="#{backingBean.pageNext}" disabled="#{backingBean.dataTable.first + backingBean.dataTable.rows >= backingBean.dataTable.rowCount}" />
    <h:commandButton value="last" action="#{backingBean.pageLast}" disabled="#{backingBean.dataTable.first + backingBean.dataTable.rows >= backingBean.dataTable.rowCount}" />
    <h:commandButton value="Append New" action="#{backingBean.ClearFields}" />
    </h:panelGroup>
    </f:facet>
    </h:dataTable>
    <h:inputHidden value="#{backingBean.sortField}"/>
    <h:inputHidden value="#{backingBean.sortAscending}"/>
    <h:inputHidden value="#{backingBean.myObjectId}"/>
    <br />
    <br />
    <table style="border-collapse: collapse; width:100%" cellpadding="3" border="1">
    <tr>
    <td style="text-align:left; width:20%; background-image:url('images/lbar.gif'); font-family:Arial; font-size:smaller; font-weight:bold" colspan="3">Detail</td>
    </tr>
    <tr>
    <td style="text-align:right; width:20%; background-color:#CCCCCC; font-family:Arial; font-size:smaller; font-weight:bold">Category </td>
    <td style="width:80%; background-color:#CCCCCC;font-weight:bold">
    <h:selectOneMenu value="#{backingBean.selectedCategory}" onchange="submit();" valueChangeListener="#{backingBean.CategoryChange}">
    <f:selectItems value="#{backingBean.selectedCategories}"/>
    </h:selectOneMenu>
    </td>
    </tr>
    <tr>
    <td style="text-align:right; width:20%; background-color:#CCCCCC; font-family:Arial; font-size:smaller; font-weight:bold">Item id </td>
    <td style="width:80%; background-color:#CCCCCC;font-weight:bold">
    <h:selectOneMenu value="#{backingBean.selectedItem}">
    <f:selectItems value="#{backingBean.selectedItems}"/>
    </h:selectOneMenu>
    </td>
    </tr>
    <tr>
    <td style="text-align:right; width:20%; background-color:#CCCCCC; font-family:Arial; font-size:smaller; font-weight:bold">Item Description </td>
    <td style="width:80%; background-color:#CCCCCC;font-weight:bold"> <h:inputTextarea value="#{backingBean.description}" cols="60" rows="5"/></td>
    </tr>
    </table>
    </h:form>
    </f:view>
    </body>
    </html>the backing bean:
    public class BackingBean{
    -- Declaration of properties --
    public void rowSelect(ActionEvent event) {
    // Get selected MyData item to be edited.
    logger.debug("Select row");
    FacesContext context = FacesContext.getCurrentInstance();
    try
    if ((sortField != null) && (myObjects != null)) {
    Collections.sort(myObjects, new DTOComparator(sortField, sortAscending));
    dataTable.saveState(context);
    catch(Exception e){
    logger.error(e.getLocalizedMessage(), e);
    context.addMessage("ERROR", new FacesMessage(e.toString()));}
    logger.debug("Setting fields");
    myObject = (MyObject) dataTable.getRowData();
    description = myObject.getDescription();
    itemCategory = myObject.getItem().getItemCategory();
    item = myObject.getItem();
    docDisabled = !certified;
    selectedCategory = itemCategory.getId();
    myObjectId = myObject.getId();
    logger.debug("Fields set");
    public void sortDataList(ActionEvent event) {
    String sortFieldAttribute = getAttribute(event, "sortField");
    // Get and set sort field and sort order.
    if (sortField != null && sortField.equals(sortFieldAttribute)) {
    sortAscending = !sortAscending;
    } else {
    sortField = sortFieldAttribute;
    sortAscending = true;
    // Sort results.
    if (sortField != null) {
    Collections.sort(myObjects, new DTOComparator(sortField, sortAscending));
    public void CategoryChange(ValueChangeEvent vce){
    try {
    logger.debug("SelectedIndexChange: Category: {}",vce.getNewValue().toString());
    selectedCategory = Integer.parseInt(vce.getNewValue().toString());
    logger.debug("SelectedIndexChange: Category");
    itemCategory = itemCategoryService.retrieveItemCategoryById(selectedCategory);
    logger.debug("Showing Category: {}", itemCategory.getDescription());
    } catch (Exception e) {
    logger.error("Error occured: {}",e.toString());
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage("ERROR", new FacesMessage(e.toString()));
    public List<SelectItem> getSelectedItems() {
    selectedItems = new ArrayList<SelectItem>();
    try
    logger.debug("selectedCategory: {}",selectedCategory);
    if (itemCategory!=null)
    logger.debug("Category Object: {}",itemCategory.getId());
    items.clear();
    items.addAll(itemCategoryService.retrieveItemCategoryById(selectedCategory).getItems());
    logger.debug("items recieved: {}",items.size());
    for (int count = 0; count < items.size(); count++) {
    selectedItems.add(new SelectItem(items.get(count).getSeq(),items.get(count).getName()));
    catch (Exception e){
    logger.error("Error occured: {}",e.toString());
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage("ERROR", new FacesMessage(e.toString()));
    return selectedItems;
    public List<SelectItem> getSelectedCategories() {
    selectedCategories = new ArrayList<SelectItem>();
    try{
    for (int count = 0; count < itemCategories.size(); count++) {
    if (itemCategories.get(count).getItems().size() != 0)
    selectedCategories.add(new SelectItem(itemCategories.get(count).getId(),itemCategories.get(count).getDescription()));
    if (selectedCategory == 0)
    selectedCategory = itemCategories.get(0).getId();
    catch (Exception e){
    logger.error("Error occured: {}",e.toString());
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage("ERROR", new FacesMessage(e.toString()));
    return selectedCategories;
    -- other getters and setters --
    }I've already tried to use the action attribute instead of the actionlistener attribute, also tried to add immediate="true" to all fields and columns.
    Did try to add onclick="submit();" to the rows.
    What can be done to fix it??
    ps: the enviroment is JSF + Spring + Hibernate

    The <h:messages/> tag is where the validation exception is shown, but no validation is used on the form, no other exeptions are sown.
    the List<Categories> is filled at a setPageLoad method which is bound to the form by <h:form binding="#{backingBean.pageLoad}">.
    The List<SelectedItem> of the categories box is filled in its getter and filled with the values of the List<Categories>
    And both the List<SelectedItem> of the items box and the List<Item> are filled in the getter of the List<SelectedItem> of the items box
    so instead of that i should rewrite it to something like this:
    public BackingBean() {
        selectedCategories = new List<SelectedItem>();
        selectedItems = new List<SelectedItem>();
        categories = CategoryService.retrieveCategories(); //gets all categories
        items = ItemService.retrieveItemsByCategory(selectedCategory); //gets the items
        for (int count = 0; count < categories.size(); count++) {
            selectedCategories.add(new SelectItem(categories.get(count).getId(),categories.get(count).getDescription()));
        if (selectedCategory == 0){
            selectedCategory = categories.get(0).getId();
        for (int count = 0; count < items.size(); count++) {
            selectedItems.add(new SelectItem(items.get(count).getId(),items.get(count).getDescription()));
        if (selectedItem == 0){
            selectedItem = items.get(0).getId();
    public void CategoryChange(ValueChangeEvent vce){
            try {
                if (vce.getPhaseId() != PhaseId.INVOKE_APPLICATION) {
                    vce.setPhaseId(PhaseId.INVOKE_APPLICATION);
                    vce.queue();
                } else {
                    FacesContext.getCurrentInstance().renderResponse();
                    selectedCategory = Integer.parseInt(vce.getNewValue().toString());
                    category = CategoryService.retrieveCategoryById(selectedCategory); // gets the category Object
            } catch (Exception e) {
                logger.error("Error occured: {}",e.toString());
                FacesContext context = FacesContext.getCurrentInstance();
                context.addMessage("ERROR", new FacesMessage(e.toString()));
    public List<SelectItem> getSelectedCategories() {
        return selectedCategories;
    public void setSelectedCategories(List<SelectItem> selectedCategories) {
        this.selectedCategories = selectedCategories;
    public List<SelectItem> getSelectedItems() {
        return selectedCategories;
    public void setSelectedItems(List<SelectItem> selectedItems) {
        this.selectedItems = selectedItems;
    }The bean is request scoped.

  • OBIEE 11g How to pass variable from one prompt to another prompt in dashboard page.

      How to pass variable from one prompt to another prompt in dashboard page.
    I have two prompt in dashboard page as below.
    Reporttype
    prompt: values(Accounting, Operational) Note: values stored as
    presentation variable and they are not coming from table.
    Date prompt values (Account_date, Operation_date)
    Note:values are coming from dim_date table.  
    Now the task is When user select First
    Prompt value  “Accounting” Then in the
    second prompt should display only Accounting_dates , if user select “operational”
    and it should display only operation_dates in second prompt.
    In order to solve this issue I made the
    first prompt “Reporttype” values(Accounting, Operational) as presentation
    values (custom specific values) and default presentation value is accounting.
    In second prompt Date are coming from
    dim_date table and I selected Sql results as shown below.
    SELECT case when '@{Reporttype}'='Accounting'
    then "Dates (Receipts)"."Acct Year"
    else "Dates (Receipts)"."Ops
    Year"  End  FROM "Receipts"
    Issue: Presentation variable value is not
    changing in sql when user select “operation” and second prompt always shows
    acct year in second prompt.
    For testing pupose I kept this presentation
    variable in text object of dashboard and values are changing there, but not in
    second prompt sql.
    Please suggest the solution.

    You will want to use the MoveClipLoader class (using its loadClip() and addListener() methods) rather than loadMovie so that you can wait for the file to load before you try to access anything in it.  You can create an empty movieclip to load the swf into, and in that way the loaded file can be targeted using the empty movieclip instance name.

  • Master/Detail Combobox

    Hello,
    I've got three ViewObjects: DataView, MasterView and DetailView. DataView has references to MasterView and DetailView. Zero to n Positions in DetailView have also a reference to MasterView (like in every Master-/DetailView association). Now I've got a form that fills one row of DataView. To fill the references to Master-/DetailView I want to use two comboboxes. Depending what the user selects in the MasterCombobox the user should get other choices in DetailViewCombobox. But somehow the DetailViewCombobox doesn't change the choices when the selection in MasterCombobox changes.
    After some research I've found out that there are two modes to bind Comboboxes. One uses ListOperMode=1 while the user uses ListOperMode=0. In the first one you bind MasterCombobox to MasterViewIterator and DetailViewCombobox to DetailViewIterator. Then the choices of DetailViewCombobox change when you change the selection in MasterCombobox. But the references in DataViewRow won't be filled. In the ListOperMode=0 the references get filled but DetailViewCombobox doesn't change its choices when MasterCombobox is changed.
    Has anybody experienced similar problems?
    regards
    joerg

    repost

  • Need combobox with a Jtable to view client & server files

    Hellow Everybody,
    I am quite new to Java, although I have experience with other
    programming languages.
    I have searched for tutorials, code, examples etc. but have not found
    much that can help me so far. I am a BCA student & I am appearing for my last year exams. I studied about various Java programs in my course and I decided to make a Swing based FTP Server. Although I not expert in Java , but I have learnt the network programming very much clearly, and that�s why by the help these I wrote a program but it not complete. I have given the program below.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Cursor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.StringTokenizer;
    import javax.swing.JButton;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JProgressBar;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    import javax.swing.border.BevelBorder;
    import javax.swing.border.EmptyBorder;
    import sun.net.TelnetInputStream;
    import sun.net.ftp.FtpClient;
    public class Client extends JFrame {
    public static int BUFFER_SIZE = 10240;
    protected JTextField userNameTextField = new JTextField("anonymous");
    protected JPasswordField passwordTextField = new JPasswordField(10);
    protected JTextField urlTextField = new JTextField(20);
    protected JTextField fileTextField = new JTextField(10);
    protected JTextArea monitorTextArea = new JTextArea(5, 20);
    protected JProgressBar m_progress = new JProgressBar();
    protected JButton putButton = new JButton("Upload <<");
    protected JButton getButton;
    protected JButton fileButton = new JButton("File");
    protected JButton closeButton = new JButton("Close");
    protected JFileChooser fileChooser = new JFileChooser();
    protected FtpClient ftpClient;
    protected String localFileName;
    protected String remoteFileName;
    public Client() {
    super("FTP Client");
    JPanel p = new JPanel();
    p.setBorder(new EmptyBorder(5, 5, 5, 5));
    p.add(new JLabel("User name:"));
    p.add(userNameTextField);
    p.add(new JLabel("Password:"));
    p.add(passwordTextField);
    p.add(new JLabel("URL:"));
    p.add(urlTextField);
    p.add(new JLabel("File:"));
    p.add(fileTextField);
    monitorTextArea.setEditable(false);
    JScrollPane ps = new JScrollPane(monitorTextArea);
    p.add(ps);
    m_progress.setStringPainted(true);
    m_progress.setBorder(new BevelBorder(BevelBorder.LOWERED, Color.white,
    Color.gray));
    m_progress.setMinimum(0);
    JPanel p1 = new JPanel(new BorderLayout());
    p1.add(m_progress, BorderLayout.CENTER);
    p.add(p1);
    ActionListener lst = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    if (connect()) {
    Thread uploader = new Thread() {
    public void run() {
    putFile();
    disconnect();
    uploader.start();
    putButton.addActionListener(lst);
    putButton.setMnemonic('U');
    p.add(putButton);
    getButton = new JButton("Download >>");
    lst = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    if (connect()) {
    Thread downloader = new Thread() {
    public void run() {
    getFile();
    disconnect();
    downloader.start();
    getButton.addActionListener(lst);
    getButton.setMnemonic('D');
    p.add(getButton);
    lst = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    if (fileChooser.showSaveDialog(Client.this) != JFileChooser.APPROVE_OPTION)
    return;
    File f = fileChooser.getSelectedFile();
    fileTextField.setText(f.getPath());
    fileButton.addActionListener(lst);
    fileButton.setMnemonic('f');
    p.add(fileButton);
    lst = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    if (ftpClient != null)
    disconnect();
    else
    System.exit(0);
    closeButton.addActionListener(lst);
    closeButton.setDefaultCapable(true);
    closeButton.setMnemonic('g');
    p.add(closeButton);
    getContentPane().add(p, BorderLayout.CENTER);
    fileChooser.setCurrentDirectory(new File("."));
    fileChooser
    .setApproveButtonToolTipText("Select file for upload/download");
    WindowListener wndCloser = new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    disconnect();
    System.exit(0);
    addWindowListener(wndCloser);
    setSize(720, 240);
    setVisible(true);
    public void setButtonStates(boolean state) {
    putButton.setEnabled(state);
    getButton.setEnabled(state);
    fileButton.setEnabled(state);
    protected boolean connect() {
    monitorTextArea.setText("");
    setButtonStates(false);
    closeButton.setText("Cancel");
    setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    String user = userNameTextField.getText();
    if (user.length() == 0) {
    setMessage("Please enter user name");
    setButtonStates(true);
    return false;
    String password = new String(passwordTextField.getPassword());
    String sUrl = urlTextField.getText();
    if (sUrl.length() == 0) {
    setMessage("Please enter URL");
    setButtonStates(true);
    return false;
    localFileName = fileTextField.getText();
    // Parse URL
    int index = sUrl.indexOf("//");
    if (index >= 0)
    sUrl = sUrl.substring(index + 2);
    index = sUrl.indexOf("/");
    String host = sUrl.substring(0, index);
    sUrl = sUrl.substring(index + 1);
    String sDir = "";
    index = sUrl.lastIndexOf("/");
    if (index >= 0) {
    sDir = sUrl.substring(0, index);
    sUrl = sUrl.substring(index + 1);
    remoteFileName = sUrl;
    try {
    setMessage("Connecting to host " + host);
    ftpClient = new FtpClient(host);
    ftpClient.login(user, password);
    setMessage("User " + user + " login OK");
    setMessage(ftpClient.welcomeMsg);
    ftpClient.cd(sDir);
    setMessage("Directory: " + sDir);
    ftpClient.binary();
    return true;
    } catch (Exception ex) {
    setMessage("Error: " + ex.toString());
    setButtonStates(true);
    return false;
    protected void disconnect() {
    if (ftpClient != null) {
    try {
    ftpClient.closeServer();
    } catch (IOException ex) {
    ftpClient = null;
    Runnable runner = new Runnable() {
    public void run() {
    m_progress.setValue(0);
    putButton.setEnabled(true);
    getButton.setEnabled(true);
    fileButton.setEnabled(true);
    closeButton.setText("Close");
    Client.this.setCursor(Cursor
    .getPredefinedCursor(Cursor.DEFAULT_CURSOR));
    SwingUtilities.invokeLater(runner);
    protected void getFile() {
    if (localFileName.length() == 0) {
    localFileName = remoteFileName;
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    fileTextField.setText(localFileName);
    byte[] buffer = new byte[BUFFER_SIZE];
    try {
    int size = getFileSize(ftpClient, remoteFileName);
    if (size > 0) {
    setMessage("File " + remoteFileName + ": " + size + " bytes");
    setProgressMaximum(size);
    } else
    setMessage("File " + remoteFileName + ": size unknown");
    FileOutputStream out = new FileOutputStream(localFileName);
    InputStream in = ftpClient.get(remoteFileName);
    int counter = 0;
    while (true) {
    int bytes = in.read(buffer);
    if (bytes < 0)
    break;
    out.write(buffer, 0, bytes);
    counter += bytes;
    if (size > 0) {
    setProgressValue(counter);
    int proc = (int) Math
    .round(m_progress.getPercentComplete() * 100);
    setProgressString(proc + " %");
    } else {
    int kb = counter / 1024;
    setProgressString(kb + " KB");
    out.close();
    in.close();
    } catch (Exception ex) {
    setMessage("Error: " + ex.toString());
    protected void putFile() {
    if (localFileName.length() == 0) {
    setMessage("Please enter file name");
    byte[] buffer = new byte[BUFFER_SIZE];
    try {
    File f = new File(localFileName);
    int size = (int) f.length();
    setMessage("File " + localFileName + ": " + size + " bytes");
    setProgressMaximum(size);
    FileInputStream in = new FileInputStream(localFileName);
    OutputStream out = ftpClient.put(remoteFileName);
    int counter = 0;
    while (true) {
    int bytes = in.read(buffer);
    if (bytes < 0)
    break;
    out.write(buffer, 0, bytes);
    counter += bytes;
    setProgressValue(counter);
    int proc = (int) Math
    .round(m_progress.getPercentComplete() * 100);
    setProgressString(proc + " %");
    out.close();
    in.close();
    } catch (Exception ex) {
    setMessage("Error: " + ex.toString());
    protected void setMessage(final String str) {
    if (str != null) {
    Runnable runner = new Runnable() {
    public void run() {
    monitorTextArea.append(str + '\n');
    monitorTextArea.repaint();
    SwingUtilities.invokeLater(runner);
    protected void setProgressValue(final int value) {
    Runnable runner = new Runnable() {
    public void run() {
    m_progress.setValue(value);
    SwingUtilities.invokeLater(runner);
    protected void setProgressMaximum(final int value) {
    Runnable runner = new Runnable() {
    public void run() {
    m_progress.setMaximum(value);
    SwingUtilities.invokeLater(runner);
    protected void setProgressString(final String string) {
    Runnable runner = new Runnable() {
    public void run() {
    m_progress.setString(string);
    SwingUtilities.invokeLater(runner);
    public static int getFileSize(FtpClient client, String fileName)
    throws IOException {
    TelnetInputStream lst = client.list();
    String str = "";
    fileName = fileName.toLowerCase();
    while (true) {
    int c = lst.read();
    char ch = (char) c;
    if (c < 0 || ch == '\n') {
    str = str.toLowerCase();
    if (str.indexOf(fileName) >= 0) {
    StringTokenizer tk = new StringTokenizer(str);
    int index = 0;
    while (tk.hasMoreTokens()) {
    String token = tk.nextToken();
    if (index == 4)
    try {
    return Integer.parseInt(token);
    } catch (NumberFormatException ex) {
    return -1;
    index++;
    str = "";
    if (c <= 0)
    break;
    str += ch;
    return -1;
    public static void main(String argv[]) {
    new Client();
    The above given code is not yet complete. I want some specific features to be implemented in this code that is given below.
    1.     A login Gridlayout or Borderlayout & within it the username & password textfield.
    2.     When the username and password will request to server and if it will success then the textfields of the username & password have to be disable.
    3 . Two Combobox. One will give client directories and files and another
    will give the server directories and files.
    4 . Below the Combobox two JTable will be given & the tables wll show the
    client and server directories and files.
    Could anybody give me the codes that I want. If anybody check this code please help me????
    With Regards,
    DILLU

    Well Mr Michael_Dunn,
    Thanks for responding my query. First of all I would like to tell that
    this FTP server is going to be my project and that's why I am submmiting my question. I told in my points that I want a Jcombobox & a JTable for displaying that files & directories. whenever I set the directories in the combobox the files will be displayed in the JTable
    I hope you understand my point

  • Position a JSTL SELECT combobox to a specific row.

    I have two comboboxes. Each displays the same list of challenge questions. How do I position the second combobox on the second row of the combo box?
    <td>
    <% HashMap tempMap = ChallengeJspService.getAllChallengeQuestions();
    pageContext.setAttribute("tempMap", tempMap); %>
    <SELECT NAME="QUESTION1" tabindex="1" align="left">
    <c:forEach var="entry" items="${tempMap}">
    <OPTION VALUE='<c:out value="${entry.key}"/>'><c:out value="${entry.value}"/></OPTION >
    </c:forEach>
    </SELECT>
    </td>
    <% tempMap = ChallengeJspService.getAllChallengeQuestions();
    pageContext.setAttribute("tempMap", tempMap); %>
    <td>
    <SELECT NAME="QUESTION2" tabindex="1" align="left">
    <c:forEach var="entry" items="${tempMap}">
    <OPTION VALUE='<c:out value="${entry.key}"/>'><c:out value="${entry.value}"/></OPTION >
    </c:forEach>
    </SELECT>
    </td>

    How about a <c:if> or <c:choose> to check for a condition then? You'll have to work out the kinks, I've not had much experience with JSTL!
        <c:forEach var="entry" items="${tempMap}">
        <c:choose>
              <c:when test="${condition == 'whatever' }">
                <c:set var="makeSelected" value="selected" /t>
              </c:when>
              <c:otherwise>
                <c:set var="makeSelected" value=""/>
              <c:when>
        </c:choose>
             <OPTION <c:out value="${makeSelected}"/> VALUE='<c:out value="${entry.key}"/>'><c:out value="${entry.value}"/></OPTION >
        </c:forEach>Edited by: nogoodatcoding on Oct 1, 2007 10:04 PM

  • Prompts issue in Dashboard

    Hi All
    I need your advice immediately.
    We want to add two prompts in dashboard and both the prompts is of the same column.
    ie : Freeze Period , i am not able to add this prompt for the 2nd time , is there a way i can add it for the 2nd time?
    Please suggest me asap.
    Regds
    Mano

    Hi Mano,
    This is how I did at my work place....instead of creating logical column in RPD and all the way through the process....
    IF you want to drag the same column as 2 prompts...within the prompts page you can do like this.....
    First Add the column (in mycase which is number data type) and lable the lable1, then drag any other column that is also the same data type and put the name as LAble2 and copy the formula expression from label1 (ie..table.columnname) to Lable2 forula expression...
    Basically you are using the same column with different names..thats it...I hope this helps and this is what you are looking for...
    Let me know if i understood wrong...
    --SK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for