Dynamically changing UI element property based on Checkbox selection
Hi,
I have a checkbox in my UI. On the selection of the checkbox, a dropdown must get enabled and when the checkbox is not selected, the dropdown should be disabled. Can someone tell me how i can achieve this?
Hi ,
bind ur checkbox and dropdowns enabled properties to context attributes of type WDY_BOOLEAN
suppose ur checkbox is bound to ca_check attribute under node cn_check
and ur drop down is bind to ca_drop attribute under node cn_drop
for the OnToggle Event of CheckBox , assign an action say act
and in Onactionact method , write the following piece of code :
DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
DATA ls_cn_check TYPE wd_this->element_cn_check.
DATA lv_ca_check LIKE ls_cn_check-ca_check.
* navigate from <CONTEXT> to <CN_CHECK> via lead selection
lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
* get element via lead selection
lo_el_cn_check = lo_nd_cn_check->get_element( ).
* get single attribute
lo_el_cn_check->get_attribute(
EXPORTING
name = `CA_CHECK`
IMPORTING
value = lv_ca_check ).
IF lv_ca_check = 'X'
DATA lo_nd_cn_drop TYPE REF TO if_wd_context_node.
DATA lo_el_cn_drop TYPE REF TO if_wd_context_element.
DATA ls_cn_drop TYPE wd_this->element_cn_drop.
DATA lv_ca_drop LIKE ls_cn_drop-ca_drop.
* navigate from <CONTEXT> to <CN_CHECK> via lead selection
lo_nd_cn_drop = wd_context->get_child_node( name = wd_this->wdctx_cn_drop ).
* get element via lead selection
lo_el_cn_drop = lo_nd_cn_drop->get_element( ).
* set single attribute
lo_el_cn_drop->set_attribute(
EXPORTING
name = `CA_DROP`
value = 'X' ).
ELSE.
lo_el_cn_drop->set_attribute(
EXPORTING
name = `CA_DROP`
value = ' ').
here ur drop down is bind to ca_drop attribute under node cn_drop.
rgds,
amit
Edited by: amit saini on Sep 24, 2009 1:42 PM
Similar Messages
-
Alignment of dynamically changing StaticText element
Having a little trouble centering a dynamically changing StaticText element whose parent container has its alignChildren property set to 'center'. As the text of the element changes, new strings that are assigned to it are truncated to the length of the string the element initially held. If I initially place a string of blank characters that is longer in length than any anticiapted text string the element will ever hold, when the text is updated it is offeset to the left by the number of characters of the initial string that are in excess of the length of the string newly assigned to it. Any ideas or suggestions would be very much appreciated.
Set the initial size of the StaticText with the "characters" property, which will reserve width so it is the proper width.
Also set "justify" to "center" so that it will always be centered within that space.
Note that "characters" is an initial creation property only, and cannot be set after the object has been created. -
Dynamic variation of prompt clause based on user selection
Hi,
I would like to know if there is any possibility to change the query to have 'IN' clause or '=' clause based on user prompt selection.
Say, if user enters single value for a prompt, the query should have = clause and when enters multiple input, the query change to IN clause.
HummingBird tool has the capability to dynamically change between = and IN based on the prompt selection.
There seems to be some issue in performance because of the IN clause we’ve used while passing single prompt value when compared to Hummingbird tool.
Is it possible in BI Publisher???Hi ,
It is not possible to select the IN or = based on Prompt selection directly..
You can Use IN..that will work as = also..
Thanks,
Ananth -
Dynamical change read only property of columns based on a profile option
Hi,
We are attempting to change a Oracle iProcurement(ShoppingCartPG) which has certain readonly columns by default.
However, we need to make these columns updateable based on a responsibility level profile option. The code goes something like this.
if readonly_profile_option = "TRUE"
{make columnA property = readonly}
else if readonly_profile_option = "FALSE"
{make columnA property = updateable}
I read the guide about switchers and it seems confusing (to me). So if someone can provide an example with some pseudocode that will be helpful.
Also, can I dynamically add an LOV to column A if readonly is false? Of course the LOV should be disabled if readonly.
Thanks a lotHi,
Thanks for the feedback.
Tapash,
Switchers definitely don't make sense.
Raffy,
Didn't know it was that simple. I always thought that the controller fires--> then the page renders --> then the VO attributes get poulated. Basing my understanding on this flow, I though that the bean properties can only be set in controllers and not in VOs(via SPEL). I'll try it tomorrow.
Aprreciate your comments on the following.
Our requirement is to make an Oracle seeded field(SupplierName in iProcurement) updateable and with an LOV . Oracle has seeded it as ReadOnly.
I have two options.
1. If I change the readonly property in jedeveloper(I cannot access it via personalization) and add SPEL that would be upgrade 'unsafe' customizing - I think.
2. So I thought I'll extend the controller, substitute it and use
messageLOVInputText SupplierNameBean=webbean.findChildRecursive("SupplierName");
if{profle=not_read_only)
{SupplierNameBean.setReadOnly(false)};
else
{SupplierNameBean.setReadOnly(true)};
This is more upgrade safe. I have talked to the iProc development team and they are fine with it. -
Dynamically changing the list item based on another list item
Hi all,
I have two fields that are list items.
First list item contain two list values: Regular and One-time
In second list item if user select the Regular then below values should appear:
Daily wages
Activity Linked
Fixed Contracts.
Contract Staff
Outsourced
if user select the one-time then below values should appear:
Projects
Repairs & Maint.
Please do the needful.First list item contain two list values: Regular and One-timeYou simply need to add a conditional check to the When-List-Changed (WLC) trigger to see which value was selected. Then, as Manu suggests, you will populate the Poplist based on the selected value.
For an example of how to dynamically populate a Poplist item, take a look at: Forms: How to Dynamically Populate a Poplist.
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
Dynamically changing break order property
I have a report that has four different fields that the user can break on. Does anyone know how to dynamically change the break order depending on which field the user choses as a parameter.
ThanksAlias the break columns.
select &p_col1 break, col2...
from tablename
then send to the report the name of the break group column.
The initial value of p_col1 should be set to 'xxxxxxxxxxxxxxxxx' enclose in quotes. Take care at the length of the string. This is the only thing that determines the length of the field. -
Calculate value based upon checkbox selection
G'day people,
I've got myself a bit stuck on a job I've got here, this javascript is getting the better of me.
The idea is that this script takes the sub total, and adds a creditcard surcharge (as a percentage) based upon a checkbox selection, then spits out the value to be entered into another field.
If anyone could have a quick look over the following and let me know where I've gone wrong, it would be appreciated.
var subtotal = this.getField("SubTotal").value;
var mastercardTick = this.getField("MasterCard");
var visaTick = this.getField("Visa");
var amexTick = this.getField("Amex");
var surcharge = this.getField("CreditSurcharge").value;
var creditcard = this.getField("PayCredit").value;
if (creditcard.value === "Off") {
event.value = 0;
} else {
if (mastercardTick.value === "Yes") {
surcharge.value= (1.2 / 100) * subtotal.value;
} else if (visaTick.value === "Yes") {
surcharge.value = (1.2 / 100) * subtotal.value;
} else if (amexTick.value === "Yes") {
surcharge.value = (3.75 / 100) * subtotal.value;
} else {
event.value = 0;Thanks George, I've given this a whirl and got very close... I got a NaN error, and found I was calling "SubTotal" a value twice, which was playing funny buggers!
I've got rid of one part (the if creditcard.value === "Off") as it wasn't acting like it should. I think I had to put it in a seperate function, to be called seperately then the rest of the code... However, I need to get the job out and it wasn't crucial.
Thanks for your help mate, appreciated.
For anyone else that's interested, amended code is as follows:
var subtotal = this.getField("SubTotal");
var mastercardTick = this.getField("MasterCard");
var visaTick = this.getField("Visa");
var amexTick = this.getField("Amex");
// var surcharge = this.getField("CreditSurcharge").value;
var creditcard = this.getField("PayCredit").value;
if (mastercardTick.value === "Yes") {
event.value = (1.2 / 100) * subtotal.value;
} else if (visaTick.value === "Yes") {
event.value = (1.2 / 100) * subtotal.value;
} else if (amexTick.value === "Yes") {
event.value = (3.75 / 100) * subtotal.value;
} else {
event.value = 0;
Not the nicest, but hey, it worked. -
Passing item id based on checkbox selection in sharepoint library
Seeking help on how to pass item id via query string into InfoPath form webpart (via connector)
I have the infopath webpart form and query string all set up and the url works when I provide the value required for the field
My problem is, the value will be driven by the user based on them selecting the checkbox next to the document in the library
Its then actioned through them selecting the quickstep button I have set up in the ribbon which has the url in it
The url I have set up is: http: / / test.abc.com.au/sites/abcd/Lists/NEW FEEDBACK/newform.aspx?title=blah
'title' is what the string is detecting and blah is what is being pulled through to the form
Any ideas?
Tom.Here is how you get selected items using JavaScript client object model:
var context = SP.ClientContext.get_current();
var selectedItems = SP.ListOperation.Selection.getSelectedItems(context);
var itemIds = "";
for (var i = 0; i < selectedItems.length; i++) {
itemIds += selectedItems[i].id + ",";
Blog | SharePoint Learnings CodePlex Tools |
Export Version History To Excel |
Autocomplete Lookup Field -
Change an Object property based on a value coming from the Excel sheet
hi all
i've been able to bind a value from the excel sheet to my my component
but i want to change a property of an object in my component based on this value at the run time.
during the design time, it works fine
for example, if my value called "_xvisible"
and i use to it to hide some object.
if i set _xvisible during the design time in excel, it works fine in the run mode.
but during the run mode, if the value got changed, there is no affect.
thank you
AmrHi
See the xcelsius samples present inside xcelsius SDK. there are examples describing how to bind data which will work at runtime also.
Hope this helps
Rush-me -
ADF MenuModel: Dynamic changes to shown property
Hi all,
I have been doing some testing, and not sure if this is a bug or I am doing something wrong. To set the stage, I've got a menu defined via managed beans (using the MenuItem, MenuModelAdapter, MenuTreeModelAdapter from SRDemo). I also have a session-scoped userInfo bean that tracks the usual stuff. I have exposed some boolean properties from this userInfo bean that are used in faces-config.xml to indicate whether the menu item should be shown or not.
My userInfo bean in the constructor, sets some default stuff, and the menu works correctly. However, if I make changes to the userInfo boolean properties, the menu is not picking up those changes; its as if the shown property is being set once and then not re-evaluated each time. I do not have any af:cache elements on my pages, so it's definitely not that. I know that the userInfo bean's properties are being updated, as I have other elements on the page that make use of it and are updating appropriately
Am I doing something wrong here, or are the managed properties going to be set once at the start and never changed again?
Kind regards,
JohnSome snippets:
one of my menu item's
<managed-bean>
<managed-bean-name>m_directive_create</managed-bean-name>
<managed-bean-class>view.menu.MenuItem</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>label</property-name>
<value>Create Directives</value>
</managed-property>
<managed-property>
<property-name>shown</property-name>
<value>#{userInfo.corporateUser}</value>
</managed-property>
<managed-property>
<property-name>viewId</property-name>
<value>/directive/ICCreateDirective.jspx</value>
</managed-property>
<managed-property>
<property-name>outcome</property-name>
<value>ICCreateDirective</value>
</managed-property>
</managed-bean>Managed bean:
<managed-bean>
<managed-bean-name>userInfo</managed-bean-name>
<managed-bean-class>view.UserInfo</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>In userInfo:
public UserInfo()
_corporateUser = true;
public boolean isCorporateUser()
return _corporateUser;
public setCorporateUser(boolean b)
_corporateUser = b;
}For testing, I've got a menu switch element on my Page:
<f:facet name="menuSwitch">
<af:menuChoice>
<af:commandMenuItem text="Corporate"
actionListener="#{superBean.corporate}"
selected="#{userInfo.corporateUser}"/>
<af:commandMenuItem text="Field"
actionListener="#{superBean.field}"
selected="#{userInfo.fieldUser}"/>
</af:menuChoice>
</f:facet>My superBean:
<managed-bean>
<managed-bean-name>superBean</managed-bean-name>
<managed-bean-class>view.backing.Super_backing</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>userInfo</property-name>
<value>#{userInfo}</value>
</managed-property>
</managed-bean>and finally superBean:
public void corporate(ActionEvent actionEvent)
_userInfo.setCorporateUser(true);
public void field(ActionEvent actionEvent)
_userInfo.setCorporateUser(false);
}Everything works, except that the menu (Create Directive in my example) is always shown. If I change it to false in the constructor, it is never shown.
Thanks for the help,
John -
Regarding dynamic changes in the layout based on the data received
hi,
i am trying to design an application using flex at the frontend and what i want is that based on the inputs given on the client-side the data received from the back end should change accordingly like the no of panels showing a particular information can vary depending upon the data and has to be adjusted
in a limited given space.how can i be able to acheive this dynamic display and change on the frontend arrangement of panels.
thanksHi Naidu,
In the Second Screen first Create all 15 Fields.
in PBO of Second Screen.
module STATUS_100.
In Program
Module status_100.
case FIELD_VALUE.
when 'X'.
loop at screen.
if screen-name = 'SCREEN_NAME' " The Field which you dont want.
screen-invisible = 1.
screen-active = 0.
modify screen.
endif. " Similary process for other Values aswell.
endloop.
endmodule.
Just you need to do little bit more work since this gives a clear Idea as how to proceed.
CHeerz
Ram -
Dynamically changing UI element 's binding
Hi Frnds,
how can we change a binding of a UI element at runtime. I guess method is REPLACE_PROPERTY_BINDING of CL_WD_UIELEMENT. Does anyone have any example for this..
Thanks
AnujHi Anuj,
the method REPLACE_PROPERTY_BINDING has 4 parameters ie 3 Importing and 1 Returning.
OLD_BINDING : Pass the current binding information. This information you will get from the wizard ie Elem_****
PATH : Just pass the attrubute path for which element you want to get it. this also can get through wizard. Here access the new context element.
BINDING_TYPE: CO_ATTRIBUTE_BINDING( Attribute Binding),
CO_NODE_BINDING(Node Binding)
CO_MULTI_ATTRIBUTE_BINDING(Multiple Attribute Binding)
CO_MULTI_NODERANGE_BINDING(Multiple Node Range Binding)
Warm Regards,
Vijay -
Dynamic Change Of Column Name based On The Dashboard Prompt in OBIEE 10g
Hi All,
I have a dashbord prompt called "calendar date". And, my report having some columns called "Product Name", "Code", "Yest Balance", "Today Balance". Now, while displaying the report in the dashboard, instead of "Today's Balance" they want to see the date which we have selected in the promt as a column name (each time we select a date in the promt, that would appear as a field name in stead of "Today's Balance" but values will be same (should show the balance for that date).
Please advice.
Thanks,
BK.yeah...you are correct....these are workaround ...no out of box solution.
Take the MAR11 target example in this current month is MAR 11 is populated by a session variable which gives you always current month.
Second using union -combined query creating a header from one report and results from other report.
But, coming to your req.......what ever the value selected in the calendar date that should come up in the column heading. so this is not possible with variable because for date of calendar image type you can not set a presentation variable. If not you can use a REQUEST VARIABLE.
You can try 2nd way creating 2 reports one for header other for value.
You can choose based on your flexibility. Instead you are showing the report along with prompt. I would suggest use appropriate name as 'selected date value'. -
How to script text field based on checkbox selection
I've written a script to format specific text boxes based on what checkbox is chosen. However, I'm not sure what I need to script in order to CLEAR the text field once the checkbox is unchecked. As it stands now if the checkbox is selected it formats the text field with the necessary information, but if it's unchecked the information stays in the box. I'd like to be something like 'if all boxes are Off then display 0.00.' I've included the current script for reference
var one = this.getField("Emp 500");
var two = this.getField ("Emp+C500");
var three = this.getField("Emp+S500");
var four = this.getField("Fam500");
var five = this.getField("NC500");
var six = this.getField("Medical");
if (one.value == 'Yes') {six.value='70.70'}
else if (two.value ==
'Yes') {six.value='127.20'}
else if (three.value == 'Yes') {six.value='141.32'}
else if (four.value == 'Yes') {six.value='198.00'}
else if (five.value == 'Yes') {six.value='0'}
var one = this.getField("Emp 1500");
var two = this.getField ("Emp+C1500");
var three = this.getField("Emp+S1500");
var four = this.getField("Fam1500");
var five = this.getField("NC1500");
var six = this.getField("Medical");
if (one.value == 'Yes') {six.value='61.47'}
else if (two.value == 'Yes') {six.value='110.49'}
else if (three.value == 'Yes') {six.value='141.32'}
else if (four.value == 'Yes') {six.value='123.04'}
else if (five.value == 'Yes') {six.value='0.00'}Hi Gayathri,
Gayathri Venugopal wrote:
Hi,
I have two text items. Need to create dynamic action for the following,
1. Order_type - Drop down values having CONSUMER & WHOLESALE.
2. Order_number- Text field
Order number should be disabled and only on selection of order type ,order number should be enabled.
Can someone please help me on this?
Create two dynamic action
1. Make it order number item disable on page load.
Event : Page Load
Action : Disable
Fire When event result is : True
Selection Type : Item
Item : Your order number item
2 . enable and disable order number on selection of order type(assuming when order type is null it is disable otherwise it is enable)
Event : Change
Selection type : item
Item : your order type item
condition : is not null
True Action
Action : Enable
Fire When event result is : True
Fire on page load : True
Selection Type : Item
Item : Your order number item
False Action
Action : Disable
Fire When event result is : False
Fire on page load : True
Selection Type : Item
Item : Your order number item
Hope this helps you,
Regards,
Jitendra -
Dynamic query table for report based on LOV selected
Hi,
Need some suggestion and guidance how to dynamically query table via lov for report .
Scenario:
Table, TABLE_LIST, has tablename (table in DB) and filter (for where clause) column. The TABLENAME_LOVE is derived from table TABLE_LIST.
SELECT TABLENAME D, TABLENAME R FROM TABLE_LIST
In Page 2,a page select list item,P2_TABLENAME to use TABLENAME_LOV
All data in tables in the table_list have identical structure (columns, triggers, primary key, and so on).
I want to have the report region query from the table based on selected LOV.
Example,
Tablename Filter
TB1
CD2 ACTIVE='Y'
When select TB1, the report regin will query based on TB1.
When select CD2, the report regin will query based on CD2 WHERE ACTIVE='Y'
Question:
How can I query based on &P2_TABLENAME. WHERE &P2_FILTER.
Like
select col1, col2 from &P2_TABLENAME WHERE &P2FILTER
Greatly appreciate any suggestion and some guidance.
TigerwapaHi,
You should always post your Apex version, DB version and other information as suggested in the FAQ.
And the moment you talk report you should state whether it is IR or Classic.
As for your query, have you explored the Report type "SQL Query (PL/SQL function body returning SQL query)" ?
That might be a good fit for what you are trying to achieve.
Regards,
Maybe you are looking for
-
Error while deploying a web service whose return type is java.util.Date
Hi I have written a simple web service which takes in a date input (java.util.Date) and returns the same date back to the client. public interface Ping extends Remote * A simple method that pings the server to test the webservice. * It sends a dateti
-
Using AVS Video Converter 5.5 for DVD on iPod
i just got AVS Video Converter 5.5 and converted my 'Scarface' DVD to MPEG format. i imported it to iTunes and tried to transfer it to my iPod and it says, "'Scarface' was not copied to the iPod because it cannot be played on this iPod." is it becaus
-
Event ID 64 CertificateServicesClient-AutoEnrollment about to expire
I noticed this warning appearing on my clients server (DC). I decided to open Certificates console (Local Computer), and under Personal/Certificate there is a certificate issued to mydomaincontroller.mydomain.local which was issues by the CA on my S
-
Enter Journal - FRM-40105: Unable to resolve reference to item GLXJEENT_A
Hello, When I am opening the form Enter Journals in General Ledger, the following messages is prompted: FRM-40105: Unable to resolve reference to item GLXJEENT_A Note that if I turn the Custom code Off, the error does not appear. Please help, Vikram
-
Downloaded album poor quality?
Downloaded & paid for D'Nell album from Itunes. Plays great on desktop but very poor quality on Nano. How can I resolve this?