How-to set default for selectOneMenu?
With my code as written, the default positionId is "1".
Is it possible to specify a diferent default value? If so, how?
My jsf jsp has the following:
<h:selectOneMenu value="#{editApproverListBB.positionId}" id="positionId">
<f:selectItems value="#{dropdowns.gpaPositionDefSelectItems}"/>
</h:selectOneMenu>
The generated html is (note the generated selected="selected"):
<select id="_id0:positionId" name="_id0:positionId" size="1">
<option value="5">Codes Engineer</option>
<option value="6">Design Director</option>
<option value="8">Design Engineer</option>
<option value="7">Design Manager</option>
<option value="12">Energy</option>
<option value="9">General Manager</option>
<option value="4">Lab Operations Engineer</option>
<option value="15">Materials Lab</option>
<option value="11">Other</option>
<option value="1" selected="selected">PA Director</option>
<option value="3">PA Engineer</option>
<option value="17">PA Engineer - Electrical</option>
<option value="16">PA Engineer - Mechanical</option>
<option value="2">PA Manager</option>
<option value="14">Packaging Lab</option>
<option value="10">Safety Tech Team</option>
<option value="13">Sound Lab</option>
</select>
The SelectItems vector is added to with:
vector.add(new javax.faces.model.SelectItem(id, desc));
The id and desc are predefined values from a database code table (order by desc).
Regards,
Al Malin
Set it in the valuebinding of the positionId.
Basic example:
public Integer getPositionId() {
if (positionId == null) {
positionId = new Integer("10"); // specify default value here.
return positionId;
}
Similar Messages
-
Process open items: how to set defaults for the additional selections
Hi FI experts,
Can anyone tell me if it is possible to set defaults for the additional selections in the processing of open items.
I am using transaction F-04 (or F-06 or F-07) to post with clearing.
When processing the open items I can use additional selection parameters. In my case I need to use the document type. I would like to save this selection as a default but this doesn't seem to be possible.
1. it is not possible to save a variant for the processing of open items
2. I can not create a variant transaction (with trx. SHD0) for F-0x since this is only possible for dialog transactions
Do you see another way to store defaults for the additional selections in open item processing?
Thanks a lot.
DimitriHi,
When you create a transaction variant from FB05, then also you will not able to default the value for additional selections variable. Hence SHD0 is not going to help.
As said above, either you can change the additional selection screen parameters, but here again you can't default the value. You can only reduce the number of entries on the screen.
Else you can create a custom transaction code by copying the standard. Even SAP recommends to create custom codes from standard tcode for clearing purposes depending on requirements.
Please check this link:
http://help.sap.com/saphelp_erp60_sp/helpdata/EN/41/37b8e7455b11d182b40000e829fbfe/frameset.htm
In the above link, in navigation choose clearing -- Specifications for processing open items
If it is a custom transaction then you can default document number.
Regards,
Ravi -
How to set default for ddlb in pcui?
Hi guys,
I wrote some coding in FILL_DROPDOWN_LISTBOX method, and right now I want to set default value for my ddlb field. Anyone have experience for this?Hi Shen,
Create first domain for your DDLB field and when you assign this filed in field grp structure select the checkbox for " Domain values". So that you can see the default values in PCUI screen when launching the page.
Ex field name - suffix ( Create domain for this field and assign values like Mr.Mrs)
Field type - Dropdownlist box
check box - Domain Vals
Regards
Raju. -
How to set default for "Horizontal / Vertical Alignment"?
Hi,
is there somewhere a setting to change the default of the "Horizontal / Vertical Alignment" property for an item label? I don't like the "Right" alignment and I have to change it each time when I create a new item.
Thanks
Patrick
http://inside-apex.blogspot.comYes, this is one of (many) cases where a Bulk edit feature in the Builder would be very useful. There have been some discussions about this and hopefully the APEX team is considering these for the next release.
Having said that, I frequently find myself taking a full app export and editing the SQL file in my favorite text editor (Vim) and making these little changes.
This is NOT to be done lightly, see the caveats and disclaimers at Re: htmldb application Disabled(on updation of FLOWS_020000.WWV_FLOW_STEP_I
As always, take a backup of the file before modifying it and save it so you can revert back to it if something goes wrong. -
How to set default values for boolean columns
I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
I've tried to set default value at column level:
<Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
<Default>TRUE</Default>
</Field>
and at content type level:
<FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
But in any case, when i create a new item with this content type, default value is applied.
Can anyone tell how to set default values for boolean columns?
Thanks in advance,
Regards,
SergioIn the field definition you can set
<Default>1</Default>
or
<Default>0</Default>
How to set the default value Null? -
How to set default User preferences in Analyzer for all users
How to set default User preferences in Analyzer for all users<BR><BR>Hi,<BR><BR>I would like to set some settings in Analyzer as default for all users. For example:<BR>1. Display | Char<BR>2. right mouse click on char | Chart Properties<BR>3. Axes tab<BR>4. "Format: Currency" i would like to change to "Format: Number".<BR><BR>How to set default values to all users? Is this possible?<BR><BR>Thanks,<BR>Grofaty
I'm pretty sure higher access superceedes, so you could set up a group with no actual access, just to get the preferences working, then their individual security will dictate what they can do. I haven't tested this fully, but I beleive this is how it will work.<BR>As far as setting the preferences, go into the admin console and right click on the group, then select Preferences. To apply the group preferences to a user, add the user to the group, then right click on the user, select preferences and from the upper left corner, use the drop down to select the active preference, in this case, it will be the group you created and added them to.<BR><BR>HTH
-
How to set default values in initialization event for select option
Abapers,
I have 3 GL account like 0024831231,0024831238,0024831245.
Please help me how to set default values in select-options ( s_hkont ) in INTIALIZATION event
ThanksSelect option is table <Structure> with fields, low, high, sign & option
you need to append the value into the select option, with appropriate value in low or
example:
S_HKONT-low = <value>
S_HKONT-SIGN = 'I'
S_hkont-OPTION = 'EQ'
append s_hkont.
Default value for select-option also can be added directly in select-option statement.
Regards,
Mahesh -
How to set default time for appointment
When I had snow leopard, the default time for length of an appointment was one hour. I upgraded to Lion and now the default time is many hours. Can't seem to find the area to change the default. Keith
Hello User,
Check this:-
Sasi Nagireddy: How to Set Default Time Zone for all Users in OBIEE?
Thanks,
Sasi Nagireddy.. -
How to set default view for preview?
Every time I open a PDF using Preview I have to set the view to 'thumbnails', then 'two pages up', then adjust the zoom. Complete waste of time.
Anyone know how to set defaults so that it opens in a predictable way?
thanks,I customized my Toolbar to look like the following. Click the middle button that has the 1 circled. That tells Preview to remember to display pages at actual size (100%). Every file that I open now displays at 100%.
-
How to set default reject reason in VA01 (create sales order)
Hi
Everybody can tell me how to set default reject reason for item in sales order.
in our sap system there are a default reject reason as '90'. We want to set it as "Null".
Thanks
HenryHi,
Assigning a default Reason for Rejection is not in standard SAP. I am sure there is some enhancement/user exit which updates the reason for rejection.
Please get the help of an ABAPer, create the sales order in debugging mode and he will find out the logic behind the automatic reason for rejection.
Before that you can find the exits in the include MV45AFZZ for any code related to this.
Hope this helps -
In Transaction code va41 how to set default sales contract start date
Hi ,
In Transaction code " VA41 " how to set default sales contract start date and end date.
Can any one tell me the correct user exit for the same.
Thanks
Basuhi,
u have to use user exits or badis.
use sutable exits mentioned below.
SDTRM001 Reschedule schedule lines without a new ATP check
SDVFX006 User exit: Tax line (transfer to accounting)
V45A0001 Determine alternative materials for product selection
V45A0002 Predefine sold-to party in sales document
V45A0003 Collector for customer function modulpool MV45A
V45A0004 Copy packing proposal
V45E0001 Update the purchase order from the sales order
V45E0002 Data transfer in procurement elements (PRreq., assembly)
V45L0001 SD component supplier processing (customer enhancements)
V45P0001 SD customer function for cross-company code sales
V45S0001 Update sales document from configuration
V45S0003 MRP-relevance for incomplete configuration
V45S0004 Effectivity type in sales order
V45W0001 SD Service Management: Forward Contract Data to Item
V46H0001 SD Customer functions for resource-related billing
V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
Edited by: katigiri linganna on Apr 28, 2009 12:19 PM -
How to set default values in dialog programming
hi gurus
can anyone suggest me
how to set default values in dialog programming
thanks®ards
kals.it's a bit dirty but I usually just place it in the PBO with a flag for control. It's simple and not too costly i think.
MODULE preRender OUTPUT.
DATA first_time TYPE flag VALUE 'X'.
IF first_time EQ 'X'.
* put your initialization code here
CLEAR first_time.
ENDIF.
ENDMODULE.
-MiR -
How to set default print orientation in oracle reports 6i?
Can anyone please help how to set default print orientation of Oracle Reports 6i? Currently document is printed in Portrait orientation, but I need to print it in Landscape orientation. Is this possible?
It is solved now. Go to Layout Model -> Main Section, Press F4. In the property pallet select the Orientation that is required to be selected when print is taken for that report.
-
Plsss help me: how to set default values in html:file and html:radio
Hai,
To set default value to text box i use the following code. It works well.
<html:text property="modifyserverdesc" value="<%= serverDesc%>" styleClass="text" size="38"/>But for file i use the code
<html:file styleClass="file" property="modifyserverimgfile" value="<%= serverImage%>" size="40"/>It doesn't display value. What is problem here?
how to set default selection in <html:radio>.No it won't help.
You can't set a value into an <input type="file"> control at all. The user has to put values in themselves.
The reason behind this is security. If the programmer could put any value they liked in there, you could upload any file at all from a users computer without their intervention. eg C:\windows\system32\passwords.txt
Bottom line: you can't put a default value into the input type="file" control.
And a good thing too ;-) -
How to set default values on the screen painter parameters?
Hello ABAP Gurus,
I would just want to ask how to set default values on the screen painter parameters.
Thank you for your replies.Hi,
To set default values for screen painter parameters initialize the field names with default values in the PBO module....
say u have the field name as f_field1....
in the PBO of that screen initialize it....
f_field1 = '100' "here 100 is the default value.
<b>reward points if useful.</b>
regards,
Vinod Samuel.
Maybe you are looking for
-
IPad 2, restore & setup as new, then restore from backup?
Confused yet? I am! So here we go, yes, I'm new to the forum, I've had my iPad 2 since Oct. 2011. And No, this problem isn't in my head. Last week, I finally updated to iOS 5.1.1, and I deeply regret doing so. I had NO issue before the update, and no
-
Multiple IP adress on one mac address?
Hi!! I have a WLC 2504 and AP 1602. Is it possible to give the client multiple ip addresses with one mac address. If yes, how it's made on WLC or AP?
-
How to disable the annoying security warning for all users in Windows Server 2008 R2
Hi, The employees from the administration complain all the time about the different types of security warning that they get when trying to run some applications which are used frequently. Since the number of the users is too big it is unfeasible to g
-
trying to update the software into my Ipdad 2 the screen froze and asked me to restore it but unable to restore due to a (-1) error I need help
-
Help! My premiere elements 11 freezes when I go to edit a design every time.
I recently got a new laptop with windows 8. I installed photoshop elements 6 on it. It was freezing up so I went ahead and upgraded to 11. Same thing I go to load a design and it just freezes. I end up having to shut it down and load everything back