Showing non hierarchical model in a jtree

Hi all,
I have the following model:
- 3 classes:
* A Day, consists of a number of Events
* A Project, also consists of a number of Events, a Project has 1 or 0
parent Projects and 0 or multiple childprojects.
* An Event is always linked to 1 Day and 1 Project
I want to create the following tree-structure:
root
+-- Day1
####+-- Project1
####+-- Project2
########+-- Project2_1
########+-- Project2_2
############+-- Event1
############+-- Event2
I have created a custom model to display this. The problem is the following. In the model (which implements the TreeModel), there is a method getChild() to retreive and display the children. Obviously, the events underneath a project (e.g. Project2_2) should only be shown if the following is true:
- event belongs to Project2_2
- event belongs to Day1
The first condition is easy, the last condition is causing the problem. How do I know I am underneath Day1?
regards,
Kenneth

westelinckk,
Your diagram leaf-indentation seems to indicate that, say, Day1 contains Project1, but you've stipulated only that "* A Day, consists of a number of Events". If Days may contain projects, your custom model needs to reflect that.
Also, you say:
Obviously, the events underneath a project (e.g. Project2_2) should only be shown if the following is true:
- event belongs to Project2_2
- event belongs to Day1
I suppose you mean furthermore than both conditions be true. From your post'd title I suspect that an Event may belong to a Day and to a Project, with no implied relationship between the Day and the Project. In that case indenting Project1 under Day1 is misleading.
Incidentally, when working with trees I suggest you use a custommodel-to-treemodel adapter, rather than making your custom model implement treemodel. That way your custom model remains the same, and you write an adapter per view type.
--A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Discontiguous selection model on a jtree

    Hi Frank
    I have a jtree bound to and adf model. i have set the branch accessor rule on the binding.
    when i set the selection model to discontiguous then it wont allow me to crtl select all the items .
    it does however allow me to select some of the items but i cannot do things such as select mutiple parent nodes.
    is there any bug that you know about.
    please if any one can help
    thanks
    George

    Our tree binding only supports single selection by default since there is only really the notion in a rowset of a single "current" row. Our developers believe that you can implement your own custom selection model to give some application-specific meaning to what the multiple-select would do in your app, but we have not thoroughly tested custom selection models with the JTree.

  • INPUT textfield does not show non-English letters with transparent mode

    INPUT textfield does not show non-English letters when i
    type, if transparent mode turn on
    this is bug of Flash Player 9?
    will this bug had be fixed?

    I just tested Firefox and Chrome on linux, i doesn't work either, but i get different weird chars: éèça
    However, on both mac and linux, if i copy the chars and paste them in the input field, it passes.

  • Firefox is suddenly not remembering or filling in any of my passwords. All of the appropriate boxes are checked in the options/security tab, but it won't remember any passwords and shows none saved. How do I get it to remember and fill in my passwords a

    Firefox is suddenly not remembering or filling in any of my passwords. All of the appropriate boxes are checked in the options/security tab, but it won't remember any passwords and shows none saved. How do I get it to remember and fill in my passwords again?

    Do you mean names and passwords in the Password Manager or do you mean that you are no longer logged on to (remembered by) websites after closing and restarting Firefox?
    If the latter happens then you have a problem with cookies that are not kept or the file that stores the cookies is corrupted.
    Websites remembering you and automatically log you in is stored in a cookie that you must allow: Tools > Options > Privacy > Cookies: "Exceptions"
    Make sure that you do not use [[Clear Recent History]] to clear the 'Cookies' and the 'Site Preferences'.
    Make sure that you not run Firefox in [[Private Browsing]] mode.
    In Private Browsing mode some menu items are disabled (grayed) and some features like visited links and others are disabled and not working.
    You are in Private Browsing mode if you see "Tools > Stop Private Browsing".
    See [[Private Browsing]] and http://kb.mozillazine.org/Issues_related_to_Private_Browsing
    See also http://kb.mozillazine.org/Password_Manager (Troubleshooting)

  • Can you add 3g to the ipad mini later if you purchase the non cellular model?

    I am interested in buying an ipad mini but I'm not sure whether to get the ipad mini with cellular data. So does anyone know if I can add the 3g later to the ipad mini if I purchase the non cellular model?
    Thanks,
    Emily x

    No you can't, and the ipad mini is 4g LTE. It doesn't come with the hardware to enable cellular if you don't buy one with cellular

  • Server showing non compliant for a no longer targeted Configuration Item

    Hi all, 
    I have a server that was removed from a collection which had a DCM baseline targeted to it.  It is still showing non compliant for Configuration items that were targeted at the old collection.  (which is correct, it isn't compliant but it isn't supposed
    to be).  I am trying to create a collection based on non compliant items but this server keeps showing up where it shouldn't be.  is there anyway to 'flush' all the compliance information and let the client rebuild it?
    thanks
    -cornasdf
    http://cornasdf.blogspot.com

    The collection is based on a WQL query that basically says, where the configuration item name = x and state <> compliant.  
    I have several of these where the servers that are non compliant fall into a collection that has an advertisement that remediates them.  
    The difficulty here is that I have a collection of BackEnd servers, based on IP Subnet.  That collection has a DCM Baseline targeted at it that checks for non compliance on specific items.  When building
    some new servers, we connected to hte wrong network for a couple of days, so they were in the included in BackEnd Servers collection which handed out the baseline.  We disconnected that link and the servers have fallen out of that collection.  The
    baseline no longer shows in teh control panel app.  
    But in my compliance collections, it still shows up as non compliant for that Conf Item.  
    I have a work around in place.  actually two.  The first was to just delete the client and let it reinstall.  That worked but seems heavy handed.  Secondarily, i narrowed my query by collection,
    ie the query for non compliance now is limited to the collection where I apply the baseline.  this is somewhat limiting for future instances (and shouldn't be necessary).
    it seems like a bad enough design flaw that I assumed I must be missing something pretty obvious.  if I remove a server from a collection w/ a baseline, it shouldn't still be non compliant for things non longer targeted to it.
    -cornasdf
    http://cornasdf.blogspot.com

  • Machine shows Non compliant in SCCM 2012R2 Configuration Manager

    We are using 2012 sccm R2 and one of our client machine shows non compliant in the reports. When we check the machine , we found that all the required and approved patches are downloaded . So it should be a compliant machine .
    SCCm Clinet is ACtive and we are able to run the cycles from the machine too. Would like to know what all steps that we need to perform for solving the issue.
    Server OS 2008 R2
    Thanks
    Madhu Madhavan

    if client having wmi issues pertaining to configmgr,then it will not (most cases) send the inventory .check the inventoryagent.log .To fix WMI issues.you can try the script http://eskonr.com/2009/03/how-to-troubleshoot-the-systems-which-has-wmi-issues-rebuild-wmi-repository/
    if you are sure that,client is functioning normal and the issue is only with software update compliance,you can try refresh the compliance state using script https://msdn.microsoft.com/en-us/library/cc146437.aspx.
    Eswar Koneti | Configmgr blog:
    www.eskonr.com | Linkedin: Eswar Koneti
    | Twitter: Eskonr

  • HT3258 What is correct update or upgrade for Mac OSX v 10.5.8? Also can't use sites without updates on firefox & safari. Auto update shows none available?

    What is correct update or upgrade for Mac OSX v 10.5.8? Also can't use sites without updates on firefox & safari. Auto update shows none available?

    Click here.
    (89934)

  • Hierarchie Model

    Hi,
            I have Created "COSTELEMENT" Hierarchie Model in SAP VC,using SAP BI Hierarchies.But i got Error msgApplication Error:  " Unspecified Error" while hit on the DrillDown Button.I was mention below My Formulas:
    DrillDown:::::::::   'FILTER_NODE_IOBJNM=0HIER_NODE; FILTER_VALUE='&#ID[ACCELUL]@costelement_key&';FILTER_COLLAPSE=  ;FILTER_IOBJNM=Z0CSTELMT;CMD_1=CMD%3DDRILL_TO_LEVEL%26LEVEL%3D%26IOBJNM%3DZ0CSTELMT%26DATA_PROVIDER%3DDP;R%3DDP;'
    Drillup is working fine.
    *DrillUP*  'CMD_1=CMD%3DDRILL_TO_LEVEL%26LEVEL%3D'&NSTR(@costelement_node_level,'B')&'%26IOBJNM%3DZ0CSTELMT%26DATA_PROVIDER%3DDP;'
    Can you Suggest me?
    Thanks

    Basically it will look something like...
    http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10790/xdb06stt.htm#sthref747
    You will need a type with contains an element which is of the type..

  • A question regarding Synchronous, Pub-Sub non-durable model

              Scenario:
              Non-durable, publish-subscribe, syncronous model.
              Publisher1 and Publisher2 both post messages to a Topic at the same time. How to
              design the non durable Subscribers that would be able to obtain both these messages
              in the same thread?
              e.g. if i in my program I create 2 subscribers, with selectors configured for the
              2 different messages...
              program start
              1. create sub1 using selector1 for topic1
              2. create sub2 using selector2 for topic1
              3. sub1.receive(timeout)
              4. sub2.receive(timeout)
              5. further processing using both the obtained messages
              6. program end.
              In the above case, if messages arrive at the same time in the topic, only sub1 will
              be able to get the message, as sub2 won't be active at that time.
              Is there anyway to acheive this considering Synchronous, Pub-Sub non-durable model
              is to be used?
              Many thanks...
              

              Thanks for the response.
              Is a subscriber active the moment it is created?
              e.g. objSub=tsession.createSubscriber(topic,strMessSelector,true);
              or it is said to be active when we call
              objSub.receive() (in case of synchronous subscriber)
              "Shean-Guang Chang" <[email protected]> wrote:
              >I don't know the details of the design. You can use a single subscriber
              >without a selector and then do two receive to get both message.
              >If you have to use selector so sub1 can only select message from pub1 and
              >sub2 can only select message from pub2 then you need sub3 without a
              >selector and sub3 will do blocking receive first and then once the sub3
              >receives a message you can use sub1 and sub2 to do receiveNoWait.
              >
              >e.g.
              >while (true) {
              > if (sub3.receive() ! = null) { // have message in the topic
              > if (sub1.receiveNoWait() != null) { // got message from pub1
              > do something
              > }
              > if (sub2.receiveNoWait() != null) {// got message from pub2
              > do something
              > }
              > }
              >}
              >
              >"vinay s" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Scenario:
              >> Non-durable, publish-subscribe, syncronous model.
              >> Publisher1 and Publisher2 both post messages to a Topic at the same time.
              >How to
              >> design the non durable Subscribers that would be able to obtain both these
              >messages
              >> in the same thread?
              >> e.g. if i in my program I create 2 subscribers, with selectors configured
              >for the
              >> 2 different messages...
              >>
              >> program start
              >> 1. create sub1 using selector1 for topic1
              >> 2. create sub2 using selector2 for topic1
              >> 3. sub1.receive(timeout)
              >> 4. sub2.receive(timeout)
              >> 5. further processing using both the obtained messages
              >> 6. program end.
              >>
              >> In the above case, if messages arrive at the same time in the topic, only
              >sub1 will
              >> be able to get the message, as sub2 won't be active at that time.
              >>
              >> Is there anyway to acheive this considering Synchronous, Pub-Sub
              >non-durable model
              >> is to be used?
              >>
              >> Many thanks...
              >
              >
              

  • My mail signatures in Mac Mail, Yosemite, recently show "none" when I try to select among signatures, and it won't allow any selections

    I'm using Mac Mail in Yosemite. Until recently all my email signatures were available, but now when I try to select any of them the signature panel shows "none" and doesn't allow me to select one. Any ideas how to restore them?

    Hey Hey Thanks a lot!:) I was so frusterated with the problem that I didn't even look there..LOL! Thanks again.

  • Why are there 26 firefox.exe processes running when the taskbar shows none?

    Win 7 professional, Firefox 25.0.1. If I shut down Firefox and restart it I often get an error that a copy is already running. Checking the Task Manager shows many firefox.exe processes (26 this morning) even though the application tab shows none.

    Hello Axis,
    Can you please confirm if this happens each time you are using Firefox? Also, the cache size wouldn't have a big bearing on this issue happening. Can you please try if this issue happens when you are running Firefox in safe-mode (instructions below). if it doesn't then we can narrow the issue to a plugin / addon.
    <hr>
    Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    <hr>
    Thank you.

  • Want to show UIX Media Model link in new page using jdev1012

    Hi, I hope you can help me.
    I have a read only table in uix page
    there's a Column of type ORDDOC
    here is my code for this column:
    <column>
    <columnHeader>
    <styledText text="${bindings.Doc.label}" styleClass="DefaultFont"/>
    </columnHeader>
    <contents>
    <media
    model="${ctrl:createMediaModel(uix.current.Doc,'AppModulLocal')}"
    shortDesc="${uix.current.DocName == null ? 'Doc' : uix.current.DocName}"
    styleClass="DefaultFont"/>
    </contents>
    </column>
    So it works all fine, i get a link to this file, but if I click on this link it shows this file in the same window as my application.
    And i want to get this link open in a new Window. Just like i could make it with link-tag (targetFrame property) and so I'm trying to find a solution to get the medie link in new page.
    So, is there a possibility to geht this media link in new window ?
    I hope somebody know this problem and can help me.
    Thanks a lot
    Sebastian
    Message was edited by:
    Sebastian_ME
    Message was edited by:
    Sebastian_ME

    Hi, I hope you can help me.
    I have a read only table in uix page
    there's a Column of type ORDDOC
    here is my code for this column:
    <column>
    <columnHeader>
    <styledText text="${bindings.Doc.label}" styleClass="DefaultFont"/>
    </columnHeader>
    <contents>
    <media
    model="${ctrl:createMediaModel(uix.current.Doc,'AppModulLocal')}"
    shortDesc="${uix.current.DocName == null ? 'Doc' : uix.current.DocName}"
    styleClass="DefaultFont"/>
    </contents>
    </column>
    So it works all fine, i get a link to this file, but if I click on this link it shows this file in the same window as my application.
    And i want to get this link open in a new Window. Just like i could make it with link-tag (targetFrame property) and so I'm trying to find a solution to get the medie link in new page.
    So, is there a possibility to geht this media link in new window ?
    I hope somebody know this problem and can help me.
    Thanks a lot
    Sebastian
    Message was edited by:
    Sebastian_ME
    Message was edited by:
    Sebastian_ME

  • Excise invoice utilization pencil icon is showing non display mode

    Hi Expert
    when i create export invoice and when i create excise invoice with an go for utilization that pencil icon is showing in non display mode because if i want to change this bond,no bond, deemed export,Lou then it is not happening. I maintain configuration for that in default excise group and series group i maintained Export Under bond to specific sales area and excise group,series group and shipping point also.
    but i cannot change to bond.no bond.Lou.and deemed export as per the requirement. if any solution please answer me asap

    We cannot change this field from display to change. Once the excise invoice is captured the excise invoice number is freezed.
    It is SAP Standard & to break this you would need the access key from SAP.
    If the change in excise invoice number is by user mistake, please cancel the excise invocie and capture the new one.
    Thanks & regards
    Hameed Parvez

  • AppleTV not showing non-synced content since upgrade to iTunes 8.1.0.52

    Prior to upgrading to 8.1, my non-synced content showed on my AppleTV (when iTunes was open on my computer). Following the upgrade, the only content showing on the AppleTV is content that is synced to it.
    iTunes can see the AppleTV and I can sync content to it. Under "Settings" for the AppleTV I have "Custom Sync" selected and the "Show only synced content on my AppleTV" box is not checked.
    Any ideas how I can get non-synced content to show again in the AppleTV?

    That's exactly what I did, it took ~20sec to complete the "apply to enclosed items" command (there was heavy disk access), but it does not improve. The permissions stay the same for the files/folders in question. It's very odd, have a look at the screenshot:
    Some folders have correct permissions, others (to which I have no access through iTunes) show "admin" twice as the only user who is allowed to write. Repair permission does not help. I have hundreds of files/folders where permissions are wrong, only since the upgrade recently.
    http://img4.imageshack.us/img4/33/permission.png
    Message was edited by: JJulian (added screenshot)

Maybe you are looking for