Save Checkbox state
Hi all, I'm looking for a way to keep and reuse the state of checkboxs.
I have checkboxs in a report and when the page is reloaded (from changing an item in a select list with submit) I'm loosing the check/uncheck values of all checkbox item. I'm already creating a collection with the checkbox but I don't know how to use it to re-check the box who were checked before the refresh.
I hope my question is clear enough...thanks for your advice.
Christian
Sergio, I got it
To make this work, I use the third parameter of htmldb_item.checkbox...p_checked_values. So I put a decode and if my value (the one in the checkbox) is in my collection (I build the collection on submit) then I return 'CHECKED' and the current box will be checked.
I'm not sur I'm clear enough but here's the exemple of the select. Remember the collection is build on submit so when any other item is called (like a select_list_with_submit) the collection is build and right after, the checkbox is process.
SELECT COMP.NAME COMP
,HTMLDB_ITEM.CHECKBOX(1,COMP.ID,DECODE(COMP.ID,SELECT C001 FROM HTMLDB_COLLECTIONS WHERE COLLECTION_NAME = 'COMP' AND C001 = COMP.ID),'CHECKED',NULL)) CHECKBOX
FROM COMPETENCIES COMP
Similar Messages
-
How to save toolbar state in browser plugin?
How do I get the Reader browser plugin to save the toolbar state?
I'm using Adobe Reader XI as a browser plugin in Firefox. I've set it to disable Read mode by default. I like to have several tools at my disposal, so I right click the toolbar and show all the page display tools that I like. When I quit and load a new PDF in the browser, the toolbar state is lost and I have to show all my favorite tools again. This gets annoying when done repeatedly throughout the day.
The native Reader program saves toolbar state. Why not the plugin?Toolbar entries for the desktop and browser instances are different, so what you assign in one won't update the other. That's because a lot of things aren't allowed in the browser plugin. You can't directly manipulate the toolbar options in the browser instance of Adobe Reader XI, they're factory-defined.
-
Saving checkbox-state to table in Interactive Report
Hi,
I have been working with the information on http://www.apexninjas.com/blog/wp-content/uploads/2012/03/Checkboxes_in_Interactive_Reports.pdf to create an interactive report with a column containing a checkbox for each row.
My report contains the following (simplified):
Task_id, Employee_id, Checkbox_column
The checkbox_column keeps track of which employees work on which tasks, so it could be:
Task_id, Employee_id, Checkbox_column
1 1 0
1 2 1
1 3 0
signifying that only employee 2 works on task 1.
Now, I need to be able to change the 0 to 1 by clicking the checkbox, which already is possible, but I have problems saving that row to the database. Saving the checkbox state is also included in the PDF I used (page 12-14, 'Saving the checkbox state #2'), but I don't really understand where to put the scripts, I haven't worked with scripts and processes before so I could use some help understanding which script I need to put where. All in all, it's not too much code, I just don't understand where to put it.
The scripts mentioned in the PDF are:
The first one is a SQL-statement or a package, I imported the package in my environment, so I won't put the SQL here
This is the only one I know where to put:
<script type="text/javascript">
function getCurIRTab()
var temp_base_report_id = $v('apexir_report_id');
return temp_base_report_id;
</script>
This I don't know where to put:
<script type="text/javascript">
document.getElementById('P_IR_REPORT_ID').value = getCurIRTab();
</script>
the PDF says:
Now, create a hidden (just hidden, not protected!) item called P_IR_REPORT_ ID inside a HTML region.
Important! This region has to be rendered afterthe Interactive Report, so create it in the “after footer” display point!
In this regions’s footer paste the following JavaScript code, that will assign the hidden item P_IR_REPORT_ID the value of the Interactive Report ID.
But can we create a region in the after footer?
This I don't know where to put because the document doesn't specify it:
apex_ir_query.ir_query_where
(:APP_ID,--application id
99,--page id
:SESSION,--sesion ID
: P_IR_REPORT_ID -–interactive report ID);
This I don't know where to put, but I guess it's a 'processing' process:
declare
whereStmt varchar2(2000);
sqlStmt varchar2(2000);
begin
whereStmt := apex_ir_query.ir_query_where(:APP_ID,
99,
:SESSION,
:P_IR_REPORT_ID);
sqlStmt := 'update CHK_TEST set SELECTED = 0 where SELECTED= 1'||whereStmt;
execute immediate sqlStmt;
if APEX_APPLICATION.G_F01.COUNT>0 then
FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
update CHK_TEST
set VALID_LINE = 1
where SELECTED_ID = APEX_APPLICATION.G_F01(i)
and VALID_LINE = 0;
END LOOP;
end if;
end;
Can I please get some help understanding where exactly to put these scripts?
I've been looking around on the forum and Google but I can't find the detailed answer to what I'm looking for anywhere.
I am currently working with the test environment Oracle supplied us, because we are testing if we can use APEX at our company.
The version is Application Express 4.2.2.00.11 and it's running on Oracle 11g.
Just ask if you need any more info.
Thanks for the answers!
NDGPlease put together an example application on apex.oracle.com and provide developer credentials. This would help prevent multiple posts back and forth about try this, try that, now try this, now try that......
But until you do that try this:
I think you already know that the following goes in the page html header.
<script type="text/javascript">
function getCurIRTab()
var temp_base_report_id = $v('apexir_report_id');
return temp_base_report_id;
</script>
Alternately, since you are on apex 4.2 you could just add it to the Page Attributes->JavaScript->Function and Global Variable Declaration field (without the script tags):
function getCurIRTab()
var temp_base_report_id = $v('apexir_report_id');
return temp_base_report_id;
Now you need to create an HTML region (in display point "after footer"). Then you create the P_IR_REPORT_ID hidden item inside your new region.
In the region definition you will put the following code into the region footer:
<script type="text/javascript">
document.getElementById('P_IR_REPORT_ID').value = getCurIRTab();
</script>
Alternately, you could try to add the line to the Page Attributes->JavaScript->Execute when Page Loads field:
document.getElementById('P_IR_REPORT_ID').value = getCurIRTab();
This is just an example of the procedure call you will make in your page process.
apex_ir_query.ir_query_where
(:APP_ID,--application id
99,--page id
:SESSION,--sesion ID
: P_IR_REPORT_ID -–interactive report ID);
It is included in this code which you will put into a page process.
declare
whereStmt varchar2(2000);
sqlStmt varchar2(2000);
begin
whereStmt := apex_ir_query.ir_query_where(:APP_ID,
99,
:SESSION,
:P_IR_REPORT_ID);
sqlStmt := 'update CHK_TEST set SELECTED = 0 where SELECTED= 1'||whereStmt;
execute immediate sqlStmt;
if APEX_APPLICATION.G_F01.COUNT>0 then
FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
update CHK_TEST
set VALID_LINE = 1
where SELECTED_ID = APEX_APPLICATION.G_F01(i)
and VALID_LINE = 0;
END LOOP;
end if;
end;
Ok, clear as mud! -
How to save the state of a program ?
I am working on a program, where one can open several tabs with JEditorpanes, and in the tabs one can read a webpage. I was wondering if there is a way to save the state of the program. For example the program starts with three tabs, but say that the user opens three more tabs. How would one save this info, so that it could be retrieved again when the program is restarted ?????
Check out java.util.prefs.Preferences. This is the standard API for loading/saving preferences between sessions of an application.
-
How do you save "game state" so the user can continue next time?
I'm not sure what the correct game terminology is for this, but how do you save "game state" so the user can continue next time?
This seems like a pretty important feature for building some games, we don't want users to have to start over everytime.
Any ideas if this is possible?Check out my blog post on the PersistenceManager:
http://www.unitedmindset.com/jonbcampos/2010/11/01/flex-4-5-persistencemanager/
This will help you understand how to store the data. When the app starts up again get the state information from the persistencemanager and reset you game to the state you need. It requires a bit of code for the startup, but it is relatively simple. -
My mac no longer saves its state when the battery runs out.. ??
Earlier when My mac drained it's battery & was not plugged in, it would give me a warning then save it's state & shut down.... Now 1 1/2 years into my Macbook Pro 17" intel it turns off but doesn't save my state, so anything not saved is lost.. (basically as if the power was pulled ) is there a setting for this ? or is my battery no longer performing well enough for my mac to safely save it's state before it turns off ?
Anyone ?
Cheers Tom....Battery Information:
Model Information:
Serial Number: SMP-ASMB014-38a8-97f
Manufacturer: SMP
Device name: ASMB014
Pack Lot Code: 0002
PCB Lot Code: 0000
Firmware Version: 0110
Hardware Revision: 0500
Cell Revision: 0102
Charge Information:
Charge remaining (mAh): 3728
Fully charged: No
Charging: Yes
Full charge capacity (mAh): 3728
Health Information:
Cycle count: 242
Condition: Check Battery
Battery Installed: Yes
Amperage (mA): 163
Voltage (mV): 12599
System Power Settings:
AC Power:
System Sleep Timer (Minutes): 105
Disk Sleep Timer (Minutes): 180
Display Sleep Timer (Minutes): 90
Automatic Restart On Power Loss: No
Wake On AC Change: No
Wake On Clamshell Open: Yes
Wake On LAN: Yes
Display Sleep Uses Dim: Yes
Battery Power:
System Sleep Timer (Minutes): 15
Disk Sleep Timer (Minutes): 10
Display Sleep Timer (Minutes): 3
Wake On AC Change: No
Wake On Clamshell Open: Yes
Display Sleep Uses Dim: Yes
Reduce Brightness: Yes
Hardware Configuration:
UPS Installed: No
AC Charger Information:
Connected: Yes
Charging: Yes -
Try to get the checkbox state into a var from an if Flash CS3
AS2.0
When I press a button I have set up to email I cannot seem to
get the state of the checkbox working.
I can get a value but is always the same weather ticked or
not. below code always returns no
Please can anyone help
on (release) {
if (this.RSVP_text_popup.Check_box.selected) {
var Coming = "Yes";
} else {
var Coming = "No";
var subject = "Wedding Invite "+GuestsNames.text+" "+Coming;
var body =
_root.RSVP_text_popup.RSVP_bodycopy.body_Text.text;
getURL("mailto:[email protected]"+"?subject="+subject+"&body="+body);
}use trace(this.RSVP_text_popup.Check_box) to confirm the
problem is an incorrect path/name issue. -
Sometimes Undo is "Undo Save History State for Image"...
Anyone know why the Undo command occasionally produces "Undo Save History State for Image" rather than a proper undo of the last operation?
I am aware of your contribution to this forum and genuinely have utmost respect for what you say, however without getting too heavily into the semantics of the meaning of the word “bug” I would truly appreciate your thought on this …
b_gossweiler wrote:
If you export (or also print) an image, an entry is inserted into the develop history of the image. Although these steps (export, print, ...) cannot be physically undone, the undo removes this history step from the develop history of the image. This makes sense and - IMHO - is not a bug at all.
Beat
Would it not be reasonable that when a user requests an “undo” that they would expect this to undo the last thing “they” did regardless of what any background task is doing?
If this does occur when performing some background task on several hundred or thousand images does this mean that they could struggle to actually achieve any meaningful undo operation on what they are currently working on because they could be attempting to undo many state changes? If so, could one consider that from a user’s perspective the undo mechanism is actually broken in this scenario?
If they request an “undo” and it does not perform to the users reasonably expected behaviour would it not reasonably be considered at least undesirable if not a bug?
If they perform an “undo” and they get this message have they actually undone something which might be important?
Even if it has no ill effects the message alone could be unsettling and confusing to users?
You say it makes sense and I know I’m slow, but I would not expect a user to see this message when the user wants to undo for example the modification to exposure or other slider they have just changed.
I’m not hung up on this as I have seen no ill effects other than mild inconvenience; however I would respectively appreciate your views on how this “makes sense” from a user’s perspective. -
Method to save application state just before quit
I am using the user preferences to save the state of my game so that when a user goes away and comes back, it comes back at the same place they left. However, I am saving to this every turn. Is there a better way of doing this. Putting it in the applicationWillTerminate method maybe? If so, I'm not quite sure how to accomplish it there. Can anyone give any advice on this?
Thanks.I made it work by setting up the MainViewController as a class and a variable in the Application Delegate. Then once the MainViewController was established, I called a method I put into the Application Delegate to set that variable to "self" (meaning MainViewController instance). Finally, in the applicationWillTerminate method of the Application Delegate, I used that variable to call the save method in the MainViewController.
Perhaps this is difficult to follow without seeing the code, but does this sound overly complicated, or about right?
Thanks. -
Hi Everyone,
I'm sure I'm doing something really dumb here but I cannot
get my checkbox state to show as true when making a call from my
Access database. The checkbox just displays unticked. The code I am
using is:
<input <%If
(CStr((rsEditProfile.Fields.Item("approvedSupplier").Value)) =
CStr("true")) Then Response.Write("checked=""checked""") :
Response.Write("")%> name="approvedSupplier" type="checkbox"
id="approvedSupplier">
The databse record is selected and so is true but the
checkbox doesn't diplay ticked. Any help please appreciated.
Ta Jules xI found a page that I did and copied the code and replaced
with your values,
the values are in a different order...who knows. I also
noticed your
response.write had some extra "
<input <%If
(CStr((rsEditProfile.Fields.Item("approvedSupplier").Value)) =
CStr("TRUE")) Then Response.Write("checked") :
Response.Write("")%>
name="approvedSupplier type="checkbox" id="approvedSupplier"
value="TRUE">
"Julesmg" <[email protected]> wrote in
message
news:f4ufnm$5ab$[email protected]..
> Thanks for the suggestion, but it makes no difference.
The feild updates
> OK
> when I submit a ticked checkbox but just will not show
as ticked on the
> resulting page. ASP is now:
>
> <input name="approvedSupplier" type="checkbox"
id="approvedSupplier"
> value="TRUE" <%If
>
(CStr((rsEditProfile.Fields.Item("approvedSupplier").Value))
> = CStr("TRUE")) Then
Response.Write("checked=""checked""") :
> Response.Write("")%>>
>
> It's got me stumped!!!
> -
I am looking for the option to save zoom state per page in a PDF portfolio. I know there is a key board shortcut to set the zoom per page and save it but can't remember what it is.
Toolbar entries for the desktop and browser instances are different, so what you assign in one won't update the other. That's because a lot of things aren't allowed in the browser plugin. You can't directly manipulate the toolbar options in the browser instance of Adobe Reader XI, they're factory-defined.
-
How to save session state for a text item
hi @averyone,
i designed in interactive report with one apex_item.text field, let's name it "count"
normally the report has more then one pages.
the report should work like a kind of a shopcart.
the user enters some data into "count" and moves on to the next page(s) enters some more date and so on.
at the end he/she will press an button to save the data into his shopcart.
now the problem:
whenever the page is changed, all data in "count" is lost because the column has no sesseion state.
any suggestions how to solve this issue without saviing the date in the database everytime the page ist changed?
thanks in advance
peterSimon,
i solved the issue using an existing table, which should act quite similar to collections:
at user request i store all entries in this table & a the end a list of selected rows is presented to the end-user.
thanks 4 ur assistance
p.s have a look at the apex api "APEX_ITEM.DISPLAY_AND_SAVE" ? -
How to save Checkbox inputs as a Variants in WD ABAP
Hi,
I am going through this nice blog [http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414700)ID0832150950DB20043138143752756391End?blog=/pub/wlg/10731] which helped me creating varaint options for SELECT -optins fields.
Everything works fine..
Now I want to save some selection screen Check boxes , plus input fields in to this.
I have NODE called ATTR in which I have checkboxes attributes like ATT1,ATT2,ATT3 etc..
So what I was trying to pass the checkbox values by reading and then assigning it to lv_att1 but it says i cannot change value..
where am i going wrong?
method HANDLEFROM_SAVEVARIANT .
DATA lo_nd_attr TYPE REF TO if_wd_context_node.
DATA lo_el_attr TYPE REF TO if_wd_context_element.
DATA ls_attr TYPE wd_this->element_attr.
DATA lv_att1 LIKE ls_attr-att1.
** navigate from <CONTEXT> to <ATTR> via lead selection
lo_nd_attr = wd_context->get_child_node( name = wd_this->wdctx_attr ).
* get element via lead selection
lo_el_attr = lo_nd_attr->get_element( ).
* get single attribute
lo_el_attr->get_attribute(
EXPORTING
name = `ATT1`
IMPORTING
value = lv_att1 ).
wd_this->lt_att1 = lv_att1.
wd_this->lt_range_table = lt_range_table .
wd_this->M_HANDLER->SET_RANGE_TABLE_OF_SEL_FIELD(
exporting I_ID = 'PS_PSPID'
IT_RANGE_TABLE = lt_range_table ).
IHi iam a starter in ABAP and i got a small error while coding that is
PARAMETERS:
ABAP AS CHECKBOX.
SELECTION-SCREEN COMMENT 5(4) text-010.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS:
MM AS CHECKBOX.
SELECTION-SCREEN COMMENT 5(4) text-011.
SELECTION-SCREEN END OF LINE.
selection-screen end of block nam1.
if ABAP = 'X'.
WRITE ' YOU ARE ELIGIBLE CONSULTANT'.
ENDIF.
in the above code my requirement is when i check the abap the following msg must be showed in the output screen but its not showing..
please help me if anyone knows how to do it. thank you.
And this is the part of the code if anyone want to see whole code it is attached with this thread. -
How to save the state of the changed visible layers in pdf, pre-designed in Indesign
Hi,
I have made an Indesign (CS 5.5) file with some textfields (no button), and interactive buttons. And saved it as Interactive PDF.
I have made a fillable form out of the textfields in Adobe Acrobat Pro X, and the interactive buttons are working in PDF.
When you open the PDF in Acrobat Reader or Pro, fill in text and change a state of the button and save the file: all the changes (text and state) are saved.
When you open the PDF in Acrobat Reader or Pro, fill in text and save the file: the changes (text) are saved.
When you open the PDF in Acrobat Reader or Pro, and only change a state of the button and save the file: the changes are NOT saved.
What I mean with states of a button: SHOW/HIDE or ON/OFF etc.
Does anyone know what I'm doing wrong. Or is it not possible to only save changes in states of a button?
Thanks in advance for thinking with me.
JosianeYou would have to check your color management and things like overprint settings or the ink levels of the color components. Streaking is usually a sign of areas getting oversaturated and the automatic adjustments in the printer driver being unable to compensate. and then of course other factors may figure in like banding inherent in using gradients across large areas, out of gamut issues for certain colors and what have you. You'd have to be much more specific about all of that for anyone to even begin to advise specifically...
Mylenium -
HELP: How can I save page state on UIX page...
I have a fallowing situation:
1. I create UIX application with Wizard based on one ViewObject
2. When I get a page with ViewObject in table style I travers up and down through records and make some updates and create new records
3. But when I go back from update and create pages I always get initial browesing page.
My question is: how can I save state of browsing page when I return to it from update and create or any other page (save position look hide/show mode or anything else)?
I try to use StateManager class but I faild.
Can anybody help me or describe how can I do it on one example?
Thanks!Attila,
Sounds as though you want to remember the interactive state of your pages across requests.
That means you'll need to store the interactive state of your pages in something like the HttpSession that has a lifecycle spanning across multiple requests.
If you make your pages interactive using the HttpSession, then, when you navigate back from another page, they should still be in the state you left them.
The built-in data provider name for the HttpSession in uiXML is ctrl:httpSession. Use this to data bind the interactive attributes of your page, such as the disclosed attribute of HideShow.
In your event handlers, update the HttpSession to make your page interactive.
Be careful to use different keys to store information in the HttpSession for different pages.
Maybe you are looking for
-
Shuffle 1st gen works only in usb port, 2nd gen shuffle isn't noticed
I am aware these problems have not been solved anywhere on the internet but im praying someone has the answer to it.....maybe even someone from apple (but i dont think they care) Lets start with my 1st gen shuffle 2 years ago it was accidently washed
-
Macbook died for no reason at all
I'm stumped. One minute my macbook (2008 model) was fine & the next it just wouldnt turn on. It's dead. I've checked the battery (full power), the power adapter...tried all the steps given in the apple pamphlet. Nothing. Oh, and it's one week out of
-
An unknown error has occurred when I try to login my apple account
I haven't use my laptop for one month. I just found I cannot login the app store with my apple account, so i cannot purchase upgrade apps. I am using mac pro. And I just change my account password, and can login the iCloud. Help me, thank you
-
Icons not appearing correctly on iPod 2G
Anyone know if this is fixable? It's only some icons.... most of them look fine.
-
Hide ADF components in email notification Human Task BPM 11g
How can I hide ADF components in email notification? I what to hide some buttons and comments section. I'm using BPM 11g 11.1.1.6 Thanks everybody.