Problem in JSF addRemoveList component selection

Hi,
We are using JSF creator studio 2.0. In our project we are using addRemoveList component to display available and selected items.
We are able to display the selected value from available list to Selected list.
uisng Add and remove buttons of the AddremoveList component.
But we are facing the problem is, we are unable to get particular selected or highlighted value from the SelectedList .
However we are able to get all selected items in bakingBean.
This is very very important for us to move further in our development. I really appreciate for any sort of help.
Thanks,
Ramesh

Hey Andy,
I did it that way (JSC 2):
assuming the add remove component's id is arl and that the components' item-property is bound to a datatable (mysql). The value field is of type Long, the display field is of type String.
Get selected:
get an array of selected objects directly from the component, and then do what ever you like to with that array.
Object[] objSel = (Object[]) arl.getSelected();
int i;
int l = objSel.length;
String str;
for (i = 0; i < l ; i++) {
str = objSel.toString();
Set selected:
Just create an array of objects holding the selected values and pass it to the component. But, attention, you'll need to make sure you're feeding the object array with the correct types of values. In my sample the value is a Long as described above, so I also need to pass in a Long, else the component just does nothing at all.
Object[] selObj = new Object[] {new Long(5), new Long(8)};
arl.setSelected(selObj);
I found this the most easy option to get and set the add remove list selection.
An other quite easy option is to bind the selected-property of the component to any session-bean property of type object-array and then set this sessionbean-property to the approrpiate values. But here you need also to make sure the datatype is correct.

Similar Messages

  • JSF Calendar Component Selection Issue

    Hi,
    I have design a JSF Page using two calendar components, ie
    Start Date
    End Date
    Both of these dates field allow user input but only one of them are on compulsory basis.
    Start Date is a compulsory , whereas End Date is not. What I notice was if the user did not select the End Date , upon clicking submit button, no action would be follow , if the End date was somehow selected , the JSF page perform normally.
    My question is how to resolve this issue as sometime it is not practical to preselect an End date in advance especially if a big project is undertaken, the logic here is , upon completion , the user could either input the date manually or via programme auto update.
    Could anyone provide any hints and solution please
    Thank

    Hi,
    I have design a JSF Page using two calendar
    components, ie
    Start Date
    End Date
    Both of these dates field allow user input but only
    one of them are on compulsory basis.
    Start Date is a compulsory , whereas End Date is
    not. What I notice was if the user did not select
    the End Date , upon clicking submit button, no
    action would be follow , if the End date was
    somehow selected , the JSF page perform normally.
    My question is how to resolve this issue as sometime
    it is not practical to preselect an End date in
    advance especially if a big project is undertaken,
    the logic here is , upon completion , the user could
    either input the date manually or via programme auto
    update.
    Could anyone provide any hints and solution please
    ThankBy "compulsory" I'm guessing you mean the "required" attribute has been set. I think one problem with the built-in calendar is that there isn't a way to specify the value "no-date-was-selected". Maybe you can simulate it by initially setting the value to the maximum date and telling the user to igore this value. Not a good solution. There is a newer popup calendar that I have been working on that has been checked into the bpcatalog tree on java.net which fixes these problems. Unfortunately, it needs to be packaged up as a complib and downloadable some where. I hope to do this soon.
    -Edwin
    http://blogs.sun.com/edwingo/

  • Problem rendering JSF selectManyListbox component from JSF selectOneMenu

    hello all. i have a problem rerender-ing selectManyListbox in "onchange" event of selectOneMenu.
    When i used both component as selectOneMenu then rerender-ing works fine but my requirement is to select many option and size also should be set which cannot be done in selectManyMenu component. so my tryint to use selectManyListbox
    So, when i change the rerender-ing component to selectManyListbox then rerendering doesnt work in onchange event of selectOneMenu.
    how can i use the selectManyListbox as rerender in onchange event of selectOneMenu?? please help and thanks in advance. please be free to answer to my post
    NOTE: i have specified 3 component
    1. selectManyListbox
    2. selectOneMenu
    3. selectManyMenu

    Did you found a solution to the problem?
    I am having similar problem in my page.
    Thanks,
    Bablu

  • JSF Calendar Component JS error

    Hi everyone,
    I have problem with JSF Calendar component. JSP version is 1.2 so we are using com.sun.rave.web.ui.component.Calendar class.
    When HTML code is generated some id missing. For example:
    JavaScript tries to find subForm:startCalendar:_datePicker:row5, but there is only subForm:startCalendar:_datePicker:row4.
    This cause JS error at line 249 in calendar.js:
    this.lastRow = document.getElementById(rowId);
    this.lastRow.style.display = "none"; //error is here this.lastRow is nullAfter few reloads and manual date change calendar seem to work fine for a while, but it can stop at anytime. There are no errors in Tomcat logs (we are using Tomcat 5.5, but we have same error with Glassfish 2).
    Here is JSP code:
    <ui:calendar binding="#{Index.startCalendar}" dateFormatPattern="dd.MM.yyyy" id="startCalendar" style="position: absolute; left: 120px; top: 96px"/>

    I had observed that the code for UI:Calendar Component looks up defaulttheme.jar file which will be avaialble with Sun studio creator or with UI tag jars ...... for its JS files, Images and style sheets etc .
    I tried seeing the contents in the JS files and there is a JS file specifically for Calendar Component ie calendar.js ... editing the same i came to see this
    // This does not work for August (08) and September (09) but it works
    // for all the other months????
    function ui_Calendar_setCurrentValue() {
        var curDate = this.field.value;
        var matches = true;
    but cant see Feb month there...
    It the problem with the code in teh JS file that they are using to generate the component...
    sooo the only solution would be to get the latest jars fixing that issue (defaulttheme.jar)
    I tried googling out for teh latest jars for the same i coudnt find any such...
    This is my investigation on this issue.Hope only code fix kills the flaw
    If any one gets a solution or workaround pls post ASAP to help us.+
    Edited by: Shivaji. on Feb 3, 2009 4:44 AM

  • JSF Declarative Component

    hi every body
    i am using Oracle Jdeveloper 11g release 2
    i wanted to create a Calendar Component
    for this i used JSF Declarative Component
    i added a RichInputText to page and a Button for opening calendar Dialog
    when for first time i open Calendar Dialog and select a day ,
    value of this day return to RichInputText truly but
    when i wanna to open it for second time that has an error
    error is:
    Error:dateValue is Read only
    i have to tell you dateValue is name of Attribute on JSF Declarative Component
    can anybody help me?

    i found a solution for this problem
    thanks

  • JSF - UICommand component not rendering properly

    2:12 PM 7/11/2007
    by Nirav Assar
    Overview
    It was discovered that in certain situations a UICommand component does not bind properly to its associated action method in the managed bean. The symptoms of this situation occur when you have a page with an action, and you click the action and nothing occurs. The page seems like it submits, but no code inside the action method of the managed bean gets executed and no errors are generated in the console!
    Problem
    The problem arises when you have a managed bean in request scope and you have a UICommand, either a commandLink or commandButton, associated to the bean. In addition this UICommand component has a rendered attribute tag (boolean value) that uses a managed bean method to tell it whether is renders or not. Even if the component gets rendered to the screen, the component does not get binded to the action method in the request scoped bean. This is a problem with JSF and may be due to the fact that the component gets rendered, but since the bean is not created until a request is submitted, the component never gets binded to an action. Therefore, nothing in the action method ever gets executed.
    Analysis
    Thus is seems like if you want to dynamically render a submit type component, such as a button or a link, you cannot effectivley do that with a bean in request scope. You'll have to place it session scope, which will work fine. Another option is to render the buttons all the time, but based on some scenario, using the "disabled" attribute to prevent a user from using the action. The "disable" attribute can access a boolean method in the managed bean.
    You could also use Javascript to hide the already rendered button on certain circumstance. However this would require javascript knowing the state of the domain objects/and or managed bean state.
    References:
    http://forum.java.sun.com/thread.jspa?threadID=5127437&messageID=9461810

    RamondDeCampo hit the nail on the head. If the bean used for the rendered attribute is request scope and the value differs between requests, you're going to see this type of behavior.
    Search the forums, there have been many similar reports as well as suggested solutions.

  • Problem in importing ESS Component.

    Hi,
        We have problem in importing ESS component from hard drive into server.
    Here is the details
    Comaponent sap.com_SAP_ESS - 600 Level 6 Update ERP05VAL.09201316
    We are importing it through CMS. its been 2 days since we initiate import. but still running.
    Please find the log details below.
    Software Component sap.com/SAP_ESS
    Version MAIN_ERP05VAL_C.20060920131656
    Label 600 Level 6 Update ERP05VAL.09201316
    System XSSTrack-Development
    Step Repository-import
    Log /local/dsk/data1/sap/trans/EPS/in/CMSsapaudev06DD0/CMS/log/XSSTrack_D@DD0/[email protected]
    The Log file does not have any info. empty.
    Please give Ur suggestions
    Cheers,
    Senthil

    Hi,
    the problem seems to be connection to the database or may be database URL is incorrect.
    The problem can be solved via the Visual Administrator or by a manual modification of the data-sources.xml file.
    Visual Administrator --> Server --> Services  -->  JDBC Connector -->Select DataSource
    Change the URL given in the Database URL field with the appropriate one & save it.
    For step by step process refer
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/2f2c4142aef623e10000000a155106/frameset.htm
    Thanks
    Swarup

  • JSF custom component

    Hi
    I have created a JSF cutom component , which has some javascript files. If i use the component within the same project my path for accessing the JS files is :- js/task.js (Its in public/html folder) .
    My problem is that when I use this custom component in some other project i am not able to access the js file ( Js file are deployed with other source file in ADF Library Jar) . As I have to hard code the path of JS files in the render can any one please tell me what will be the path for accessing the JS files.
    i heard ADFLibraryFilter is used for the purpose. Anyone please shed more light on it.

    Thanx Frank for your help .
    I am generating html from the rendererm, in the encodeBegin method i have now written <script type="text/javascript" src="adflibResources/js/task.js"></script>
    But still the script isn't loading on the page
    I added the following code in web.xml but Jdeveloper (Studio Edition Version 11.1.1.1.0) is complaining that "refernce oracle.adf.library.webapp.LibraryFilter and oracle.adf.library.webapp.ResourceServlet not found. I am using Fusion Web Application (ADF) as the application template.
    <filter>
    <filter-name>ADFLibraryFilter</filter-name>
    <filter-class>oracle.adf.library.webapp.LibraryFilter</filter-class>
    <init-param>
    <param-name>provider-lazy-inited</param-name>
    <param-value>true</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ADFLibraryFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>adflibResources</servlet-name>
    <servlet-class>oracle.adf.library.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>adflibResources</servlet-name>
    <url-pattern>/adflib/*</url-pattern>
    </servlet-mapping>

  • Service Marketplace Component Selection

    Dear Forum Members,
    In SAP Active Global Support, we are underway with a project to simplify the component selection process for our customers. From our analysis of customer feedback and usability studies, we have found that customers have difficulty in navigating through the component hierarchy tree and choosing the appropriate component. We will therefore be reducing the number of components visible to customers, and SRM has been chosen as a pilot component.
    Goal
    Of the 160 components in the SRM area, we will be hiding 35. Based on an analysis of incoming message volume, these components have been chosen because of a lack of usage, or because they could be easily absorbed by other areas or parent components. Please see the list below which shows the components which will be hidden.
    Benefit
    the reduction of components will assist us in Support as less component granularity leads to swifter and easier dispatching. Secondly, the reduction will pay dividends on the SMP Message Wizard as fewer components being proposed to the customer in the SMP means easier component selection and increased satisfaction.
    We plan to introduce the component hiding from Monday, the 10th October 2011.
    The affected components which will be removed from the SMP Wizard list as of 10th October are:
    AP-CAT-IMP
    AP-CAT-PER
    AP-CAT-XI
    AP-CAT-XI-MAP
    AP-CAT-XI-IFR
    SRM-CM
    SRM-CM-UI
    SRM-CM-BW
    SRM-CAT-RQI
    SRM-CAT-ICA
    SRM-CAT-PI
    SRM-CMT
    SRM-CMT-PCM
    SRM-EBP-CON-MC
    SRM-LA-UI
    SRM-LA-MSG
    SRM-LA-INT
    SRM-BW-SUS
    SRM-BW-GLS
    SRM-BW-EBP
    SRM-EBP-CA-XML
    SRM-EBP-CA-DIF
    SRM-EBP-CA-TOL
    SRM-EBP-CA-PAY
    SRM-EBP-CA-SCL
    SRM-EBP-CA-SIG
    SRM-XI-MAP
    SRM-XI-IFR
    SRM-XI-SCD
    CA-GTF-TS-WSI
    SRM-EBP-CA-MSP
    SRM-CAT-MDM-DEP
    SRM-SMC
    SRM-SMC-SUE
    Furthermore, we will use this thread to inform you, our customers, of any updates to the SRM component hierarchy as and when we have such details.
    Please feel free to post any comments or queries related to this topic and we will respond at our earliest convenience.
    Kind Regards,
    SAP SRM Moderators

    http://scn.sap.com/community/it-management/alm/solution-manager/blog/2012/08/01/quick-tip--create-a-problem-category-in-solution-manager-71
    HI Christian,
    For more with solution Category you can go with this Link.
    Regards,
    Shashank

  • Can't instantiate JSF Custom Component

    I'm hoping some of you expert (or at least seasoned) JSF custom component developers might be able to lend some insight into the "Can't instantiate class" problem. I have a custom component which extends another component (which happens to be Oracle ADF's panelGroup), and I've verified that everything is in place:
    1. Component class uses correct component type referenced by faces-config.xml and tag class
    2. Renderer type referenced in faces-config.xml matches that of the renderer type in component class
    3. There is a default constructor (no args) for the component class, which also sets the renderer type
    4. TLD with tag is correct
    All classes are definitely in the classpath, as I have another custom component in the same packages which loads and is used just fine.
    Any ideas would be appreciated.
    Thanks,
    Shawn Bertrand
    Tyco Electronics

    So, is no one else having any problems when using the new JSF components from Java Studio Creator 2 in their existing projects? I can make simple projects in Creator and run them on PointBase and Tomcat and can deploy and run from Eclipse using MyEclipse but I cannot get my existing project working and I am wondering if their is some sort of conflict between the new JSF components and legacy Struts stuff in that project or if perhaps Spring is someone interferering. Kind of at a loss right now...

  • I am having a problem when I try to select a photo or itunes song in Imovie or other programs. I get a window with grey lettering that says: "Open Itunes to populate this list" or "Open iphoto to see photos from your iPhoto library in this list.  I have t

    I am having a problem when I try to select a photo or itunes song in Imovie or other programs. I get a window with grey lettering that says: "Open Itunes to populate this list" or "Open iphoto to see photos from your iPhoto library in this list.  I have tried relaunching programs and nothing appears. Seemed to start happening a while back after one of my system upgrades.

    After a a lengthy conversation with Apple Tech. ($20), my problem seems to be solves. The Iphoto problem solved by trashing the plist file. The Itunes was more involved. We had to create a new Itunes folder and import the files into the new folder; and then import the playlists.

  • How capture the value selected in the component ( Select Many Choice )

    Hello Everyone ,
    I am new to ADF and i have a ADF page developed with Select Many Choice as one of the component , this field can be multiple numbers , i would
    like to capture each one the value being selected under each message choice and print them using sop .
    Let me explain through example :
    Application 1
    : Role 1
    : Role 2
    Application 2
    : Role 4
    : Role 5
    Where Application 1 , 2 are name of the Select Many choice component and Role 1 , 2 .. are values inside various Message choice .
    Now if i select Role 1 in Application 1 and Role 5 in Application 2 , i would like to print each of these information on click of a button.
    can some one help to achieve this .
    Note : All the values like Application 1 , 2 and Role 1,2,3 etc are just hard coded , not using any data base .
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Pratap ,
    Thanks for your response ,Its just a page with component ( Select Many Choice ) i have hard coded some of the values for
    select choice .
    Let me know if you need any further input .
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I just paid for Adobe PDF pack and I think I am having problems installing. When I select to print from word, PDF is not an option. Help!

    I just paid for Adobe PDF pack and I think I am having problems installing. When I select to print from word, PDF is not an option. Help!

    Hi voltric2014,
    If you are on Windows, you can download and install the CreatePDF Desktop Printer, which would allow you to "print" to PDF from Word. You'll find a link to the installer on the CreatePDF page at https://cloud.acrobat.com. Here are the instructions for installing it: Using Adobe PDF Pack
    Please let us know if you have additional questions.
    Best,
    Sara

  • JSF UI component view restore.

    Good day,
    Please help me with my problem.
    The problem is:
    I use this http://myfaces.apache.org/tomahawk/panelNavigation2 to make a menu on my site. Component renered perfect: I can open submenu items, click on them, todo some actions and so on. But if I will be redirected to another page the view of my menu cleared. I mean, that all items collapsed and there is no active menu item what had been clicked.
    How can I realise a component view saving for example in session? I mean, If I click on some item I want to see this item opened after refresh.
    This problem not in http://myfaces.apache.org/tomahawk/panelNavigation2 realisation, because if I use another components of the same type (rich components from JBOSS for example) I have the same....
    Please help me!

    I don't use tomahawk but in other similar components you have a flag or something that controls state, like expanded/collapsed, selectedItem, etc.
    The problem is that the component will remember the state because it saves it internally as a local value. Thus as long as you are using the same view (viewId) the component state is stored in the component tree. The minute you go to another view, that view state is lost.
    The answer is typically to create a managed bean, put it is session scope, and have it hold the view state. That way when you return to the view all of the expanded/collapsed, selectedItem, etc information is restore correctly.

  • JSF Menu Component

    Hello Suners,
    I'm developing a JEE application and using mojarra jsf implementation. I need to find a JSF Menu component that i can use in my app.
    Regards,

    abulseed wrote:
    I need to find a JSF Menu component that i can use in my app.You would be better off creating your menus using Cascading Style Sheets (CSS). JSF menuing often involves JavaScript of some sort which won't work if the user has JavaScript turned off. CSS menuing guarantees that your menu always work (even with Javascript turned off) and it's better by design, not to mention less annoying to users.
    Googled for 'CSS menu' - there are heaps of examples out there that you can use.
    Edited by: user2412 on Apr 5, 2011 12:30 AM

Maybe you are looking for