Parent shuttles

Hi guys,
We're using JDeveloper 10.1.3.4 and JHeadstart 10.1.3.3.81.
When creating a parent shuttle, how do you prevent already assigned children showing up in the unselected shuttle list when creating a new parent ?
for example, good old Departments and Employees. Once a employee is assigned to a department, it cannot be assigned to a new department without being removed from the original department first.
If I create the shuttle as standard, then when creating a new department, all employees are shown in the unselected list, even the ones assigned to other departments. If I modify the VO used in the "Domain for Unselected list in Shuttle" to only show employees where dept_id is null, then when viewing existing departments, I can no longer view the employees assigned to that department.
Surely there is something easy I'm missing here ! Can someone please shed some light ? :)
Cheers,
Brent

Hi,
Thanks for your reply but it seems the problem was down to my lack of understanding about how the shuttles work. I had assumed they could operate independently of one another but as I found in this post
Re: How to fill SelectManyShuttle from source?
*"Remember that u'r leading and trailing lists are not two disconnected beings. Your leading list should have all possible valid values(SelectItems) that can come up in the list and your trailing list contains all those values(keys) IN THE LEADING list which are/were selected."*
With this in mind, it's not possible to use a selectManyShuttle for a "one parent at most" assignment. If you exclude already assigned values from the leading list (to avoid them being selected again for a different parent), then they will not show up in the trailing list when viewing existing assigned values. Shame :( Having to use other means to achieve a "one parent at most multiple record assignment".
I would be interested to hear what other people have used to achieve this ?
Cheers,
Brent

Similar Messages

  • Multiple parent-shuttle pages

    Hi guys,
    I'm using Jdeveloper 10.1.2 and JHeadstart 10.1.2 (build 19).
    I've developed a page that contains a master view object and two detail view objects. What I want to do is to display both as parent shuttles on the same page. I have created 2 detail parent-shuttle groups and set both to display on same page. The two shuttle groups are displayed fine but the problem is when it comes time to saving the changes on the page. It seems that only the first shuttle group is being updated and the second one ignored. I checked that I wasn't doing anything silly but setting the second parent-shuttle to display on a separate page and when it was, the update of both work fine.
    Is it not possible to have two parent shuttle's on the same page ?
    Cheers,
    Brent

    Brent,
    It turns out that, while not documented, this is not supported. The method name generated into the UI Model to process the shuttle has the id "processParentShuttle". So, if you have two shuttles, the second shuttle overrides the first shuttle method binding .....
    You could fix that manually, by adding a second shuttle method binding to the UI Model with a different name, but when you do that, you also need to subclass JhsDataAction, and override method processShuttle which currently only checks for a parent shuttle binding named "processParentShuttle".
    Steven Davelaar,
    JHeadstart Team.

  • Using JHeadstart to generate shuttles for updates

    Hi guys,
    Using JHeadstart 11.1.1.3 - is it possible to generate shuttle boxes for the simple task of updating records.
    For example - in the leading list I want to see all employees with a status of 'ACTIVE'. In the trailing list I want to see all employees with a status of 'INACTIVE'. By shuttling employees between the two lists, the status of the employee should be updated accordingly. I know there are processShuttle class in JhsApplicationModuleImpl but this (and the App Def Editor) only really seem to cope with data where a parent-child relationship exists.
    Is there any way to achieve this in JHeadstart (I recall years ago somehow using dummy parent VO's ?) - or am I best dropping back to ADF for this and then using templates to preserve the code
    Cheers,
    Brent

    Hi Steven,
    I have actually managed to get this working in JHeadstart - and with only a couple of lines of custom code needed - so I thought I would post the process I followed here in case anyone else is interested (and perhaps get some feedback from you on whether this method is ok to use, or indeed if it can be tweaked/improved on :)
    So, for my testing I used the HR schema
    1. Extended the EMPLOYEES table to add a new column EMPLOYEE_STATUS. Not null, set most to "INACTIVE", some to "RETIRED" and some to "ACTIVE"
    2. Created Employee EO and Employees VO
    3. Also created a new VO EmployeesToBeActivatedShuttle - based on Employee EO with a custom where clause of WHERE Employees.EMPLOYEE_STATUS in ('ACTIVE','INACTIVE') - as in my unselected list, I don't want to see employees with a status of "RETIRED"
    4. Created a dummy parent VO EmployeeStatusActiveDummy - Read only VO with query "select 'ACTIVE' as emp_active_status from dual"
    5. Created a view link between EmployeeStatusActiveDummy and Employees
    6. In AppModule added EmployeeStatusActiveDummy and the child Employees VO (renamed ActiveEmployeesShuttle)
    7. In JAG, created a group ActivateEmployees with Data Collection EmployeeStatusActiveDummy. Hide single attribute.
    8. Created a dynamic domain for the unselected list using EmployeesToBeActivatedShuttle with EmployeeID as value and LastName as meaning
    9. Created a child group ActiveEmployees using the Data Collection ActiveEmployeesShuttle. Set group to parent-shuttle, set the unselected list domain and relevant titles
    As it stands, after generation this works perfect for showing just the INACTIVE employees in the leading shuttle and ACTIVE employees in the trailing shuttle. Also, moving employees from the INACTIVE to the ACTIVE shuttle also works as the existing processSelectedParentShuttleRow method in JhsApplicationModuleImpl simply updates the child attr (EmployeeStatus in this case) to the value of the parent attribute (hard coded as ACTIVE). What doesn't work out of the box is moving employees the other way (ie un-selecting them) as the standard processUnselectedParentShuttleRow method sets the child attr to null.
    I simply overrode processShuttle in my AppModuleImpl, and depending on the value of the childVo ViewObject I replace the processUnselectedParentShuttleRow with a shuttle box specific one (processUnselectedEmpStatusActiveShuttleRow). In this I simply change the line setting the child attr from null to INACTIVE (in my real world case I am looking up another attribute on the row that holds the previous status and using this value to reset the current status).
    And voila - JHeadstart generated shuttle updating the status of my records :)
    Hopefully it will stand up to more testing !
    Cheers,
    Brent

  • Using a shuttle to update the status of a record

    I'm using JHeadstart 10.1.3. What I need to do is allow the users to select a record(s) that need to have it's status updated to show it's been rejected. I would like to acomplish this by using a shuttle, listing all the records that haven't been rejected and then allowing the user to shuttle over the records that require to have the status set to rejected. So essentialy, the two shuttle VO's would be for the same entity. On moving a record over from one shuttle to another all I want to happen is for the status of the record to change. This doesn't really seem to fit the mould of either a parent-shuttle or an intersection-shuttle :(
    Do I have to abandon the idea of using a shuttle and revert to something else ? If not the shuttle, what else would best serve my purpose here ? Can JHeadstart generate a tableSelectMany component ?
    Cheers,
    Brent

    Hi,
    What's the link between Printing the Smartform and Updating the HU status?
    Generally Smartform is used to print the Output of Packing Slip,?
    You mean after packing is over you have to Modify the handling Unit status?
    then you have to find the status of packing and based on that field you have to modify the JU status.
    Regards,
    Anji

  • Re-displaying a shuttle page

    I have a parent-shuttle on a page that also contains a field that the user must enter a password before the changes are saved. In the onCommit, if the password is incorrect a call is made to addError and the page is redisplayed. The problem is that the call to prepareShuttle's repopulates the left hand side of the shuttle but leaves the right hand side, meaning that you have the same values now on both sides. In attempt to fix this, in my dataAction I overrode the prepareShuttle to do nothing and only make the call to super.prepareShuttle from within onCommit. While this prevents the same values being displayed on both sides of the shuttle, it has the undesirable effect of losing the changes that the user has made if they enter an incorrect password.
    Is there a way of redisplaying the shuttle but not re-querying the VO used for the left side of the shuttle ?
    I'm sure I'm missing something here ! (hopefully)
    Cheers,
    Brent

    Brent,
    You can override refreshShuttleIterators in JhsDataAction.
    Steven Davelaar,
    JHeadstart Davelaar.

  • A simpler explanation for creating shuttling

    Well,
    Looking at the tutorial provided for creating shuttling, it seems not to be the best way to get user started on this. Where did employee3 came from.
    I created a view link between two View Objects and I can see Jheadstart automatically created the groups and even Lookup list.
    Are Groups just the way Jheadstart organize the ViewObjects? I guess it's best on these Groups that we can make the Look up.
    I tell you, if Oracle ever end up making smaller examples/tutorials but to cover every base in creating all the components, that would work out really well.
    If anybody has a step by step approach in creating shuttles between two tables and Save, I'll greatly appreciate it.
    Thank you,
    Kamran

    Kamran,
    You want to create shuttles between two tables. JHeadstart supports two types of shuttles.
    The first decision you need to make is: do you want to create a parent shuttle or an intersection shuttle?
    With a parent shuttle where A is the parent and B is the child, you want to assign rows from B to be a direct child of A.
    With an intersection shuttle where you want to create intersections between tables A and B, you store the intersections in table C which has relations to both A and B.
    With parent shuttles, a row of B can only belong to at most one row of A. With intersection shuttles, a row of B can belong to many rows of A. Which one do you want?
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • SelectManyCheckCheckBox

    Hi,
    I am developing a simple application using JHeadstart 10.1.3.I want to display multiple checkboxes for values which will be fetched from some table.For ex. ChkBox1 - Value A
    ChkBox2 - Value B
    ChkBox3 - Value C
    ChkBox4 - Value D.
    Since these values A.B.C.D are not the database fields but they are the values in the DB Table.
    I have an idea to use SelectManyCheckbox for this but I dont know how to use it.As after placing that SelectManyCheckbox on .jspx page it prompts me to enter Binding and values etc.
    Please help me out of this if somebody knows how to use SelectManyCheckbox ?
    If i have wrong idea then please do correct me or late me know.
    Many Thanks.

    I referred the same document but the example cited over there is comparitively easier since the tables involved are only two .Actually I am using three DB tables. Out of that From one table my values for Facility field will get displayed like Car Parking,Canteen etc[Only Display purpose].Furthermore these values will be stored in some other table[used Updatable VO] like CAR for Car Parking,LAB for Laboratory etc.So I used the Domain for Unselected values and FacilityVo[updatable] with parent-shuttle layout.But after running the page its giving me error as Id is Required in FacilityVO[updatable].And also the values which are getting displayed as checkboxes are again getting unchecked after clicking on save button
    Please help me or suggest some way for this!

  • A problem with bind variables in a shuttle

    Hi
    After days of research I cannot come up with a solution to this problem which I hope will be easy to describe.
    I'm working on an apex.oracle.com workspace (4.02).
    I have a page with
    a) a region with tree which works well populated by a list of roles and users
    b) a region with a shuttle with the following sql
    List of values
    select SOB_DISPNAME, SOB_ID
    from VIEW_SYSTEMOBJECT
    order by SOB_DISPNAME
    Source
    SELECT SOB_ID FROM VIEW_OBJECTSECURITY_GRANTED WHERE U_ID = :P19_SELECTED_ID
    :P19_SELECTED_ID is a hidden textbox with the currently selected users id.
    The above works very well - I select a user from the tree and the shuttle lhs populates with unselected object names and the rhs with objects selected for the user. A submit button drives a page process which clears out and then inserts the selection into a the table (objectsecurity)
    So far so good.
    I added a list box to the shuttle region (:P19_SOB_TYPE_LIST) so that the data being worked on could be filtered by type, its driven by a LOV that produces a value or 'PAGE', 'REPORT' ... etc.
    I updated the above SQL to be
    List of Values
    select SOB_DISPNAME, SOB_ID
    from VIEW_SYSTEMOBJECT WHERE SOB_TYPE = :P19_SOB_TYPE_LIST
    order by SOB_DISPNAME
    and the source
    SELECT SOB_ID FROM VIEW_OBJECTSECURITY_GRANTED WHERE U_ID = :P19_SELECTED_ID AND SOB_TYPE = :P19_SOB_TYPE_LIST
    So now I would expect that if 'PAGE' is selected in the list box then only objects that are pages will be seen.
    However nothing at all appears.
    If I substitute the bind variable :P19_SOB_TYPE_LIST for 'PAGE' ... WHERE SOB_TYPE = 'PAGE' it works perfectly. So why does :P19_SELECTED_ID do it's job but not P19_SOB_TYPE_LIST ?
    I am probably making some ridiculously simple mistake but I just cannot spot it; is my syntax wrong?.
    The session state is persisting so that I can see the value of :P19_SOB_TYPE_LIST being set to PAGE
    Any help with this would be very much appreciated.

    Hi Dirk
    Thanks for that which looked promising!
    I added P19_SOB_TYPE_LIST as the Cascading LOV Parent Item and removed it from the where clauses of both SQL's and the result was that all types are shown; corresponding to my original position.
    I then added the where clause back to the LOV SQL and both shuttle boxes are blank again
    I added back to the source SQL and again both boxes empty
    Finally I removed the where clause from the LOV SQL (the only other combination) and again lhs box populated with all rows (not filtered) and rhs box blank.
    So unfortunately that doesn't seem to have fixed it.
    Many thanks for the help and any more will be greatly appreciated.
    Regards
    Charles

  • How to prevent apex 4.0 shuttle cleared by cascading LOV setting?

    I have a shuttle control for choosing a list of database users populated from a child table by an On Load - After Header process, which then repopulates the child table in an On Submit - After Computations and Validations process. Work fine.
    I then set the shuttle's Cascading LOV Parent Item(s) to a text item that could be used for filtering the shuttle's LOV, and revised the LOV SQL to a) use the filter and b) include items stored in the child table, i.e.:
    select username as dv, username as rv
    from all_users
    where username like upper(:P5_USERSFILTER) || '%'
    union
    select username, username
    from user_grouping_users
    where groupid = :P5_GROUPID
    order by 1
    Unfortunately, when the filter value changes (P5_USERSFILTER), the state of shuttle (as set in my On Load - After Header process) is cleared. The values from the child table are properly included in the LOV, but they are no longer selected -- so the appear in the left-hand list as candidate values but not in the right-hand list as selected values. Additionally, any items selected in the shuttle before changing the value of the LOV Parent (:P5_USERSFILTER) are no longer selected.
    Is there a way to prevent the selections of a Cascading LOV item from being cleared when the parent item is reset?
    Note, I've specified 'No' for Optimize Refresh, and 'P5_USERS' for Page Items to Submit and 'Yes' for Display Extra Values (which in general does not seem to have any affect on a shuttle LOV)

    Hallo all!
    I got a similar situation: a text item that filters the left side of an shuttle item (P11_IAG_ENUM), but the right side should stay the same - independet from the text item, where search-phrases are entered.
    So I tired with your example - thanks for that - but I changed the code that I only have one collection 'P11_IAG_VALUES' ... but right side seems to be still dependend from the search item. I also deleted the "set value" action of the "save current selection"-dynamic-action, because I supposed it's not needed.
    Here is my "save current selection"-dynamic-action:
    DECLARE
    c_collection CONSTANT VARCHAR2(30) := 'P11_IAG_VALUES';
    l_seq_id NUMBER;
    BEGIN
    IF NOT apex_collection.collection_exists(c_collection) THEN
    apex_collection.create_collection(c_collection);
    END IF;
    SELECT MIN(seq_id)
    INTO l_seq_id
    FROM apex_collections
    WHERE collection_name = c_collection
    IF l_seq_id IS NULL THEN
    apex_collection.add_member (
    p_collection_name => c_collection,
    p_c001 => :P11_IAG_ENUM );
    ELSE
    apex_collection.update_member (
    p_collection_name => c_collection,
    p_seq => l_seq_id,
    p_c001 => :P11_IAG_ENUM );
    END IF;
    COMMIT;
    END;
    ... and the "restore old selection"-dynamic-action:
    DECLARE
    l_selected_iag VARCHAR2(32767);
    BEGIN
    SELECT c001
    INTO l_selected_iag
    FROM apex_collections
    WHERE collection_name='P11_IAG_VALUES'
    RETURN l_selected_iag;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
    RETURN NULL;
    END;
    Where is my error in reasoning?
    (Meanwhile I try to create an example application...)
    [Edit: I got problems to acces my workspace, try to reset my password --> error, even try to find my workspace -->error .... everytime the same; I'll try it later again, but hoping that anyone can help me without example application]
    Edited by: kc7 on 10.09.2010 09:20
    [Edit II: I finally created a example-application: *http://apex.oracle.com/pls/apex/f?p=30216*
    workspace: kc7
    user: dummy
    pwd: doll
    Edited by: kc7 on 10.09.2010 12:28

  • Intersection-shuttle not working

    Hi,
    I am using JHeadStart 10.1.3. i displayed detail records in sub tab of parent form page as intersection-shuttle.
    Shuttle is displaying results correctly. But after moving some results fom left to right and clicking on Save button, i am getting "No changes to Save" message instead of saving the results.
    Please any one help me on this?
    Regards,
    A V G K Raju

    I have the same issue after following the intersection-shuttle example in the JHS developers guide.
    I downloaded the hr demo application, but only found a parent-intersection example. not necessarily helpful for an intersection-shuttle.
    I would like to try and restart this thread. Any one out there have ideas.
    It seems as if the underlying VO does not know it has been modified. This is the case for adding rows or removing rows from the list.
    Thanks,
    Jim
    JDEV 10.1.3.4.0.4270 JHS 10.1.3.3.81
    Edited by: 170412 on Aug 7, 2009 2:50 PM

  • Sticky Shuttle values

    Hi,
    Apex 4.02
    DB 11g
    Ref Re: Auto filter Shuttle selection list
    I have a very large number of values (a few thousand) in a shuttle but have a Select List as a parent cascading LOV.
    When I select an item from the Select List, the left hand shuttle items successfully get filtered down accordingly.
    If I move some values to the right hand side of the shuttle, then pick another value in the Select List, the the left hand shuttle items successfully get filtered down accordingly and the right hand side shuttle resets itself to have no values selected.
    This is standard functionality...
    I was wondering if there was any way that I could keep the values on the right hand side of the shuttle once they were selected so that I could build up a list from different parent groupings?
    I did try to implement this excellent posting from Christopher Beck
    http://christopherbeck.wordpress.com/tag/shuttle/
    but with limited success...
    Cheers
    Gus..

    first thing: why using a shuttlebox for selecting days of week. a multiselect list should suffice. okay, you are right, that's a design decision :)
    I'm not sure what you tried already, but some pl/sql code should do the trick.
    loop thorugh start and end date, and in that loop. format the date to the 'day' and compare it with the values selected in the shuttle/multiselect. You can just check with instr if the selected day is in the item value, I think that is the easiest solution. Put every found occurence in an array or where ever you want to put it.
    hope that helps.

  • Shuttle component

    i have created a shuttle component.it is working,but data is not correct.data is not coming from selected item but from the next item in the combo box it is populating.in the application module it is showing correctly
    plz tell me how to rectify it?
    Edited by: Jay R on Aug 17, 2012 1:48 AM

    Hi Jay,
    If you are using partial trigger, give the trigger to the parent container instead of the component. This may solve your problem.
    And always mention your jdev version for better solutions.
    Regards,
    Vignesh S.

  • ADF select many shuttle value tracking in the bean

    Hi All,
    I am working on a one requirement,
    I have adf task flow(.jsff component), here i have ADF select many shuttle component,
    I need to track value value which i am moving from the left side of panel to the right side panel ,i need to track these values in the Bean class.
    I am not doing in the .jspx ,doing it in the .jsff bounded task flow.
    can any1 pls suggest me the approach??
    thanks
    Santosh

    Here is what I did to get the selected items in the backing bean before they are shuttled across.
    Added af:clientListener (<af:clientListener method="showDetails" type="propertyChange"/>) for af:selectManyShuttle
    Set ClientComponent for af:selectManyShuttle to true
    Added af:serverListener (<af:serverListener type="shuttleItemSelected" method="#{backingBeanScope.mainBean.itemSelected}"/>) to parent of af:selectManyShuttle which is af:panelBox in my case.
    Added af:Resource with the following code
    <af:resource type="javascript">
    function showDetails(event)
    if(AdfRichSelectManyShuttle.SELECTION == event.getPropertyName())
    var shuttleComponent = event.getSource();
    var parent = shuttleComponent.getParent();
    var selectedObjs = AdfShuttleUtils.getLeadSelection(shuttleComponent);
    AdfCustomEvent.queue(parent, "shuttleItemSelected", {fvalue:selectedObjs}, false);
    event.cancel();
    </af:resource>
    In the backing bean code, implemented serverListener with the following code. "DepartmentsView1" is the list binding used to populate the Shuttle.
    public void itemSelected(ClientEvent clientEvent) {
    ArrayList ids = (ArrayList)clientEvent.getParameters().get("fvalue");
    Object idArray[] = ids.toArray();
    BindingContainer bc = this.getBindings();
    JUCtrlListBinding listBinding = (JUCtrlListBinding)bc.get("DepartmentsView1");
    RowIterator itr = listBinding.getRowIterator();
    for (int i = 0; i < idArray.length; i++) {
    int idx = Integer.parseInt((String)idArray);
    Object str = itr.getRowAtRangeIndex(idx);
    System.out.println(str);
    When I run the JSPX file, I see the selected value printed in the message window before it is shuttled. If I select multiple values, I see them in the backing bean.

  • How can a parent restrict a child's access to a PARENT'S PRE-EXSISTING iTunes account via iCloud's Family Sharing Program?

    How can a parent restrict a child's access to a PARENT'S PRE-EXSISTING iTunes account via iCloud's Family Sharing Program?  To explain further... I have a young son who is on my iCloud family sharing program... I am excited to be able to share SOME of my music in my iTunes library, but there are some songs and music videos that are not age appropriate for him and currently there is no way to restrict him from viewing and downloading anything off of my iTunes library.  Yes, I suppose I can delete the songs he shouldn't have access to, but I don't think I should have to do that... I paid for them and still like them and listen to them while I work out or am without my kids.  Is there a way for me to personally select which songs/videos I would like to "hide" from my children in an effort to shield them from inappropriate content?

    Hello ggg39,
    Welcome to the Apple Support Communities!
    I understand that you have some content in your iTunes library that you would like to restrict access for the child set up on Family Sharing with you. To do this, you can set restrictions on the child’s device as described in the attached article. 
    Family Sharing - Apple Support
    Now kids under 13 can have their own Apple IDs. As a parent or legal guardian, the family organizer can create an Apple ID for a child and add the child to the family group automatically. Ask to Buy is turned on by default, and the organizer can also limit the content kids have access to on their devices through Restrictions on an iOS device or parental controls in OS X and iTunes.
    For more information on restrictions and how to set them up, please reference the next attached article. 
    About Restrictions (parental controls) on iPhone, iPad, and iPod touch - Apple Support
    Have a great day,
    Joe

  • HT1420 How can I get past 5 authorized computers when we have more computers, ipads, iphones than allowed. I want to have parental control by sharing 1 apple ID with one account?

    We have multiple computers, laptops, iphones and ipad in our home. We have kept one account for iTunes in order to monitor what my family downloads for parental monitoring. How can I get approval or allow for more devices to be 'authorized' to purchase from iTunes? I don't want to have to have more than one account that I have to monitor - technology is overwhelming enough to control with all the hackers and distasteful things on the web.

    Authorization applies ONLY to computers.
    ipads/ipods/iphones/apple tvs are NOT authorized at all.

Maybe you are looking for