Dynamic panels

Hi!
Im planning to make a web software with panels (windows).
So I need to dynamic load a form inside the panels.
The best thing i thought was: <ui:include src="#{mybean.dynamicForm}" />
Is there another(better/correct) way of doing it?
Thanks!

better than a single line of template content?
Note that for example Richfaces has built in support for ajax enabled popup div dialogs.

Similar Messages

  • Creating a Dynamic Panel

    Hi, I try too create a dynamic panel, but when a do ASSERT(panel), the plugin enter in if(!panel), someone know what is wrong ?<br /><br />PMLocaleId localeId = LocaleSetting::GetLocale();<br /><br />IDataBase *panelDB = ::GetDataBase(panelMgr);<br /><br />InterfacePtr<IControlView> panel((IControlView*) ::CreateObject(panelDB,RsrcSpec(localeId, kXXXPluginID, kViewRsrcType, kSDKDefPanelResourceID, kTrue), IID_ICONTROLVIEW));     <br />          <br />ASSERT(panel); // HERE O CURRIED A ERROR.<br />if(!panel){<br />  break;<br />}<br /><br />Someone can help me PLZ!!

    I assume the that the Dynamic panel example works for you (?) If so, the failure could come from a wrong ID to the RsrcSpec call.

  • How to create dynamic panel tree view?

    Hello,
         I can create dynamic pallete panel without any problems (from sdk/paneltreeview) , but i can't when it's a panel tree view (from sdk/paneltreeview). I don't know how to initialize it.  Can i call IID_ITREEVIEWWIDGETMGR's impl directly in ActionComponent to create panel widget? and how?
    Thanks in advance.

    solved by self

  • RichFaces: Issue with displaying Dynamic panel

    {color:#0000ff}Hi ,
    My requirement is that, i have a page with four links. On clicking on each link, i should display a table and a textfield to filter out the table results.
    To make it generic i am generating the table and filter fields dynamically and binding to a <rich:panel>
    <rich:panel id="manageUsersPanel" styleClass="surveyPanel">
    <rich:panel binding="#{adminUsersDataBean.searchTablePanel}" />
    </rich:panel>The binding #{adminUsersDataBean.searchTablePanel} is of type HtmlPanel.
    It has two child components HtmlPanelGrid and HtmlDataTable.
    and finally rendering the panel on clicking on each link.
    Now the issue is, By the moment i click on any link and reRender the panel it is not showing up.
    If i do F5/ Ctrl + F5 i am able to see the table and other fields.
    Surprisingly if a place any richfaces tags (some <h:outputtext> /<a4j:commandButton> any code) it is coming.
    Only the dynamic binding value is not refreshing.
    Some body please help me out to sortout the issue.
    Thanks in advance.
    Thanks
    Venkat{color}

    i found solution to this problem..
    use <af:iterator>r instead of af:forEach
    bind <af:iterator> to collectionModel
    <af:iterator id="i3"
    value="#{bindings.VO_DA1.collectionModel}"
    var="ls">
    <af:outputText value="#{ls.AREASECTOR}" id="ot8"
    binding="#{backing_Home.ot8}" truncateAt="0"/>
    </af:iterator>
    Regards
    Manav Ratra

  • Adding dynamic panels

    My application needs to dynamically decide how many components will be present in the panel depending on the clauses. For each clause, I have designed a seperate panel,(its design is fixed) . But the number of clause panels to be included in the main panel is dynamic. How do I add the panels to the main panel for display?
    I was successful in adding a single panel to the main panel. For this I had to define the layout of the panel again and set its horizontal and vertical group. But how do I add a list of components. If I add a for loop within the layout.setHorizontalGroup() or layout.setVerticalGroup(), it does not work. Also panel.addLayoutComponent() did not work. Can anyone please tell me how will I add the components dynamically.

    Its still not working.
    In my application I have some user defined panels. The component I need to add to the main panel is a user defined panel.
    The code is as follows, where panelBetween is a user-defined panel in the package com.HelperTool
    com.HelperTools.panelBetween between1 = new com.HelperTools.panelBetween();
                between1.jCheckBoxBetweenCondition.setText("Where userid between");
                jPanelMain.add(between1);
                jPanelMain.revalidate();
                jPanelMain.repaint();

  • Spry Accordian with dynamic panels from XML

    Hi. I've searched, but haven't seen anybody answer this yet.
    I'm trying to build a page that uses a spry accordian to display
    data by category. So category 1 is on panel 1 in a spry table with
    a link to a spry detail section on the page. Category 2 is on panel
    2 in a spry table with a link to the same spry detail section, etc.
    I have 2 issues: 1) I haven't figured out how to filter a
    single XML data set onto different accordian panels or
    2) how to get the same detail region to take links from
    different XML data sets on the different panels.
    Any help that anybody could give would be VERY much
    appreciated.
    THANKS!

    I did get it working. Please check out..
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=602&threadid=1334877
    The key is the Data Set Shell. I use multiple data sets for
    each category, in your case department. Then I list the items in
    that category to update a detail region. If the above link doesn't
    help you please re-post and I can give you some more help.

  • Building a adf rich client component dynamically...

    Is it possible to specify the af:selectItem(s) in a af:selctOneChoice using af|forEach where the "items" attribute" calls a client side List or Array?
    Where can I find for documentation regarding EL expressions and how to call a client side varible in an af:RichComponent attribute value, e.g. lable="X" or value="X" where X is a client side varible. And can such a construct be used in a partialSubmit (innerHTML) update.
    Thanks, Larry

    Hi Frank,
    I'm building a user interface for a mapping application. What I was hoping to do was to be able to build dynamically, panel boxes for the map types and map layers, Street map with Interstates, Streets, State Highways, etc; or Aerial Images with Parcel Lines, and Building Footprint, Major Streets, etc; These combination grow exponentially and become what we call FOIs (Features of Interest); i.e. if you have 6 map type, Street Lines, Aerial Images, Soils, Environmental, Cultural etc, and you have 6 Layers (or feature that can be displayed, that gives to 36 combination for FOI layouts.
    I would like be able to build the select choice (CheckBox choice, List Choice etc.) dynamically based on the Map type, some features could available to several map type, but choice may appear in different orders.
    What I was hoping to do was get a Hashmap object (or what we might call a feature/theme tree, (some would be standard, some would be user built and persisted) from the database at the page.onload, then exract objects to lists as local variables within the client (browser) environment. Therefore be able to build the Panel Box with the appropriate "choice List" as the user made choices. I know that we can do this with bindings and making round trips to the server as needed, but since I was in a client environment, I was hope to save time.
    I had first tried doing with the JavaScript API, I was able to get the AdfRichSelectOneChoice object (and I also tried with the AFDRichSelectManyCheckBox object) then using the interface method getSelectItems() I actually had the list and was able to add to it and manipulate the list but since it was a copy of the list I was not able to set the select items in the AdfUIObject with something like a "setSelectItems(someListOfValues)" method. So then I tried the af:forEach route, hoping that I could do a partial submit of say a af:PanelBox. But no as you pointed out I'm not having any luck. I guess I'll have to do it the "old fashioned" way with round trips.
    I must also apologize of being a “propeller head” - as an old time programmer I'm much more comfortable building application interface and user interface by writing code. I realize that most "frameworks" want programmers to stop programming and to start building thing with "drag and drop" and by using "wizards"... but some of us just aren't built that way. I'll try to do better. But in the meantime do you have any advice?
    Thanks Larry

  • Dynamic GUI Refreshing

    First, I'll try and explain the function I'm trying to accomplish:
    I have a JPanel within a JScrollPane with multiple JLabels and JTextFields. It is supposed to show a list of students, assignments, and the students' grades on the assignments. The initial draw of this panel is not a problem, everything is fine.
    Problems arise when I do any of the following:
    Add/Edit a student
    Add/Edit an assignment
    Change classes
    Changes grades
    The labels and text fields are all in arrays, since their can be a varying number of them depending on the class and data files used when the program is started. I think the problem is here.
    I had another dynamic panel that I experienced this same problem with. The labels would lose their identity after I recreated them using oldLabel = new JLabel(). If instead I do oldLabel.setText(newText);, it works fine.
    This, however, won't work with the fields and other labels, becuase the number changes. If I change classes and I now need 40 fields instead of 20, I would have to setText for the first 20 fields, and do new JLabel() for the second 20. The varing circumstances make this very impractical, if even possible.
    Here's the draw() method I call every time I want to redraw the panel:
    public void draw(){
            currentView = model.getCurrentView();
            classAssignments = new ArrayList();
            for(int i = 0; i < assignments.size(); i++)
                if(currentView <= 4) {
                    if(((Assignment)(assignments.get(i))).getClassID() == currentClass.getID() && (((Assignment)(assignments.get(i))).getQuarter() == currentView))
                        classAssignments.add(assignments.get(i));
                else {
                    if(((Assignment)(assignments.get(i))).getClassID() == currentClass.getID() && ((((Assignment)(assignments.get(i))).getQuarter() == 1) || (((Assignment)(assignments.get(i))).getQuarter() == 2)) && currentView == 5)
                        classAssignments.add(assignments.get(i));
                    else if(((Assignment)(assignments.get(i))).getClassID() == currentClass.getID() && ((((Assignment)(assignments.get(i))).getQuarter() == 3) || (((Assignment)(assignments.get(i))).getQuarter() == 4)) && currentView == 6)
                        classAssignments.add(assignments.get(i));
            assignmentColumnLabel = new JLabel[classAssignments.size()];
            for(int i = 0; i < classAssignments.size(); i++)
                assignmentColumnLabel[i] = new JLabel(((Assignment)classAssignments.get(i)).getName());
            classStudents = new ArrayList();
            for(int i = 0; i < students.size(); i++)
                for(int counter = 0; counter < ((Student)(students.get(i))).getClasses().size(); counter++)
                    if((int)(((Class)((((Student)(students.get(i))).getClasses().get(counter)))).getID()) == currentClass.getID())
                        classStudents.add(students.get(i));
            nameLabel = new JLabel[classStudents.size()];
            numberLabel = new JLabel[classStudents.size()];
            scoreField = new JTextField[classAssignments.size()][classStudents.size()];
            finalScoreField = new JTextField[classStudents.size()];
            for(int i = 0; i < classStudents.size(); i++) {
                nameLabel[i] = new JLabel(" " + ((Student)(classStudents.get(i))).getName());
                numberLabel[i] = new JLabel("" + (i + 1) + ".");
            for(int i = 0; i < classAssignments.size(); i++) {
                for(int counter = 0; counter < classStudents.size(); counter++) {
                    if((((Student)(classStudents.get(counter))).getGrades()).size() != 0){
                        if((((Grade)(((Student)(classStudents.get(counter))).getGrades()).get(i)).getAssignment()).equals((Assignment)(classAssignments.get(i))))
                            scoreField[counter] = new JTextField(((Grade)(((Student)(classStudents.get(counter))).getGrades()).get(i)).getScore());
    else
    scoreField[i][counter] = new JTextField();
    for(int i = 0; i < classStudents.size(); i++) {
    if(((Student)(classStudents.get(i))).getGrades().size() != 0)
    finalScoreField[i] = new JTextField("" + ((Student)(classStudents.get(i))).getFinalScore(currentView,categories,assignments));
    else
    finalScoreField[i] = new JTextField();
    Vector tempVector = new Vector();
    for(int i = 0; i < classes.size(); i++) {
    tempVector.addElement(((Class)(classes.get(i))).getID() + " - " + ((Class)(classes.get(i))).getName());
    Arrays.sort(classListText);
    classList.setModel(new DefaultComboBoxModel(tempVector));
    classList.setSelectedItem(model.getCurrentClass().getID() + " - " + model.getCurrentClass().getName());
    if(currentView == 5) {  //First Semester
    finalColumnLabel.setText("First Semester Grade");
    periodList.setSelectedItem("First Semester");
    else if(currentView == 6) {
    finalColumnLabel.setText("Second Semester Grade");
    periodList.setSelectedItem("Second Semester");
    else if(currentView == 1) {
    finalColumnLabel.setText("First Quarter Grade");
    periodList.setSelectedItem("First Quarter");
    else if(currentView == 2) {
    finalColumnLabel.setText("Second Quarter Grade");
    periodList.setSelectedItem("Second Quarter");
    else if(currentView == 3) {
    finalColumnLabel.setText("Third Quarter Grade");
    periodList.setSelectedItem("Third Quarter");
    else if(currentView == 4) {
    finalColumnLabel.setText("Fourth Quarter Grade");
    periodList.setSelectedItem("Fourth Quarter");
    constructListPanel();
    ListPanel.repaint();
    this.repaint();
    And here's the constructListPanel() method. This is called when I first draw the panel at startup (works correctly this time), and everytime I call draw() (doesn't work).
    public void constructListPanel() {
            layout = new GridBagLayout();
            ListPanel.setLayout(layout);
            constraints = new GridBagConstraints();
            constraints.gridy = 0;
            constraints.gridx = 0;
            constraints.gridheight = 1;
            constraints.fill = GridBagConstraints.HORIZONTAL;
            layout.setConstraints(numberColumnLabel,constraints);
            ListPanel.add(numberColumnLabel);
            constraints = new GridBagConstraints();
            constraints.gridy = 0;
            constraints.gridx = 1;
            constraints.gridheight = 1;
            constraints.fill = GridBagConstraints.HORIZONTAL;
            layout.setConstraints(nameColumnLabel,constraints);
            ListPanel.add(nameColumnLabel);
            for(int i = 0; i < numberLabel.length; i++) {
                constraints = new GridBagConstraints();
                constraints.gridy = i + 1;
                constraints.gridx = 0;
                constraints.gridheight = 1;
                constraints.fill = GridBagConstraints.HORIZONTAL;
                layout.setConstraints(numberLabel,constraints);
    ListPanel.add(numberLabel[i]);
    for(int i = 0; i < nameLabel.length; i++) {
    constraints = new GridBagConstraints();
    constraints.gridy = i + 1;
    constraints.gridx = 1;
    constraints.gridheight = 1;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    layout.setConstraints(nameLabel[i],constraints);
    ListPanel.add(nameLabel[i]);
    for(int i = 0; i < classAssignments.size(); i++) {
    constraints = new GridBagConstraints();
    constraints.gridy = 0;
    constraints.gridx = 2 + i;
    constraints.gridheight = 1;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    layout.setConstraints(assignmentColumnLabel[i],constraints);
    ListPanel.add(assignmentColumnLabel[i]);
    for(int c = 0; c < nameLabel.length; c++) {
    constraints = new GridBagConstraints();
    constraints.gridy = c + 1;
    constraints.gridx = 2 + i;
    constraints.gridheight = 1;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    layout.setConstraints(scoreField[i][c],constraints);
    ListPanel.add(scoreField[i][c]);
    ListPane = new JScrollPane(ListPanel);
    Sorry if this is a simple thing that's been posted many times, but I've searched and tried to interpret other problems to no avail.
    Thanks in advance.
    Daum

    From your description it sounds like you're abandoning references when you create new components. In other words, the code that is changing the value isn't refering to the same object that is being displayed. You say it is impractical to keep references to the same components because the number of components changes, but I don't understand that. You either add new ones or delete old ones, but I see no need to replace existing ones. Perhaps the problem is the use of []'s instead of ArrayLists?

  • Accordéon Spry avec données dynamiques.

    Bonsoir.
    J'ai créé une base de données avec des news et je souhaiterais, à l'aide de Dreamweaver et la librairie Spry, réaliser un accordéon dynamique, affichant le titre de la new dans le bandeau cliquable, et le texte de la new dans le content. J'ai essayé de jouer avec les zones répétées mais je ne suis parvenu à rien. Quelqu'un peut-il me mettre sur la voie ? (je ne demande pas de solution toute faite bien sur, juste le chemin à suivre).
    Merci beaucoup d'avance.
    pmediag

    Personally I would not an accordion for this; but a master/detail area as I have done here http://pleysier.com.au/rss/
    But if you want to use a dynamic accordion, have a look here http://www.infoaccelerator.net/blog/post.cfm/spry-dynamic-panels-within-dynamic-accordions
    The first step is to create an XML file populated with data from the database, see here http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html
    You can then create a SpryXMLDataSet to use for the accodrion.
    Gramps

  • Static & Dynamic Frames

    I have a main screen with 2 panels, one is Static and will be used for Buttons, ComboBox�s etc..
    I want the other panel to be able to load in different frames so that I don�t have to load up a new screen each time. (Eg Wingows Media Player, static panel down side and Dynamic panel in the middle).
    Any code examples welcome, that use more than one Class.

    Displaying Dynamic content is no magic. You either can add/remove JPanels and other components to it as needed, or override it's paintComponent method

  • Can CS3/CS4 be told to destroy closed panels?

    We have two plug-ins with dynamic panels; one uses them for web browser tabs, another for a huge Miles 33 ActiveX control. We've allocated 16 WidgetIDs and ActionIDs so that the user can have up to 16 tabs open, "more than will ever be needed".
    In CS2 we have full control of the UI for closing the tab; we provide a button and a menu item. These call IPalettePanelUtils::ScheduleDestroyPanelCmd, which destroys the panel thoroughly. The system resources are freed and the WidgetID and ActionID can be re-used when the user asks for a fresh tab.
    In CS3/CS4 there is a new standard UI for closing panels; the user closes the panel by clicking the "X". Sadly, the built-in panel/palette manager does not destroy the panel but caches it instead. The resources stay claimed, and, if the user closes and opens 16 panels, we find that all the WidgetIDs and ActionIDs are in use. We're checking for this by calling panelMgr->GetPanelFromActionID to get a panel pointer, and then panelMgr->GetPaletteRefContainingPanel( panel_pointer ) and PaletteRef.GetOWLControl() to see if it's in a palette with an HWND.
    Two questions
    (1) Is there any way to tell the panel/palette manager that when one of our panels is closed by the user, it should be destroyed and its resources released?
    (2) Failing that, is there any way to spot that a panel has been closed by the user, so that we can safely try to re-use the panel after resetting its contents?
    Thank you.

    Normally, one can open CS3 Projects in PrPro CS4, but there can be exceptions.
    Now, as far as doing a Project in Encore, with Assets from CS3 & CS4, there is not problem. Given your issues with CS3 PrPro Projects into PrPro CS4, I would recommend that you do things the "old-fashioned" way - Export the Assets from each version of PrPro, as elemental/elementary streams, i.e. one Video-only file and one Audio-only file. Import the Video-only file as a Timeline, and then each Audio-only file as an Asset. Drag the Audio to the appropriate Timeline and it will snap into place. You can choose to do the Transcoding to MPEG-2 from within each version of PrPro, or can Export as a DV-AVI (no Audio), and let Encore do the Transcoding. That choice is yours. If you go the MPEG-2 route, you will need to know and understand "bit-budgeting," and have a bit-budgeting calculator.
    No problem doing what you need to do. I do it all the time with Assets from PrPro and some from other NLE's in the proper format. No issues whatsoever.
    Good luck,
    Hunt

  • Dynamic step-by-step instructions for training simulation

    I'm looking for some guidance with an idea for having a dynamic step-by-step list for a training simulation created in Captivate 7.
    The default behavior when creating a guided training simulation is for the steps to appear in a text box nearby the click box. Instead, I'd like to stack the step-by-step instructions in a panel on the left side of the screen that would sit next to the simulated interface on the right side of the screen. All of the high level steps would be visible throughout the simulation and each step in the panel list would be highlighted as appropriate.
    I began with Lilybiri's Knockout blog post ("Create and Use a 'Knockout' Master Slide"), which seems like a possible solution, but I haven't yet gotten to the point of adding my dynamic instruction panel.
    In essence, the dynamic panel will function as follows:
        Step 1 in instruction panel is highlighted at start of simulation.
        Learner clicks associated step 1 click box in simulation interface (as instructed in instruction panel).
        On click of step 1 click box, step 2 in instruction panel is highlighted and step 1 highlight disappears.
        Learner clicks associated step 2 click box in simulation interface (as instructed in instruction panel).
        And so on through all steps listed in the instruction panel.
    I'm working on mocking something up using variables and advanced actions to achieve the dynamic instruction panel and want to overlay it on the left side of the screen. I'm thinking it would sit on top of the left panel in the Knockout.
    In various posts, I've seen that it's not advisable to insert a Captivate SWF into another project file, so it seems that Lieve's Knockout approach is the way to go. I am happy to tackle the technical aspects of this on my own, but first want to confirm that it is even possible with Captivate or if it would make more sense to use Flash. Has anyone done something similar or does anyone see any issues with this approach?
    Any input or suggestions would be greatly appreciated!
    Thanks in advance!
    Nancy

    Hi Lieve,
    Thanks for replying. I'm using Captivate 7.
    I'm hoping to work through it myself and then possibly post something to help others who may see value in something like this, so having you confirm that you believe it's possible is helpful - thank you.
    I've worked out the basic technical approach and now need to integrate my instruction panel with your Knockout approach. If I can get it working, I will definitely share.
    Nancy

  • How to make Screen Splitter in c#

    Screen Splitter will allow main screen to be split into two or more sections. It will be helpful for the
    active program’s window to be resized properly to one part of the screen. Using this utility, User will be able to do a split system desktop into two or more areas.
    there will b multiple buttons with directional arrows. It’s
    lets users quickly snap windows into a variety of sizes and positions using action buttons.
    i don't know how to start .. kindly guide me .... i can't understand which functions and classes to use.. as i am self learner and beginner programmer.

    You can add splitContainers, that are 2 panels, and inside each panel you can add another split container, and then again and again...
    To make panels fit on the maximum size of the form you'll have to use dock propery = fill or anchor it to top, right, bottom and left
    http://www.axure.com/learn/dynamic-panels/advanced
    http://www.axure.com/learn/dynamic-panels/advanced/drag-drop-images-tutorial
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • Multiple screens

    I have a main screen with 2 panels, one is Static and will be used for Buttons, ComboBox�s etc..
    I want the other panel to be able to load in different frames so that I don�t have to load up a new screen each time. (Eg Wingows Media Player, static panel down side and Dynamic panel in the middle).
    Any code examples welcome, that use more than one Class.

    Well ... guys, you have another candidate for a
    flaming competition ;-)How can one flame what one does not understand?

  • Accordion Tab without  Submenu

    Hello,
    my Problem:
    I need a menu with and without submenu.
    Exapmle: (just a example)
    Button "Home" without submenu, but "company" there are 2 submenus: "about" and "where to buy"
    Now i make a new accordion menu and the first ("Home") button have to without submenu, but how?
    When i delete at the one panel <div class="AccordionPanelContent"> and link the text in <div class="AccordionPanelTab2"> to an other site, the link is not working and the other open submenu is not closing.
    Here a example which is not working:
    <div id="Accordion1" class="Accordion" tabindex="0">
            <div class="AccordionPanel">
              <div class="AccordionPanelTab2"><a href="main.html" target="main">Home</a></div>
            </div>
            <div class="AccordionPanel">
              <div class="AccordionPanelTab">Page 1</div>
              <div class="AccordionPanelContent"><a href="menu.html" target="main">Content 1</a></div>
            </div>
            <div class="AccordionPanel">
              <div class="AccordionPanelTab">Page 2</div>
              <div class="AccordionPanelContent">
              Content 2<br />
              Content 2.1
              </div>
            </div>
            <div class="AccordionPanel">
              <div class="AccordionPanelTab2"><a href="main.html" target="main">Page 3</a></div>
            </div>
            <div class="AccordionPanel">
              <div class="AccordionPanelTab">Page 4</div>
              <div class="AccordionPanelContent">Content 4</div>
            </div>
          </div>
    I want that when i click on the "Home" button the link site will open and the open submenu(s) get closed. an the same when i klick on "Page 3"
    The link "Page 3" works perfectly.
    The link in this example is not interest, just a sample.
    I hope someone crack it.

    You are right.
    If i add one of those the panels don´t close.
    When i click on a "normal" panel (with submenu) it add up, when i click it again it will close.
    But not when i click for example at this (panel without submenu):
    <div class="AccordionPanelTab"><a href="main.html" onclick="window.main.location = this.href; AccordionPanel.showPanel( -1 );
    ">News</a></div>
    I think the answer is in the JS Script, so here it is:
    var Spry;
    if (!Spry) Spry = {};
    if (!Spry.Widget) Spry.Widget = {};
    Spry.Widget.Accordion = function(element, opts)
        this.element = this.getElement(element);
        this.defaultPanel = 0;
        this.hoverClass = "AccordionPanelTabHover";
        this.openClass = "AccordionPanelOpen";
        this.closedClass = "AccordionPanelClosed";
        this.focusedClass = "AccordionFocused";
        this.enableAnimation = true;
        this.enableKeyboardNavigation = true;
        this.currentPanel = null;
        this.animator = null;
        this.hasFocus = null;
        this.previousPanelKeyCode = Spry.Widget.Accordion.KEY_UP;
        this.nextPanelKeyCode = Spry.Widget.Accordion.KEY_DOWN;
        this.useFixedPanelHeights = false;
        this.fixedPanelHeight = 0;
        Spry.Widget.Accordion.setOptions(this, opts, true);
        this.attachBehaviors();
    Spry.Widget.Accordion.prototype.getElement = function(ele)
        if (ele && typeof ele == "string")
            return document.getElementById(ele);
        return ele;
    Spry.Widget.Accordion.prototype.addClassName = function(ele, className)
        if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1))
            return;
        ele.className += (ele.className ? " " : "") + className;
    Spry.Widget.Accordion.prototype.removeClassName = function(ele, className)
        if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1))
            return;
        ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
    Spry.Widget.Accordion.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
        if (!optionsObj)
            return;
        for (var optionName in optionsObj)
            if (ignoreUndefinedProps && optionsObj[optionName] == undefined)
                continue;
            obj[optionName] = optionsObj[optionName];
    Spry.Widget.Accordion.prototype.onPanelTabMouseOver = function(e, panel)
        if (panel)
            this.addClassName(this.getPanelTab(panel), this.hoverClass);
        return false;
    Spry.Widget.Accordion.prototype.onPanelTabMouseOut = function(e, panel)
        if (panel)
            this.removeClassName(this.getPanelTab(panel), this.hoverClass);
        return false;
    Spry.Widget.Accordion.prototype.openPanel = function(elementOrIndex)
        var panelA = this.currentPanel;
        var panelB;
        if (typeof elementOrIndex == "number")
            panelB = this.getPanels()[elementOrIndex];
        else
            panelB = this.getElement(elementOrIndex);
        if (!panelB || panelA == panelB)   
            return null;
        var contentA = panelA ? this.getPanelContent(panelA) : null;
        var contentB = this.getPanelContent(panelB);
        if (!contentB)
            return null;
        if (this.useFixedPanelHeights && !this.fixedPanelHeight)
            this.fixedPanelHeight = (contentA.offsetHeight) ? contentA.offsetHeight : contentA.scrollHeight;
        if (this.enableAnimation)
            if (this.animator)
                this.animator.stop();
            this.animator = new Spry.Widget.Accordion.PanelAnimator(this, panelB, { duration: this.duration, fps: this.fps, transition: this.transition });
            this.animator.start();
        else
            if(contentA)
                contentA.style.display = "none";
                contentA.style.height = "0px";
            contentB.style.display = "block";
            contentB.style.height = this.useFixedPanelHeights ? this.fixedPanelHeight + "px" : "auto";
        if(panelA)
            this.removeClassName(panelA, this.openClass);
            this.addClassName(panelA, this.closedClass);
        this.removeClassName(panelB, this.closedClass);
        this.addClassName(panelB, this.openClass);
        this.currentPanel = panelB;
        return panelB;
    Spry.Widget.Accordion.prototype.closePanel = function()
        // The accordion can only ever have one panel open at any
        // give time, so this method only closes the current panel.
        // If the accordion is in fixed panel heights mode, this
        // method does nothing.
        if (!this.useFixedPanelHeights && this.currentPanel)
            var panel = this.currentPanel;
            var content = this.getPanelContent(panel);
            if (content)
                if (this.enableAnimation)
                    if (this.animator)
                        this.animator.stop();
                    this.animator = new Spry.Widget.Accordion.PanelAnimator(this, null, { duration: this.duration, fps: this.fps, transition: this.transition });
                    this.animator.start();
                else
                    content.style.display = "none";
                    content.style.height = "0px";
            this.removeClassName(panel, this.openClass);
            this.addClassName(panel, this.closedClass);
            this.currentPanel = null;
    Spry.Widget.Accordion.prototype.openNextPanel = function()
        return this.openPanel(this.getCurrentPanelIndex() + 1);
    Spry.Widget.Accordion.prototype.openPreviousPanel = function()
        return this.openPanel(this.getCurrentPanelIndex() - 1);
    Spry.Widget.Accordion.prototype.openFirstPanel = function()
        return this.openPanel(0);
    Spry.Widget.Accordion.prototype.openLastPanel = function()
        var panels = this.getPanels();
        return this.openPanel(panels[panels.length - 1]);
    Spry.Widget.Accordion.prototype.onPanelTabClick = function(e, panel)
        if (panel != this.currentPanel)
            this.openPanel(panel);
        else
            this.closePanel();
        if (this.enableKeyboardNavigation)
            this.focus();
        if (e.preventDefault) e.preventDefault();
        else e.returnValue = false;
        if (e.stopPropagation) e.stopPropagation();
        else e.cancelBubble = true;
        return false;
    Spry.Widget.Accordion.prototype.onFocus = function(e)
        this.hasFocus = true;
        this.addClassName(this.element, this.focusedClass);
        return false;
    Spry.Widget.Accordion.prototype.onBlur = function(e)
        this.hasFocus = false;
        this.removeClassName(this.element, this.focusedClass);
        return false;
    Spry.Widget.Accordion.KEY_UP = 38;
    Spry.Widget.Accordion.KEY_DOWN = 40;
    Spry.Widget.Accordion.prototype.onKeyDown = function(e)
        var key = e.keyCode;
        if (!this.hasFocus || (key != this.previousPanelKeyCode && key != this.nextPanelKeyCode))
            return true;
        var panels = this.getPanels();
        if (!panels || panels.length < 1)
            return false;
        var currentPanel = this.currentPanel ? this.currentPanel : panels[0];
        var nextPanel = (key == this.nextPanelKeyCode) ? currentPanel.nextSibling : currentPanel.previousSibling;
        while (nextPanel)
            if (nextPanel.nodeType == 1 /* Node.ELEMENT_NODE */)
                break;
            nextPanel = (key == this.nextPanelKeyCode) ? nextPanel.nextSibling : nextPanel.previousSibling;
        if (nextPanel && currentPanel != nextPanel)
            this.openPanel(nextPanel);
        if (e.preventDefault) e.preventDefault();
        else e.returnValue = false;
        if (e.stopPropagation) e.stopPropagation();
        else e.cancelBubble = true;
        return false;
    Spry.Widget.Accordion.prototype.attachPanelHandlers = function(panel)
        if (!panel)
            return;
        var tab = this.getPanelTab(panel);
        if (tab)
            var self = this;
            Spry.Widget.Accordion.addEventListener(tab, "click", function(e) { return self.onPanelTabClick(e, panel); }, false);
            Spry.Widget.Accordion.addEventListener(tab, "mouseover", function(e) { return self.onPanelTabMouseOver(e, panel); }, false);
            Spry.Widget.Accordion.addEventListener(tab, "mouseout", function(e) { return self.onPanelTabMouseOut(e, panel); }, false);
    Spry.Widget.Accordion.addEventListener = function(element, eventType, handler, capture)
        try
            if (element.addEventListener)
                element.addEventListener(eventType, handler, capture);
            else if (element.attachEvent)
                element.attachEvent("on" + eventType, handler);
        catch (e) {}
    Spry.Widget.Accordion.prototype.initPanel = function(panel, isDefault)
        var content = this.getPanelContent(panel);
        if (isDefault)
            this.currentPanel = panel;
            this.removeClassName(panel, this.closedClass);
            this.addClassName(panel, this.openClass);
            // Attempt to set up the height of the default panel. We don't want to
            // do any dynamic panel height calculations here because our accordion
            // or one of its parent containers may be display:none.
            if (content)
                if (this.useFixedPanelHeights)
                    // We are in fixed panel height mode and the user passed in
                    // a panel height for us to use.
                    if (this.fixedPanelHeight)
                        content.style.height = this.fixedPanelHeight + "px";
                else
                    // We are in variable panel height mode, but since we can't
                    // calculate the panel height here, we just set the height to
                    // auto so that it expands to show all of its content.
                    content.style.height = "auto";
        else
            this.removeClassName(panel, this.openClass);
            this.addClassName(panel, this.closedClass);
            if (content)
                content.style.height = "0px";
                content.style.display = "none";
        this.attachPanelHandlers(panel);
    Spry.Widget.Accordion.prototype.attachBehaviors = function()
        var panels = this.getPanels();
        for (var i = 0; i < panels.length; i++)
            this.initPanel(panels[i], i == this.defaultPanel);
        // Advanced keyboard navigation requires the tabindex attribute
        // on the top-level element.
        this.enableKeyboardNavigation = (this.enableKeyboardNavigation && this.element.attributes.getNamedItem("tabindex"));
        if (this.enableKeyboardNavigation)
            var self = this;
            Spry.Widget.Accordion.addEventListener(this.element, "focus", function(e) { return self.onFocus(e); }, false);
            Spry.Widget.Accordion.addEventListener(this.element, "blur", function(e) { return self.onBlur(e); }, false);
            Spry.Widget.Accordion.addEventListener(this.element, "keydown", function(e) { return self.onKeyDown(e); }, false);
    Spry.Widget.Accordion.prototype.getPanels = function()
        return this.getElementChildren(this.element);
    Spry.Widget.Accordion.prototype.getCurrentPanel = function()
        return this.currentPanel;
    Spry.Widget.Accordion.prototype.getPanelIndex = function(panel)
        var panels = this.getPanels();
        for( var i = 0 ; i < panels.length; i++ )
            if( panel == panels[i] )
                return i;
        return -1;
    Spry.Widget.Accordion.prototype.getCurrentPanelIndex = function()
        return this.getPanelIndex(this.currentPanel);
    Spry.Widget.Accordion.prototype.getPanelTab = function(panel)
        if (!panel)
            return null;
        return this.getElementChildren(panel)[0];
    Spry.Widget.Accordion.prototype.getPanelContent = function(panel)
        if (!panel)
            return null;
        return this.getElementChildren(panel)[1];
    Spry.Widget.Accordion.prototype.getElementChildren = function(element)
        var children = [];
        var child = element.firstChild;
        while (child)
            if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
                children.push(child);
            child = child.nextSibling;
        return children;
    Spry.Widget.Accordion.prototype.focus = function()
        if (this.element && this.element.focus)
            this.element.focus();
    Spry.Widget.Accordion.prototype.blur = function()
        if (this.element && this.element.blur)
            this.element.blur();
    Spry.Widget.Accordion.PanelAnimator = function(accordion, panel, opts)
        this.timer = null;
        this.interval = 0;
        this.fps = 60;
        this.duration = 500;
        this.startTime = 0;
        this.transition = Spry.Widget.Accordion.PanelAnimator.defaultTransition;
        this.onComplete = null;
        this.panel = panel;
        this.panelToOpen = accordion.getElement(panel);
        this.panelData = [];
        this.useFixedPanelHeights = accordion.useFixedPanelHeights;
        Spry.Widget.Accordion.setOptions(this, opts, true);
        this.interval = Math.floor(1000 / this.fps);
        // Set up the array of panels we want to animate.
        var panels = accordion.getPanels();
        for (var i = 0; i < panels.length; i++)
            var p = panels[i];
            var c = accordion.getPanelContent(p);
            if (c)
                var h = c.offsetHeight;
                if (h == undefined)
                    h = 0;
                if (p == panel && h == 0)
                    c.style.display = "block";
                if (p == panel || h > 0)
                    var obj = new Object;
                    obj.panel = p;
                    obj.content = c;
                    obj.fromHeight = h;
                    obj.toHeight = (p == panel) ? (accordion.useFixedPanelHeights ? accordion.fixedPanelHeight : c.scrollHeight) : 0;
                    obj.distance = obj.toHeight - obj.fromHeight;
                    obj.overflow = c.style.overflow;
                    this.panelData.push(obj);
                    c.style.overflow = "hidden";
                    c.style.height = h + "px";
    Spry.Widget.Accordion.PanelAnimator.defaultTransition = function(time, begin, finish, duration) { time /= duration; return begin + ((2 - time) * time * finish); };
    Spry.Widget.Accordion.PanelAnimator.prototype.start = function()
        var self = this;
        this.startTime = (new Date).getTime();
        this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);
    Spry.Widget.Accordion.PanelAnimator.prototype.stop = function()
        if (this.timer)
            clearTimeout(this.timer);
            // If we're killing the timer, restore the overflow
            // properties on the panels we were animating!
            for (i = 0; i < this.panelData.length; i++)
                obj = this.panelData[i];
                obj.content.style.overflow = obj.overflow;
        this.timer = null;
    Spry.Widget.Accordion.PanelAnimator.prototype.stepAnimation = function()
        var curTime = (new Date).getTime();
        var elapsedTime = curTime - this.startTime;
        var i, obj;
        if (elapsedTime >= this.duration)
            for (i = 0; i < this.panelData.length; i++)
                obj = this.panelData[i];
                if (obj.panel != this.panel)
                    obj.content.style.display = "none";
                    obj.content.style.height = "0px";
                obj.content.style.overflow = obj.overflow;
                obj.content.style.height = (this.useFixedPanelHeights || obj.toHeight == 0) ? obj.toHeight + "px" : "auto";
            if (this.onComplete)
                this.onComplete();
            return;
        for (i = 0; i < this.panelData.length; i++)
            obj = this.panelData[i];
            var ht = this.transition(elapsedTime, obj.fromHeight, obj.distance, this.duration);
            obj.content.style.height = ((ht < 0) ? 0 : ht) + "px";
        var self = this;
        this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);

Maybe you are looking for

  • Duplication check for Lead and Contact

    Hi, Can i confirm that, there is no duplication check for Lead and Contact during the new reacord adding? I also realise that during the Lead convertion, CRMOD also never check for duplication even i have existing contact available? Is there anyway f

  • Problem in calling oracle procedure from java

    Oracle procedure with the following parameters. CREATE OR REPLACE PROCEDURE CREDITED_TO_STORE_INSERT (P_CUST# IN NUMBER, P_INV_DATE IN DATE, P_MEMO# IN NUMBER, P_SESS_ID IN VARCHAR2 ) IS BEGIN /*.........Procedure Body with select and insert statemen

  • Yosemite Very Slow, Spotlight and Mail not working.

    Yosemite has brought my iMac mid-2010 to a crawl.  Try to delete mail in browser and instead of deleting, just jumps to a different email and selects it. Also, spotlight's not doing anything.  I type the name and it just sits there. No movement, no a

  • Imessage and facetime wont wont argh

    i go into i message and it wont send it gets 90% of the way waits a bit then fails facetime does the same it says connecting but after ages it fails any advice

  • Report for initial fill of marketing attributes for contact persons

    Hello, i have an excel document with contact persons and marketing attributes. What way do you recommend to bring this attributes into SAP CRM? The contact persons are already in SAP CRM. Thank you Best regards Manfred