Disable column's header
I have a custom header renderer for one of datagrid columns. I want when I click on it to disable the header.
Here is my code:
package
modulecode{
import flash.events.Event;
import flash.system.*;
import mx.containers.VBox;
import mx.controls.Image;
import mx.controls.listClasses.BaseListData;
import mx.events.DynamicEvent;[
Event(name="addEvent", type="mx.events.DynamicEvent")]
public class newSalesAccountHeaderGrid extends VBox{
private var _listData:BaseListData;
public function newSalesAccountHeaderGrid(){
super();}
override protected function createChildren() : void{
if (deleteIcon == null){
var deleteIcon:Image = new Image();deleteIcon.buttonMode =
true;deleteIcon.useHandCursor =
true;deleteIcon.toolTip =
"Add Account";deleteIcon.addEventListener(
"click", onAddAccountClick);Security.allowDomain (
"*");deleteIcon.source =
"D:/projects/sfcs/assets/plus.gif";addChild(deleteIcon);
validateNow();
protected function onAddAccountClick(event:Event):void{
enabled =
false;
var dynEvent:DynamicEvent = new DynamicEvent("addEvent", true);dynEvent.data = data;
dispatchEvent(dynEvent);
The header will become disable, but because of the code that runs in addEvent it wil get enabled right away.
accounts.addEventListener(
"addEvent", onAddAccountEvent, false, 0, true);
private
function onAddAccountEvent(event:DynamicEvent):void{
var newAccount:XML = XML(accounts.dataProvider[0]).copy();newAccount.ccompany =
"";newAccount.ccustno =
accounts.dataProvider.addItemAt(newAccount, accounts.dataProvider.length); // this will cause the header become enabled.
accounts.scrollToIndex(accounts.dataProvider.length - 1);
accounts.selectedIndex = accounts.dataProvider.length - 1;
accounts.editedItemPosition = {columnIndex:0, rowIndex:accounts.selectedIndex};
Any idea why it works that way?
Thanks
Hi There,
Im not sure what you are asking for, but if you want
to populate a dropdown from data from database, this
will help
http://www.netbeans.org/kb/55/dropdowncomp.html
Thanks
KNo, I know how to bind the dropdown directly to a Database this is simply.
The steps of my idea:
1. drag and drop a table.
2. Bind to a database table.
3.drag and drop a dropdownlist.
4. Obtain only the visible fields in the table (When I bind the data to table, I can select with table layout option the database fields to display.).
The idea is search by column in the table. The user selects in the dropdown the column and then search a word.
The 4 step is difficult for me.
Thank's
Similar Messages
-
Enable/Disable Column in a Advanced Bean Table
Hi,
I have 2 columns that needs to be enabled/disabled on a standard oa page PO Lines summary page.
I went through couple of blogs/forums and found 2 approaches :-
Approach 1
1) Extended the standard VO POLinesMerge.
2) Added a attribute column DeriveDisplayFlag of type VARCHAR2 . This call a database function and will return Y or N
3) Added a attribute of type ShowAdditionalColumn boolean. the get method of this attribute returns TRUE if DeriveDisplayFlag is 'Y' otherwise returns FALSE.
4) created a substitution for the custom VO
5) uploaded the substitution to mds.
6) copied the xml/class files to $JAVA_TOP/..
7) Bounced entire middle tier
8) using personalization, entered a SPEL command on the rendered property. I know rendered will hide/show the column but for time being I just want this to work.
But this fails :-
oracle.apps.fnd.framework.OAException: Message not found. Application: FND, Message Name: FND_VIEWOBJECT_NOT_FOUND. Tokens: VONAME = XXPBPoLinesMergeVO; APPLICATION_MODULE = oracle.apps.po.document.server.DocumentAM;
I am not aware how to get around this. Can someone help please?
Approach 2
1) steps 1 to 6 from Approach 1.
2) trying to extend controller class OrderLinesTableRNCO. But have couple of questions. This iis a advanced bean table so how should i reference individual record and the column that i need to disable/enable ?
Conceptual questions
Also, when i am entering a new record at what point in time the 2 new attribute will derive its value? the 2 attributes are dependent on the Item number column but i have not created a dependency between the attributes and Item# column.
Will the controller logic fire for every column while i am entering a new record?
Thanks.Hi Anil,
Thanks for the response. I have given up that i will get reply on this post.
I have done the substitution and upload the jpx to umsing importer.
But you are correct may be i might have done something wrong. Can you please help me. I can send you the files if you can review and let me know it will be great.
Also, will this approach work since PO Lines is a advanced bean table ?
One of the experts suggested to use Bound values. I am not sure how to implement it though?
I have went and told back to my business team that I am not able to do this so now they have asked me to enable/disable columns based on a dff value on po header. I thought this will be easier by extending the controller class on PO Lines table but that too is not working.
Can you help me please ?
Here is my code to extend the controller class :-
package xxpb.oracle.apps.po.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageLovInputBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean;
import oracle.apps.fnd.framework.webui.beans.table.OAColumnBean;
import oracle.apps.fnd.framework.webui.beans.table.OASortableHeaderBean;
import oracle.apps.fnd.framework.webui.beans.table.OATableBean;
import oracle.apps.po.document.order.webui.OrderLinesTableRNCO;
public class XXPBOrderLinesTableRNCO extends OrderLinesTableRNCO
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAAdvancedTableBean tableBean =
(OAAdvancedTableBean)webBean.findIndexedChildRecursive("LinesTableRN");
OAMessageLovInputBean poLineLov =
(OAMessageLovInputBean)tableBean.findIndexedChildRecursive("XXPBSecondaryUOMLOV");
poLineLov.setDisabled(false);
} -
Not null and enable or disable column in tabular form
Hi,
Using apex version 4.1 and working on tabular form.
ACT_COA_SEGMENT_MAS is Master table
and
ACT_SEGMENT_VALUES_MAS is detail table
I have entered 8 rows in master table and PARENT_SEGMENT_ID is column in master table which is null able. If i specified PARENT_SEGMENT_ID with value in master table then in detail table there is column PARENT_ID that should not be null and enable.
How i can enable or disable column when in master table PARENT_SEGMENT_ID column is null then in detail table PARENT_ID column should disable and vice versa.
I have created tabular form on Detail table. before insert into the tabular form Check in master table in first entry if PARENT_SEGMENT_ID is not null in first row of master table then in tabular form PARENT_ID should enable and not null able in corresponding to this first row id's lines in tabular form.
Same should check for second row in master table if PARENT_SEGMENT_ID is not null then entered rows with PARENT_ID into tabular form corresponding to 2nd id in master table should not nullable and column should enable in tabular form.
Thanks & Regards
Vedant
Edited by: Vedant on Jan 9, 2013 9:12 PMVedant,
You need to create you own manual tabular form and not use the wizard.
Using APEX_ITEM api you should be build you own form and you will be able to control how you wan to display the rows. (See Link [Apex Item Help|http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CACEEEJE] )
select case when PRIMARY_TABLE_COLUMN is null then APEX_ITEM.DISPLAY_AND_SAVE(3 , DETAIL_COLUMN ) else APEX_ITEM.TEXT(2,detail_column) end "ALIAS" from detail table
Hope that help.
Vivek -
Disable column in tabular form
Hi,
I am working on apex4.1 ,working on tabular form . i want to disable columns in tabular form.
I Have debit and credit column in tabular form.These columns are multiply by exchange rate.
if i have multiplication of Debit_prod =debit*Exchange_rate then
credit column should be disable, and if Multiplication of cr_prod =Credit*Exchange_rate
then dr column should be disable.
Thanks in advance.
Thanks & Regards
Vedant
Edited by: Vedant on Sep 20, 2012 4:14 AMHi,
Thanks for reply.
I am entering the value in tabular form. As i fill debit or credit column of the tabular form,Then if value in the debit column i have entered ,then on press tab control switch to exchange rate column , credit column should not be enterable and vice versa.
Thanks & Regards
Vedant -
Webdynpro ABAP ALV in SAP ECC6 - EHP4: To disable Column Selection
Hi All,
We are using SAP ECC6 EHP4 and for Webdynpro ABAP application, after each column a vertical white line is appearing, and I need to hide this..
SAP suggested us to disable COLUMN SELECTION I have tried the below code but still I am not able to get this done..
Can you please suggest the appropriate method to achieve the same.
Code:
* show tab COLUMN SELECTION in Settings page
CALL METHOD wd_this->alv_conf_table->if_salv_wd_std_functions~set_column_selection_allowed
EXPORTING value = ABAP_false..
here alv_conf_table refers to CL_SALV_WD_CONFIG_TABLE.
Thanks in advance.
Thanks
Srinivas
Edited by: Srinivas Manchi on Apr 22, 2010 11:35 AM
Edited by: Srinivas Manchi on Apr 22, 2010 1:06 PMYou have to disable the DDic binding on the column before your override text will show up:
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
data l_salv_wd_table type ref to iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv( ).
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
data l_column type ref to cl_salv_wd_column.
l_column = l_table->if_salv_wd_column_settings~get_column( 'POSTING_DATE' ).
data l_header type ref to cl_salv_wd_column_header.
l_header = l_column->get_header( ).
l_header->set_prop_ddic_binding_field(
property = if_salv_wd_c_ddic_binding=>bind_prop_text
value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
l_header->set_text( `Posting Date` ). -
How to disable columns while displaying
Hi,
How to disable columns from the page which we don't want to show to the users.For example Users will search by "Invoice No" but they don't want to see again Invoice No on the results page.
Appreciate your quick response.
Thks.Check out Dev Guide
Chapter 4: Implementing Specific UI Features -> Search -> Declarative Implementation: Auto Customization Criteria
With this Query Bean option you can separate the Search region from the results table. You map the items in the search region to the items in the result region. You can mark the item in the result table as Rendered=No. OAF will run the query against this item even though it's not displayed. -
Select row and column from header in jtable
hello i have a problem to select row and column from header in jtable..
can somebody give me an idea on how to write the program on it.Hi Vicky Liu,
Thank you for your reply. I'm sorry for not clear question.
Answer for your question:
1. First value of Open is item fiels in Dataset2 and this value only for first month (january). But for other month Open value get from Close in previous month.
* I have 2 Dataset , Dataset1 is all data for show in my report. Dataset2 is only first Open for first month
2. the picture for detail of my report
Detail for Red number:
1. tb_Open -> tb_Close in previous month but first month from item field in Dataset2
espression =FormatNumber(Code.GetOpening(Fields!month.Value,First(Fields!open.Value, "Dataset2")))
2. tb_TOTAL1 group on item_part = 1
expression =FormatNumber(Sum(CDbl(Fields!budget.Value)))
3. tb_TOTAL2 group on item_part = 3 or item_part = 4
expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) + ReportItems!tb_TOTAL1.Value )
4. tb_TOTAL3 group on item_part = 2
expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) - ReportItems!tb_TOTAL2 .Value)
5. tb_Close -> calculate from tb_TOTAL3 - tb_Open
expression =FormatNumber(Code.GetClosing(ReportItems!tb_TOTAL3.Value,ReportItems!tb_Open.Value))
I want to calculate the value of tb_Open and tb_Close. I try to use custom code for calculate them. tb_close is correct but tb_Open is not correct that show value = 0 .
My custom code:
Dim Shared prev_close As Double
Dim Shared now_close As Double
Dim Shared now_open As Double
Public Function GetClosing(TOTAL3 as Double,NowOpening as Double)
now_close = TOTAL3 + NowOpening
prev_close = now_close
Return now_close
End Function
Public Function GetOpening(Month as String,NowOpen as Double)
If Month = "1" Then
now_open = NowOpen
Else
now_open = prev_close
End If
Return now_open
End Function
Thanks alot for your help!
Regards
Panda A -
OBIEE - How to selectively hide or disable columns on a dashboard prompt?
Hello! I need some help with OBIEE dashboard Prompts. Any help will be highly appreciated!
Question 1. How to selectively hide or disable columns on a dashboard prompt or the entire prompt? There seems to be no "hide" or "dsable" options on
prompts.
Question 2. How to synchronize 2 different prompts on the same dashboard?
The application is this: There are total of 2 tabs on a dashboard ("tab_1" and "tab_2"). Each tab uses different prompts ("pr_1" and "pr_2"), having just one first drop down column in common ("Product_id").
The desired functionality is this: user selects "Product_id" on the first tab's prompt, which filters its reports (on "Go") and also propagates to the second tab. When user clicks on the second tab, the reports there are already filtered (or begin filtering) by "product_id", selected on the first tab.
Question 3. How to prevent the reports from retrieving when switching to a different tab on a dshboard? Specifying dummy default values in the prompt does
not seem to preven reports from retrieving, which still takes time.
Thank you very much!
RogerRegarding Question 2:
What you need to have is a Dashboard scope dashboard prompt for Product_ID (i.e., Don't use the column prompt from the prompt tab within the Request.)
1) Create the dashboard prompt, put it on tab1 and save the prompt to a presentation variable, say prmtProdID. Set the scope to "dashboard." (This is the default, by the way.) If you create a dashboard prompt and set the scope to "dashboard," then the prompt values selected will hold true across dashboard pages.
2) On tab2, go to your report and in Criteria mode, apply a filter to the Product_ID column making it equal to the PV. (Click the filter icon, Add>Variable>Presentation Variable and type prmtProdID. Save.)
When the user selects a Product_ID on tab1 of your dashboard and hits "Go," not only will it filter your report on tab1, when you go to tab2 the report here will be filtered with the same value selected in the prompt on tab2.
Regarding Question 3:
If you implement 2, you cannot implement 3. You can't have it both ways. Not for the same scenario. But if you want to know how to do it in general, read this:
http://obieeone.com/2009/08/24/how-to-stop-queries-to-automatically-fire-off-once-entering-dashboarddashboard-page/ -
Disable column when in edit mode 2
Hello experts,
some time ago I posted the thread: Editable ALV: Check Entries in order to disable an ALV grid column for user input.
How can I disable the column even if the user adds a new row to the editable ALV Grid control?
and
How can I show in the disabled column information that is read from the database during user input? For instance, if the user presses ENTER?
Thanks for your help! Obviously, points will be rewarded.
ManuelHi
U need to go for styles in alv grid. U can define a style for each cell in which u can manage editable or disable in that.
This u can handle in PBO each time conditionally. See the below code.
Add one field in your output internal table as below for populating the style.
CELLTAB TYPE LVC_T_STYL, " for input enabling the cell.
This is a table type. U need to populate this field in each row with its type to enabled or disabled as below and style for which field in your internal table. Here it is WERKS.
CELLTAB-FIELDNAME = 'WERKS'.
CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
or
CELLTAB-FIELDNAME = 'WERKS'.
CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED
insert this table in the field CELLTAB of your internal table.
in each row.
And populate the layout with style field name. Here our field is CELLTAB.
GS_LAYOUT-STYLEFNAME = 'CELLTAB'.
GS_LAYOUT-EDIT = GC_X.
This can solve ur problem
Venkat. -
Getting Column names (header) of a table dynamically
Dear Experts,
Greetings.
I have a requirement in which I need to get the column name (header) of a table when the user clicks on a column.
Kindly suggest me the possible ways.
Thanks in advance.
Regards
SathyaHi,
use one of the following based on your requirement
Bind the header text to a context attribute and access this attribute from code when clicked on the column.
Or use parameter mapping.
Regards
Ayyapparaj -
Folks,
How to Disable the Process Header, collapsible Area, and Process Warning Bar from Contacts Form of CRM 2013
Thank you.Hi,
You can deactivate the business process itself if you do not want at all. So that the header will not available for the entity.
Regards,
Priya -
Disable Column validation in editform.aspx page
I want to temporarily disable column validation in editform of custom list. For example i have column 'age' with column validation =[age]>18 , but I want to allow user to enter any value only in editform.aspx .
Thanks, Saravanan PRSOption #1. You may remove those validations from list settings
temporarily.
Option #2. Remove list setting validations and apply all validations through javascript or jquery. You
can have a flag to disable or enable. This way you get a flexibility to ON/OFF validations.
Bala -
Need multiple lines in single column of header using alv oops
Hi
I am using alv oops in a report.
I need multiple lines in single column of header.
In header of my report i am using 9 columns.
In the second column i need to split the line
Notification description/activity/work/activity long text/
as
Notification description/
activity/
work/
activity long text/
Please guide me to achieve this functionality.It is not possible to break the column description in the ALV disply.
Actually, if you have a longer description in one of the seltext_* field of the fiels catalog, it will automatically display it as a tooltip, if you put the mouse over the heading. In ALV OO, you can explicitly set the tooltip text.
Also you can get more help on the field pressing F1: If you use DDIC fields, it it automatic, otherwise you can do it as you like. -
OA Framework Enable/disable columns conditionally in a table.
Hi
I have a requirement to enable / disalbe multiple coulmns of a row in a table.
For ex: A table in which user can enter items with a add row button. The table has item name and three othere columns new price, amount off and discount off. If user enter enters new price then other two columns should be disabled and vice versa.
I tried following:
I added a CO to the table and I registered PartialFireAction event for each of columns.
Each column is mapped to a PVO attribute ${oa.SpecialPricingPVO1.NewPriceEnable}, ${oa.SpecialPricingPVO1.amountEnable}, ${oa.SpecialPricingPVO1.percentOffEnable} etc.,
In the Event method code and PVO init method I'm setting the Boolean value for above PVO attributes. In the init of PVO I'm always getting the first row.
The problem I have is that the columns of all rows are getting the same boolean values based on latest row values. So if I enter values for AmountOff column then New Price and Percent Off are getting disabled for the latest row and for all other previous rows.
Can some body suggest how can I over come this problem? is there a way I can refer row number in SEPL attribute references?
Or suggestions on any other approach that works to enable / disable column in multiple rows would be greatIn order to capture row level PPR events you need to trap the row which triggered the PPR event, pass the row reference and modify the value of the row accordingly.
if ("<ItemPPREventName>").equals(event))
// Get the identifier of the PPR event source row
String rowReference =
pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
Serializable[] parameters = { rowReference };
// Pass the rowReference to a "handler" method in the application module.
am.invokeMethod("<handleSomeEvent>", parameters);
You need to do this in addition to the databinding which Tapash has specified in his last reply. For details on how to databind properties to a viewAttribute check the dev guide. -
Hi All.
I have a control file which i need to add a column with header data value.
example
data file:
123456;201303
santiago;producto1;100
santiago;producto2;200
valparais;producto1;400
valparais;producto3;900
The control file skip the first column and load the three columns on the table, but, now i need to add other column with 201303 value constant of the first record and load it on the table.
Then
select * from table:
santiago producto1 100 201303
santiago producto2 200 201303
valparais producto1 400 201303
valparais producto3 900 201303
How i do this in the control file?
Regards!SCOTT@orcl_11gR2> host type test.dat
123456;201303
santiago;producto1;100
santiago;producto2;200
valparais;producto1;400
valparais;producto3;900
SCOTT@orcl_11gR2> host type test1.ctl
options (load=1)
load data
infile test.dat
replace
into table onecol_onerow
fields terminated by ';'
trailing nullcols
(filler1 filler, newcol)
SCOTT@orcl_11gR2> host type test2.ctl
options (skip=1)
load data
infile test.dat
append
into table test_tab
fields terminated by ';'
trailing nullcols
(col1, col2, col3,
newcol expression "(select newcol from onecol_onerow)")
SCOTT@orcl_11gR2> create table onecol_onerow
2 (newcol number)
3 /
Table created.
SCOTT@orcl_11gR2> create table test_tab
2 (col1 varchar2(15),
3 col2 varchar2(15),
4 col3 number,
5 newcol number)
6 /
Table created.
SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test1.ctl log=test1.log
SQL*Loader: Release 11.2.0.1.0 - Production on Mon May 6 10:46:44 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 1
SCOTT@orcl_11gR2> select * from onecol_onerow
2 /
NEWCOL
201303
1 row selected.
SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test2.ctl log=test2.log
SQL*Loader: Release 11.2.0.1.0 - Production on Mon May 6 10:46:45 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 4
SCOTT@orcl_11gR2> select * from test_tab
2 /
COL1 COL2 COL3 NEWCOL
santiago producto1 100 201303
santiago producto2 200 201303
valparais producto1 400 201303
valparais producto3 900 201303
4 rows selected.
Maybe you are looking for
-
New sound card (E-MU 1212M) won't record higher than 48kHz
I'm running Windows XP Pro/SP2 with a 2.8GHz Pentium 4 processor (motherboard is Elitegroup 848P-A). I have 1GB of RAM installed. I do a lot of vinyl transfer work. I decided to upgrade sound cards to the E-MU 1212M to improve the overall quality of
-
Hi. I'm new to this. I recently 'killed' my reconditioned mac and was lucky that the hard drive still had my final cut pro project intact. I bought a brand new OS X and was advised to use a 'caddy' to plug the old hard drive into the new computer. I
-
With the Form6i, I create a form in which one of the items is with type IMAGE. With this IMAGE item, I add a trigger for WHEN_IMAGE_PRESSED as below. read_image_file(get_file_name(),'TIFF','s_image.image'); If the data type of "s_image.image" is LONG
-
Hi, anyone can explain me the impact of KKAO transaction, if i run it daily. otherwise give me report to see the WIP. and also explain some production orders have complete all operations, but there was a WIP for that orders. What is that? Br, Sanjay
-
File Error - FCP-6 - "not enough memory" ---DVDPro disk is slightly jerky..
I have a macbook. 2GHz Intel Core Duo, 1 GB 667 DDr2 SDRAM. Final Cut Pro 6.0.1 OS 10.4.11 I have a project file - HD that has worked fine up until now. And wouldn't you know it - it's just when I need to be able to burn to quicktime that this occurs