Dynamically fill a dashboard Panel in a Fragment

I work with a custom in a fragment (jsff) Panel dashboard.  The user can customize the dashboard (re - order of the Panel boxes, set the number of columns, add/remove Panel boxes, etc.) and our goal is to persist these customizations so that they are available in different sessions.  To do this, I created several tables of data base for these customizations and they linked to the table user.  When the user opens the application, the fragment of dashboard is the first fragment to display.  I load the information of the database, and then build the dashboard Panel.  The dashboard starts with a static Panel box set (as seen in main_dashboard.jsff below), then based on the data, I have re - order and boxes rendered set equal to false for the deleted user Panel.

My problem is that I have to do before the page is rendered.  To do this, call the method of customization of the constructor of my grain of support.  The RichPanelDashboard I bind the user interface component for is not yet available.  I tried several things that didn't work, including:

-Added @PostConstruct to my customization method annotation.

-By taking the root of the view component: RichPanelDashboard mainDashboard = (RichPanelDashboard) .getViewRoot () .findComponent () FacesContext.getCurrentInstance ("mainDash");

-Adding an event 'preRenderComponent' to the page: < f: event type = "preRenderComponent" listener = "#{main_dashboard.setupCustomDashboard}" / > (after a search on the web, it seems that the tag f: event is not supported in the Fragments of the ADF).

I encountered this problem in the past with the different user interface components.  In particular, I had to fill a SelectOneListBox before the page is rendered.  I solved the problem by adding a child < f: selectItems > to < af:selectOneListBox > and the value of this tag to a list of SelectItems in my grain of support and populate this list on instantiation of the bean.  Is there a similar option for a dashboard Panel and a list of the Panel boxes?  The idea of using a < af:forEach > tag had crossed my mind to fill the dashboard Panel with Panel boxes, but as you can see in my code below, I already use to dynamically fill the first group with < af:forEach > command links box.  Unless there is a way to dynamically fill a dashboard Panel with Panel boxes dynamically populated in the fragment, I don't think that the for each approach will work (it does not appear as a way to dynamically fill boxes of Panel with the user interface components in the bean to support either).

Example of code is below.  Any suggestions are greatly appreciated.

main_dashboard. JSFF

{code}

< af:panelDashboard id = "mainDash" columns = "2" rowHeight = "250px" styleClass = "AFStretchWidth" inlineStyle = "height: 1000px;

dropListener = "#{main_dashboard.handleReorder}" binding = "#{main_dashboard.panelDashboard}" > "

<!-f: event listener = "#{main_dashboard.setupCustomDashboard}" type = "preRenderComponent" /--> "

< af:panelBox id = "openedBox" text = "Recently opened" >

< af:componentDragSource / >

< af:forEach var = "item" items = "#{main_dashboard.openedCommandLinks}" >

< af:commandLink text = "#{item.text}" partialSubmit = 'true' "

actionListener = "#{main_dashboard.editorFiredFromDashboard}" / >

< / af:forEach >

< / af:panelBox >

< af:panelBox id = "editedBox" text = "Recently published" >

< af:componentDragSource / >

< af:outputText value = "Recently edited" id = "ot2" / >

< / af:panelBox >

< af:panelBox id = "openCPsBox" text = "My Open Config Packages" >

< af:componentDragSource / >

< af:outputText value = "My Open Config Packages" id = "ot3" / >

< / af:panelBox >

< af:panelBox id = "testbox.foobar.com" text = "Test box" >

< af:componentDragSource / >

< af:outputText value = "to test only" id = "ot4" / >

< / af:panelBox >

< / af:panelDashboard >

{code}

MainDashboardBackingBean (main_dashboard)

{code}

Private RichPanelDashboard panelDashboard;

...

public MainDashboardBackingBean() {}

...

setupCustomDashboard();

}

...

Using the annotation @PostConstruct has failed

@PostConstruct

public void setupCustomDashboard() {}

...

Set the number of custom columns

Integer selectedColumnCount = customDashboardDcl.getColumnCount ();

FacesContext pulling didn't work

RichPanelDashboard mainDashboard is FacesContext.getCurrentInstance (RichPanelDashboard) () .getViewRoot () .findComponent ("mainDash");.

mainDashboard.setColumns (selectedColumnCount);

Null pointer that happens here

panelDashboard.setColumns (selectedColumnCount);

Create the new ordered list

If (customDashboardMap! = null) {}

List < String > reorderedIdList = new ArrayList < String > (customDashboards.size ());

for (Integer key: customDashboardMap.keySet ()) {}

String customId = customDashboardMap.get (key);

for (UIComponent currChild: panelDashboard.getChildren ()) {}

String currId = currChild.getId ();

If (customId == currId) {}

reorderedIdList.add (currId);

break;

}

}

}

Unused Panel boxes must always be added, but not rendered

for (UIComponent currChild: panelDashboard.getChildren ()) {}

String currId = currChild.getId ();

If (! reorderedIdList.contains (currId)) {}

currChild.setRendered (false);

reorderedIdList.add (currId);

}

}

Apply the changes

ComponentChange change = new ReorderChildrenComponentChange (reorderedIdList);

change.changeComponent (panelDashboard);

}

AdfFacesContext.getCurrentInstance () .addPartialTarget (panelDashboard);

}

...

public RichPanelDashboard getPanelDashboard() {}

Return panelDashboard;

}

{} public void setPanelDashboard (RichPanelDashboard panelDashboard)

this.panelDashboard = panelDashboard;

}

{code}

Hello

I actually fill my panelDashboard with a forEach on a dashboard item list.

Binding = "#{pageFlowScope.myDashboard.dashboard} '"

dropListener = "#{pageFlowScope.myDashboard.move}" > "

var = 'panels' >

background ID = "${panels.ID}" = "medium" showDisclosure = "false" > "

ID = "r2" / >

All my panels is rendered as regions that is dynamically filled with workflow single page that are related to the page that contains the dashboard.

My DashboardItem class creates the binding workflow RegionModel

public RegionModel getRegionTaskflow() {}

String regionBinding = "#{bindings." + taskflow + ".regionModel";}

Model RegionModel = (RegionModel) JSFUtils.resolveExpression (regionBinding);

return the template;

}

I don't know if it's a good practice, but it works.

Hope that helps,

Achim

Tags: Java

Similar Questions

  • How do I dynamically fill IDropDownListController

    Hello!

    My question is how can I dynamically fill the IDropDownListController widget? In the example of project WriteFishPrice, the entries are all static, but I need to add or remove entries in the list. Thanks for the pointers!

    Assuming that you want to add inside a controller or an observer to the Panel you

    Here's a function I use.

    void MyDialogController::InitialiseDropdown (stringArray, const WidgetID, K2Vector & widgetId)

    {

    InterfacePtr panelControlData (this, UseDefaultIID()); / / I can get a Panelcontoldata because my controller is located in the kDialogBoss

    If (panelControlData is nil)

    ASSERT_FAIL ("invalid panelControlData");

    do

    {

    View IControlView * = panelControlData-> FindWidget (widgetId);

    If (view == nil)

    ASSERT_FAIL ("view invalid control");

    InterfacePtr stringListControlData (view UseDefaultIID());

    If (stringListControlData is nil)

    {

    ASSERT_FAIL ("invalid stringListControlData");

    break;

    }

    Clear the drop-down list.

    stringListControlData-> clear)

    kFalse, / / do not invalidate.

    kFalse / / no warning

    );

    Add their names to the drop down.

    K2Vector : iterator iter;

    for (iter = stringArray.begin (); iter)< stringarray.end();="">

    {

    Server PMString = * iter;

    Server. SetTranslatable (kFalse);

    stringListControlData-> AddString

    (

    Server,

    IStringListControlData::kEnd,

    kFalse, / / do not invalidate.

    kFalse //don't notify.

    );

    }

    view-> Invalidate();

    }

    While (false);

    }

  • Dynamically fill dDocAuthor when Committing WebCenter content Capture 11 g

    Hi all

    I use WebCenter content 11.1.1.8.0 and here I followed the document Doc-ID 1932842.1 to dynamically fill the dDocAuthor and after that, I am able to document capture and ucm webcenter content server logging, but after that when I'm trying to checkin document Imaging application from a capture or imaging console I start getting the error repository.

    Journal:

    [2015 10-12 T 16: 16:08.566 + 05:30] [IPM_server1] [ERROR] [TCM-00787] [oracle.imaging.service.exceptions] [tid: [ASSETS].] [ExecuteThread: '4' for queue: "(self-adjusting) weblogic.kernel.Default"] [ecid: 0000L1Rac8y8PtG5IzWByf1M6rli00005f, 0] [APP: imagery] a repository error has occurred. [[

    • oracle.imaging.ImagingException: TCM-00787

    stackTraceId: 8-1444646768566

    faultType: SYSTEM

    Details:

    Error code = oracle.stellent.ridc.protocol.ServiceException, ErrorMessage = "IPM_000576" element content has not been verified successfully. A user must be entered.

    at oracle.imaging.repository.ucm.UcmErrors.convertRepositoryError(UcmErrors.java:161)

    at oracle.imaging.repository.ucm.UcmRepositoryOperationImpl.convertDocumentRepositoryError(UcmRepositoryOperationImpl.java:410)

    at oracle.imaging.repository.ucm.UcmCreateDocumentImpl.createDocument(UcmCreateDocumentImpl.java:167)

    at oracle.imaging.repository.ucm.UcmRepositoryManager.createDocument(UcmRepositoryManager.java:623)

    at oracle.imaging.document.DocumentServiceImpl.createDocument(DocumentServiceImpl.java:345)

    Caused by: oracle.stellent.ridc.protocol.ServiceException: 'IPM_000576' content item has not been verified successfully. A user must be entered.

    at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:142)

    at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:108)

    to oracle.imaging.repository.ucm.UcmResponse. < init > (UcmResponse.java:70)

    so I followed the below steps and always faced with the question of archiving of the document currently anyone profile will work in Check imaging applications or the Checkin Standard profile.

    I created 2 workspace for the UCM posting profile and one for profile commit Imaging

    1. 1. for the validation of the University Complutense of MADRID.
    2. a. I created a field xAuth UCM and mappped this xAuth docAuthor Capture field in the posting profile
    3. b. then created a rule in the AAU to set the value derived from xAuth capture went from dDocAuthor to the Complutense University of MADRID.
    4. c. therefore, whenever I am trying to capture recording, the document is downloaded successfully

    1. 2 but for Imaging.
    2. a: I created a xAuthor field in Imaging and that mapped to docAuthor capture field in the posting profile
    3. b. but there is no derived rule created in the Complutense University of MADRID for this to give the value of the xAuthor of imaging field to the field dDocAuthor of the Complutense University of MADRID
    4. d. therefore, whenever I try to download the content from imagery, there is no value passed to dDocAuthor to the Complutense University of MADRID due to no rules created for it and that's why he takes the xAuth value which is actually zero.

    Here I am facing problem because the field of Imaging is not get mapped to the field dDocAuthor UCM and vice versa.

    If I use the derivative rule value as:

    < $dprDerivedValue = # active.xIPM_APP_1_19$ >

    I am able to record the document by using of capture and imaging posting profile console for Application of imaging; but unable to consignment to the standard profile of consignment of the Complutense University of MADRID document.

    Here I make no doubt that the condition is not properly evaluating of that I am unable to record of the document to help commit view profile capture and Imaging console application Imaging.

    derived rule current value:

    < # $if like '% IPM_' active.dDocName $>

    < $dprDerivedValue = # active.xIPM_APP_1_19$ >

    < $else$ >

    < $dprDerivedValue = # active.xAuth$ >

    < $endif$ >

    so please help me with good condition so that I can record the document using the two profile.

    Thank you

    Sanjeev

    Hey Jiri,

    Thank you for providing the idea for the creation of global everything how I created a global rule only, but due to an error, it was not assess the State and I am faced with the question, but now my problem solved using the slot provided.

    <$if  #active.xauth="" $="">

    <$dprDerivedValue=#active.xAuth$>

    <$else$>

    <$dprDerivedValue=#active.xIPM_APP_1_19$>

    <$endif$>

    Thanks again

    Sanjeev

  • Attempt to bind the drop-down menu to dynamically fill Textfield

    I had trouble to come with the script for calculating appropriate for this question and I was wondering if anyone would be able to help me.

    Basically what I'm doing, it's down a product Option Drop (let's call it "RS1") to dynamically fill a separate price/text ("Price RS") field based on the selected product in the drop down menu.

    Product in the menu options drop-down are 'single' and "Double".

    If I select the option of simple product, he would fill in the price with a price $345,00 field. If I had to choose the Double product option, it would enter the price with a price $565.00.


    The intention is to multiply what fills pricing by a separate drop-down field that I already have in place that measures the quantity of the item to get a total final for this order of products.


    I know this should be relatively simple, but I can't get my calculation script to work for the life of me. Any help is greatly appreciated!

    You can use this code as a custom text field calculation script:

    var v = this.getField("RS1").value;
    if (v=="Single") event.value = 345;
    else if (v=="Double") event.value = 565;
    else event.value = "";
    

    Make sure that you set the option to validate the value selected from the drop-down field immediately for the calculation to occur as soon as the selected takes place in the menu dropdown.

  • Dynamically hide a dashboard

    Hello:

    Is it possible to dynamically hide a dashboard on a single day for a week? Any tips will be appreciated.

    Thank you
    Chavigny.

    Happy that you have invested some time for 2nd approach... Here you go:

    (1) create a table in DB say

    CREATE TABLE DASH_SCREEN (FLG CHAR);
    INSERT INTO DASH_SCREEN (FLG) VALUES (' N "");
    I guess that if FLG = N then the dashboard is visible, otherwise if FLG = Y then its replaced with a hidden with custom message page.

    (2) you now have 2 options
    -Either use request Direct database: we should not import this picture to RPD
    - OR import this table in RPD and drag up to the presentation layer

    I'm now going to first approach. Ofcourse give access to a database directly to the administrator.

    (3) create a hidden page under the dash with a custom message

    (4) create a direct request from the database:
    -You can put the name of the connection pool that has the details of the database in which this table is present even if the table is not imported to the physical layer.
    -Put SQL as SELECT * FROM DASH_SCREEN WHERE FLG = 'Y '.
    -Check the option to workaround here
    -Click on the result, it will give you no results as value = N. create a Narrative here checked HTML and under story view put this:
    [[
    [[
    [[
    [[

    remove all [in above code

    -This script replace dash with a custom page that is hidden when the value of the flag is 'Y '.

    (5) now, Goto dashboard, front page, first section... Place the report above and also in chapter guided navigation
    Application to the reference Source: Yes
    Request to the source: same as above report
    See Section: If the query returns rows

    Now this guided navigation will guide the hidden page dashboard when this report returns a line any

    (6) you can easily create a direct request to the database to update the valu flag 'Y' or ' don't and then make use of the ibot to plan when necessary.

    This is a good method to hide or basically full dash replacement

    See you soon

  • Can I create a book, whose pages are dynamically filled with text, images?

    Can I create a book, whose pages are dynamically filled with text, photos, videos?

    And then want to give these pages a curl effect when activated. Pls. note I want to build these pages on the fly.

    If it is possible, what are the possible technologies that I can use?

    See you soon,.

    Samantray

    Flash can read data from several sources (XML files, text files, on the web, on-site, etc.) and you can use these data to populate your address dynamically. He can do the same thing with the pictures and any other active flash can use (images, video, etc).

    The effect of curvature of page can be done in different ways. Just google for flash page flip effect and tons of resources and tutorials will appear laboriously explaining how to do it.

  • Dynamically fill ObjectChoiceField according to the selected box

    Hi all

    I have a few boxes on my screen and an ObjectChoiceField. I have to fill this ObjectChoiceField dynamically according to the selected checkbox.  I have a few separate hard-coded (I announced on the same screen) array of strings for all the boxes.

    If I select the first box, then ObjectChoiceField must be populated with the corresponding array of strings... and so on...

    Thank you and best regards.

    You just need to use

    .setChoices ();

  • dynamically fill a webapp with blog tags

    Hello, is it possible fill a webapp with blog tags dynamically?

    So basically, each element webapp name would be the name of tag, that's all,

    Thank you

    Not that I know, but you can make a blog with some webapps, this video will give the basics. Mike Sallander - Blog Web App

    It may be useful

  • Dynamically, to replace a Panel in a palette?

    Hi, my question is this:

    My plugin has a palette with a Panel and two modes. These two modes are expected to show another Panel in the same palette. the transition from one mode to the other, the content of the palette (aka the Panel itself) are replaced with the sign of the second mode.

    I already looked at the example DynamicPanel, but this does not replace the Panel, but it dynamically creates new palettes with new panels.

    Thanks for any help I can get!

    Dirk and Bartek thanks for your answers!

    I ended up do like I said before, because it has proved to be the easiest way.

    I included all the widgets in a Panel and set them visible/invisible mode. the code is as easy as the following.

    (in my c ++ method where I check for mode)

    IControlView * SomeButtonControlView = VARUtils::GetWidgetOnPanel (kMyPanelWidgetID, kSomeButtonWidgetID); acquire the controlview in the specified widget

    check for my condition

    If (loggedIn is true)

    {

    SomeButtonControlView-> ShowView();

    } else {}

    SomeButtonControlView-> HideView();

    }

    VARUtils::GetWidgetOnPanel method

    / * GetWidgetOnPanel

    */

    VARUtils::GetWidgetOnPanel (IControlView *)

    const WidgetID & panelWidgetID, const WidgetID & widgetID)

    {

    IControlView * controlView = nil;

    do

    {

    InterfacePtr

    panelData (Utils()-> QueryPanelByWidgetID (panelWidgetID));

    Do not say, fail silently, the tree view panel can be closed.

    if(panelData == Nil)

    {

    break;

    }

    controlView = panelData-> FindWidget (widgetID);

    Assert (controlView);

    if(controlView == Nil)

    {

    break;

    }

    } while (0);

    Return controlView;

    }

    Thanks for your answers, they helped me understand what I needed!

  • a RG dynamically fill

    Hello
    I want to fill a record group dynamically from a collection, so: when I press a button, the LOV should show 3 values.
    the button code is:
    declare
     l_coll abc_type.varchar2_tbl;
     rg_name VARCHAR2(20) := 'record_group7';
     rg_col2 VARCHAR2(20) := rg_name||'.COD';
     
    begin
      l_coll := get_emp_collection(getcapattransa2);
      for i in l_coll.first .. l_coll.last loop
        -- add the value to your Record Group here
        Add_Group_Row( rg_name, END_OF_GROUP );
        Set_Group_Char_Cell(rg_col2, i, l_coll(i));
      end loop;
      
    end;
    
    do_key('LIST_VALUES');
    the record_group7 exists and it has a column named COD. But when I press the button I got error FRM-41080 adding line group 3 times, number of items in the collection, then FRM-40733.
    Also the RG has the Type property record value 'Static' and not 'Query' group because the RG is not met by a query, the values are added to a collection.
    What I am doing wrong?
    This collection contains 3 elements, 'x', 'asdasd' and 'aaaaa', so these values should be displayed in the LOV.

    Thank you!

    If the Receiver General exist, you need to destroy before recreating. See the doc on how to destroy a RG.

    François

  • Dynamic columns in dashboard prompt

    Hi all
    I have to 'TOP' dispay & dynamic value 'BOTTOM' in the drop-down list of the dashboard invites the creation of a dynamic column value in the drop-down list prompt dashboard? I'm trying to create in writing view sql result but not getting does not correctly according to the selection of HIGH and low, I must make a report changes
    SELECT CASE WHEN 1=0 THEN ExistedPresentationColumn ELSE 'TOP' END FROM SubjectArea
    
    UNION ALL
    
    SELECT CASE WHEN 1=0 THEN ExistedPresentationColumn ELSE 'BOTTOM' END FROM SubjectArea
    
  • dynamic text in the Panel

    How can I do textInput inside a Panel?

    Thank you

    sali1982,

    my_text_input. SetStyle ("fontSize", 42);

    my_text_input. SetStyle ("color", "0x4488cc");

    Remember that you must spell the American way color and everything should be OK.

    Richard

  • dynamically fill area with words from the list

    Hi all

    I want to fill the entire area with words flash animation.

    the film begins in white, but as time past the visible area fills with words in a list of pre-written.
    Ideally, the height and the width of the words is random in a beach I determine.

    I wouldn't mind being pointed to a tutorial that shows how to fill an area of rectangles of size randomly, that might help.

    Finally, I want to be able to control the speed of the area being filled with an input (mouse or external sensor) device, but let's first!

    use flash 8.

    Thank you
    Aya.

    You can check this. He fills a space with words and keep filling the empty space. I ' ts free you can take the Ridge inside.

    http://www.Levitated.NET/daily/levEmotionFractal.html

  • Dynamically fill a menu navigation menu drop-down

    I have some beautiful CSS to develop a horizontal drop down menu navigation similar to what is used on this site. But I can't understand how dynamically populate the menu and submenu items.

    The parents and children are stored in a single table with this structure:

    TopNavId
    TopNavParentId (for all parents, is 0 for all children, it is TopNavId for the parent)
    TopNavName
    TopNavOrder
    TopNavURL
    TopNavStatus

    I should be able to write a query to get the information in the table and then somehow loop on this query to get the pieces (parents and children) in the menu structure, just? I can't understand how to do this.

    Help? Thank you!

    -------------


    Thank you, Michael. The scooter5791 of recommended Sothink products is actually quite easy. Request of the mother works as a

    SELECT *.
    TRACKING
    WHERE topNavParentId = 0
    AND TopNavStatus = 1
    ORDER BY topNavOrder

    Request of the child is simply

    SELECT *.
    TRACKING
    WHERE topNavParentId <> 0
    AND topNavStatus = 1
    AND #getTopNav.topNavId #= topNavParentId

    and then just exit it traverses the query GetTopNavDropdown, essentially:


    ' #topNavName # ' #topNavURL #.

    The Sothink product made all the formatting, etc.

    Thank you, everyone, for help. -Dbast

  • Switch dynamically fill

    Is it possible to have a selector_2 filtered from what I have stated in a selection in selector_1, dynamically, without refreshing the page on the #1 being selected first.

    EXAMPLE, in selector_1, I have a list of types of food to a table, pasta, meat, vegetables, etc. I select pasta. Selector_2 should use #1 selection to filter and limit its own list of all foods to the only types of pasta (spaghetti, fettucine, penne, etc.). I have a good idea how to proceed. But, my question is: with CF, it is essential that the page refresh after #1 to "define" this id # 1. Or, is it possible to have the filter from #1 to #2 as long as selector_1 has a selected item?

    I hope that all makes sense. I try just shortened my learning curve by the way not days trying to do is basically impossible.

    Thank you!

    It is called CF_TwoSelectsRelated:

    http://www.Adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&EXTID=1000288

    --
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com

    "Dan Bracuk" wrote in message
    News:flrghh$O31$1@forums. Macromedia.com...
    > You can do with javascript. If you do a search on Google Advanced Group
    > for
    > anything by me including the etiology of Word, you should find an example.
    >
    > There is also a custom tag there called TwoSelectsRelated, or
    > something
    > like that.
    >
    > Or you can google "coldfusion related selects '.
    >

Maybe you are looking for