Without refresh value in Check box
hi,
i have one select list class name .now i want the value into check box without refresh .
when i select class name then corresponding subject name should come in to check box item.
How can i do this.
Thanks
Manoj
Edited by: Manoj Kaushik on Oct 11, 2009 3:45 AM
hi,
i have a select list class_name with value 1,2,3,4,5 .i have a subject table .
CLASS_SUBJECT_DETAILS
SUBJECT_CODE SUBJECT_NAME CLASS_NAME
ENG --------- ENGLISH------------------------ 1
EORL------- ENGLISH ORAL--------------- 1
HIN--------- HINDI---------------------------- 2
M.E---------- MORAL EDUCATION----------- 2
MAT--------- MATH----------------------------- 3
MAT--------- MATH----------------------------- 4
PED---------- PHYSICAL EDUCATION --------4
SS------------ SOCIAL STUDY------------------ 4
SCI----------- SCIENCE--------------------------- 4
PHY---------- PHYSICS-------------------------- 6
CPRC---------CHEMISTRY PRECTICAL------- 7
ENG--------- ENGLISH-------------------------- 8
HORL---------HINDI ORAL--------------------- 1
HIN---------- HINDI------------------------------ 6
ENG ENGLISH---------------------------------- 6
Now here when i select class_name '1' in select list then subject name ENGLISH,ENGLISH ORAL,HINDI ORAL corresponding to class_name '1' should be come in to check box item.(without refresh)
How can i do this.
Similar Messages
-
Hi,
I want to give a value to the check box using the following code:
<input type="checkbox" value="SelectAll" onclick="$f_CheckFirstColumn(this)" /> -- This code has been put in the column heading of the report generated using the following sql
select apex_item.checkbox(1,rownum),ename,empno
from emp;
I want a check box which can select all the check boxes along with i also want a name of the check box saying select All. is this possible?
Thanks
VGHello,
Your code will check all the checkboxes I believe. If you want the text Select All in front of it or after it, you can just type that after your input tag.
Or did I misunderstand your question?
Also I guess you have your example from Carl's website http://apex.oracle.com/pls/otn/f?p=11933:5
If you type in the search field checkbox in you'll see some other examples.
Regards,
Dimitri
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/
http://www.apexblogs.info/ -
Need to pass value from check box to the pl/sql function in process
My requirement is to use single value check box and pass the flag value to the pl/sql function.
The function need to interpret the flag and execute accordingly.
In this case checkbox name is P1_DELETE and it returns Delete, if checked.
Anonymous block with in the process looks as follows:
declare
l_result VARCHAR2(1024);
begin
l_result := test_function(:P1_DELETE);
end;Hi Visu,
checkboxes in APEX are handled as arrays, namely APEX_APPLICATION_GLOBAL.VC_ARR2. To pass and process the checked values of checkboxes in a pl/sql function or procedure you could use the following way, assuming you have a checkbox named P1_DELETE with a single return value of "Delete"
DECLARE
l_checkbox_values apex_application_global.vc_arr2;
BEGIN
l_checkbox := :P1_DELETE;
-- calling function test_function processing the value
test_function(NVL(l_checkbox(1), 'SOME_OTHER_VALUE'));
END;If the checkbox is not checked then the array at position 1 is null and you have to process that as you like.
If your checkbox would be a group than the array would be colon separated such as 1:2:3:4 etc. and you would have to loop the array like:
FOR idx IN 1..l_checkbox.COUNT LOOP
test_function(l_checkbox(idx));
END LOOP;Hope that helps.
Andreas -
Updating the recoed based on the value of check box
I have a form which has a check box for each record.
I want to update the values of the checked records.
Enclosing my code below:
htp.htmlOpen;
htp.headOpen;
htp.title ('Out Details Form');
htp.headClose;
htp.bodyOpen;
htp.header (1,'Out Details Form');
htp.formOpen ('RSA.UPDATE_OUT_RECORDS');
br_code := substr(PORTAL.wwctx_api.get_user(),1,2);
product_code := upper(p_product_code);
for each_rec IN ref_cursor (p_date,br_code,product_code)
loop
htp.p(each_rec.ref_no);
htp.p(each_rec.name);
htp.p('<input type = "hidden" name ="p_ref_no" value = '||each_rec.ref_no||'>');
htp.p ('<input type = "checkbox" name = "p_cd" >');
htp.p ('<br>');
end loop;
htp.p('<br>');
htp.p ('Courier Name');
htp.p('<input type = "text" name ="p_courier">');
htp.p('Courier Number');
htp.p('<input type = "text" name ="p_courier_no">');
htp.p('Destination Branch Code');
htp.p ('<input type = "text" name ="p_branch">');
htp.p('<br>');
htp.formSubmit ('Submit');
htp.bodyClose;
htp.htmlClose;
end;
my update procedure is given below
Create or Replace PROCEDURE RSA.UPDATE_OUT_RECORDS
p_ref_no IN PORTAL.wwv_utl_api_types.vc_arr,
p_cd IN PORTAL.wwv_utl_api_types.vc_arr,
p_courier IN VARCHAR2,
p_courier_no IN VARCHAR2,
p_branch IN VARCHAR2,
submit IN VARCHAR2
as
begin
for i in 1..p_ref_no.count loop
htp.p(p_ref_no(i));
update RS_MIMO_TRANSACTIONS
set RS_MIMO_TRANSACTION_TO_PLACE = p_branch,
RS_MIMO_TRANSACTION_OUT_TIME = sysdate,
RS_MIMO_TRANSACTION_COURIER_NO = p_courier_no,
RS_MIMO_TRANSACTION_COUR_NAME = p_courier
where RS_MIMO_TRANSACTION_REF_NO = p_ref_no(i);
commit;
end loop;
exception
when others then
null;
end;
When I ran the above all the records are getting updated
even if I have not clicked the check box.
Please help me how to check the value of the checkbox in the UPDATE_OUT_RECORDS procedure and updating those records for which the check box is clicked.You can declare one more dummy variable in your procedure to be used as checkbox field in your form and with some javascript code you can set the value 'Y'(es) or 'N'(o) in the original variable which you can refer it in your update procedure to update values in the table. Here is the sample code how you can do this:
declare
lv_string varchar2(32767);
li_ind integer;
begin
lv_string := '<SCRIPT LANGUAGE="JavaScript">
function set_chkbx_value(row_num){
SampleForm.p_yes_no[row_num].value = (SampleForm.p_dummy_chkbx[row_num].checked)?"Y":"N";
</SCRIPT>';
lv_string := lv_string ||'<BODY>
<CENTER>
<form name=SampleForm action="p_update_table" METHOD="POST" ENCTYPE="multipart/form-data">
<div align="center">
<center><TABLE>
<TD align="center"><TABLE BORDER="1" CELLSPACING="2" CELLPADDING="0">
<BR><TR>
<TH><b><font STYLE="font-family:Tahoma; color:brown; font-size:9pt;">Name</font></b></TH>
<TH><b><font STYLE="font-family:Tahoma; color:brown; font-size:9pt;">Salary</font></b></TH></TR><TR>';
For li_ind in 1..10 Loop
lv_string := lv_string ||'<TR><TD ALIGN=middle><INPUT TYPE=text SIZE="20" NAME="p_name" MAXLENGTH = "30" >
<INPUT TYPE=text SIZE="10" NAME="p_salary" MAXLENGTH = "30" >
<TD ALIGN=middle><INPUT TYPE=checkbox SIZE="1" NAME="p_dummy_chkbx" OnClick="set_chkbx_value('||(li_ind - 1)||')"></TD>
<INPUT TYPE="hidden" NAME="p_yes_no"></TR>';
End Loop;
lv_string := lv_string ||' </TABLE></CENTER>
<h2 align="center">
<INPUT TYPE="Submit" VALUE="SAVE">
<input type="reset" value="RESET"><h2>
</TABLE>
</FORM>
</BODY>';
htp.p(lv_string);
end;
Create or Replace PROCEDURE p_update_table
p_name IN PORTAL.wwv_utl_api_types.vc_arr,
p_salary IN PORTAL.wwv_utl_api_types.vc_arr,
p_dummy_chkbx IN PORTAL.wwv_utl_api_types.vc_arr,
p_yes_no IN PORTAL.wwv_utl_api_types.vc_arr
as
begin
for i in 1..p_name.count loop
If p_yes_no(i) = 'Y' Then
update emp
set sal = p_salary(i)
where ename = p_name(i);
commit;
end loop;
exception
when others then
null;
end; -
Hi All,
I have a multirow block with three text item columns,which source is a view. I have a column of check box besides this multirow block, so that each check box corresponds to each row in the block.
If the check boxes are checked, then the corresponding row will be processed. I tried to add a virtual column as a process flag when creating the view, but the virtual column cannot be updated, so I cannot check or unchecked the check boxes.
Is there another way to do this?
Thanks in advance!
Regards,
Vanessavanessa,
if the processing is handled by Forms then you could place teh checkbox into the block having teh other columns and unset the database usage in the properties.
Frank -
How to get the correct value from check box
hi guys,
here is a program to read data from IKPF.
with the user tick on the check box, the program will retrive
corresponding records based on the inventory counted (zstat) status.
however i don't get the correct output with the following selection.
Please advise where is going wrong. Thank you.
IF ph_ncnt = 'X'.
v_zstat1 = SPACE.
ENDIF.
IF ph_pcnt = 'X'.
v_zstat2 = 'A'.
ENDIF.
IF ph_acnt = 'X'.
v_zstat3 = 'X'.
ENDIF.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
b~menge into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat3 OR
a~zstat = v_zstat2 OR
a~zstat = v_zstat1 )
and a~gjahr = p_gjahr.hi guys,
i'll use the following to get the desire result. This is a bit "stupid" but at least it gives me the correct result.
IF ph_ncnt = 'X'.
v_zstat1 = SPACE.
ENDIF.
IF ph_pcnt = 'X'.
v_zstat2 = 'A'.
ENDIF.
IF ph_acnt = 'X'.
v_zstat3 = 'X'.
ENDIF.
IF ph_ncnt = SPACE AND ph_pcnt = SPACE
AND ph_acnt = SPACE.
message I799(SA) with 'Which data to print?'.
stop.
ELSEIF ph_ncnt = 'X' AND ph_pcnt = 'X'
AND ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~gjahr = p_gjahr.
ELSEIF ph_ncnt = 'X' AND ph_pcnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat1 OR
a~zstat = v_zstat2 )
and a~gjahr = p_gjahr.
ELSEIF ph_ncnt = 'X' AND ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat1 OR
a~zstat = v_zstat3 )
and a~gjahr = p_gjahr.
ELSEIF ph_pcnt = 'X' AND ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and ( a~zstat = v_zstat2 OR
a~zstat = v_zstat3 )
and a~gjahr = p_gjahr.
ELSEIF ph_ncnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~zstat = v_zstat1
and a~gjahr = p_gjahr.
ELSEIF ph_pcnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~zstat = v_zstat2
and a~gjahr = p_gjahr.
ELSEIF ph_acnt = 'X'.
select awerks bmatnr bcharg aiblnr bzeili agjahr a~gidat
bmenge azstat into table t_data
from ikpf as a
inner join iseg as b
on aiblnr = biblnr
and agjahr = bgjahr
where a~werks in s_werks
and a~lgort in s_lgort
and a~gidat in s_gidat
and a~zldat in s_zldat
and a~zstat = v_zstat3
and a~gjahr = p_gjahr.
ENDIF. -
hi
i have multi record block with check box.
ex:
Name
test1
test2
test3
test4
test5
totaly 5 records .
when user select in the record test3 , test4,test5 then i want to concatnating with the three record
test3,test4,test5 like this
That column is varchar2
Edited by: user8674910 on Aug 15, 2011 10:46 PMyou then need to loop the block one by one starting at 'test3' for concatenaing them
declare
my_field varchar2(20):=:the_field;
begin
GO_BLOCK('YOUR_BLOCK');
FIRST_RECORD;
FOR :block.the_field>=my_field and :system.last_record<>'TRUE'
LOOP
:str := :str||','||:the_field;
NEXT;
END LOOP;
end; -
Single or multiple check box values displayed in a text field
My apologies, this may be a duplicate discussion.
I'm using the following script to display the values of check boxes in a text field. I would like the word "and" to separate the values if two check boxes are selected. If more than two boxes are selected I want the values to be separated by a comma and then the last value be separated by "and". Example of two check boxes selected: A and B. Example of two or more: A, B, C, and D. Can this be done?
form1.page1.page1SF.programs::calculate - (JavaScript, client)
//displays the values of check boxes named programCB
var aChkBx = [];
var vChecks = programCB.all;
for (var a=0; a<vChecks.length;a++){
if(!vChecks.item(a).isNull) {
aChkBx.push(vChecks.item(a).rawValue);
this.rawValue = aChkBx.join(", ");My apologies, this may be a duplicate discussion.
I'm using the following script to display the values of check boxes in a text field. I would like the word "and" to separate the values if two check boxes are selected. If more than two boxes are selected I want the values to be separated by a comma and then the last value be separated by "and". Example of two check boxes selected: A and B. Example of two or more: A, B, C, and D. Can this be done?
form1.page1.page1SF.programs::calculate - (JavaScript, client)
//displays the values of check boxes named programCB
var aChkBx = [];
var vChecks = programCB.all;
for (var a=0; a<vChecks.length;a++){
if(!vChecks.item(a).isNull) {
aChkBx.push(vChecks.item(a).rawValue);
this.rawValue = aChkBx.join(", "); -
Single or multiple check box values displayed in a textbox
Hi Experts!
I'm using the following script to display the values of check boxes in a text field. I would like the word "and" to separate the values if two check boxes are selected. If more than two boxes are selected I want the values to be separated by a comma and then the last value be separated by "and". Example of two check boxes selected: A and B. Example of two or more: A, B, C, and D. Can this be done?
form1.page1.page1SF.programs::calculate - (JavaScript, client)
//displays the values of check boxes named programCB
var aChkBx = [];
var vChecks = programCB.all;
for (var a=0; a<vChecks.length;a++){
if(!vChecks.item(a).isNull) {
aChkBx.push(vChecks.item(a).rawValue);
this.rawValue = aChkBx.join(", ");So, the way I see it, you actually have four scenarios. Nothing is checked, one item is checked, two items are checked, and three or more items are checked.
Here's how I did it.
I have four checkboxes all with the same name, cb. (You could have many more, and it wouldn't matter as long as they're all named the same thing.) I'm presuming that you will use the captions from the checkboxes as the text you want to enter. I called my text area where I enter the information tfSentence. (It's not a text field, it's just called "Text" in the Object Library.)
//we need to count how many boxes are checked
var checked = 0;
for (i=0; i<=cb.length; i++){
if (xfa.resolveNode("cb["+i+"]").rawValue == 1) checked ++;
//create a string variable to store our sentence
var str = "";
//look at the checked variable and choose our case from that
switch(checked){
case 0:
//you may want to do more than just type out a sentence here, like a message box
tfSentence.rawValue = "Nothing was selected";
break;
case 1:
//you can set text that will appear before your list of items here
//str = "preliminary text";
for (i=0; i<=cb.length; i++){
if (xfa.resolveNode("cb["+i+"]").rawValue == 1) str += xfa.resolveNode("cb["+i+"].caption.value.#text").value;
//you can set text to appear after your list of items here
//str += "ending text";
tfSentence.rawValue = str;
break;
case 2:
//str = "preliminary text";
for (i=0; i<=cb.length; i++){
if (xfa.resolveNode("cb["+i+"]").rawValue == 1){
if (checked == 1) str += " and " + xfa.resolveNode("cb["+i+"].caption.value.#text").value;
else str += xfa.resolveNode("cb[+i+"].caption.value.#text").value;
checked--;
//str+= "ending text";
tfSentence.rawValue = str;
break;
default:
//str = "preliminary text";
for (i=0; i<=cb.length; i++){
if (xfa.resolveNode("cb["+i+"]").rawValue == 1){
if (checked == 1) str += "and " + xfa.resolveNode("cb["+i+"].caption.value.#text").value;
else str += xfa.resolveNode("cb["+i+"].caption.value.#text").value + ", ";
checked--;
//str += "ending text";
tfSentence.rawValue = str;
break -
How to display result set boolean value as a check box
Hi guys,
I am getting the data which include boolean from the database, i need to display the boolean values as check box, see my code, its displaying the data into the table with the boolean values as true and false, how to make it in check boxes
package swing2.org;
import java.awt.GridBagLayout;
import javax.swing.JPanel;
import java.awt.Color;
import javax.swing.BorderFactory;
import javax.swing.border.BevelBorder;
import javax.swing.table.AbstractTableModel;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.ComponentOrientation;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
public class Panel2 extends JPanel {
private static final long serialVersionUID = 1L;
private JScrollPane jScrollPane = null;
private JTable jTable = null;
* This is the default constructor
public Panel2() {
super();
initialize();
* This method initializes this
* @return void
private void initialize() {
// Panel2.ResultSetFrame();
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.gridy = 0;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.gridx = 0;
this.setSize(340, 200);
this.setLayout(new GridBagLayout());
this.setBackground(new Color(171, 211, 224));
this.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED), null));
this.add(getJScrollPane(), gridBagConstraints);
* This method initializes jScrollPane
* @return javax.swing.JScrollPane
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setViewportView(getJTable());
return jScrollPane;
String[] columnNames = {"Task Description",
"Time ",
"Pop-up",
"Sound",
"Delete"};
* This method initializes jTable
* @return javax.swing.JTable
private JTable getJTable() {
ResultSetFrame oo = new ResultSetFrame();
JTable table = new JTable(oo.model);
table.setBackground(new Color(195, 217, 230));
table.setComponentOrientation(ComponentOrientation.UNKNOWN);
table.setShowGrid(true);
table.setShowVerticalLines(true);
table.setRowHeight(17);
table.setShowHorizontalLines(true);
return table;
abstract class ResultSetTableModel extends AbstractTableModel
public ResultSetTableModel(ResultSet aResultSet)
rs = aResultSet;
try
rsmd = rs.getMetaData();
catch(SQLException e)
System.out.println("Error " + e);
public String getColumnName(int c)
{ try
{ return rsmd.getColumnName(c + 1);
catch(SQLException e)
{ System.out.println("Error " + e);
return "";
public int getColumnCount()
{ try
{ return rsmd.getColumnCount();
catch(SQLException e)
{ System.out.println("Error " + e);
return 0;
protected ResultSet getResultSet()
{ return rs;
private ResultSet rs;
private ResultSetMetaData rsmd;
class CachingResultSetTableModel extends ResultSetTableModel
{ public CachingResultSetTableModel(ResultSet aResultSet)
{ super(aResultSet);
try
{ cache = new ArrayList();
int cols = getColumnCount();
ResultSet rs = getResultSet();
/* place all data in an array list of Object[] arrays
We don't use an Object[][] because we don't know
how many rows are in the result set
while (rs.next())
{ Object[] row = new Object[cols];
for (int j = 0; j < row.length; j++)
row[j] = rs.getObject(j + 1);
cache.add(row);
catch(SQLException e)
{ System.out.println("Error " + e);
public Object getValueAt(int r, int c)
{ if (r < cache.size())
return ((Object[])cache.get(r))[c];
else
return null;
public int getRowCount()
{ return cache.size();
private ArrayList cache;
class ResultSetFrame
{ public ResultSetFrame()
/* find all tables in the database and add them to
a combo box
try
{ Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/task","root","nbuser");
stmt = con.prepareStatement("SELECT * FROM tasky");
try
String query = "SELECT * FROM tasky";
rs = stmt.executeQuery(query);
model = new CachingResultSetTableModel(rs);
JTable table = new JTable(model);
scrollPane = new JScrollPane(table);
catch(SQLException e)
System.out.println("Error " + e);
catch(ClassNotFoundException e)
{ System.out.println("Error " + e);
catch(SQLException e)
{ System.out.println("Error " + e);
private JScrollPane scrollPane;
public ResultSetTableModel model;
private ResultSet rs;
private Connection con;
private Statement stmt;
}add a
public Class getColumnClass(int col) {
return getValueAt(0, col).getClass();
}in your ResultSetTableModel which extends AbstractTableModel.
A simple example
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;
public class SimpleDemo extends JFrame {
public SimpleDemo() {
createAndShowUI();
private void createAndShowUI(){
String[] columnName = {"CheckBox Column", "Data Column"};
Object[][] data = {{new Boolean(true), "Data 1"},
{new Boolean(false), "Data 2"}, {new Boolean(true), "Data 3"}};
MyModel model = new MyModel();
model.setData(columnName, data);
JTable myTable = new JTable(model);
JScrollPane scrollPane = new JScrollPane(myTable);
setDefaultCloseOperation(EXIT_ON_CLOSE);
getContentPane().add(scrollPane);
pack();
setLocationRelativeTo(null);
class MyModel extends AbstractTableModel {
String[] columnName;
Object[][] data;
public void setData(String[] colName, Object[][] theData) {
this.columnName = colName;
this.data = theData;
fireTableStructureChanged();
public String getColumnName(int column) {
return columnName[column];
public Object getValueAt(int rowIndex, int columnIndex) {
return data[rowIndex][columnIndex];
public int getRowCount() {
return data.length;
public int getColumnCount() {
return columnName.length;
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
public static void main(String[] args){
Runnable run = new Runnable(){
public void run(){
new SimpleDemo().setVisible(true);
SwingUtilities.invokeLater(run);
} -
Check boxes not checked when value passed through a request
I've a URL which sets default-check box values -
f?p=121:41:&SESSION.::YES::P41_OWNER,P41_AI_TYPE:&BUGDB_USER.,\5,6,7\
where "\5,6,7\" is the value of check-boxes.
On Page 41, I compute P41_AI_TYPE as follows (as a Process - On Load Before Regions) -
begin
if (:P41_AI_TYPE = '5,6,7') then
*:P41_AI_TYPE := '6:7:5';*
end if;
end;
There are 3 conditional reports that are generated on the page 41 based on these values. i.e. 5,6,7. All the three reports are displayed indicating that the reports do indeed see the P41_AI_TYPE variable.
The "Debug" shows
0.03: ...Session State: Saved Item "P41_AI_TYPE" New Value="6:7:5"
prior to displaying the checkbox
The "Session" also shows -
121 41 P41_AI_TYPE Checkbox 6:7:5 U
However none of the check-boxes are checked.
What could be the issue ?
Edited by: ygore on Aug 26, 2009 10:41 AM0.01:
0.02: S H O W: application="121" page="41" workspace="" request="" session="692841112185158"
0.02: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us
0.02: alter session set nls_language="AMERICAN"
0.02: alter session set nls_territory="AMERICA"
0.02: NLS: CSV charset=WE8MSWIN1252
0.02: ...NLS: Set Decimal separator="."
0.02: ...NLS: Set NLS Group separator=","
0.02: ...NLS: Set date format="DD-MON-RR"
0.02: ...Setting session time_zone to dbtimezone
0.02: NLS: Language=en-us
0.02: Application 121, Authentication: CUSTOM2, Page Template: 5653628457062181
0.02: ...Session ID 692841112185158 can be used
0.02: ...Application session: 692841112185158, [email protected]
0.03: ...Determine if user "YPGORE" workspace "943324391470666" can develop application "121" in workspace "943324391470666"
0.03: Session: Fetch session header information
0.03: Saving g_arg_names=P41_OWNER and g_arg_values=YGORE
0.03: ...Session State: Saved Item "P41_OWNER" New Value="YGORE"
0.03: Saving g_arg_names=P41_AI_TYPE and g_arg_values=5,6,7
0.03: ...Session State: Saved Item "P41_AI_TYPE" New Value="5,6,7"
0.03: ...Metadata: Fetch page attributes for application 121, page 41
0.03: Fetch session state from database
0.03: Branch point: BEFORE_HEADER
0.03: Fetch application meta data
0.04: Computation point: BEFORE_HEADER
0.04: Processing point: BEFORE_HEADER
0.04: Show page template header
0.04: Computation point: AFTER_HEADER
0.04: Processing point: AFTER_HEADER
Root Cause Analysis
([email protected]) | Logout
Reports
Edit
Classify
Edit
Administration
Edit
EditEditEdit
Summary Report Area Report Custom Reports
0.05: Region: Action Items Report
Action Items Report
0.05: Computation point: BEFORE_BOX_BODY
0.05: ...Evaluate condition "NEVER" for computation of item: P41_AI_TYPE
0.05: Processing point: BEFORE_BOX_BODY
0.05: ...Process "Compute AI Type": PLSQL (BEFORE_BOX_BODY) begin if (:P41_AI_TYPE = '5,6,7') then :P41_AI_TYPE := '6:7:5'; :P41_AI_TYPE_COMMA := '5,6,7'; end if; end;
*0.05: ...Session State: Saved Item "P41_AI_TYPE" New Value="6:7:5"*
0.05: ...Session State: Saved Item "P41_AI_TYPE_COMMA" New Value="5,6,7"
0.05: Region: Enter Bug User Id
0.06: Item: P41_AREA TEXT
Area : Edit
0.06: Item: P41_OWNER TEXT
AI Owner : Edit
0.06: Item: P41_AI_PERCENT_LOW_MARK TEXT
AI %age comp. range Edit
0.06: Item: P41_AI_PERCENT_HI_MARK TEXT
And Edit
0.06: Item: P41_AI_TYPE CHECKBOX
AI Type :
Test-Generic TestCase Development
Edit
0.06: Item: P41_AI_ID TEXT_WITH_ENTER_SUBMIT
AI Id : Edit
0.06: Item: P41_GO BUTTON
Go
Edit
0.06: Item: P41_AI_TYPE_COMMA HIDDEN
Edit
0.06: Region: Test-Generic Action Items Report
Test-Generic Action Items ReportEdit
0.06: show report
0.07: determine column headings
0.07: activate sort
0.07: parse query as: RMTOOLS_QAINIT
0.07: binding: ":P41_AREA"="P41_AREA" value="%"
0.07: binding: ":P41_OWNER"="P41_OWNER" value="YGORE"
0.07: binding: ":P41_AI_PERCENT_LOW_MARK"="P41_AI_PERCENT_LOW_MARK" value="0"
0.07: binding: ":P41_AI_PERCENT_HI_MARK"="P41_AI_PERCENT_HI_MARK" value="100"
0.07: binding: ":P41_AI_ID"="P41_AI_ID" value="%"
0.08: print column headings
0.08: rows loop: 15 row(s)
No action items in this category.
0.08: Region: TestCase Action Items Report
TestCase Action Items ReportEdit
0.08: show report
0.08: determine column headings
0.08: activate sort
0.09: parse query as: RMTOOLS_QAINIT
0.09: binding: ":P41_AREA"="P41_AREA" value="%"
0.09: binding: ":P41_OWNER"="P41_OWNER" value="YGORE"
0.09: binding: ":P41_AI_PERCENT_LOW_MARK"="P41_AI_PERCENT_LOW_MARK" value="0"
0.09: binding: ":P41_AI_PERCENT_HI_MARK"="P41_AI_PERCENT_HI_MARK" value="100"
0.09: binding: ":P41_AI_ID"="P41_AI_ID" value="%"
0.09: print column headings
0.09: rows loop: 15 row(s)
No action items in this category.
0.09: Region: Development Action Items Report
Development Action Items ReportEdit
0.10: show report
0.10: determine column headings
0.10: activate sort
0.10: parse query as: RMTOOLS_QAINIT
0.10: binding: ":P41_AREA"="P41_AREA" value="%"
0.10: binding: ":P41_OWNER"="P41_OWNER" value="YGORE"
0.10: binding: ":P41_AI_PERCENT_LOW_MARK"="P41_AI_PERCENT_LOW_MARK" value="0"
0.10: binding: ":P41_AI_PERCENT_HI_MARK"="P41_AI_PERCENT_HI_MARK" value="100"
0.10: binding: ":P41_AI_ID"="P41_AI_ID" value="%"
0.11: print column headings
0.11: rows loop: 15 row(s)
No action items in this category.
0.11: Region: Print Region
Print Report
Edit
0.11: Computation point: AFTER_BOX_BODY
0.11: Processing point: AFTER_BOX_BODY
0.11: Computation point: BEFORE_FOOTER
0.11: Processing point: BEFORE_FOOTER
0.11: Show page tempate footer
Home Application 121 Edit Page 41 Create Session Activity No Debug Hide Edit Links Show Edit Links
0.11: Computation point: AFTER_FOOTER
0.11: Processing point: AFTER_FOOTER
0.11: Log Activity:
0.11: End Show: -
Hi,
I have check boxes in data grid, using action script how do i get the values of check boxes that were selected ?
Can anybody guide me here.
<mx:DataGrid id="targetBaseAdd" width="100%" height="100%" dataProvider="
{Application.application.ccModel.initializeBusinessUnitData.initializeBusinessUnit.baseArra y}">
<mx:columns>
<mx:DataGridColumn headerText="" width="20">
<mx:itemRenderer>
<mx:Component>
<mx:HBox width="100%">
<mx:CheckBox horizontalCenter="0"/> </mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn headerText="Base" labelFunction="baseTargetList"/>
</mx:columns>
</mx:DataGrid>
Thank You,
Anu.
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn headerText="Base" labelFunction="baseTargetList"/>
</mx:columns>
</mx:DataGrid>
Thank You,
Anu.refer following examples:
http://blog.flexmonkeypatches.com/2007/11/06/datagrid-checkbox-itemeditor/
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_23237167.ht ml -
How to disable one check box when another is checked
Hi, I'm a first time user.
i am trying to make text fields appar and dissapaer when check boxes are ticked. but only alow one check box to be active at one time.
I am making a simple form in Acrobat pro 9,
I have two check boxes Checkbox1 & Checkbox2.
I have two text fields Textfield1 & Textfield2
i have added actions to checkbox1 & checkbox2 to 'hide or show' the text fields.
Action --> on focus (checkbox1) show/hide field (textfield1) is hide
Action --> on focus (checkbox1) show/hide field (textfield2) is show
oposite
Action --> on focus (checkbox2) show/hide field (textfield2) is hide
Action --> on focus (checkbox2) show/hide field (textfield1) is show
problem 1 - how to disable checkbox1 when checkbox 2 is ticked.
or disable checkbox2 when checkbox1 is ticked.
my other problem is that this action has the same effect for ticking or unticking the checkbox.
thanks in advance to anyone who can help.
can you please write your answer in simple terms. Basically this is the first time i have used acrobat pro so please dont assume any knowledge at all. thansk very much .First, I would experiment with just check boxes and learn their properties and how they can interact.
Have you tried using the same name for 2 check boxes and assign a different "export value" to each check box.
Have you looked at the values a check box or boxes have when checked or un-checked?
Have you looked at how the various actions for a field work? -
Check box Item property in mutiple record block
Hi,
I have migrated a number of forms from 6i to 10g. All seems to be working apart from a problem with the display of check boxes that are part of a multiple record block. The item property for the checkbox has font weight set to bold and this works fine on the 6g version. On the 10g version it is displayed as normal font weight.
Any other items in the record, text items etc are displayed in bold correctly.
As this seems to affect a lot of forms is there some patch/fix that I should have applied or is this just the way it is?
I am trying to use set_item_instance_property to set them manually but that doesn't seem to make any difference.
Thanks in advance and Happy Christmas/New Year.Problem solved following response from Oracle support desk -
UPDATE
======
Hi Dave,
When using lookandfeel=generic, the colors for different Windows items (e.g., menu, check
box, window background ...etc) are taken directly from the Operating System
(OS) user settings. I tested the issue with lookandfeel=oracle and with
colorScheme set to different values, and check box tick in this case takes the
same color as the color scheme used.
I suggest then using dark color scheme to give you a similar effect as it was in Forms 6i. for example:
colorScheme=Titanium -
Hi,
I am working on checkbox in webdynpro. I hav 2 views. In the first view I hav 4 check boxes. In the second voew I hav one text box. If the check box is checkd and the submit button is pressed then the corresponding value of check box should get display in Second view. This is my requirement.
But for this what are the methods I need to use.....to know which check box is checked...and to set the corresponding checkbox value to the text box?
Regards
Sandeep ReddyThe Same Node create in Component control and Drag and Drop to create Context Mapping to View1 and View2.
on the Submit Button Event Handler using code wizard navigate to next view
in the InBound plug Event Handler of the View2 put the code
data: lr_node type ref to if_wd_context_node.
data: lr_elem type ref to if_wd_context_element.
data: lt_elem type WDR_CONTEXT_ELEMENT_SET.
data: ls_elem type <node_type>.
lr_node = wd_context->get_child_node( '<node_name>' ).
lt_elem = lr_node->get_elements( ).
loop at lt_elem into lr_elem.
if lr_elem->is_selected( ) eq abap_true.
this record is selected
lr_elem->get_static_attributes( importing static_attributes = ls_elem ).
ls_elem structure will have the selected check box
fill your input field binded context attribute here.
endif.
endloop.
Maybe you are looking for
-
Gmail account has been fine, but some emails yesterday and today I can't open. Went to laptop and can view them no problem. they don't contain pics or logos, just an ordinary message from a relative. When I press menu nothing happens either so cant
-
How to uninstall software with installer
I have uninstalled AV by dragging and dropping to trach in Mac Air. I want to install new AV but it does not allow me to install , it say i need to unstall old AV What should be done. I dont see Library folder under Home
-
Indesign missing fonts, please help!
Hi! i I just switched from windows 8 to a mac mini. I had indesign CC trial on the PC and now that I switched to a mac fonts are missing n my document. Both versions of indesign were up to date. How do I get my fonts back please help. The font I real
-
Skype-In can't make Group Call
I have two Skype # assigned to my ID. Since my Skype-Out subscription expired, I have been having difficulty with Group calls. Once I add a new incoming call, it automatically put the original call on hold and prompt me with the option of buying a sk
-
Hi all, As we got only data records without activity key (or some similar flag for change/update) we I need to create an interface to check if a business partner/ insurance object is already existent or not. The only input we have is the external BP