Deactivating a page element based on the value of another element on the page
HelloI have a page element I want to turn off if the value of another article (drop-down list item) is set to a specific value. I followed the example in the book 'Pro Oracle APEX"(p.320) in this regard. He ordered me to do this in the HTML form element attributes for the element section:
OnChange = "htmldb_item_change (this); html_DisableOnValue (This, 'Closed', 'P3_PRIORITY', 'P3_ASSIGNED_TO'); »
It works very well. It disables the element I want to disable. HOWEVER, it does not neutralize the article unless the element with the onchange attribute is changed.
How can I add features to disable the second element, even if the first element does not change, but contains the value 'Closed' when the user of the first load of the page?
Thanks for your help and your insight!
-Reid
Hello Reid,
The easiest way would be to (also) a Condition only read the item that you want to disable.
Greetings,
Roel
http://roelhartman.blogspot.com/
Tags: Database
Similar Questions
-
Select list need to pass a value to collect information based on a value in another page
I have a page product - detail.php which is then sent to a cart.php I have a number of tables that are all United and that you show in the following statement. the results are displayed on the detail page
$var1_rsProduct = "-1";
If (isset($_GET['productID'])) {}
$var1_rsProduct = $_GET ['productID'];
}
@mysql_select_db ($database_beau, $beau);
$query_rsProduct = sprintf ("SELECT * FROM beauAW13_SizeList WHERE beauAW13_products.catID = beauAW13_Cat.catID AND beauAW13_products, beauAW13_Cat, beauAW13_products, beauAW13_Stock.") ProductID = beauAW13_Stock.ProductID AND beauAW13_Stock.SizeID = beauAW13_SizeList.SizeID AND beauAW13_products. ProductID = %s AND beauAW13_Stock.Stock! = 0 ", GetSQLValueString ($var1_rsProduct,"int"));
$rsProduct = mysql_query ($query_rsProduct, $beau) or die (mysql_error ());
$row_rsProduct = mysql_fetch_assoc ($rsProduct);
$totalRows_rsProduct = mysql_num_rows ($rsProduct);
I have a selection list that must demonstrate that the sizes.this is shown below
< select name = "select" id = "sΘlectionner" >
<? PHP
{}
? >
< option value = "<?" PHP echo $row_rsProduct ["StockID'];? > "> <?" PHP echo $row_rsProduct ["Size"]? > < / option >
<? PHP
} While ($row_rsProduct = mysql_fetch_assoc ($rsProduct));
$rows = mysql_num_rows ($rsProduct);
If ($rows > 0) {}
mysql_data_seek ($rsProduct, 0);
$row_rsProduct = mysql_fetch_assoc ($rsProduct);
}
? >
< / select >
It currently passes the value of <? PHP echo $row_rsProduct ["StockID'];? >
which is ok, as it is a so on single number completely the basket page, I need to get all this stockID size information
Here's an example:-
I used a stockID of 355
on the cart.php the stockID resonates on as 355 and size echoed the as 355, which is what I expected.
the stock table looks like this
StockID | ProductID. SizeID | Stock
---------------------------------------
355. 582. 14. 5
so
ProductID is jumper blue
Stock ID is unique number
SizeID = 14 = once size
Stock = 5 in stock
so I need in the basket tell
355 = 14 = unique size
I can then echo the correct size in single size and not of 355
I really hope someone can help
Thank you
Thanks for everyone's advice. I managed to make it work
I sent the stockID; go to the basket page, made a new variable based on the stockID made a request and got all the information based on the new variable stockID
<>
$newStockID = $XCart_StockID = ${$XCName} ["content"] [0] [$XCart__i];
@mysql_select_db ($database_beau, $beau);
$query_rsSize = "SELECT * FROM beauAW13_SizeList, beauAW13_Stock WHERE beauAW13_Stock.SizeID = beauAW13_SizeList.SizeID AND beauAW13_Stock.StockID = '$newStockID" ";
$rsSize = mysql_query ($query_rsSize, $beau) or die (mysql_error ());
$row_rsSize = mysql_fetch_assoc ($rsSize);
$totalRows_rsSize = mysql_num_rows ($rsSize);
?>
Select the list
-
How to highlight a cell IR report based on a value in another column?
I used the code below and the cell is highlighted for all use column formatting css #COLTOHIGHLIGHT #add to pageBut what I need is if the HIDDENCOL is 'OUT' value and Custom2 should apply if the HIDDENCOL has value 'IN' then custom1 should apply. How to do? Please help thanks loly
Sinduja Sivasailam wrote:
Thank you for your contributions. I understand the concern.
As suggested, I've reproduced the problem in the environment of the APEX.
Thanks for making the effort. I suggest the following approach, which is more flexible and allows a more efficient use of the separation of concerns as above. I created an example on a new page to illustrate this.
1. change the report query to
select jan , feb , mar , jan_st , feb_st , mar_st from project_status
2. in the report, set the month columns to display text and status columns to be hidden.
3. set the property Expression of HTML for each column of months to use a HTML
data
attribute to include metadata status as well as the displayed value:#JAN#
4. create a dynamic action after Refresh on the IR region to retrieve the status of project code in the columns of months and apply it as a class to the cell of report element:
Event: After refresh
Selection type: Region
Region:
Real Actions
Sequence: 10
Action: Run the JavaScript Code
Fire on Page load: Yes
Code
$('.a-IRR-table td [data-prj-status]').each(function () { var x = $(this); x.parent().addClass(x.data('prjStatus')); });
5 Add a style sheet to the page of Inline CSS property with a rule to set the background color of cell as required for each State of the project:
.a-IRR-table tr:hover td { opacity: 0.7; transition: opacity .1s } .a-IRR-table td.REQ, .a-IRR-table tr:hover td.REQ { background-color: #ff9; } .a-IRR-table td.INP, .a-IRR-table tr:hover td.INP { background-color: #cf9; } .a-IRR-table td.YTS, .a-IRR-table tr:hover td.YTS { background-color: #ccf; } .a-IRR-table td.CR, .a-IRR-table tr:hover td.CR { background-color: #f66; } .a-IRR-table td.COM, .a-IRR-table tr:hover td.COM { background-color: #9cf; }
-
How to merge values into a line, based on distinct values in another column
I have a table like
updatedby updateddate text
Approval John 1st May 2009 1 added file
Approval of John 1 May 2009 2 added file
May 2, 2009 1 deleted David approval form
I need the text column values to be concatenated and displayed for unique (updatedby updateddate) records. The output is something like
updatedby updateddate text
Approval of May 1, 2009 John save further approval 1 sheet, 2 added
May 2, 2009 1 deleted David approval form
I had planned to do it using PLSQL. Is there a way to achieve this in SQl...? Please suggestSQL> ed Wrote file afiedt.buf 1 with t as (select 'John' as updatedby, to_date('01-May-2009','DD-MON-YYYY') as updateddate, 'Approval record 1 added' as text from dual union all 2 select 'John', to_date('01-May-2009','DD-MON-YYYY'), 'Approval record 2 added' from dual union all 3 select 'David', to_date('02-May-2009','DD-MON-YYYY'), 'Approval record 1 removed' from dual) 4 -- END OF SAMPLE DATA 5 -- 6 select updatedby, updateddate, ltrim(sys_connect_by_path(text,','),',') as text 7 from ( 8 select updatedby, updateddate, text, row_number() over (partition by updatedby, updateddate order by text) as rn 9 from t 10 ) 11 where connect_by_isleaf = 1 12 connect by rn = prior rn+1 and updatedby = prior updatedby and updateddate = prior updateddate 13 start with rn = 1 14* order by 2 SQL> / UPDAT UPDATEDDA TEXT ----- --------- ---------------------------------------------------------------------------------------------------- John 01-MAY-09 Approval record 1 added,Approval record 2 added David 02-MAY-09 Approval record 1 removed SQL>
Edited by: BluShadow May 21, 2009 12:37
Argh! hair to the pole by SY -
You will need to change based on values in another article LOV...
Hi all
I got a mudbrick THAT LOV based on a value in another column. Let me explain... Assume that A value in the column is A1 then column B should show A11, A12, A13 and if column A is the value C cloumn B should show C11, C12... etc. The LOV will be static with some pre defined values. So all the LOVs will be defined in the forms. We just need to show based on the value in column A.
Please suggest.
Thank you.
Published by: Amit1cs on April 18, 2013 19:40Amit1cs wrote:
Hi allI got a mudbrick THAT LOV based on a value in another column. Let me explain... Assume that A value in the column is A1 then column B should show A11, A12, A13 and if column A is the value C cloumn B should show C11, C12... etc. The LOV will be static with some pre defined values. So all the LOVs will be defined in the forms. We just need to show based on the value in column A.
Please suggest.
Hello Amit,
Up to now, I understand, you can create several record group for a single LOV. before you display the lov just to change or assign the appropriate record group. You can use pre-text-element column B trigger and set the record group to your LOV.Hope this helps
Hamid
-
Turn off the cell table based on the contents of another cell
Hello
Using JDeveloper 12.1.2.3 and have a table where I want to disable a cell in the row, based on a value in another cell (in the same line) and vica versa, IE are mutually exclusive.
The photo below shows the two cells that need to be mutually exclusive. I have implemented this by setting the "Disabled" field to something like that
"#{row.bindings.LineOfBusiness.inputValue ne ""}"
I also put the autosubmit = true and added a partial trigger for the other column cell.
Should be simple enough, right.
The problem is that it doesn't work and all lines is disabled.
Any tips?
It turns out that I needed to check on
don't #{row.bindings.LineOfBusiness.inputValue ' 0'}
for the selectOneChoice, then it worked.
-
How to disable a page based on the value of another element on the Page element?
Hello
How can I turn a page element using javascript based on the value of another element on the page?
Eg: P1_TEXT want to be disabled if the value in P1_LCOK = "LOCK".
How can I do this using javascript. I want this implemt on loading the page.
Kind regards
BenzPut this function in the page header:
and call it in the footer:
f_disable_item;
Denes Kubicek
------------------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------------------ -
Disable the number of items based on the values of another page/table
Hi people,
I have a form with 15 fields such as:
Form1
id_plan = 1
level 1 = 2
level 2 = 2
level 3 = null
level 4 = null
level 5 = null
level 6 = null
and so on...
Later, in another form that I have:
Form2
ID
id_plan (from 'form1')
account: 10.01 (based on the number of decimal places defined on the level of 'form1')
So, I need to disable page Form1 items if I had some values of Form2. But only the levels where the account is registered. In the example above, only level 3, level 4, level 5, level 6 and so on would be activated.
Any suggestion?
I could put a read only condition for any page in question, is it good? or there is another suggestion?
Thank you
bsalvador
Hi people,
To resolve my issue, I used the read only option. I chose the body of the PL/SQL function returning a Boolean and put
Start
If (CST_RETURN_LEVEL(:P7_ID_PAR_PLANO_GER) > = 2) then
Returns true;
end if;
end;
where CST_RETURN_LEVEL is a function that returns the last filled level. If the point of the page is at level 2, I test, if CST_RETURN_LEVEL(:P7_ID_PAR_PLANO_GER) > = 2 then I returned true for read only and so on for other page elements.
Thank you
bsalvador
-
Show and hide the drop-down menus on the page of the product, based on selected values
Hello.
I wish that my product page to view different drop-down lists following, based on the values of individual drop-down list.
I managed to achieve this through JavaScript, but I don't like how it works.As far as I know, there is no identifier for each individual drop-down list to determine who it is, so I can't for the moment is to rely on their order in the DOM, which is bad and it is difficult for me to create a solution that might work for all products.
For example, if the following is a single attribute:
< div class = "catProductAttributeGroup" style = "" display: none; "> < div class ="catProdAttributeTitle"> metal Foiling < / div > < div class ="catProdAttributeItem"> < select > < option value =" ">--please select--< / option > < option value ="6051720"> not necessary < / option > < option value ="6051721"> sheet ONE side + £45 < / option > < option value ="6051722"> Foiling BOTH sides + £75 < / option > < / select > < / div > < / div >"
I would like to than the div outermost having some sort of html attribute that contains the product id attribute. Something like: data-attribute id = "XXXXXXX". Is this possible?
Here's what I have so far:
I use {tag_attributes_json}, {tag_product_json} and {tag_currency} to get these values in javascript on the page loading, so I can use them later.
Then, I hang on to change the events of the drodpowns I have and then toggle their visibility based on those who are selected. I rely on the jequery ': eq (n)' selector to achieve, I don't like. Is there an option with {tag_attributes} which to add additional information (such as the ID attribute on the menu drop-down) on the generated HTML code?All works in the beginning, but if I can 'Add to Cart', the product element get ajax-reloaded and events are suddenly off the hook, so it no longer works. For this one, there are two options:
1. I could hang on to an event that triggers once the product added to the shopping cart and the page is ready. Is there such an event?
2. I could set up my own add to cart using bcInternals.shop.addToCart. I tried to do this, but I have two problems with it.
a. addToCart seems add my selection twice, for some reason any. Any ideas what I could do wrong?
b. the news of cart in the upper right corner don't refresh. Apparently, he's trying to refresh, but there is a kind of access error in the script. This part is not yet fully added to the page, but there is a function which would add it to the basket at the bottom of the largest block of script. Am I using the function addToCart incorrectly?
It's the page, sure I have the feature added partial implementation:
The scripts are currently embedded in the HTML code. Once I put it in place correctly, I would like to extract in a separate file. Search for "'$productAttributesElement ' to find the block with the features and for 'productInfo' to find the part where I store the product with tags. _json data "
Hello
No worries, na not know if you have solved or that the answer was not helpful
You need trigger the script you in the presentation of product details model, or you can add a listener for the container of the product and to trigger the script if changes are detected.
Concerning
-
Change the type of region based on the value of the element
Hi all
Is it possible to change a type of model of a region based on the value of the page element?
For example, if I have a template type for the area has as the type of model and the region to hide/show for area B as hide/show as well.
I want that type of region B model will be replaced by a type of custom template based on the value of an element in A region.
Is this possible?
Enjoy your entries.
Thank you!Spriya wrote:
Hi all
Is it possible to change a type of model of a region based on the value of the page element?
For example, if I have a template type for the area has as the type of model and the region to hide/show for area B as hide/show as well.I want that type of region B model will be replaced by a type of custom template based on the value of an element in A region.
Is this possible?N ° you either need to have 2 instances of region B, based on different models and make one of them conditionally based on the value of the area A; or to develop a unique model with a structure that is flexible enough to be used in both cases and change its appearance and behavior, for example, Exchange classes in dynamic Action.
-
Dynamic action - set a value of element based on the selection of lines of report
Hi people,
Does anyone have an example how to set up a dynamic action, which could fill an element with the selected ID based on the selection of line of the report on the same page?
Demo:
http://Apex.Oracle.com/pls/Apex/f?p=19543:2
If I select an item in the report, then I would fill in 'Selected ID' element with the value of the selected report EMPNO line.
Later, I would use it for the display of parts of master / detail on the same page.
Thank you very much
TomasFor this sample page, add the following JS code to run when the page is loaded.
$('.highlight-row td').click( function(){ //fetch record id from the cell contents of first column in row id = $(this).parent().children('td:eq(0)').text(); //set page item to selected id $('#P2_SELECTED_ROW').val(id); });
-
Toggle controls simple form based on the value of an element
Is it possible to toggle the controls on simple form based on the value of an element?
for example, if P21_stat = 1 5 controls behave as type "View as text (saves the State)", otherwise they must be of type "text field"?
No work around if not?Hi Alex,
Look at the definition of the article page, you will find a 'readonly' section where you can specify a condition that this point should be readonly (in all other cases, it is a normal entry point).
brgds,
Peter-----
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
Work: http://www.click-click.at -
How to navigate to the next page based on the value returned by the method call inside the action attribute of the command key.
I use JDeveloper 12.1.2.0.0
< af:button id = "tt_b2".
rendered = "#{attrs.nextRendered} '"
partialSubmit = 'true '.
action = "#{attrs.backingBean.nextAction} '"
Text = "next".
Disabled = "#{attrs.nextDisabled}" / >
private static final String NEXT_NAVIGATION_ACTION = "controllerContext.currentViewPort.taskFlowContext.trainModel.getNext";
public String nextAction() {}
If (validate()) {}
updateModel();
Return NEXT_NAVIGATION_ACTION;
}
Returns a null value.
}
Use case is made for model train, which is being implemented based on this blog: http://javacollectibles.blogspot.co.UK/2014/10/ADF-train-template.html
We define a generic action following in the model, but the action must be called under certain conditions, based on the question of whether all validation controls had been passed on no.
You can do this in two ways:
1 returnValue = (String) ADFUtils.invokeEL("#{controllerContext.currentViewPort.taskFlowContext.trainModel.getNext}");
return returnValue;
2.
public String getNextTrainStop() {}
String nextStopAction = null;
ControllerContext controllerContext = ControllerContext.getInstance ();
ViewPortContext currentViewPortCtx = controllerContext.getCurrentViewPort ();
TaskFlowContext taskFlowCtx = currentViewPortCtx.getTaskFlowContext ();
TaskFlowTrainModel taskFlowTrainModel = taskFlowCtx.getTaskFlowTrainModel ();
TaskFlowTrainStopModel currentStop = taskFlowTrainModel.getCurrentStop ();
Terminus of TaskFlowTrainStopModel = taskFlowTrainModel.getNextStop (currentStop);
nextStopAction = nextStop.getOutcome ();
_logger.fine ("train, next stop:"+ nextStopAction ");
Return nextStopAction;
}
-
To access the elements of an array of elements based on the value of the attribute
Hi all
I create a BPEL 11 g process that calls a web service which returns a data table. I need iterator on the data elements and access based on their attribute value.
Here is a sample web service load:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/apps/inv/soaprovider/plsql/item_pub/get_item/"> <GET_ITEM> <Row> <Column name="ORGANIZATION_ID" sqltype="NUMBER">101</Column> <Column name="ORGANIZATION_CODE" sqltype="VARCHAR2">MyOrg</Column> <Column name="SEGMENT1" sqltype="VARCHAR2">MySegment</Column> <Column name="DESCRIPTION" sqltype="VARCHAR2">Upload 445</Column> <Column name="PRIMARY_UNIT_OF_MEASURE" sqltype="VARCHAR2">Each</Column> <Column name="PRIMARY_UOM_CODE" sqltype="VARCHAR2">EA</Column> <Column name="ITEM_CREATION_DATE" sqltype="VARCHAR2">01/21/2014 09:22:35</Column> <Column name="ITEM_UPDATE_DATE" sqltype="VARCHAR2">01/21/2014 09:22:35</Column> <Column name="REVISION" sqltype="VARCHAR2">0</Column> <Column name="REVISION_LABEL" sqltype="VARCHAR2">0</Column> <Column name="REV_CREATION_DATE" sqltype="VARCHAR2">01/21/2014 09:22:57</Column> <Column name="REV_UPDATE_DATE" sqltype="VARCHAR2">01/21/2014 09:22:57</Column> </Row> <Row> ... </Row> <Row> ... </Row> </GET_ITEM> </OutputParameters> </env:Body> </env:Envelope>
How can I get some columns based on the name of the column attribute?
I tried to do this:
bpws:getVariableData('getItemResponse','body','/ns7:OutputParameters/ns7:GET_ITEM/ns7:Row[$partIndex]/ns7:Column[@name='SEGMENT1'])
and
bpws:getVariableData('getItemResponse','body','/ns7:OutputParameters/ns7:GET_ITEM/ns7:Row[bpws:getVariableData('partIndex')]/ns7:Column[@name='SEGMENT1'])
but I got this compilation error:
Error (157): xpath expression "bpws:getVariableData ('getItemResponse', 'body','/ ns7:OutputParameters / ns7:GET_ITEM / ns7:Row [bpws:getVariableData('partIndex')] / ns7:Column [@name = 'SEGMENT1'])" appearing is not valid, because XPath query syntax error. The syntax error occurs when parsing bpws:getVariableData ('getItemResponse', 'body','/ ns7:OutputParameters / ns7:GET_ITEM / ns7:Row [bpws:getVariableData('partIndex')] / ns7:Column [@name = 'SEGMENT1']) expression XPath, posted on 112. The XPath query syntax was false; the exception was: anticipated :). Check the detailed origin described in the text of the exception message and verify that the XPath expression that is named in the error message is correct. The XPath expression is defined in the BPEL process.
I use JDeveloper 11.1.1.7.0
Thanks in advance,
Bill
Use an entitlement and copy node and you can get it to work by using the syntax below.
Assign an expression of the copy below syntax: -.
Query="/ns1:GET_ITEM/ns1:row[$index]/ns1:column[./@name='Segment1']"/ >
Query = "" / client: processResponse / client: result "/ >"
-
Redirect to different pages based on the value of linked report table
Hello
I wanted to navigate to different pages of a report link based on a value from the table on which the report is based. I was able to link to a particular page without any problem.
But I wanted to link to different pages depending on the value in the table. Please let me how can know I do this?
Thank youKaminey wrote:
I use Apex 4.2 and my report is a classic.If I click on empID in a classic report, now it redirects to page 1. Now what I want to do, if I click empID, if his role as MANAGER he should redirect to page 2 and fill out the form on the page with the details of the employee. The role of the employee is ANALYST should redirect to page 3 and fill in the form on the page with its details
This approach makes maximum use of the APEX has standard and minimizes the extra programming.
1. If it is not already included as a displayed value, include the role column giving the value of MANAGER/ANALYST as a hidden column in the report.
2. create the link in the column on the EmpID column, with the target of the link on the same page as the report and ask the role column value (for example #ROLE #).
3. on the page of the report, create a On Load: front branch to page 2, with an request = Expression 1 condition with 1 Expression defined for the MANAGER.
4. on the report page, create a On Load: front branch to page 3, with a Request = Expression 1 Expression 1 ANALYSTvalue condition.
Maybe you are looking for
-
Restore the backed up Notes of Time Machine
I was automatically save my com.apple.Notes on the time Machine and it's time that I need to restore an older version of the Notes. So I entered the Time Machine and restored the old version and that worked fine. I can see the dates of the oldest rec
-
iMessage "awaiting activation" international problem
So I went oversees and upon arrival, my IMessages by cell phone number worked perfectly on the wifi connection, but I had a hard time sending pictures/videos. I didn't have my ID apple connected to both, but I turned off IMessage and then back on...
-
YouTube displays a message 'Installation', but never finished. I'm unable to remove the YouTube icon or download a new copy.
-
BlackBerry smartphones when the keyboard slider is open screen won't tilt
Hi I do not know if it's by design or a bug, but if you have the physical keyboard open, then you try to reverse the screen horizontally, the screen doesn't flip. You must close the cursor of the keyboard, then it turns. Not a big deal, but it can be
-
Can I connect SQL Developer to Essbase?
I know that tools such as the table can connect to Essbase, but how can I connect Oracle SQL Developer to Essbase?