Assign cfinput checkbox value
I have following code to assign value from my stored procedures.
The text cfinput works to get value from stored procedure, but check box does not get value.
The check box value return to 1, but check box does not check.
I would like to know are there any way to assign a stored procedure value to check box.
Your help and information is great appreciated,
Regards,
iccsi,
<td><cfinput type="checkbox" name="Mychk" id="Mychk" value="#MySP.MyCheckValue#"></td>
<td><cfinput type="text" name="Mytxt" id="Mytxt" value="#MySP.MyTextValue#"></td>
fergusondj wrote:
First, you are completely wrong here. As I stated before ColdFusion will not omit anything from the form scope. It has no control over what the browsers sends to the server. The form field omission is done by the browser. There is nothing for CF to omit as the field would not be submitted by the browser.
I hope you can see that your arguments have leaned so far on misunderstandings. This time you make a shift within 3 sentences from 'scope', the word I used, to 'field'. The shift is subtle, but makes all the difference. The form scope I talk about pertains to ColdFusion, not to the browser.
To illustrate with a concrete example, suppose the form in question has a checkbox named chkbx. Suppose further that you submit the form without checking the checkbox. Then, on the CFM action page, ColdFusion will omit the key chkbx from the form structure. This is simply a statement of fact. It is true, whether or not the browser sends the field to the server.
Next, again you are completely wrong about the use of any of the cf ui tags (cfform, cfgrid, cflayout, etc.. ). These should not be used by someone learning CF, or anyone else for that matter. They don't teach you CF, the teach you how to do crappy UI that will not translate over to any other technology. A new developer is better off learning JS and how to build forms properly so that knowledge can translate to other languages.
If you were to look in StackOverflow you would people consistently trying to get people to not use the UI tags. Anytime someone posts a question about any of the UI tags, one of the first comments are generally.. "stop using the ui tags".
You might want to read this blog post...
http://www.raymondcamden.com/index.cfm/2014/1/23/Im-not-going-to-tell- you-to-stop-using-ColdFusion-UI-tags-anymore
Then check out..
https://github.com/cfjedimaster/ColdFusion-UI-the-Right-Way
Once again, you claim I am wrong when I mention another statement of fact. I have been around for a bit as a ColdFusion developer and am aware of the the issues regarding the UI tags. In fact, I myself have had to resort over the years to alternative solutions like Dojo, Ext and JQuery. However, this isn't about me.
Many colleagues use - and, if recent history is anything to go by, will in the near future continue to use - ColdFusion's UI tags. Especially, a lot of developers starting out in ColdFusion consider them simple, versatile solutions to their problems. Rightly or wrongly. That is simply a fact of life.
Naturally, I agree with you that more experienced developers owe it to the community to sound a note of warning about the issues that may arise with the UI tags. However, I do believe that such advice will be more effective if delivered with a tickle rather than a punch.
In my opinion, there is a psychological component to this. People invest time to learn ColdFusion, and good money to acquire a license. They want to believe in all the goodies the platform promises to deliver. They would hate and resist you if you attempted to spoil the dream for them. Ironically, your reference to Raymond Camden actually says something similar.
This reminds me of one of the best books on strategy I ever read, David Maister's Strategy and The Fat Smoker. Why would an intelligent man, a professor at Harvard, no less, continue to smoke, put on weight and avoid exercise even after his physician warns him of the impending danger to his heart? The answer is trivial and universal. It has little to do with rationality. The professor or the ColdFusion developer, like most human beings, prefers the easy life, wants to believe things will work out somehow today, and puts off difficult changes until tomorrow.
Similar Messages
-
Place default checkbox value "in SESSION" on initial page load
Oracle 11.2
Apex 4.1
Desire outcome: Chart renders on inital page load using default value of checkbox in query.
I have a checkbox with a default (checked) value. It shows checked when the page renders for the first time but the value is not in the SESSION state. I use this value in a query for a chart. I do not want to use a Submit button so I have a dynamic action submitting the value for the checkbox and the chart refreshes as desired when I check and uncheck the box.
I tried "Fire on Page Load" in the DA Execution Options, as well, but that caused a loop where the page renders and immmediately renders, and immediately renders, etc.
Is there a declarative solution that submits the current, in this case default, values when the page is loaded? I only need and want the default values used the first time the page is accessed. This is the initial page of the application but I need the same behavior on all pages for the separate checkbox selections found there.
May God Bless,
HowardHoward (DBA in Training) wrote:
If I remove the Default Value and add a Before Header page computation for the item with static assignment to
a:bI get the 2 A/B checkboxes, both checked, and the value is set in session state.If you log in here, you can see it up close and personal!
http://apex.oracle.com/pls/apex/f?p=21997:3 Login: Dever / Ima9Dever
The Default Value colon-delimited string must contain the checkbox values, not the labels. In a static LOV the checkbox options are specified as <tt>label;value</tt> pairs. Thus in your checkbox LOV the labels are A/B, whilst the values are a/b. The values are case-sensitive.
The Default Value should therefore be:
a:bwhereas you've specified:
A:BWith the checkbox item LOV Display Extra Values property set to Yes, APEX displays these extra values that are not included in the LOV definition as additional checkboxes. You can see this if you inspect the rendered checkbox elements in the HTML source:
<input type="checkbox" id="P3_CHECKBOX_0" name="p_v01" value="a">
<input type="checkbox" id="P3_CHECKBOX_1" name="p_v01" value="b">
<input type="checkbox" id="P3_CHECKBOX_2" name="p_v01" value="A" checked="checked">
<input type="checkbox" id="P3_CHECKBOX_3" name="p_v01" value="B" checked="checked">You get the a/b values defined in the LOV, plus the extra A/B values the LOV knows nothing about.
==== ) How do you keep it from setting/resetting these values each time the
page is rendered? The need is to do it only the very first time? ( ====Put a Value of Item / Column in Expression 1 Is NULL condition on the Computation. Problem then is that the computation will be run if the user can [legitimately] deselect all of the checkboxes, either leaving you back where you started, or requiring the use of a further item to flag whether it is the really "the very first time" (which I find intellectually deeply unsatisfactory). This may be a sign that the control should really be a radio group that always has one option set, rather than a check box. -
Send one of 5 checkbox values to a text field
I am trying to send the checked value of one of six checkboxes to a text field and just can't work it out. Can anyone help me.
Here is the script I have been trying to work with. I know it is wrong because it doesn't work.
var Architect = getField("Arch Chkbx")
var Engineer = getField("Eng Chkbx")
var Landscape = getField("Land ChkBx")
var Interior = getField("Int Chkbx")
var Other = getField("Other Chkbx")
if (Architect == "Architect") {
event.value="Architect";
else if (Engineer == "Engineer") {
event.value="Engineer";
else if (Landscape == "Landscape Arch.") {
event.value="Landscape Architect";
else if (Interior == "Interior Designer") {
event.value="Interior Designer";
else if (Other == "Other Designer") {
event.value="Other Designer";I got it to work using your suggestion and giving them all the same name and assign different export values. Thanks for the recommendation.
Here is the code that works. Thanks again GKaiseril!
function(){return A.apply(null,[this].concat($A(arguments)))}
var License = this.getField("Check Box10.0").value;
if (License == "Architect") {
event.value = "Architect";
else if (License == "Engineer") {
event.value = "Engineer";
else if (License == "Land") {
event.value = "Landscape Architect";
else if (License == "Interior") {
event.value = "Interior Designer";
else if(License == "Other") {
event.value="Other Designer";
else event.value =''; -
Assigning a default value to a field
Hello Everyone,
Could you please tell me how to assign a default value to a field in a transparent table, so that while creating an entry even if we don't enter the value, a default value will be assigned.
Thanks,
Anbu.Like this
DATA: BEGIN OF itab OCCURS 0,
field1 TYPE c VALUE 'X'
field2 TYPE c,
END OF itab.
append itab.
append itab.
You will have by default X set in both rows for field1.
Regards
Marcin
PS: Ooops I just noticed you meant transparent table but I wrote about internal one. As long as you maintain that table using maintenance view you can use event 05 - When Creating a New Entry and set fixed value for a field there. So whenever you create new entry it will receive that value.
Edited by: Marcin Pciak on Jun 23, 2010 8:57 AM -
Assigning a node value from an XML variable to a String type in Weblogic Process Integrator
Hi,
Is there any way to assign a node value from an XML variable to a String variable
in Weblogic Process Integrator...
Thanx.
Narendra.Nerendra
Are you talking about using Xpath on the XML document and assigning to a
variable, it is unclear what you are asking
Tony
"Narendra" <[email protected]> wrote in message
news:3bba1215$[email protected]..
>
Hi,
Is there any way to assign a node value from an XML variable to a Stringvariable
in Weblogic Process Integrator...
Thanx.
Narendra. -
Assigning a javascript value to a JSP variable
How do i assign a javascript value to a JSP variable?
eg
<%
String JSPvar;
%>
<script language="JavaScript1.2">
<!--
var javascriptVar="hey"
-->
</script>
<%
JSPvar = javascriptVar ???
%>You do know that the JSP runs on the server and generates HTML, including Javascript, that is executed on the client, don't you?
-
How to get Checkbox Value from Flex in PHP.
Hi,
I need to know how to get a checkbox value from flex in PHP-POST/GET because I don't know what is the value property of a checkbox in flex.
Please Help.Hi,
It is very simple. Follow the steps below to achieve the solution,
1. Write a check-box change event to capture the value of the check box. Store this value in a variable(say bolChkSelected:Boolean).
2. In step 1 you got the value of the check box. Now your aim is to send the value to php. Declare a httpService in your flex application(i think you are aware of using it).Ok..im writing it
<mx:HTTPService id="sampleService" resultFormat='e4x' url='http://yourdomain/file.php' result='handleResult()' fault='handleFault()'>
</mx:HTTPService>
3. Now the actual solution... u need to send the shcStatus in to php..
Declare an object to hold the data
var objparameters:Object={};
objparameters['CheckBoxdata'] = bolChkSelected;
--in the above line... 'CheckBoxdata' is used as a parameter to php..you shud have the same variable name while accessing in php file also..
in php file..
checkboxstatus = $_POST[''CheckBoxdata''];
echo checkboxstatus
thats it.. -
Get checkbox values from alv grid
Hi,
I'm using the function REUSE_ALV_GRID_DISPLAY and I'm showing a table with a field like a checkbox.
In USER_COMMAND FORM to get selected values do as follow:
CALL METHOD REF_GRID->CHECK_CHANGED_DATA.
And then:
loop at i_pos (my table) with checkbox eq 'X'.
endloop.
The first time I execute the ALV every thing is OK but if I do any action (I use the function 'BAPI_GOODSMVT_CREATE' ...), I refresh the data and I raise the alv again. In USER COMMAND FORM the code is the same and I can not get checkbox values.
Can someone help me please?
Thanks and regards.Hi,
Check this
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = pt_grpfcat[]
it_excluding = p_grpexcltab2[]
is_layout = pt_grplayout2
i_callback_program = sy-repid
i_callback_html_top_of_page = p_header
i_callback_pf_status_set = v_status_set1
i_callback_user_command = f_user_command1
i_screen_start_column = 25
i_screen_start_line = 5
i_screen_end_column = 80
i_screen_end_line = 20
it_events = i_events[]
tables
t_outtab = i_grpoutput.
form f_user_command1 using p_ucomm type sy-ucomm
rs_selfield type slis_selfield.
data p_ref1 type ref to cl_gui_alv_grid.
call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
importing
e_grid = p_ref1.
call method p_ref1->check_changed_data.
case p_ucomm.
when 'YCNC'.
leave to screen 0.
endcase.
rs_selfield-refresh = c_x. " Grid refresh < You need to fill up this
endform. " F_user_command1
aRs -
Retrieving checkbox values from JSP
In my program I have an 'ADD' form.
In that form I ask the question "Do you have a car?"
with a single checkbox for reply.
The code I use is below.
Can anyone tell me how to set the checkbox to 'ticked' or 'unticked' in my
main jsp by sending paramters from the ADD form's checkbox??
ADD FORM...
<form action='post' method='servlet/controller?task=addEmployee'>
<input type'text' name='emplpoyee'>
<input type='checkbox' name='car' value='true'>
<input type='submit' name='submit' value='Add'>
</form>
Through a class I retrieve the values posted
public Page doTask() {
Employees employee = new Employees();
employee.setName(request.getParameter("name"));
employee.setCar(Boolean.getBoolean(request.getParameter("car")));
try{
String submit = request.getParameter("submit");
if(submit.equals("Add")){
model.addEmployee(employee);
Page nextPage = new Page("/servlet/Controller?task=GetAllEmployeesTask");
return nextPage;
This class sends the parameters to my main JSP where
this information is inserted. ('employees.jsp')
my name is retrieved so...
<= employees.getName()>
how would I retrieve/set a checkbox valuerequest.getParameter("car")
the thing is that the browser will not send unchecked checkbox values. so you can only know it was checked by the presense or absense of the value. -
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")) -
How to send timer job email to "assigned to" feild value in a task list?
Hi All,
How to send timer job email to "assigned to" field value in a task list if due date is after two days from now?Create a SharePoint Designer Workflow and use "pause until date" option when an new item is created/update.
Using Server Object model, I believe you can create the timer job from item event receiver.
--Cheers -
How to Assign a Constant Value to a Dim. Member when pulling Master Data?
BPC Gurus:
I am trying load Vendor and Customer Master data into BPC dimension. My Dimesnion has memebrs: ID, EVDESCRIPTION, PARENTH1, TYPE. I have successfully pulled the ID and the description from 0CUSTOMER and 0VENDOR. However, I
need to have a ttext value for 'PARENTH1' and 'TYPE'. For Customers, I want to add a FIXED value "'CUSTOMER' for every
Customer ID pulled in and also for "TYPE", I want a value of "CUSTOMER". When I maintainthe Dimension, I want to see
th followingvalues:
ID EVDESCRIPTION PARENTH1 TYPE
0000000001 WALMART CUSTOMER CUSTOMER
0000000002 TARGET CUSTOMER CUSTOMER
and so ON
Since we have Vendor Numbers in the same Diemsnion, when I pull Vendors, I need to have similar values as:
ID EVDESCRIPTION PARENTH1 TYPE
0000005050 ABC Supply Inc. VENDOR VENDOR
0000005051 BASF VENDOR VEDOR
and so ON
How can assign a Fixed value to the member Propert? Can I achieve it in Conversion file....?
( My atempts failed...).
Any suggestion recommendation would be gretaly appreciated.
Munna.Hi,
For adding fixed values to the properties, you can use the transformation file. In the mapping section, you can specify a constant value. This value will be written to properties of all the members while importing master data. However, for parenth, its a bit different. First thing is that, you need to have a member called CUSTOMER, then only you can have CUSTOMER in the parenth column. Even if you add it and use the mapping section for this purpose, then it will write CUSTOMER to parenth for all the members (even to CUSTOMER member). And this will be wrong. So, you will need to write it manually.
Hope you got the idea. -
Can't assign a string value to a member of type TEXT in Calculation Manager
I can assign a string value to that member of type TEXT using a run-time prompt of type StringToNumber.
Example: "My Text Member" = {string_rtp};
However, I need to accompllish the same function without using a run-time prompts.
I have a planning application and I know that text along with all other non-numeric
values are stored on the relational side in the planning application schema.
It seems reasonable to assume that if this can can accomplish
with a run-time prompt that I could do also do it without a run-time prompt.
What appears to be lacking is a function like:
"My Text Member" = @StringToNumber(<String Literal>);
Clearly, this is already being done "under the covers" for run-time prompts. If
would appear to be a minor enhancement to expose such a function to developers.
NOTE: I suppose you would also need to add new syntax/function to identify a string
literal from say a member name. I'm wondering if this is the more difficult challenge
from a product perspective????When executing a Calculation Manager rule in Planning, the run-time prompt (RTP) is populated by looking up the outline information present in the relational Planning application database. If the RTP is of type TEXT, the strings displayed in the member select are from the from the relational Planning application database too. Subsequently when executing the Rule, the RTP's value is in fact the record ID (a number) which is then saved into the appropriate intersection in Essbase.
You need to bear in mind, the Rule is executed in Essbase. If Essbase needs to "write" a text, it would then need to connect to the Planning relational database to create a new record. The newly created record ID then needs to be feed back to Essbase, in order to store it in the appropriate intersection.
What you are suggesting, comes with a big overhead causing Essbase and the rule to slow. Thus, the disadvantages outweighs the advantages. -
How to assign a default value to a column ?
Hi
In the Object browser is it possible to modifiy a column in order to assign a defalut value to the column ?
I have a table FICHE in which I want to assign a default value 0 to a column which type is NUMBER.
Thank you for your kind answers.
Christian.Hi Christian
For one reason or the other you can't do that using 'Create Column' or 'Modify Column'. You can only do that by issuing a SQL command : alter table fiche modify column( <column name> default 0)
HTH
Roel -
How to assign a default value when there is no prompted value
Dear all,
I create a filter and it's value is relate to a prompt.If the prompt is not fill I found that all record is selected.
How did I assign a default value so that when I didn't fill some value in to the prompt and still can get the result by
the default value I set?
Thanks a lot!Are you using dates for between or some character column?
Post your example.
Instead of between use to is equal prompts, so u will have then 2 fields one for date from a nd one for date to. Everything is the same as I wrote just repeat steps...
You must put 2 separate fields if you are using date between and you want to have default variable for both.
Column formula for the first calendar date prompt:
case when 1=2 then TIMES.TIME_ID else cast ('1.1.1900' as date) end
and for the second:
case when 1=2 then TIMES.TIME_ID else cast ('1.1.2900' as date) end
Now you set up default repository variable for both prompts.
Presentation variable you put in the set presentation variable on each prompt:
p_date_from
p_date_to
And in Answers filter will be like this:
*TIMES.TIME_ID between @{p_date_from}{VALUEOF("rv_test_date_to_char")} and @{p_date_to}{VALUEOF("rv_test_date_to_char")}*
or you can put a different default variables
*TIMES.TIME_ID between @{p_date_from}{VALUEOF("rv_test_date_to_char_from")} and @{p_date_to}{VALUEOF("rv_test_date_to_char_to")}*
I posted similar in my blog:
Date between in filter and title when using presentation variable from calendar dashboard prompt or drop-down list in OBIEE
http://108obiee.blogspot.com/2009/03/date-between-in-filter-and-title-when.html
Regards,
Goran O
http://108obiee.blogspot.com
Edited by: Goran O on 2009.04.23 03:37
Maybe you are looking for
-
"Authorization error" while accessing Multiprovider in Analysis for excel tool
Hi, We are using "Analysis for excel" 1.4 version. My users are executing all queries out of any MP with out any issue. But while accessing Multi Provider in "Analysis for excel" tool they are geeting "Authorization" error. Any suggestions please. T
-
Problem in language (numbers) after installing a new add-on
Recently I added this [https://addons.mozilla.org/en-US/firefox/addon/persian-plus-pack/ Persian calendar add-one] to my Firefox and nothing was wrong with it, except that in Persian websites the font of'' numbers'' are messed up. Now its font is par
-
Client application and axis communication
Hello all, here is my problem. I used axis to generated webservices stubs and skeletons from wsdl. I deployed the webservices using TomCat. Now I want to make a client application (CA) that can invoke the deployed services (no problem for that), but
-
HH3 & WD MyBookWorld NAS - strange !!!
Just got my FTTP installed two days ago and changed everything over to HH3 with little problems, except for my WD MyBookWorld NAS Drive. My Setup: iMac running 10.8.2 - connected to GiGE port 4 WD MyBookWord NAS - connected to port 2 What should hap
-
Label for htmldb_item.checkbox
Is there a way to put a display label for checkboxes rendered with htmldb_item.checkbox? I know it doesnt make much sense to put a label on every row next to each checkbox on a report region, but just wanted to know if it was possible. Thanks