Selected Attribute in f:selectitem is missing ?

Hello,
In EA4, it was possible to write..
<h:selectitem .... selected="true" />However, in the beta release, there is no "selected" attribute in <f:selectitem>.
How do we specify the initial selected item in case of <f:selectitem> ?
Ajay

Fair enough !
But, I would like to specify something like the following in the JSP..
<h:selectone_radio id="searchType" value="#{CustomerSearch.searchType}">
  <h:selectitem item itemValue="01" itemLabel="Phone Number" />
  <h:selectitem item itemValue="02" itemLabel="Customer ID" />
  <h:selectitem item itemValue="03" itemLabel="Customer Name" />
</h:selectone_radio>Ofcourse, I can set the default value of the property searchType in faces-config.xml
or in the CustomerSearch bean constructor.
But, I think the page author should be able to specify the default value for any
selection item.
Ajay

Similar Messages

  • Subquery in select attributes

    I don't think this is possible, I've exhausted every option I can think of to output this sql in toplink. I've searched the web and this forum but found no info about it. If it's not possible please let me know and I will move on to something else.
    This is a simplified example of what I want to do in toplink:
    select r.name, (select count(*) from items i where i.request_id = r.request_id), r.comments from requests r where r.requestor like '%FRED%' ... etc
    I can get the subquery in the where clause fine, but I can't work out how to put it in the select part of the statement.
    Thanks for your help!

    Oh lookie at me, I'm replying to myself. Again.
    If you want a subquery in the select attributes then gosh darn it use a function. Create an oracle function that does the subquery and add it as an attribute with:
    query.addFunctionItem("numRequests", request.get("id"), "request_counter")

  • I am unable to see the images in Aperture trash, though there are a number indicated in the trash.  I have "show all" selected.  What settings am I missing?

    I am unable to see the images in Aperture trash, though there are a number indicated in the trash.  I have "show all" selected.  What settings am I missing?

    You may have an invisible filter on your trash.
    Try the "Double Caggiano", as described in Frank Caggiano's User tip:
    Images not appearing in browser, search filter is cleared
    Regards
    Léonie

  • Problem using 'selected' attribute of dropDown component

    Valid Assumptions:
    1. Developer is not a novice
    2. Problem has been verified by third party
    3. Using Netbean 5.5 plus Visual Web Pack 5.5
    Problem:
    The 'selected' attribute of the webuijsf:dropDown throws 'Component Error'
    <webuijsf:dropDown... selected="#{address$CreateUI.addressFormBean.accessLevel}" />where:
    a. 'selected' is the object that represents the selection made from the available options
    b. 'accessLevel' is java.lang.String with get/setter methods
    ERROR:
    javax.el.ELException: javax.faces.el.PropertyNotFoundException: javax.el.PropertyNotFoundException: Target Unreachable, 'addressFormBean' returned null
         at javax.faces.component.ValueExpressionValueBindingAdapter.getType(ValueExpressionValueBindingAdapter.java:129)
         at com.sun.webui.jsf.util.ValueTypeEvaluator.evaluateValueBinding(ValueTypeEvaluator.java:138)
         at com.sun.webui.jsf.util.ValueTypeEvaluator.evaluateValueType(ValueTypeEvaluator.java:111)
         at com.sun.webui.jsf.util.ValueTypeEvaluator.getValueType(ValueTypeEvaluator.java:90)
         at com.sun.webui.jsf.util.ValueTypeEvaluator.getValueType(ValueTypeEvaluator.java:67)
         at com.sun.webui.jsf.component.ListSelector.processSelections(ListSelector.java:278)
         at com.sun.webui.jsf.component.ListSelector.getListItems(ListSelector.java:122)
         at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderList(ListRendererBase.java:376)
         at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderListComponent(ListRendererBase.java:168)
         at com.sun.webui.jsf.renderkit.html.DropDownRenderer.encodeEnd(DropDownRenderer.java:78)
         at com.sun.webui.jsf.renderkit.html.AbstractDesignTimeRenderer.encodeEnd(AbstractDesignTimeRenderer.java:40)
         at com.sun.webui.jsf.renderkit.html.SelectorDesignTimeRenderer.encodeEnd(SelectorDesignTimeRenderer.java:131)
         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:848)
         :Thanks in advance.

    What object type for dropdown's items? selected property's type has to match dropdown's value.

  • ECMA 2.0 Select Attributes

    I am following the ECMA 2.0 example below:
    http://msdn.microsoft.com/en-us/library/windows/desktop/hh859566(v=vs.100).aspx
    I got the DB created like this:
    However, when I try to create the MA, I do not see anything under the "Select Attributes":
    Has anyone else experienced the same problem?
    Thanks,
    John

    What does your GetSchema function look like? 
            public Schema GetSchema(KeyedCollection<string, ConfigParameter> configParameters)
                Microsoft.MetadirectoryServices.SchemaType personType = Microsoft.MetadirectoryServices.SchemaType.Create("Person", false);
                myServer = configParameters["Server"].Value;
                myDB = configParameters["Database"].Value;
                myTable = configParameters["Table"].Value;
                DataSet myData = this.SQLSchema(myServer, myDB, myTable);
                string[] SQLSchema = new string[myData.Tables["Columns"].Rows.Count];
                for (int i = 0; i <= myData.Tables["Columns"].Rows.Count - 1; i++)
                    SQLSchema[i] = myData.Tables["Columns"].Rows[i].ItemArray.GetValue(0).ToString().Trim();
                    string myattrib = SQLSchema[i];
                    if (myattrib == "EmployeeID")
                        personType.Attributes.Add(SchemaAttribute.CreateAnchorAttribute(myattrib, AttributeType.String));
                    else
                        personType.Attributes.Add(SchemaAttribute.CreateSingleValuedAttribute(myattrib, AttributeType.String));
                Schema schema = Schema.Create();
                schema.Types.Add(personType);
                return schema;
            public DataSet SQLSchema(string server, string database, string table)
                myConnection = ("Server = '" + server + "';Initial Catalog='" + database + "';Integrated Security=True");
                conn = new SqlConnection(myConnection);
                cmd = new SqlCommand();
                cmd.CommandType = CommandType.Text;
                string cmdText = "Select COLUMN_NAME from Information_Schema.Columns where TABLE_Name = '" + table + "'";
                cmd.CommandText = cmdText;
                cmd.Connection = conn;
                adapter = new SqlDataAdapter(cmd);
                da = new DataSet();
                adapter.Fill(da, "Columns");
                return da;

  • How to access Selection Attribute Filter Key on a TG through CRMD_MKTTG* ??

    Hello,
    We need to apply all the attributes filters on a TG (for instance city filter) for searching an address  that comply with the filters.
    To create a segment at CRMD_MKTSEG transaction for using it later in a campaign, it could be done by 3 ways:
    1. Create a simple profile
    2. Create a target group: create a profile and build the targe group
    3. Create a profile set: create a profile and build for profile set
    When creating first the profile, it is possible to apply attributes filters. This atributes filters are stored in BD tables of marketing. We are able to find the filters for the first and third case, but not for second case.
    I proceed to explain the first and third case:
    CRMD_MKTTG_TG_H: CRM Marketing: Target Group Header Data
         GUID: CRM Marketing: GUID of Target Group (this data I know beforehand)
         SET_H_GUID: CRM Marketing: GUID Profile Set
         SET_GUID: CRM Marketing: GUID Profile Set
         PROF_GUID: CRM Marketing: GUID of a Profile
    For the first case directly we do a select on CRMD_MKTTG_PF_S where  PF_GUID = CRMD_MKTTG_TG_H-PROF_GUID:
    CRMD_MKTTG_PF_S: CRM Marketing: Selection Criterion of a Profile
         GUID:CRM Marketing: GUID for a Target Group Selection Criterion
         PF_GUID: CRM Marketing: GUID of a Profile
    For the third case we do select on CRMD_MKTTG_PF_H where SET_GUID = CRMD_MKTTG_TG_H-SET_H_GUID and we retive GUID:
    CRMD_MKTTG_PF_H: CRM Marketing: Profile
    GUID: CRM Marketing: GUID of a Profile
    SET_GUID     :CRM Marketing: GUID Profile Set
    Then  we do select select on CRMD_MKTTG_PF_S where  PF_GUID = CRMD_MKTTG_PF_H-GUID.
    And we can obtain the filters through:
    .INCLUDE     CRMT_MKTTG_PF_S_RANGE:CRM Marketing: Selection Range
    SEL_SIGN: CRM Marketing: Component SIGN for Selection Criterion
    SEL_OPTION: CRM Marketing: Component "OPTION" for Selection Criterion
    SEL_LOW     : CRM Marketing: Component "LOW" for Selection Criterion
    SEL_HIGH     :CRM Marketing: Component "HIGH" for Selection Criterion
    But what about the second case that correspond to CRMD_MKTTG_TG_H-SET_GUID?
    Could somebody explain how to access the filters when the second case happen? ¿What relationship MKT tables is based on?
    I would appreciate any suggestion.
    Best regards,
    Rosa
    Edited by: Carlos de Cozar on Feb 15, 2008 12:13 PM
    Edited by: Rosa on Feb 20, 2008 9:42 AM

    Can you please let me know how I can find out the duplicate record.
    you need to split the records from flat file structure into your internal table ans use a delete ADJACENT duplicates comparing fields
    split flat_str into wa_f1 wa_f2 wa_f2 at tab_space.

  • Feature request: remember selected attribute in wizard

    Hi,
    I often find myself doing this:
    - In the entity object wizard, select the 'attributes' tab
    - Click on an attribute
    - Select the 'Attribute settings' tab
    First feature request: It would be nice if the attribute settings tab would now show the properties of the attribute I last selected on the other tab, instead of the first attribute.
    Second feature request: It would be nice if you could open the attribute settings of an attribute directly from the attributes tab. (perhaps via a right-click -> properties contextmenu).
    Greetings,
    Ivo

    Filed bug#2564815 to track request number 1.
    If we implement that, then I don't think you'll also need request #2. It will be just one click away
    by changing the panel.

  • Getting rid of "value" attribute in f:selectItems?

    Hello,
    There is a simple problem I am facing at work that is actually hurting us significantly... we have a JSF 1.1 (yes, it's very old!) situation where we need to present a page that has a very long dropdown list, more than 5000 options in it. The problem is that the options are very long, and the entire page ends up being over 600Kb in the browser, and worse than that the application server gobbles up massive amounts of RAM just to generate the page.
    One optimization we want to do is to take advantage of the following fact: all of the options have values that match the labels. In other words, our options look like this:
    <option value="longString1">longString1</option>
    <option value="longString2">longString2</option>
    <option value="longString3">longString3</option>
    We'd like to reduce the page by 50% with a simple optimization: suppress the value attributes like the following:
    <option>longString1</option>
    <option>longString2</option>
    <option>longString3</option>
    We are generating these options in an ArrayList of SelectItems, and using an f:selectItems to generate the HTML... but we have NOT figured out how to suppress the value attributes. Try as we might, we are unable to remove them... Is there any way to get:
    <f:selectItems ...>
    to just display the labels???
    Or is there another approach we should use??
    Thanks in advance.

    Hi,
    Can't help specifically with JSF 1.1 I'm afraid, but in 2.0 you need to supply a custom renderer to achieve this. The default MenuRenderer will always write out the value attribute, as per the following code:
    // com.sun.faces.renderkit.html_basic.MenuRenderer
    protected boolean renderOption(...) {
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement("option", component);
      writer.writeAttribute("value", valueString, "value");
      writer.write(curItem.getLabel());
      writer.endElement("option");
    }I achieved an option list with no value attributes by extending this class, overriding the renderOption method, commenting out the writeAttribute line, and setting that as the default renderer for the SelectOneMenu. Like I said, this was JSF 2, but maybe a similar approach would work for JSF 1.1?
    On a completely different approach, how often do the values in the list change? If they are infrequent, then maybe you could use something like the following:
    - dynamically create a javascript file that holds the data, plus a method to build an option list from this data
    - include a reference to this javascript file in the page header
    - create a custom tag in the page which uses the javascript to build the option tags
    The advantage of this is that you can let the browser cache the big javascript file with all the options in it, and only include a link to it and a call to the javascript function in the page data. If required, you can add a sequence number to the javascript link to force the browser to reload it when the data changes.
    Obviously, you still get the hit the first time you load the list (although the data here is much more concise, as you don't need to send the XML tags at this point and also you only need to send each value once), and it's not as useful if your data changes frequently. Also dumps some processing on the client side, but that sounds like it would be a good thing in your case!
    I've used this approach in other situations where I had to repeatedly push a lot of static data to the client. Never actually used it from JSF, but the principle is still valid. Let me know if you think it would be useful; sure I've still got the old javascript lying around somewhere
    Cheers,
    Barney
    @EJP / qimbal2: The OP asked a pretty specific question: "how to render a dropdown list without the value attribute", which is a perfectly valid question. Yes, we can all see that 5,000 items in a drop down list is not ideal, and I understand that anyone answering questions like these is generally doing so on their own time, but just stating that the design sucks isn't really helping.

  • Change image according to selected attribute

    Hi ,
    I know there is lot of forum post around.
    I still haven't managed to get that sorted.
    I have created a product - I have set it up and it show nice big pciture.
    In attributes, I have created colors : 4 images of the same product ( diffrent color ofc )
    In Site Mangeer - Module templates - Shop - Individual Product -Large
    I have included
                   {tag_attributes}
    Which works fine ofc - So on my page i see  the product - dropdown box for the colors.
    next from the this page ; http://helpx.adobe.com/business-catalyst/partner/product-inventory.html#id_12613
    I use the code on the bottom of the page :
    <script>
    $(function(){
            var product = {tag_product_json};
            var attributes = {tag_attributes_json};
            var divId = "#catProdTd_"+product.productId;
            $(divId).find("select").change(function (){
                      var selected = $(this).val();
                      var option = attributes.options[selected];
                      if(option && option.image)
                         $(divId).find("img").attr("src", option.image);
    </script>
    I have inserted that in the same page as i inserted the tag_attributes
    I'm not really sure what im doing wrong.
    I thought it could be the, name of the images, or the code should be on top of the page/bottom.
    Any suggestions?

    I am interested in doing this as well. Did anyone have any suggestions?
    Josh

  • Selecting attributes in a cube

    I have two cubes which both have the info object 0SHIP_TO.
    When building a query using one of the two cubes I can select several attributes that belong to 0SHIP_TO.  They appear under the same dimension table as 0SHIP_TO.  NOTE: The attributes do not appear UNDERNEATH 0SHIP_TO but appear selectable at the same exact level as 0SHIP_TO.  In other words I don't have to first click 0SHIP_TO in order to see all the various attributes.  I think it treats them like this because the are navigation attributes.
    Now, when I attempt to query from the second cube I can not see ANY attributes of 0SHIP_TO.
    What triggers the attributes of info object 0SHIP_TO to be seen in one cube and not the other??
    CLUE: If I use RSA1 and go directly into the first cube I can select all of the attributes of 0SHIP_TO.  Somehow in the technical name it appends 0SHIP_TO such as;
    0SHIP_TO____ZBROKER
    0SHIP_TO____ZRSM
    0SHIP_TO____0COUNT
    etc....
    Thanks for your help.
    -Patrick

    Hi Patrick,
    Even though you have them as nav attr of SHIP_TO, you need to turn on the nav attr flag in the cube definition too. On the Char tab in Cube > Edit, you will see a button called Nav. Attributes. Click this and check the attributes that you want to see in the query designer. Save and actiavte the cube. Then re log in into BEx and you should be able to see them.
    Hope this helps...

  • Subquery as Select Attribute

    How would I do the following query using Toplink expressions:
    select a.something, ( select min(b.column) from b where b.fk = a.pk)
    from a
    where ...
    I have figured out how to do:
    select a.something
    from a
    where whatever = ( select min(b.column) ... )
    but when I try to add the subquery as an attribute instead of as part of the where clause, I get the following error:
    "The expression has not been initialized correctly. Only a single ExpressionBuilder should be used for a query.
    For parallel expressions, the query class must be provided to the ExpressionBuilder constructor, and the query's ExpressionBuilder must
    always be on the left side of the expression."
    Thanks.

    Group by clauses are for usage with aggregate functions. Since you don't have an aggregate function in your outer query, you don't need a group by clause in your outer query. Although you do have aggregate functions (count) in your sub-queries, since they are only on one column, you don't need a group by there either. Please see the corrected query below.
    SELECT DISTINCT pro.proj_name,
           a.doc_name,
           b.description,
           substr (b.CATEGORY,6) Doc_Type,
           TO_DATE (SUBSTR (a.delidate, 1, 7), 'YYYY-MM') open_date,
           a.status,
           (select COUNT(item_id) as cnt_maj
            from   day_cmcs_comment
            where  status IN ('CL', 'OP')
            AND    classification IN ('MA', 'NF')) cnt_major,
           (select COUNT(item_id) as cnt_mnr
            from   day_cmcs_comment
            where  status IN ('CL', 'OP')
            AND    classification IN ('ED', 'NC')) cnt_minor
    FROM   day_cmcs_comment a,
           day_cmcs_main b,
           gen_proj_catg gen,
           proj_cmcs_proj_mapping pro
    WHERE  pro.doc_name = a.doc_name
    AND    pro.proj_id = gen.other_id
    AND    a.doc_name(+) = b.name
    AND    pro.edition = b.edition
    ORDER  BY pro.proj_name

  • How to display selected attributes

    In BC4J +UIXML ,Using <setRegion> We can display automaticly all of the attributes of a ViewObject.But how to select some of them to display?
    not:
    <bc4j:region automatic="true">
    <!-- the stamp for each attribute -->
    <bc4j:attrStamp>
    <bc4j:messageInput readOnly="true"/>
    </bc4j:attrStamp>
    </bc4j:region>
    PacsDemonstrationId 43548
    PacsDemonstrationCode INN I
    PacsDemonstrationName Innere 1
    I dont need the first Pacs...Id here. how can I do it?
    Thanks
    Yong GE Germany

    2 ways:
    - replace the b4cj region and attrstamp stuff by single messageInput tags for each desired attribute.
    - define the viewobject in the bc4j application module with only the attributes necessary.
    i would recommend the latter because this is usually part of the business logic.
    trevi

  • How to set No Selection Attribute in List of Values?

    Hi Everyone,
    I'm developing an ADF form which has a List of Value(LOV) as a requirement.
    I've got it working based on a View Object. However, I'm trying to set the No Selection option in the LOV and it doesnt seem to work. I've set it to the "Labelled Item - First of List" - <Please select a reason>. That doesnt seem to do the trick.
    Is there another attribute I need to set?
    I'm using JDev 11g.
    Many thanks.
    PP.

    if you are using the af:selectonechoice then use it like
    unselectedLabel="Please Select"but its better to debug why you are not getting this done from the VO.. can u give more information on this to solve it in the model itself..
    did u check if the VO is updated properly with the changes???

  • Video type selection for QT Pro export is missing/blank?

    Sometime in the last week, my QT Pro export options for videos on my desktop PC have gone blank. The Export option from the File menu still works, but it leads to a screen where a file name can be entered, but 'Export:' and 'Use:' labels have no fields next to them (e.g. no pull-down menus to select video export type, etc.), just blank space.
    I upgraded to the latest QT version, and even uninstalled/reinstalled/reregistered QT Pro (7.4.5), but those fields are still blank (and they are there on my laptop PC, so I 'know' they are missing). I tried short AVIs from my digicam, and a variety of other MOVs and AVIs (all of which will play), but same result with all.
    Any ideas?
    rj

    Bump ...
    rj

  • Selecting certain iWeb templates results in missing index.xml file error

    some, not all my templates (which are all the default ones that come with iWeb) do not work. Of course, the one I need right now is one of the defunct templates!
    When I launch iWeb, I get the "Choose a template for your webpage" and the list of available templates.
    When I select either "White" or "Black" I get an error message that indicates I'm missing the index.xml file and the only option is "close", which results in an unusable iWeb that I have to re-launch.
    What happened to the index.xml file? What do I have to do to get it back? I've updated to the latest release but that did not solve the problem.
    Is there an index.xml file somewhere else that I can just copy into the right folder and move on?

    What follows is a LOG that I took as I dealt with the above problem noted in this post. I apologize for the *CAPS LOCK SYNDROME* and the *AKWARD NATURE OF MY PROCESS* but *IT WORKED!!!*
    *IWEB REDESIGN PROBLEM (April 13, 2008)*
    1. OPEN DOMAIN FILE AND RENAMED 'index-new.xml' to 'index.xml'
    2. STILL NO CHANGE AND CANNOT OPEN IWEB FILE!
    3. AFTER SOME TIME IT OPENED THE FILE BUT COULDN'T FIND ALL MEDIA FILES (LINK SEEMED BROKEN)
    4. COPIED BOTH DOMAIN AND DOMAIN.SITES FILE TO EXTERNAL HD.
    5. TRASHED REMAINING DOMAIN FILES FROM APPLICATION SUPPORT/ IWEB FOLDER.
    6. TRANSFERED ORIGINAL DOMAIN FILE (SAVED) FROM EXTERNAL HD TO INTERNAL HD IWEB FOLDER.
    7. DELETED PLIST FILE FROM PREFERENCES.
    8. OPENED IWEB APPLICATION WHICH CREATED NEW DOMAIN FILE (of course).
    9. TRASHED NEW DOMAIN FILE.
    10. TRIED TO OPEN ORIGINAL DOMAIN FILE WHICH I RENAMED AS 'Domain (redesign 2008)' BUT IT WOULDN'T! STARTING FROM NEW DOMAIN FILE INSTEAD!
    11. TRIED TO RENAME THE ORIGINAL FILE BACK TO JUST 'DOMAIN' AND WALLAH AFTER MUCH TRIAL AND ERROR ORIGINAL FILE IS BACK EXACTLY AS I LEFT IT BEFORE UPLOADING TO .MAC ACCOUNT LAST NIGHT.
    THOUGHTS:
    Something definitely happened to the original domain file when it was being uploaded to .mac account and the renaming of the index.xml file to index-new.xml plus the inclusion of another 'Domain.sites' file in my iWeb folder where originally there was only one 'Domain' file caused the confusion and resulting panic that followed! AAAAAAAAAAAAAAAAAH!
    The crazy thing is that this will probably happen again as I make more changes (redesign) and upload them to the mac server. If someone has a *REAL FIX* to prevent this CHANGE from happening - *PLEASE POST THIS HERE!*
    Good luck to all who read this and remember: 'When there is a will, there is a way!'

Maybe you are looking for