Problems with CheckBox
Hi,
I've a matrix and one of the columns is of type CheckBox. This column has a dbdatasource. The problem is that I want to check the checkbox via uiapi and I'm not able, my code is:
Dim oCheckBox As SAPbouiCOM.CheckBox
ocheckbox = omatrix.Columns.Item("ImpAhora").Cells.Item(pVal.Row).Specific
ocheckbox.Checked = True
Although setting the property checked to true, it continues in False.
The ValOn property is set to "Y" and the ValOff property is set to "N".
Thanks in advance,
vanesa
Hi Vannessa,
What happens if you click the check box in SBO GUI? If it doesn't work there it won't work via code.
You can also just try to click the check box instead of setting it to checked. Another option is to set the value in the dbDataSource instead of setting it on the matrix, like:
oForm.DataSources.DBDataSources.Item("MyTable").SetValue("Field", pVal.Row, "Y")
Hope it helps,
Adele
Similar Messages
-
Problem with checkbox group in row popin of table.
In table row popin I have kept Check Box Group.I have mapped the texts property of checkbox group to the attribute which is under the subnode of the table.the subnode properties singleton=false,selectioncardinality=0-n,and cardinality=0-n.
if there are 'n' number of records in the table.each record will have its own row popin and in the row popin there is check box group.
the check box group in the row popin belongs to that perticular row.
but the checkboxegroup values in row popins of all the rows are getting changed to the row which is lead selected.
The same scenario (table in the row popin is showing the values corresponding to its perticular row and all the table values in popin are not getting changed to the one lead selected in the main table)is working fine with the table in place of checkbox group in row popin with datasource property of table binded to the subnode
I cant trace out the problem with checkbox group in place of table.
Please help me in this regard.I have to place check box group in place of table in row popin.
Thanks and Regards
Kiran Kumar KI have done the same thing successfully with normal check box ui element. Try using check box in your tabel cell editor instead of check box group.
-
Problem with checkbox column in matrix
Hello.
I have a little problem with checkbox column in matrix.
Column is binded to the UserData.
It has ValOn="Y", ValOff="N".
I use C++. It is wird problem. In matrix I have 10 columns - scrollbar role and if You want see checkbox column, You must role to the right. If this column is on the screen, and I use:
checkcell->PutChecked(VARIANT_TRUE);
then the checkbox is cheched, and if the checkbox isn`t on the screen and I use this comment - it nothing happening.
I tried to use ValOn="Y", PutChecked...
The problem i solved if the column is on the screen - if the column is first in matrix or second, but if it`s last I have a big problem.
My column with checkbox is not editable, but I tried to make it editable, check it, and then make it uneditable - the same efect.
How can I solve it ?
Sorry for my english.
Kamil WydraHello Kamil,
I am not sure about your problem, but here is an example of how to use checkbox in UI API.
First, create the matrix with checkbox column in Screen painter, and the output is an xml file, like this. Type as 121 indicates that it is a check box.
- <column AffectsFormMode="0" backcolor="-1" description="" disp_desc="0" editable="0" right_just="0" title="Rented" type="121" uid="Rented" val_off="N" val_on="Y" visible="1" width="41">
<databind alias="U_RENTED" databound="1" table="@VIDS" />
<ExtendedObject />
Second, bind the column to table from DB. This is a bug of 2004 Screen Painter, so if you are using 2005 Screen Painter, there is no problem.
Third, when you open the form, you can check and uncheck the cell.
BTW, please set the editable of the column to true.
Hope this helps,
Nick -
Problem with checkbox on table component
Hello i am having a problem with checkbox in table component
i am developing something like a shopping cart app and i have a checkbox in my table component , i want users to select items from the checkbox to add to thier cart, They can select the items from cartegory combobox , my problem is when they select the items from the checkbox if they select another category the alread selected once do not display in my collection opbject please how can i maintain the state of the already selected items in my collection objectHi,
Please go through the tutorial "Understanding scope and managed beans". This is available at:
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/scopes.html
The details of the selected items need to be stored in an object that is in session scope.
Hope this helps
Cheers
Girish -
Problem with checkbox value and app.settings.getSetting()
Hello everyone.
I`ve got a problem with getting saved settings for checkbox.
Saved settings doesn`t apply on checkbox value.
It`s strange, but it always "true".
So here piece of code:
checkMe = 11; //any value for the first time running
if (app.settings.haveSetting("savea", "chck")) {
checkMe = app.settings.getSetting("savea", "chck"); // get saved value, else 11
alert("checkMe = "+checkMe)
if(checkMe == 11){
checkMe= false; //if there is no saved settings, checkbox value will be false/ unchecked
alert("You run this script first time, so manual value will be 'false'")
}else{
checkMe = app.settings.getSetting("savea", "chck"); // if saved settings exist, get true or false
alert("Yes, checkMe will = "+checkMe)
win.checkPanel.chkOne.value = checkMe; /// checkbox value will equal saved checkMe
var fff = win.checkPanel.chkOne.value; // string for alert
alert("aha! but checkbox value is = " +fff+ "\n Why so?") // here we`ve got always "true"
win.checkPanel.chkOne.onClick = function () {
var path11 = win.checkPanel.chkOne.value; // checkbox value to variable
app.settings.saveSetting("savea", "chck", path11); //saving checkbox value
alert("Saved this value - " + app.settings.getSetting("savea", "chck"))
win.checkPanel.chkOne.value is always true.
Can someone exmplain why and how to get rid of this static value?
P.S. just in case, here is full code:
function mainFun()
this.windowRef = null;
mainFun.prototype.run = function()
/*----- UI -----*/
var retval = true;
var win = new Window("palette", "Check option", [150, 150, 460, 455]);
this.windowRef = win;
win.checkPanel = win.add("panel", [25, 150, 285, 265], "Checkbox");
win.checkPanel.chkOne = win.checkPanel.add("checkbox", [10, 15, 125, 35], "Checkbox One");
//win.checkPanel.chkTxtOne = win.checkPanel.add('edittext', [140, 15, 230, 35], '');
win.quitBtn = win.add("button", [110,275,200,295], "Close");
checkMe = 11; //any value for the first time running
if (app.settings.haveSetting("savea", "chck")) {
checkMe = app.settings.getSetting("savea", "chck"); // get saved value, else 11
alert("checkMe = "+checkMe)
if(checkMe == 11){
checkMe= false; //if there is no saved settings, checkbox value will be false/ unchecked
alert("You run this script first time, so manual value will be 'false'")
}else{
checkMe = app.settings.getSetting("savea", "chck"); // if saved settings exist, get true or false
alert("Yes, checkMe will = "+checkMe)
win.checkPanel.chkOne.value = checkMe; /// checkbox value will equal saved checkMe
var fff = win.checkPanel.chkOne.value; // string for alert
alert("aha! but checkbox value is = " +fff+ "\n Why so?") // here we`ve got always "true"
win.checkPanel.chkOne.onClick = function () {
var path11 = win.checkPanel.chkOne.value; // checkbox value to variable
app.settings.saveSetting("savea", "chck", path11); //saving checkbox value
alert("Saved this value - " + app.settings.getSetting("savea", "chck"))
win.quitBtn.onClick = function() {
win.close();
win.center();
win.show();
return retval;
if(typeof(mainFun_unitTest) == "undefined") {
new mainFun().run();Played around with different values, combinations...
Doesn`t work too:
checkMe = 111; //any value for the first time running
if (app.settings.haveSetting("333", "check")) {
checkMe = app.settings.getSetting("333", "check");
alert(checkMe);
if(checkMe == 111){
win.checkPanel.chkOne.value= false;
}else{
if (checkMe != false){
win.checkPanel.chkOne.value= true;
}else{
win.checkPanel.chkOne.value= false;
win.checkPanel.chkOne.onClick = function () {
var path11 = win.checkPanel.chkOne.value;
var path12 = path11.toString();
app.settings.saveSetting("333", "check", path12);
alert("Saved value - " + app.settings.getSetting("333", "check")) -
Problem with checkbox in the selection screen
Hi guys,
I have a problem with the check box in the selection screen.When i select a check box then a field in the selection screen should be enabled for entering a value.Again if i unselect the checkbox then the field should be disabled for entering a value.I have written the code in at selection-screen output.
The problem is when i select the check box ,the field is not enabled.But when i press enter after selecting the checkbox then the field is enabled for input.It is the same when i unselect the checkbox,after i press enter only the field is getting disabled.What could be the problem.Any suggestions please?
Thanks.Hi d p
Please try this code . I think this code have some way that you would like.
REPORT zdownload_to_application_server.
TABLES : caufvd, jest.
I N C L U D E P R O G R A M *
*INCLUDE znrpstnd.
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
PARAMETERS: p_outb RADIOBUTTON GROUP g1 USER-COMMAND outb DEFAULT 'X' ,
p_inb RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETERS : p_werks LIKE caufvd-werks MODIF ID a. " Plant "OBLIGATORY
SELECT-OPTIONS : s_auart FOR caufvd-auart MODIF ID a, " Order Type
s_aufnr FOR caufvd-aufnr MODIF ID a. " Order number
PARAMETERS: p_path TYPE string DEFAULT 'C:\SchedulerInterface-OutboundTextFile\' MODIF ID a,
p_actual AS CHECKBOX MODIF ID a. " Transfer Actual
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETERS : p_werks2 LIKE caufvd-werks MODIF ID b, " Plant "OBLIGATORY
p_path2 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
p_path3 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
p_sessio TYPE apqi-groupid MODIF ID b. " BDC Session
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
IF p_outb EQ 'X'. " Outbound --> Hide inbound
LOOP AT SCREEN.
"IF screen-name = '%BT02011_BLOCK_1000'.
IF screen-group2 = 'BLK'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'A'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'B'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
"IF screen-name = '%BT01004_BLOCK_1000'.
IF screen-group3 = 'BLK'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'A'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'B'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path2.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = 'C:\SchedulerInterface-InboundTextFile\'
mask = ',Text Files,.txt,All files,.*.'
IMPORTING
filename = p_path2
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path3.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = 'C:\SchedulerInterface-InboundTextFile\'
mask = ',Text Files,.txt,All files,.*.'
IMPORTING
filename = p_path3
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
TOP-OF-PAGE.
START-OF-SELECTION.
Regards
Wiboon -
Problem with checkbox selection in Tableview
Hi All
I am using table view with 8 columns - in the last 4 columns i have checkboxes for user input - i have a strange problem - when the table has multiple entries - for the last column i can only select the checkbox on line 1 - and i cannot select the checkbox on the remaining entries below - but for the other colums with checkboxes this is not the case
The selection mode for the table is no line selection - since the table is already displayed with input enabled fields - this is to reduce the no of clicks for user
Can anyone point out what is going wrong - how can i fix this - what i am doing wrong ?
Thanks
SenHi
When i click on the checkbox for the 2nd or 3rd rows of the last column - nothing happens - the checkox is still active but nothing happens -
this is the tableview code
<htmlb:tableView id = "Detail"
design = "ALTERNATING"
headerText = "Header Text"
onNavigate = "onMyNavigate"
emptyTableText = "test"
onRowSelection = "onMyRowSelection"
fillUpEmptyRows = "false"
footerVisible = "true"
visibleRowCount = "5"
table = "<%= DETAILTAB %>"
iterator = "<%= iterator %>" >
and this is the code for the last column
<htmlb:tableViewColumn columnName = "OBSOFLGICON"
width = "3"
type = "user"
horizontalAlignment = "CENTER"
title = "Obs" >
<htmlb:checkbox />
</htmlb:tableViewColumn>
Thanks
Sen -
Problem with checkbox and Event.stop(event)
Hello,
I cannot change the checkbox in a row, if the Event.stop(event) is fired on checkbox. My aim is, that the event OnRowClick is stoped, if I change the checkbox in the row.
<rich:extendedDataTable id="requestTable" value="#{requestListHandler.normalisedRawRequestList}" var="req"
rows="#{requestListHandler.limitRows}" selectionMode="single">
<a4j:support event="onRowClick" action="#{requestListHandler.viewRequest}">
<f:setPropertyActionListener value="#{req}"
target="#{requestHandler.selectedRequest}" />
</a4j:support>
<rich:column>
<h:outputText value="#{req.offerListSize}">
<f:convertNumber type="number" />
</h:outputText>
</rich:column>
<rich:column id="checkBoxColumns">
<h:selectBooleanCheckbox onclick="Event.stop(event);"
value="#{req.firstInterpreterTimeChecked}"/>
</rich:column>
</rich:extendedDataTable>I know I am using richfaces, but I have problem with sun-ri component <h:selectBooleanCheckbox..../>.
Have you any idea?
Manu
Edited by: Argonist on Jun 16, 2009 8:27 AM
Edited by: Argonist on Jun 16, 2009 12:25 PMI had the same problem. I read you post and was so disappointed that no one had answered you. But I have a good news for you :) My team leader managed to solve this awkward problem.Add to h:selectBooleanCheckbox style="z-index: 20;" so that it is "above" the table row that fires its own onclick event.
-
Problem with Checkbox that disables/enables other components.
Hi
As I show in the title, I have problems with a checkbox that enables/disables another components (three exactly).
I have done the follow:
1.- Set property "AutoSubmit" true in the SelectOneChoice
2.- Set "Disabled" property true or false depending if the SelectOneChoice is selected or not
(#...selectBooleanCheckbox.value?false:true})
3.- Set the Partial triggers to the SelectOneChoice in the three components.
CASE 1: The SelectOneChoice is unmarked. The three components appears disabled and when I mark the SelectOneChoice, this components appears enabled. The thing works ;)
CASE 2: The SelectOneChoice is marked. The three components appears enabled and when I unmark the SelectOneChoice, the components continue enabled. They don't disable until I press the submit button.
how can i make that the components appears disabled when i unmark the checkbox?
i try with de ChangeValueListener, but it only works where the SelectOneChoice changes from unmarked to marked.
thanks!I think the problem is, when the value is null the checkbox return with the selected state, b'coz u r
returning the checkbox (as it is). so pl'z try with below code (ADDED).
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus,
int row, int column){
if(value != null){
Boolean booleanValue = (Boolean)value;
setSelected(booleanValue.booleanValue());
else /// ADDED
setSelected(false);/// ADDED
return this;
Nediaph. -
Problem with checkbox and process
Hallo,
I have a checkbox on my page and now I want to create a process that runs when the checkbox is checked.
What I want to do is: to ckeck wheather the checkbox is check and if this is then to set values.
I don't know if it is right how I check the status of the checkbox. What I also don't really know how I can decide
that all field I go through in the loop get the same value from the XYZ-collection. The value should be the last from
the XYZ-collection.
Thanks, Jade
declare
check integer:=0;
change integer:=0;
begin
check:=:Px_Check;
if (check <> 0) then change:=1; end if;
if change = 1 then
for i in 1..htmldb_application.g_f04.count
loop
htmldb_collection.update_member_attribute(p_collection_name=>'XYZ',
p_seq=>i,
p_attr_number=>5,
p_attr_value=>???);
end loop;
end if;
end;Hi,
Taking the two issues separately....
1 - When dealing with checkboxes, you have to bear in mind that the submit process will only return the values of those checkboxes that have been ticked into the f04 collection (assuming f04 is the column containing your checkboxes). In order to determine which ones they are, you need to get the value (which should be a row number if you've created the checkboxes by using the Row Selector option) and then use that to get to the values on the actual rows. Something like:
DECLARE
vITEM NUMBER;
BEGIN
FOR i IN 1..HTMLDB_APPLICATION.G_F04.COUNT
LOOP
vITEM := HTMLDB_APPLICATION.G_F04(i);
END LOOP;
END;Then, within the loop, you can use vITEM as the row number. So, if the user ticked items 1, 4 and 6. G_F04(1) would contain 1, G_F04(2) would contain 4 and G_F04(3) would contain 6. Therefore, for you update statement, you can use vITEM for the sequence number of the item to update.
2 - When dealing with collections, if you want to get to the last item in the collection, you can get the member count and use that to get to the member:
DECLARE
vCOUNT NUMBER;
vDATA NUMBER;
BEGIN
vCOUNT := HTMLDB_COLLECTION.COLLECTION_MEMBER_COUNT ('XYZ');
SELECT c005 INTO vDATA FROM HTMLDB_COLLECTIONS WHERE COLLECTION_NAME = 'XYZ';
END;That should get the c005 value for the last item and store it in vDATA. You can then update the ticked items with this value.
Andy -
Problem with checkbox and run the get button event continuously
Hi all,
I have a checkbox list of 3 sensors. I have used the X-Control (for checkbox) found in the following link for my application https://decibel.ni.com/content/docs/DOC-30558. I have problems to achieve the following.
Suppose i check Vibration and Strain, I should be able to display both Vibration and Strain data. (I should compare each element of 1d array with the string constant and run the case structure).
I have to run the GET event continuously to display the data.
I have attached the code to the post.
Please can anyone suggest how to go about this.
thanks in advance
Regards,
KM
Attachments:
Main page Enhancements for Create and Load.vi 69 KBHi Bob_Schor,
I tried using the approach you mentioned. I cant run continuously. I am not able to figure out where i am going wrong. I have attached the updated vi.
Hi Hooovahh,
The link you have posted seem to work with LV2013. I am currently using LV 2011. Can you please update it to 2011. Is OpenG necessary for this?
Regards,
KM
Attachments:
Main page Enhancements for Create and Load.vi 77 KB -
Problem with checkbox in JTable when using MyTableModel
Hi all,
I have been trawling these message boards for days looking for the answer to my question but have not had any success.
I am extending AbstractTabel model to create MyTableModel which returns a vector containing the results of a MySql query. One column in this query returns a "0" or "1" which I then store as the boolean value into the vector so that it is rendered as a checkbox on the screen.
I have also overridden the setValueAt method. THe problem is that when I attempt to check the box in the table, the checkbox isn't actually checking.
Do I need to implement some sort of listener which picks up the user clicking the box and refresh the model?
Here is my model code:
public class MyTableModel extends AbstractTableModel {
private Vector v = null;
int listId;
MyTableModel(int listId){
this.listId = listId;
v = new ListItemManagement().getFullList(listId);
public Class getColumnClass(int c) {
switch(c) {
case 6:
return Boolean.class;
default:
return Object.class;
public String getColumnName(int colIndex){
return ((String[])v.get(0))[colIndex];
public int getColumnCount() {
return ((String[])v.get(0)).length;
public int getRowCount() {
return (v.size() - 1);
public Object getValueAt(int rowIndex, int colIndex) {
return ((Object[])v.get(rowIndex + 1))[colIndex];
public void setValueAt(Object aValue, int rowIndex, int colIndex) {
System.out.println("Value: " + String.valueOf(aValue));
Object row[] = (Object[]) v.elementAt(rowIndex);
if(colIndex<6){
row[colIndex] = (String)aValue;
else{
row[colIndex] = (Boolean)aValue;
v.setElementAt(row, rowIndex);
fireTableCellUpdated(rowIndex, colIndex);
public boolean isCellEditable(int row, int col) {
//Note that the data/cell address is constant,
//no matter where the cell appears onscreen.
return ! (col < 6);
}Here is the getFullList function which returns the vector:
rs = stmt.executeQuery();
ResultSetMetaData colData = rs.getMetaData();
int columnCount = colData.getColumnCount();
String[] columnNames = new String[columnCount];
for (int i = 0; i < columnCount; i++){
columnNames[i] = colData.getColumnName(i + 1);
Vector v = new Vector();
v.add(columnNames);
while (rs.next()){
Object[] values = new Object[columnCount];
for (int i = 0; i < (columnCount-1); i++){
values[i] = rs.getString(i + 1);
int sel = rs.getInt("selected");
System.out.println(sel);;
if(sel==0){
values[columnCount-1]=new Boolean(false);
else if (sel==1)
values[columnCount-1]=new Boolean(true);
v.add(values);
rs.close();
stmt.close();
return v;Thanks for the replies, much appreciated.
I've looked at the Swing jtable tutorial and added a TableModelListener and have managed to achieve the desired results but for one thing.
When I attempt to check the box on the first row of the jTable I get a runtime error:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayStoreException: java.lang.Boolean
at project.MyTableModel.setValueAt(MyTableModel.java:65)
I have been playing around with the setValueAt method and it is in my original post. Here is how it currently looks:
public void setValueAt(Object aValue, int rowIndex, int colIndex) {
System.out.println("Value: " + String.valueOf(aValue));
Object row[] = (Object[]) v.elementAt(rowIndex);
if(colIndex<6){
row[colIndex] = (String)aValue;
else{
if(getValueAt(rowIndex,colIndex).toString()=="true"){
row[6] = new Boolean(false);
else{
row[6] = new Boolean(true);
v.setElementAt(row, rowIndex);
fireTableCellUpdated(rowIndex, colIndex);
} -
Problem with checkboxes in IR report mainly for update process please help
Hello,
Can anyone please help me out with this issue.
I have an interactive report with 3 checkbox item for a single column named status. Based on the value of the column status the check box should be checked. For example:
DECODE(status,'DEV',1,0) as DEV,
DECODE(status,'RVW',1,0) as RVW,
DECODE(status,'PRD',1,0) as PROD,
So for this I have used the apex_item.checkbox item. Below is my report query
SELECT APEX_ITEM.HIDDEN(30,0,'','f30_' || ROWNUM)
|| APEX_ITEM.HIDDEN(31,0,'','f31_' || ROWNUM)
|| APEX_ITEM.HIDDEN(01,ROWNUM,'','f01_' || ROWNUM)
|| APEX_ITEM.HIDDEN(04,CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN,'','f04_' || ROWNUM)
|| APEX_ITEM.HIDDEN(05,CHF_STATUS,'','f05_' || ROWNUM)
|| APEX_ITEM.HIDDEN(06,CHF_STATUS,'','f06_' || ROWNUM)
|| APEX_ITEM.HIDDEN(08,CHF_STATUS,'','f08_' || ROWNUM)
|| APEX_ITEM.HIDDEN(09,CHF_STATUS,'','f09_' || ROWNUM)
|| APEX_ITEM.HIDDEN(11,CHF_STATUS,'','f11_' || ROWNUM)
|| APEX_ITEM.HIDDEN(12,CHF_STATUS,'','f12_' || ROWNUM)
|| APEX_ITEM.CHECKBOX (32,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f30'');"'
,DECODE (0,1, ROWNUM),':','f32_' || ROWNUM) DELETE
,CHF_COLUMN
,CHF_STATUS
,APEX_ITEM.CHECKBOX (07,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f05'');"',DECODE (CHF_STATUS,'DEV',ROWNUM),':','f07_' || ROWNUM)
DEV_EDIT
,APEX_ITEM.CHECKBOX (10,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f08'');"',DECODE (CHF_STATUS,'RVW',ROWNUM),':','f10_' || ROWNUM)
RVW_EDIT
,APEX_ITEM.CHECKBOX (13,ROWNUM,'onClick="javascript:ToggleValue(this,' || ROWNUM || ','||'''f11'');"',DECODE (CHF_STATUS,'PRD',ROWNUM),':','f13_' || ROWNUM)
PRD_EDIT
FROM CHF_COLUMN WHERE
CHF_DATASTORE = 'DOMAIN_DEV' AND
CHF_SCHEMA = 'SCHEMA_DEV' AND
CHF_TABLE = 'EMPLOYEEE'
ORDER BY 1; And I have a button for the update process so that the users can check the checkboxes option for the status column either 'DEV', 'RVW', 'PRD'. The status of the column can be in either of these states or can be null.
I have a update process, its having some problem - I don't understand whats causing the problem. Below is the error message which I encountered when trying to update.
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
My Update process.
DECLARE
l_cnt BINARY_INTEGER := 0;
l_stepid number := 10;
l_date DATE := SYSDATE;
BEGIN
FOR i IN 1 .. apex_application.g_f01.COUNT
LOOP
IF APEX_APPLICATION.G_f05 (i) = 1 THEN
UPDATE CHF_COLUMN
SET CHF_STATUS = 'DEV'
WHERE CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN = APEX_APPLICATION.G_f04 (i)
l_cnt := l_cnt + SQL%ROWCOUNT;
apex_application.g_print_success_message := apex_application.g_print_success_message ||
'Successfully updated'||l_cnt ||'<br><br>';
END IF;
IF APEX_APPLICATION.G_f08 (i) = 1 THEN
UPDATE CHF_COLUMN
SET CHF_STATUS = 'RVW'
WHERE CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN = APEX_APPLICATION.G_f04 (i)
l_cnt := l_cnt + SQL%ROWCOUNT;
apex_application.g_print_success_message := apex_application.g_print_success_message ||
'Successfully updated'||l_cnt ||'<br><br>';
END IF;
IF APEX_APPLICATION.G_f11 (i) = 1 THEN
UPDATE CHF_COLUMN
SET CHF_STATUS = 'PRD'
WHERE CHF_DATASTORE||CHF_SCHEMA||CHF_TABLE||CHF_COLUMN = APEX_APPLICATION.G_f04 (i)
l_cnt := l_cnt + SQL%ROWCOUNT;
apex_application.g_print_success_message := apex_application.g_print_success_message ||
'Successfully updated'||l_cnt ||'<br><br>';
END IF;
END LOOP;
COMMIT;
END;If you can please have a look at the app, you can get a better understanding of my problem.
Workspace : orton_workspace
username : [email protected]
password : sanadear
Application No: 15089 SAMPLE_CHECKBOX_APP
Thanks,
Orton
Edited by: orton607 on Aug 4, 2010 9:28 AMI could be wrong but maybe change the hidden items to be like:
APEX_ITEM.HIDDEN(05,DECODE(CHF_STATUS,'DEV',1,0),'','f05_' || ROWNUM)
APEX_ITEM.HIDDEN(08,DECODE(CHF_STATUS,'RVW',1,0),,'','f08_' || ROWNUM)
APEX_ITEM.HIDDEN(11,DECODE(CHF_STATUS,'PRD',1,0),,'','f11_' || ROWNUM)so that the values are 0/1?
Also, you have
DECODE (CHF_STATUS,'DEV',ROWNUM)instead of
DECODE (CHF_STATUS,'DEV',0,1)in the checkboxes, as I would expect.
I'm also not sure why you need to duplicate the checkboxes (f07,f10,f13) as hidden items (f05, f08, f11) if they are both 0/1 values. -
Browser specific problem with checkbox
Hi,
From my parent window am selecting one checkbox entry then i click on submit, i get one popup window when that closes selcted item get added into DB. but the next item in the list get selected in mozilla firefox, it must be unchecked,this is not incase of IE. am using firefox 2.0.1..
please help me as soon as possible.
thank u..I never did get any repose to this problem I raised last year.
However, it's just been raised again by a customer and one of the developers who can't access the info he needs on our product.
When launching an individual page of the help either as context-sensitive help or just directly by launching that .html file, any popup links do not work in Mozilla Firefox or Google Chrome. This applies to both auto-sizing popups and custom-sized popups.
Anyone have any ideas on how I can get around this?
(Webhelp output is produced using RH8 with all patches installed.)
Thanks for any ideas.
Regards,
Feebeegeebee -
Problem with checkbox and "if" & "else if" statement
Hi, i have got something like this:
if (this.rawValue=="0" ){
app.alert("0");
this.resolveNode("Circle1").presence = "hidden";
this.resolveNode("cross").presence = "visible";
else if (this.rawValue=="1"){
app.alert("1");
this.resolveNode("Circle1").presence = "visible";
this.resolveNode("cross").presence = "hidden";
else{
app.alert("2");
this.resolveNode("Circle1").presence = "hidden";
this.resolveNode("cross").presence = "hidden";
I set default position on neutral state. Values are default: on=1, off=0, neutral=2.
When i am clicking on my check box button there works only "on" (1) and "neutral" (2) state. "off" state is not working and i don`t know why.
Please help me with that.Hi,
Here is the form back to you: https://acrobat.com/#d=qiBnkcpRnPWxA5hokFXvQw.
I have tightened the script, but that was not the main problem. The issue was that the checkbox was on the Master Page and had a default value of neutral. Some objects on the Master Page, like checkboxes with default values and buttons, can misbehave when the form is relaid out (layout:ready event).
If you have a look at the form you will see that the objects on the Design Page behave as expected. However similar objects on the Master Page will revert to default everytime the layout:ready event fires. This has already been logged with Adobe.
I would recommend moving the objects to a Design Page or maybe use a dropdown instead of the checkbox.
Niall -
Problem with checkbox item renderer in datagrid
I have a data grid having check box as an item renderer. I have viewed many posts in this forum but nothing useful in my case. I am failed to bind my datagrid itemrenderer checkbox with the field of dataprovider i.e. listUnitMovement.CHECK_PATH. Then I have to traverse data provider to check which checkboxes are checked.
[Bindable]
var listUnitMovement:XMLList=null;
In a function call
public function init(event:ResultEvent):void
listUnitMovement=event.result.unitmovement;
<mx:DataGrid id="dg_country"
dataProvider="{listUnitMovement}"
enabled="true">
<mx:columns>
<mx:DataGridColumn>
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox selectedField="CHECK_PATH" />
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn headerText="Latitude" dataField="NEW_LAT" visible="false"/>
<mx:DataGridColumn headerText="Longitude" dataField="NEW_LONG" visible="false"/>
<mx:DataGridColumn>
<mx:itemRenderer>
<mx:Component>
<mx:Button label="Details"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>Hi,
Do you want to just check/uncheck the checkboxes based on the CHECK_PATH field.
Do you want something like this...
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;[
Bindable]
private var listUnitMovement:ArrayCollection = new ArrayCollection([{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:false,NEW_LAT:133.233,NEW_LONG:702.22}]);]]>
</mx:Script>
<mx:DataGrid dataProvider="{listUnitMovement}">
<mx:columns>
<mx:DataGridColumn>
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox selectedField="CHECK_PATH" change="data.CHECK_PATH=selected" />
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="NEW_LAT"/>
<mx:DataGridColumn dataField="NEW_LONG"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
Please let me know clearly what's your problem...Do you want to just bind the check box based on XmlList or something else..?
Thanks,
Bhasker Chari.S
Maybe you are looking for
-
Create new iCal event from contents of mail uses wrong date
I received an email today with an appointment using the date "6/3/2010 at 4PM". Being from the US, it is obvious to me that this meeting should occur on June 3, 2010, but when I attempt to create a new iCal event with this date it creates the event o
-
Hey guys- I'm using my G5 as my main computer in a home based recording studio and I'm running out of drive space. I currently have the 2 internal drives: MAIN 160 GB (13GB available) & 300 GB (9 GB available) and one USB external 500 GB with 12GB av
-
When I try to open iTunes I get an error message
I cannot open iTunes. I have uninstalled and reinstalled several times and nothing has helped yet. I get the following error message when I try to open iTunes: Windows cannot find 'C:\Program Files(x86)\iTunes\iTunes.exe'. Make sure you typed the nam
-
Is it possible to reinstall Symbol dfont into the system folder?
Since updating to Snow Leopard, there is no Symbol dfont in the system folder. I have been relying on this font for sometime now to avoid special character issues. I use InDesign and this font has become essential for my work. The Symbol font now sup
-
Hi All I have much more available credit than i will ever need - and thinking of reducing some of my cc accounts, which may make better cards with higher limits available to me, further down the road?? This is what I have - and suggestions would be g