Component from a set of jsf elements

I use a set of JSF elements (adf:table, adf:commankLink...).
How to make all this elements part of a "Components" with input params ?
What is the best solution ? region, facelets, subview, ...

Fred,
this is what regions are for
Frank

Similar Messages

  • Calling a method in the Custom ADF component from JSF page

    HI.
    I have created some custom compoents by extending the core ADF Components. Like i have a ComboBoxDefault component with it's ComboBoxDefaultTag.java and Controls.tld file.
    Now my requirement is i want to bind my label to this component from the JSF page. like
    <fwcontrols:label binding="#{listComponents.comboBoxDefaultLabel}" id="label1"/>
    <fwcontrols:comboBoxDefault binding="#{listComponents.cmbLocales}"
    value="en_GB" id="comboBoxDefault" autoSubmit="true" label="label1">
    <f:selectItems value="#{listComponents.locales}"/>
    </fwcontrols:comboBoxDefault>
    In my JSF page the label will have an id, and that id will be specified in the label tag of the component.
    In Tag.java file i have overrided the setProperty(FacesBean facesBean). In this method i have bind all my properties. In core JSF the setProperty method is provided with the UIComponent parameter, so i can call my method in component also. Which is not in case of ADF Faces.
    My main point is how i can call my method setLabel() which is in ComboBoxDefault.java so that i can set the label.
    Thanks in Advance.

    Thanks for all your replies. I want this kind of a functionality because Im trying to invove a DC (Child DC) from a Parent DC such that the Child DC's view is displayed onto the view container of the Parent DC. I have embedded using 'interface view of a component instance' in the Parent Window and am able to create the component and set usage though the onPlugDefault of the Child View.
    But I observe that when i make a call from the parent, the flow is like this:
    1. The wdDoInit of the Child Component Controller gets triggered first.
    2. Then the wdDoInit of the Child's <b>VIEW</b> gets triggered
    3. and <b>THEN</b> the onPlugDefault of the Child Component Interface View
    What I had actually wanted was to Fire onPlugDefault where Im calling a method LoadData(), after which the Child DC's view must be triggered so it can display the fetched data.
    What is actually happening is the view gets displayed, but no data is displayed in the view.
    Right now I have just given a work around where Im triggering <b>LoadData()</b> of the <b>COmponent COntroller</b> from the <b>wdDoInit</b> of the <b>VIEW</b>.
    Is there a better way to do this? I find it strange that I have to load the Data from the view.
    Thanks
    Jack

  • How i can set the selected item of a dropDown component from java code

    Hi
    Thank you for reading my post
    How i can set the slected item of a DropDown component from backing beans java code ?
    it is binded with a database , so one field determine its display and one other field determine its value , I want to set the selected item of this combobox
    In back code i have both value and display values to use them .
    can some one give me some help ?
    Thanks ,

    See code sample 3 at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    See also, the selection components row in the table under http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    It says
    One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. Be sure to verify that getSelected() returns null before setting the default options, or you will overwrite the user's selections on a post-back.

  • How to set the value of something in a component from the main application?

    Hi,
    Maybe I've been working on this too long, but I can't figure
    out how to set the value of the text property of a text input field
    in a component from my main application in an mx:Script block. I
    have a component called Login in the components folder, and I need
    to set the text value of empNum. In my mxml declaration at that the
    top, I've declared these components as xmlns:c="components.*" So
    logically, the property I'm trying to set is c.Login.empNum.text. I
    can't figure out the correct syntax to get this to work, and I've
    tried everything I can think of. Does anyone have any suggestions?
    I'm thinking this should be an easy one, and I'm just missing
    something.
    Thanks!
    Holli

    Did you try giving it an id ?
    <c:MyLogin id="loginScreen" /c>
    So later you can do loginScreen .empNum.text = "my text"
    Laurent,

  • Accessing a JSF element from a back bean method

    Hi,
    short question, can I access the JSF element from a back bean method?
    So, for example, if I have the following JSF code:
    <h:panelGroup id="test1" rendered="#{bean.someMethod}">...</h:panelGroup>
    <h:panelGroup id="test2" rendered="#{bean.someMethod}">...</h:panelGroup>
    <h:panelGroup id="test3" rendered="#{bean.someMethod}">...</h:panelGroup>
    Can I found out in some way, which element (esp. which ID) calls the someMethod-method?
    Kind regards
    Matthias

    There are more possibilities as well. If you depend it on for example the User's rights/groups, then you can also do for example:
    rendered="#{user.admin}" // getter = public boolean isAdmin()
    rendered="#{user.groupName == 'admin'}" // getter = public String getGroupName()
    rendered="#{user.groupId > 1}" // getter = public int getGroupId()
    rendered="#{fn:contains(user.groups, 'admin')}" // getter = public String[] getGroups() or public List<String> getGroups()
    etc..I think it's after all just a matter of learning about the capabilities of EL a bit more.

  • Emergency!! How to remove elements from a set? or..?

    How do I remove elements from a Set?
    If I have Set s1and s2, I want to create a new set which consist of all elements in s1 but not in the s2.
    Which means, I have to s1.union(s2) and then remove elements of s2.
    Is there any method which has this function (remove elment from a set)?
    Or is there any other better way to solve this (which doesn't have to remove anything)?
    If not, how to design a method which will do this job?
    Your help will be very much appreciated.

    Hi
    you can use method removeAll() from set
    s1.removeAll(s2);
    so s1 contains all the element not in s2.
    If you want to lef s1 unmodifyed you have to create a copy.
    Set s3 = s1.clone();
    s3.ramoveAll(s2);
    bye
    Nicola.

  • How can I set a JSF page to accept requests from outside

    I have a file upload page in my application(JSF and MyFaces). It works fine when I navigate to page and select the file to upload and submit. Do I need to make any changes to this page to post from an external system?
    I created a perl script to send a file to this page. When I called the URL for this page, it returned the page content. How can I submit from the perl script?
    <h:form id="apppostform" name="apppostform" enctype="multipart/form-data" >
              <h:panelGrid styleClass="mbformdata" columns="2" border="0" cellspacing="25" cellpadding="0">
              <h:outputText value="#{appmsg.prompt_upload_file}"/>
              <t:inputFileUpload id="fileupload"
              value="#{fileUploadForm.upFile}"
              storage="file"
              styleClass="fileUploadInput"
              />
                   <h:commandButton type="submit" value="submit" action="#{fileUploadForm.uploadFile}"/>
                   </h:panelGrid>
    </h:form>
    Thanks,
    rm

    I created uploadservlet. I specified in web.xml:
    <servlet>
    <servlet-name>uploadservlet</servlet-name>
    <display-name>UploadServlet</display-name>
    <servlet-class>servlet.UploadServlet</servlet-class>
    </servlet>
    When I try to access uploadservlet, I am getting 404 error.
    I have few questions:
    How does it know about uploadservlet if it is not inherited from facesservlet while using JSF?
    Do I need to add any info about this in faces-config.xml?
    Please help!
    Thanks

  • Formatting Elements from a Set

    Hi Guys,
    I have in my jsp the following code;
    <core:forEach var="s" items="${Sandwiches}">
    <tr bgcolor="beige">
    <td><center>null</td>
    <td><core:out value="${s.bread}"/></td>
    <td><core:out value="${s.spread}"/></td>
    <td><core:out value="${s.baseFillings}"/></td>
    <td><core:out value="${s.extraFillings}"/></td>
    <td><core:out value="${s.seasonings}"/></center></td>The values bread, spread, etc, are elements of a set. They are output on the jsp page as;
    [Tomato, Mixed Salad, Sliced Onion]and
    [Ham, Chedder Cheese, ]However I want to format the output and get rid of the brackets. Is this possible?
    Message was edited by:
    DontKnowJack

    The relevant code is pretty large and I am also using the spring MVC framework. In short. a parses is used to read each individual word in a text file and store it in the sets bread, spread, etc. These are then passed on to the view and then displayed on the webpage. The following code is used to read the text file;
    public Set parse(File textFile) {
            Set sandwiches = new HashSet();
            try {
                //Initializing and declaring the scanner s and getting it to read the text file
                Scanner s = new Scanner(new BufferedReader(new FileReader(textFile)));
                // s.useDelimiter(System.getProperty("line.separator"));
                s.useDelimiter("\r");
                long cnt = 0;
                while (s.hasNext())//while there are elements to read in s
                    //each element constitutes as a line
                    //give a String var the value of the next element in the scanner
                    String line = s.next();
                    log.debug(line);
                    //initiate an object of type Sandwich and give it the value returned by calling
                    //the parseLine Method. Each line read by scanner s is passed into the method
                    Sandwich sw = parseLine(line, ++cnt);
                    //sw now references the object of type sandwich s
                    //add this to the set sandwiches
                    sandwiches.add(sw);
                s.close();
            } catch (FileNotFoundException e) {
                System.out.println("cannot find the file");
                // ignore for now
            return sandwiches;
        private Sandwich parseLine(String line, long counter) {
            //declare a new scanner and pass it the line
            Scanner lineScanner = new Scanner(line);
            lineScanner.useDelimiter("#");
            //create a new object of the type sandwich
            Sandwich s = new Sandwich();
            //use this object to call and set the filling elements
            s.setBread(lineScanner.next());
            s.setSpread(lineScanner.next());
            for(int i = 0; i<13; i++) {
                String var1 = lineScanner.next();
                if (!var1.equals("null")) {
                    s.addBaseFillings(var1);
            for(int i = 0; i<12; i++) {
                String var1 = lineScanner.next();
                if (!var1.equals("null")) {
                    s.addExtraFilling(var1);
            for(int i = 0; i<8; i++) {
                String var1 = lineScanner.next();
                if (!var1.equals("null")) {
                    s.addSeasonings(var1);
            s.setId(counter);
            //return the sandwich object s
            return s;
        }This is called by another class which is also used to pass this info to the web page. Is there anything in JSTL I can use to format the elements in the set or the set itself?

  • Update Phase Component From Project Component

    Morning all.
    I'm looking at options we might have open to us for the following scenario. Any ideas? Previous experiences,  etc most welcome ...
    We have a custom field in DPR_DET_DATA_PROJECT_O that we transfer to PS, but want to use the same field value to force PPM to think the same field change has occurred in DPR_DET_DATA_PHASE_O without us actually needing to access the component via the UI. We have an active subsystem that we write the value to,  but don't want to have to a have to start the phase component from the ui to pass the change before saving.
    The idea being that we only need this field value at PS Replication time on the phase .... As we want to effectively cascade this value onto all our WBS Elements (DPO & PPO objects) in PS (only 2 level controlling scenario) ... We don't even really need to save the data at the phase level .... Just make the change manager think that the phase had changed ... hopefully we'll then get the PPO objects through the DPR_FIN_GECCO_ATTR Badi during replication .... without having physically made s chessmen at phase level. Make sense?
    Is setting the phase data (and triggering a change to be recorded) from the project component a possibility?
    Many Thanks

    Hello David,
    If I understood correctly, you want to change a custom field existing both in the project definition and at phase level, without accessing the Phase in the UI? Is that right?
    If so, than it's simple. In your subsystem, I suppose you have an instance of your loaded project (cl_dpr_project_o). When you change the value of the particular field and "trigger" the updating, you just use the project instance (let's call it lo_project) to get all the child phases in an object table (type CL_DPR_PHASE). Loop through this table and use the method lo_phase->set_data( ). I'm not sure in which of the three structure you can find the custom fields, but it's definitely either _INT/_CHG/_EXT. Also, I recommend you encapsulate this code inside a method, as you'll need to call it from the beginning (if you decide not to save the value).
    Hope this helps!
    Tudor

  • How can I call a public function in one component from another component?

    I have two components: Form and Confirmation.  Form is a Canvas and Confirmation is a TitleWindow.
    Form contains several controls and a submit button.  Confirmation contains an OK button.  When the user clicks the submit button, the Confirmation appears over the Form (Form is blurred).  When the user clicks the OK button on the Confirmation, I want to run a function on Form to set some default values in the controls.
    How can I address the function in the Form component from the Confirmation component so I can fire the function?
    Thanks!

    Here is the source
    CustomForm.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
    <mx:Script>
    <![CDATA[
    public function callBack(): void {
    lblStatus.text = "Success";
    ]]>
    </mx:Script>
    <mx:Label id="lblStatus"/>
    <mx:Form x="50" y="50" verticalGap="15">
            <mx:FormHeading label="Send us comments" />
            <mx:FormItem label="Full Name:">
                <mx:TextInput id="fullName" />
            </mx:FormItem>
            <mx:FormItem label="Email:">
                <mx:TextInput id="email" />
            </mx:FormItem>
            <mx:FormItem label="Comments:">
                <mx:TextArea id="comments" />
            </mx:FormItem>
            <mx:FormItem>
                <mx:Button id="submit"
                    label="Submit" />
            </mx:FormItem>
         </mx:Form>
    </mx:Canvas>
    CustomTitle.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute" width="200" height="80"
    showCloseButton="true" close="closeMe(event)"
    backgroundAlpha="1"
    color="#173553" backgroundColor="#EEEEEE"
    headerColors="#FFFFFF, #CBCCCC"
    borderColor="#666666" borderStyle="solid">
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    public var callBack: Function = new Function();
    private function closeMe(event: Event): void {
    PopUpManager.removePopUp(this);
    callBack();
    ]]>
    </mx:Script>
    <mx:HBox width="100%" height="100%" horizontalAlign="center" verticalAlign="bottom">
    <mx:Button id="btnOK" label="OK" click="closeMe(event)" />
    </mx:HBox>
    </mx:TitleWindow>
    TitleWindowSample.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns="*"
    layout="absolute"
    width="100%" height="100%"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    private function init(): void {
    customForm.submit.addEventListener(MouseEvent.CLICK, onMouseClick);
    private function onMouseClick(event: MouseEvent): void {
    customForm.lblStatus.text = "";
    var customTitle: CustomTitle = new CustomTitle();
    customTitle.callBack = customForm.callBack;
    PopUpManager.addPopUp(customTitle, this);
    PopUpManager.centerPopUp(customTitle);
    ]]>
    </mx:Script>
    <mx:VBox
    width="100%" height="100%"
    verticalAlign="middle" horizontalAlign="center">
    <CustomForm id="customForm" width="500" height="300">
    </CustomForm>
    </mx:VBox>
    </mx:Application>

  • Accessing a button in a Component from other component

    I have a two components Test_Interface.mxml & teacher_fullscreen. I called teacher_fullscreen.mxml from Test_Interface.mxml by
                  private var tfull:teacher_fullscreen = new teacher_fullscreen();
                  tfull.title = "Teacher Window";            
                  tfull.maximizable=true;             
                  tfull.systemChrome = 'none';
                  tfull.minWidth = 800;
                  tfull.minHeight = 600;             
                  tfull.open();              
    Now I created an instance of Test_interface in my 2nd mxml by
    public var par:Test_Interface=new Test_Interface();
    Actually, I wanted to disable a button in Test_interaface.mxml with id = "b1" from my 2nd mxml using the object created above.
    So I gave par.b1.enabled=false; It did not give any compile errors but during run time cannot access object or method of null reference sandbox error was returned for the statement par.b1.enabled=false. So how do I change the property of a button in one component from other. Please Help me.

    We need more information.
    1) Is this an AIR application?
    2) What is the name of the main app MXML file??
    3) Please boil this down to a minimal yet complete set of code files and post the entire code here for all files.
    I think based on what you mentioned you should be able to boil it down and post just a few lines of code for each file and the answer to your problem should come soon. But with the error you are getting it is too easy to make assumtions that may not reflect your situation.

  • Importing tags from Photoshop Album to Photoshop Elements 5

    I have had Photoshop Album 2.0.2 for several years and it currently holds the information of 13000+ tagged items. I have a detailed tagging system set up which I don't want to lose.  I also have Photoshop Elements 5 and having just discovered that Photoshop Album is now discontinued I wanted to transfer my existing information into Elements.
    I have spent some time trying varies options but cannot find the solution I want.
    If I select a photo from file to import into Elements then the tagging information does not come with it.
    If I export an image from Album to desktop and then import it into Elements no tags come with it.
    If I email a photo from Album to myself then import that image it does come with the tags into Elements.
    Obviously I can't email all 13000 images to myself to import them but can someone suggest how I can transfer this data - obviously the photos themselves don't need to move as both programmes only keep a link to the original location to the photos.
    I'm not interested in using the online storage system but wonder if one solution might be to upload all my phots to that temporarily then reimport them to Elements.
    Additionally is it possible to import my current tag structure  rather than have imported tags all appearing under a 'imported tags' tag.
    Any help grately appreciated.
    Thanks
    Gill

    Thank you so much it worked - the only thing that didn't transfer was the folder pics I'd chosen for the tags so that didn't take long to redo - many thanks - I'd never have found that. It would have been so much more obvious if it showed 'open' or 'select catalogue' rather than just the word 'catalogue' with no other options visible from the dropdown menu.
    Happy Bunny here!

  • A set from a set of sampled data from a thickness sensor.

    A  set from a set of sampled data from a thickness sensor.
    The samples are stored in an appropriate array of up to 100 elements.
    The values represent the depth of the insulation around a particular cable.
    The thickness can vary from 0-4mm represented by a corresponding real value
    stored in the array. as long as the depth is between 1 and 4 mm the cable
    falls within the allowable specification however if it falls below 1mm it is
    deemed to be too thin.
    Design a VI that will identify the number of thin values and display as a
    percentage of total number of samples.
    The front panel  have the must have the following:
    An array of controls holding the sampled values.
    An indicator holding the percentage of thin values.
    Attachments:
    Test Data 1.vi ‏14 KB

    hi there, this is Faddi, I am doing the same assignment as the one you poested earlier!! I know its a very basic one, but i need your help in doin the second task asap PLEASE!! IF you could please...its as follows:
    This is to be designed to work on a set of sampled data from a thickness sensor. The samples are stored in an appropriate array of up to 100 elements. The values represent the depth of the insulation around a particular cable. The thickness can vary from 0- 4 mm represented by a corresponding real value stored in the array. As long as the depth is between 1 and 4 mm the cable falls within the allowable specification however if it falls below 1 mm it is deemed to be too thin.  Specification 1
     To design a VI that will identify the number of thin values and display as a percentage of the total number of samples. The front panel must have the following:           An array of controls holding the sampled values.           An indicator holding the percentage of thin values.  Specification 2
     Thin values tend to appear as sections or patches along the length of the cable i.e. values of less than 1 mm stored in successive array elements. To design a VI that will meet specification 1 and will also calculate the number of these thin patches. The front panel will now have an extra indicator to display the number of patches.  
    Thankyou

  • Mass Removal of component from Maintenance Order Component list

    Hi Gurus,
    I had a long list of material which have been set with deletion flag. With this list, I had remove them from BOM using CS20. Does anyone knows how to remove a component from the maintenance order component list based on that material had set deletion flag in material master & that GI had not been done? Appreciate your help.
    Best regards,
    David Tan

    I guess we dont have std function to do this..
    I will suggest to take help of an abaper & create a code to find material & delete from orders.
    Regards

  • Plan Component from Maintenance Order

    Hi,
    When i plan a component from maintenance order I use item category N with key MATE.
    But i woul plan component for purchase requisition on project stock( account assign Q) directly from Maintenance Order. Allow I insert item category N in the field ad near insert the value 2 for project stock.
    When i release the order the system blank the field and i don't create a Purchase requisition with project stock but i purchase requisition with account assignement F
    Because the system put away the field blank?, I must done another customizing, or i must utilize another KEY?
    Thank you

    Hi,
    When you make Item cat as N it means they are non stock .
    For non stock & with F order as account assignment system creates PR.
    if you want this componenet as Project stock them there are following  ways
    1.Make PR with item cat as Q & make PR on WBS or PS System.
      System will post direct entries.
    2.Make normal stock PR then issue against WBS by order
       Settle the maintenance order to WBS element
    3.Get material as normal stock material issue with 221 mvt against WBS or PS system.
       Systme will make enties to WBS.
    Ramesh

Maybe you are looking for

  • Media Encoder Greater that 7.0 does not recongnise SD footage with correct pixel aspect ratio

    Hello, I logged this bug with Adobe last year but even through the latest releases the bug still remains and is a real issue for anyone editing in SD via Premiere Pro CC. Effectvely when you create a PAL sequence within Premiere Pro CC using SD 720x5

  • Performance Problems by using a subreport with a SAP BW Query

    Hello Experts, we have the following scenario: - Crystal Reports Report (CRR) on top of a SAP BW Query - SAP BW Query contains a member structure with Month, Year, Prior Year and total If I now put some details of a dataset in the main report (e.g. k

  • Messages in the OS logs of Oracle Solaris on SPARC (64-bit)

    One of my Customer is getting following messages in the OS logs of the Oracle Solaris on SPARC (64-bit) machine. Feb 2 01:07:33 ndc-m9k-2-r1 Invalid ioctl opcode = 0x403 Feb 2 03:07:43 ndc-m9k-2-r1 scsi: [ID 243001 kern.warning] WARNING: /pseudo/fcp@

  • Classic showing generic document icons

    Recently had trouble whilst running Quark 4.1 under Classic in OS 10.2.8, kernal panic's meaning needed to shut computer down. since running disk and permissions repair through my start up cd things seem to be better, however now when i look for imag

  • Mail Client & Gmail

    Is anyone else having any issues with the mail client and gmail working together?  I have run into the issue a few times and I have had to reestablish communication between the two.  My situation is that I currently use gmail as my primary email and