How to set default selected checkbox in af:tableSelectMany /
Hi,
I am new to ADF technology, I am using JDev 10..3g.
I want to set the checkbox as default selected for particular rows.
but I don't know how to set default selected checkbox in <af:tableSelectMany />
Is there any way to do this using ADF<af:tableSelectMany />
Thanks,
Mohammed
Hi Jeroen,
Thanks for reply. but the problem is that I am getting data from database and based on some flag I need to select checkbox while page is loading first time.
at that time the table is null as till now it not rendered. and when its rendered it means page is displayed now.
just before display I need to set checkbox as selected.
I don't want to do like this (when user is pressing any command button then only is should update checkbox selection).
Thanks,
Mohammed.
Similar Messages
-
How to set default selection in html:radio
hai
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 selection in tableSelectOne
Hi Friends,
How to set tableSelectOne through backing bean.
I am opening a child window which will populate the list in table format. I am loading it through manually. Now i want to set the first record to be selected. Kindly let me know how to do it.
The below is my code in jspx
<af:table emptyText="#{mofRes['mofEgov.po.noItemsFound']}" rows="5" banding="row"
bandingInterval="1" binding="#{BeneficiaryTableHandler.beneficiaryTable}"
value="#{BeneficiaryTableHandler.beneficiaryTableModel}" var="rowBeneficiary"
id="table2" width="900">
<f:facet name="selection">
<af:tableSelectOne binding="#{BeneficiaryTableHandler.beneficiarySelectOne}"
id="tableSelectOne"/>
</f:facet>
<af:column sortable="false" sortProperty="bankName"
headerText="#{mofRes['mofEgov.supplier.bankName']}"
binding="#{BeneficiaryTableHandler.beneficiaryColumn3}"
id="beneficiaryColumn3" formatType="icon">
<af:outputText value="#{rowBeneficiary.bankName}"
id="beneficiaryOutputText3"
binding="#{backing_apps_po_POBeneficiaryOutput.beneficiaryOutputText3}"/>
</af:column>
<af:column sortable="false" sortProperty="bankActName"
headerText="#{mofRes['mofEgov.supplier.bankActName']}"
binding="#{BeneficiaryTableHandler.beneficiaryColumn1}"
id="beneficiaryColumn1" formatType="icon"
gridVisible="true">
<af:outputText value="#{rowBeneficiary.bankActName}"
id="beneficiaryOutputText1"
binding="#{backing_apps_po_POBeneficiaryOutput.beneficiaryOutputText1}"/>
</af:column>
</af:table>
Below code used in backing bean to create rows in the table
for (int rwIndx = 0; rwIndx < siteLiseSize ; ++rwIndx) {
beneficiaryBean = (BeneficiaryBean)beneficiaryList.get(rwIndx);
handler.createRow(beneficiaryBean);
logger.log(Level.INFO," --- Bank Name --- :"+beneficiaryBean.getBankActName()+": --- Bank Act No -- :"+beneficiaryBean.getBankActNo());
public void createRow(BeneficiaryBean bean) {
//logger.log(Level.FINE," ---- createRow Start --- ");
((Collection)beneficiaryTableModel.getWrappedData()).add(bean);
//logger.log(Level.FINE," ---- createRow End --- ");
Thanks & Regards
VBThis is probably too late to help, but I had a similar situation. There are a couple of ways to solve this.
1. Set the ID values on the af:form, af:table, and af:tableSelectOne tags, and write some javascript code to select the first radio button, in the event there are no radio buttons selected. Something like this would work.
function selectFirstRadio() {
radioButtons = document.myform['mytable:myradios'];
anypressed = false;
for (i = 0; i < radioButtons.length; i++) {
radioButton = radioButtons;
if (anypressed.checked) {
anypressed = true;
if (!anypressed) {
document.myform['mytable:myradios'][0].checked = true;
This would have an af:form with an id='myform', an af:table with an id='mytable', and an af:tableSelectOne with an id='myradios'
The other method I used was, in the accessor for getting the value for the af:table was this:
public DataModel getMyModel() {
RowKeySet selectedItem = myTable.getSelectionState();
if ((selectedItem == null) || (selectedItem.getSize() == 0)) {
Object o = myModel.getWrappedData();
List rows = (List)myModel.getWrappedData();
try {
selectedItem.getKeySet().add( "0" );
} catch (Throwable t) {
t.printStackTrace();
return myModel;
}'myTable' is a binding from an af:table to a UIXTable.
I should add, this is for ADF 10.1.3.x, not ADF 11.
Best of luck.
Edited by: daiken on Mar 27, 2009 7:13 AM -
How to set a selected checkbox in output internal table of oops ALV grid
Hi All,
i have a checkbox as first column in my ALV grid output using oops alv, when i select some checkbox, that rows have to be selected and i need to process only selected rows in user command.
i have given the below code also in fieldcatolg.
f_fldcat-fieldname = 'checkbox'.
f_fldcat-tabname ='gi_output'
f_fldcat-checkbox = 'X'.
f_fldcat-edit = 'X'.
but the checkbox is not getting set in internal table when i select some checkboxes.
can anybody explain y the checkbox in internal table not getting set?
Thanks,
Srilakshmi.Hi,
i tried already whatever u said, but still not resolved.Pasted my code below..can u please look into it.
MODULE pbo OUTPUT.
PERFORM init_container.
PERFORM prepare_field_catalog.
PERFORM prepare_layout.
PERFORM display_output.
ENDMODULE. " PBO OUTPUT
*& Module PAI INPUT
text
MODULE pai INPUT.
DATA: lt_rows TYPE lvc_t_row.
CASE gv_okcode.
WHEN gc_exit OR gc_back OR gc_canc. " Finish program
LEAVE PROGRAM.
when 'PRINT'.
CALL METHOD gv_grid->get_selected_rows
IMPORTING et_index_rows = lt_rows.
CALL METHOD cl_gui_cfw=>flush.
ENDCASE.
ENDMODULE. " PAI INPUT
*& Form INIT_CONTAINER
text
FORM init_container .
CREATE OBJECT gv_custom_container
EXPORTING
container_name = gc_container.
CREATE OBJECT gv_grid
EXPORTING
i_parent = gv_custom_container.
CREATE OBJECT gv_document
EXPORTING
style = 'ALV_GRID'.
*& Form PREPARE_FIELD_CATALOG
text
FORM prepare_field_catalog .
PERFORM fill_catalog USING:
'Table Name' 'Field Name' 'NoZero' 'sel-text'
'GI_OUTPUT' 'CHECKBOX' ' ' text-013 'X',
'GI_OUTPUT' 'KUNNR' 'X' text-003 ' ',
'GI_OUTPUT' 'NAME1' ' ' text-004 ' ',
'GI_OUTPUT' 'BELNR' 'X' text-005 ' ',
'GI_OUTPUT' 'BLART' ' ' text-006 ' ',
'GI_OUTPUT' 'BUDAT' ' ' text-007 ' ',
'GI_OUTPUT' 'BLDAT' ' ' text-008 ' ',
'GI_OUTPUT' 'DMBTR' ' ' text-009 ' ',
'GI_OUTPUT' 'WAERS' ' ' text-010 ' '.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form FILL_CATALOG
text
FORM fill_catalog USING fv_tabname
fv_fldname
fv_nozero
fv_seltxt
fv_checkbox.
DATA f_fldcat TYPE lvc_s_fcat.
f_fldcat-fieldname = fv_fldname.
f_fldcat-tabname = fv_tabname.
f_fldcat-no_zero = fv_nozero.
f_fldcat-coltext = fv_seltxt.
f_fldcat-checkbox = fv_checkbox.
IF fv_checkbox = gc_x.
f_fldcat-edit = gc_x.
ENDIF.
APPEND f_fldcat TO gi_fieldcat.
ENDFORM. " FILL_CATALOG
*& Form PREPARE_LAYOUT
text
FORM prepare_layout .
gs_layout-info_fname = 'COL'.
gs_layout-cwidth_opt = gc_x.
gs_layout-zebra = gc_x.
gs_layout-no_toolbar = gc_x.
gs_layout-no_rowmark = '1'.
gs_layout-sel_mode = 'A'.
ENDFORM. " PREPARE_LAYOUT
*& Form DISPLAY_OUTPUT
text
FORM display_output .
CALL METHOD gv_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_outtab = gi_output
it_fieldcatalog = gi_fieldcat.
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_user_command FOR gv_grid.
CALL METHOD cl_gui_control=>set_focus EXPORTING control = gv_grid.
ENDFORM. " DISPLAY_OUTPUT -
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 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 make default selected "Set to Null" option in Prompt screen?
Hi,
I have created Report using Bex Query. It has around 20 Optional variables.
In the Prompt screen for Optional variables it is showing "Set to Null" Check box.
I want to make this Check box selected by default when we preview. Kindly help me to make this option.
Thanks for your support in advance.
Thanks & Regards,
ShivaHi.
If you mean on how to set default to date between dashboard prompt there is a Default to part in the prompt.
Example - SQL Results:
SELECT min(TIMES.TIME_ID) FROM "Presentation folder"
SELECT max(TIMES.TIME_ID) FROM "Presentation folder"
Or you can add repository variable as default for each date (from and to), etc.
Regards
Goran
http://108obiee.blogspot.com -
How to disable a default selection checkbox in the tableview
Hi All,
How to disable a default selection checkbox in the tableview ???
I have a tableview with a iterator class mentioned on the iterator attribute of the table view. Table is a MULTISELECT tableview . Is it possible to disable or make it invisible a particular row selection check box?.
For my scenario I have Currency values on all the columns and I want to do a sub total overall total for all the price column fields in the last row of that table. I archived this functionality using Iterator class method. But I don't want the user to delete that last row in any case.
Thanks for your help in advance.
Thanks,
GreetsonHi,
You can NOT disable the "Checkbox" of particular row using HTMLB. I had the same requirement. I achieved using <b>2 Tableviews</b>, one after another. 1st tableview will show all the rows and 2nd Tableview(without Table Header) and without any row. The <b>total</b> will be displayed as <b>Column title</b> of 2nd Tableview.
Here is the code of 2nd tableview which we used to display the Total:
<htmlb:tableView id = "tv2"
headerVisible = "false"
keyColumn = "appid"
footerVisible = "false"
selectionMode = "SINGLESELECT"
design = "ALTERNATING"
fillUpEmptyRows = "false"
visibleRowCount = "0"
width = "100%"
table = "<%= tot_header %>" >
<htmlb:tableViewColumns>
<htmlb:tableViewColumn columnName = "empno"
title = "Total"
width = "50"
type = "TEXT" >
</htmlb:tableViewColumn>
<htmlb:tableViewColumn columnName = "ename"
title = " * "
width = "90"
type = "TEXT" >
</htmlb:tableViewColumn>
<htmlb:tableViewColumn columnName = "appamount"
title = " <%= tot_appamt %> "
width = "60" >
</htmlb:tableViewColumn>
<htmlb:tableViewColumn columnName = "ugjr_amt"
width = "60"
title = "<%= tot_ugjr %>" >
</htmlb:tableViewColumn>
<htmlb:tableViewColumn columnName = "apprvd"
width = "50"
title = "*" >
</htmlb:tableViewColumn>
</htmlb:tableViewColumns>
</htmlb:tableView>
Hope this will help you.
<b>Note: Reward each useful post.</b>
Raja T
Message was edited by:
Raja T -
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 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 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.
-
How to set default value to date type attribute.
Hi,
How to set default value to date type attribute.
E.g I want to set u201C01/01/1999u201D to date attributes.
First i want to set value and then i want to fetch the same & want to check equals.
please suggest solution.
Regards,
SmitaHi,
In wdinit() method u can set the date
DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
Date today = Calendar.getInstance().getTime();
String reportDate = df.format(today);
wdContext.currentContextElement().setFromDate(reportDate);
Another way you have set the this formate like that
1. Create a Simple type under "Dictionaries->SimpleType" called DateFormat
2. Select the type as "date"
3. Go to the "Representation" tab and set the format as "dd/MM/yyyy" (or whatever u want, but month should be MM)
4.Bind the context attribute to the type created now.
Hope this helps u.
Best Regards
Vijay K -
How to set default programs???
How to set default programs?
An example: when I click on a .doc it opens in TextEdit, but I want it to open with NeoOffice (to make that happen now requires right-click>open with>NeoOffice)
How can I set NeoOffice as the default program for .doc, .xls, .ppt?
And set default programs for other files?
Thanks.redaple
Select a .doc and go File -> Get Info
In the resulting window you'll see a pane called Open With... Select your preference from the Drop Down. To make the new app default for all these types, click 'Change All...'
Regards
TD -
How to set default currency and Country in R12 financial modules
Hi all,
How to set default currency and Country in R12 financial modules (AR,AP,GL,FA,CE) becuase I found some default settings are shown "USD" & "United States" such as create AR Customer, the Country is shown the default "United States"....
Can anybody advise ?
Thanks & Regards,Hi,
Change the below profile for the user to a territory different than the US :
In System Administrator, navigate to Profiles -> System.
Select Site, Application, and Responsibility.
Profile options:
Default Country
HZ: Reference Territory
ICX: Territory
Regards,
Raju. -
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?
Maybe you are looking for
-
I have a question regarding a trigger written in a forms application. This is of course a PL/SQL routine. This is my code: IF :variable = '237' THEN GOTO t_237; ELSEIF :varible = '238' THEN GOTO t_238; ELSE MESSAGE('Wrong'); END IF; << t_237 >> NULL;
-
Hi friends I need to retrive the file name of the PDF created document , any one knows how to do it. I need also to move the file from the original the folder to another folder , is it possible to write an abap code to do that. Thanks
-
I updated my software, now my email will not update, how do I fix this?
I cannot get emails on my iphone 4 after I updated the software to the latest one. I tried to re-enter my passwords but that did not work, still get no email. HELP
-
Reinstalling Microsoft Office: Mac 2011
Hi everyone, I am not sure if this kind of question has been asekd before but I couldn't find any forum taling about this. I have a 3-users 3-Macs Microsoft office for mac. If I reinstall Lion OS X and reinstall this copy of Microst Office, will that
-
Unable to use touch screen, there is a Not Enough storage warning and it wont go away
I am unable to use the iPad, this morning there was a Not Enougt storage warning, and the iPad got locked, i can push the touch screen buttons but they dont work