Radio button affecting dynamic action
Hi
I am trying to implement Radio Button in apex 4.1.1 , on selecting radio button , it show and hide regions. I got that working
I was wonder if , i include more static value to radio groups and which are only shown , when authenticated user is logged in or is not a public user and then on selecting same non public radio button it show authenticated region only.
All in same radio groups
radio 1 show this to public user
radio 2 (shown on logged in) when selected show this region.
thanks in advance
Hi,
>
I am trying to implement Radio Button in apex 4.1.1 , on selecting radio button , it show and hide regions. I got that working
I was wonder if , i include more static value to radio groups and which are only shown , when authenticated user is logged in or is not a public user and then on selecting same non public radio button it show authenticated region only.
All in same radio groups
radio 1 show this to public user
radio 2 (shown on logged in) when selected show this region.
>
Radio buttons are complex HTNL elements. While it is theoretically possible to manipulate then with JavaScripts it is simpler and better to have 2 separate items and hide/show them conditionally.
If you must use one group then you will need to use jQuery selectors to get hold of the buttons individually. Look up the element in HTML DOM using browser "inspection" utilities, e.g. FF+Firebug, and you can work out the selector.
Cheers,
Similar Messages
-
When triggering a dynamic action from a button, I'd like to prevent the page from submitting. Following the advice from earlier threads, I have set the button to redirect to a URL. But since the dynamic action will be performing all the required actions, I'd like the URL invoked by the button to do nothing.
What is the best practice for allowing the button to do no more than initiate the DA?
Thank you
CS
Edit: Alternatively; instead of triggering the DA using an "onclick" event on the button, can I invoke the DA by naming it as the target URL. That would be the preferred solution I think.
Edited by: ChrisS. on Jul 31, 2011 4:50 AMThank you very very much Little Foot.
Coincidentally, I just read earlier today an answer from Anthony Rayner to an unrelated question which mentioned this neat solution in passing. After hours of trawling through W3 schools in vain...
CS
Edit: PS Sorry Little foot, I already marked Tobias's answer as correct, so I could only give you a helpful
Edited by: ChrisS. on 06-Sep-2011 05:49 Edit: PS Sorry Little foot, I already marked Tobias's answer as correct, so I could only give you a helpful -
Keep Radio Button selected after action
Hi All - This is a strange situation.
I have 3 context node for Radio Buttons
the 1st context node is for 2 radio buttons
the 2nd context node is for 6 radio buttons
the 3rd context node is for 4 radio buttons
Scenario: 1st Context node has "DEFAULT VALUE" so is initially selected, the other two context node doesn't have DEFAULT VALUE.
I select a radio button (that belongs to the second node) and also select a radio button (that belongs to the 3rd context node) now I click a custom button that will trigger an ACTION.
1st & 3rd Radio buttons keep the RADIO BUTTON SELECTED but 2nd Radio Button now is like INITIAL, WHY??? if everything is designed the same way.
I want to keep the selected value so the user can see which options they selected.
A1 B2 C3 <----
First time (after initialization)
X
A1 B2 C3 <----
I selected values
X X X
A1 B2 C3 <----
After Action is trigger
X X
thanks!
Jason PVHi,
I dont see any reason other than selected value getting lost in wddomodify method or in action event handler.
Check in WDDOMODIFYVIEW or in Action Handler method you are not playing modifying the context node bound to 2 group of radio buttons .
Or you can fetch the selected value in your action handler store it in some view attribute and bind the node back again with same value on wddomodifyview.
Regards
Manas Dua -
Radio button in dynamic ALV grid
Hi guys!
I want to implement a dynamical ALV grid with a radiobutton in the first column.
when clicking a button, or processing the program i want to get the information of the selected row and perform other things....
Can someone help me with a code example for this, or just tell me where i can find the necessary information`?
regards
thomasHi,
I dont understand why you need Radio button, If you use REUSE_ALV_GRID_DISPLAY the output grid will by default allow you to select only one row.
see the program - BCALV_FULLSCREEN_DEMO for more information -
Can't turn wifi radio on. Hardware slider switch OK, Fn+F5 shows radio button, illuminates when focus on button, does not operate when button pressed. So no wifi available. X301 Intel 5300 AGN: driver version 13.1.1.1. /1-13-10 Device working properly : do not allow PC to turn off device: media state enabled. Windows network diagnostics - 'There might be a problem with the wifi driver' Lenovo toolbox - diagnostics :- available and capable to send and receive data. (obviously not true!) PCI express status test passed, no other tests can run because no network can be seen. Other laptops adjacent to X301 can see the wifi network signal. Tried, disable and uninstall drivers and device. Latest updates from Microsoft, Lenovo and Intel. Rolling back and restore have become corrupted and trying these fails. Has anyone any other ides to try please? Thanks
damn ! that was it ... you wouldn't believe how long i was struggling with that strange error
chrome-remote-desktop is actually a pretty cool tool to remotely control your pc from your mobile.
well, but it had to go now ... thanks for your help ! -
Changing radio button property dynamically
Hi,
I decalred two blocks in selection screen named B1 and B2, each have 2 radio buttions.
B1 has radio button named B1R1 and B1R2.
B2 has radio button named B2R1 and B2R2.
If i select B1R1 then B2R1 should be selected and B2R2 should be disabled(user should not able to select).
If i select B1R2 then B2R2 should be selected and B2R1 should be disabled(user should not able to select).
Can anyone please tell me how to do this.
Thanks,
AmalHi
Try this
SELECTION-SCREEN: BEGIN OF BLOCK b1.
PARAMETERS: b1r1 RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND ucomm1,
b1r2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK b2.
PARAMETERS: b2r1 RADIOBUTTON GROUP g2 USER-COMMAND UCOMM2 MODIF ID MD1,
b2r2 RADIOBUTTON GROUP g2 MODIF ID MD2.
SELECTION-SCREEN: END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF b1r1 = 'X'.
if screen-group1 = 'MD2'.
screen-input = 0.
endif.
ELSEIF b1r2 = 'X'.
if screen-group1 = 'MD1'.
screen-input = 0.
endif.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
AT SELECTION-SCREEN.
IF b1r1 = 'X'.
b2r1 = 'X'.
b2r2 = ''.
ELSEIF b1r2 = 'X'.
b2r2 = 'X'.
b2r1 = ''.
ENDIF. -
Displaying radio buttons with dynamic subforms between 2 radio buttons
I am very new to Adobe Designer/Form Server and had the following question.
Our form is going to have the following display
Radio A
Radio B
Radio B1
List of text boxes
Radio B2
Radio C
Radio C1
List of text boxes
Radio C2
When the form is first displayed, user sees Radio A, Radio B and Radio C, right below each other. When the user selects Radio B, Radio B1 and Radio B2 should appear, and the Radio C should 'slide' down to accomodate Radio B1 and B2.
Similarly, when the user clicks Radio B1, List of text boxes should appear and Radio B2 should 'slide' down to accomodate those text boxes.
Is this possible? Can anyone please send me a sample code/design?
ThanksWell I got the form to work by copying the Options List Java Script code in change to docReady and adding if(this.rawValue==0). This produces the result that I need.
To clean this up I would like to put this code in a Script Object so I can use the same code in both change and docReady. I’m not a programmer so I’m not sure what additional code I have to put in the Script Object and what code I have to put in change and docReady to use the Script Object. Any assistance would be greatly appreciated.
Thank you. -
Dynamic action on "Change" of Radio group value
Hi,
I'm using Apex 4.1 on XE 11G.
If I create a simple dynamic action which shows/hides a field on the change of an item of type select list this works great.
So for example if the value of the select list is 1 then show another field and otherwise hide this other field.
If I change the type of the first field ( the select list ) to a radio group the dynamic action stops working. It looks like the value of the radio group does not get changed when I click another value in the radio group.
I'm somehow able to bypass this by using a dynamic action which fires when the radio group is clicked and then evaluatie it's value via JS, but that's not really the ideal solution.
Is there some basic difference in radio groups and select lists when it comes to storing values and/or dynamic actions which are based on the change event on that item ?
Regards
Bas
Edited by: Bas de Klerk on 31-mei-2012 6:42Take a look at the Radio group item in HTML DOM using FF/Firebug or IE/DevTools, and you will see the difference.
If you have neither of the 2 debug tools , time you get one.
Regards, -
Assign values dynamically to radio button
I am creating an online test. I will need to display answer choices from the table. I created radio buttons for these answer choices and I could put the labels dynamically by using
Set_Radio_Button_Property('block_name.radio_group_name', 'radio_button1',LABEL,cursor_name.field_name);
Now I have problem to set radio button values dynamically. Should I use when_radio_changed event?
Any help would be appreciated.I really appreciate your help.
My intention is to display the test on the screen.
That means I need to display all questions and answer
choices for each one dynamically. Based on the answer
choice type (radio button or checkbox or drop down
etc) I will need to assign the values to them and
display on the screen. So far I could display
questions and answer choices on the screen and set
the label property for each radio button.
Do you know what is the syntax to assign value to
each radio button? First I will need to store user's
answers in a table. For that I need to know what
answer they selected. I wasn't sure how to do that.
ThanksAs I said, the values cannot be assigned dynamically. Thus you will store the answers in code (perhaps in an array?) and your radio buttons will be 1,2,3,4 etc.
In WHEN-RADIO-CHANGED you can retrieve the value from the array using the radio button value. Then store that value.
e.g. Your screen shows
What is the sound of one hand clapping?
o Blue
o Yes
o 12
These labels will be set dynamically, but the values for the radio buttons will be 1,2,3. If they pick "Yes", your radio button will be 2. You then get the value you really want from answer_array(2), where you put it when you retrieved the question details. Then you insert that into your users_answers table. -
Dynamic creation of Radio Button Group
Hi,
I need to create a Radio Button Group dynamically and add Radio buttons to it.
I am able to create the Radio buttons dynamically. Could someone help me how to create Radio Button Groups.
I tried creating the Radio Button Group using the following code
DATA : lr_radiobuttongrp type REF TO CL_WD_RADIOBUTTON_GROUP_BY_IDX.
call method CL_WD_RADIOBUTTON_GROUP_BY_IDX=>NEW_RADIOBUTTON_GROUP_BY_IDX
EXPORTING
bind_texts = 'test'
RECEIVING
control = lr_radiobuttongrp.
cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_radiobuttongrp ).
lr_container->add_child( lr_radiobuttongrp ).
But when I run it I am geting a dump "subnode viewname.ME does not exist".
Thanks,
Suvarna.
Edited by: Suvarna Chittor on Aug 12, 2008 12:10 PMwhat is 'test' in bind text parameter
you should provide the name in Capitals along with the node name,
if the node name is TEXTS and the context attribute under this node is TEXT then you have to pass
TEXTS.TEXT
also provide the VIEW parameter to the call
Abhi
Edited by: Abhimanyu Lagishetti on Aug 12, 2008 12:26 PM -
Disabling actions on a radio button
Hello,
I need your help for implementing this behavior on a radio button:
disable any actions on a radio button (no selection is possible) until an event is generated.
It means that this radio buttib still waits for an event for being activated on for another for being desactivated another time?
Any help?This works fine for me:
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.RadioButton;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class DisabledRadioButtonExample extends Application {
@Override
public void start(Stage primaryStage) {
final RadioButton choice1 = new RadioButton("Choice 1");
final RadioButton choice2 = new RadioButton("Choice 2");
final ToggleGroup tg = new ToggleGroup();
tg.getToggles().addAll(choice1, choice2);
choice2.setDisable(true);
final Button enableButton = new Button("Enable");
enableButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
choice2.setDisable(false);
// enable button has no use any more:
enableButton.setDisable(true);
final VBox root = new VBox(5);
root.getChildren().addAll(choice1, choice2, enableButton);
primaryStage.setScene(new Scene(root, 300, 200));
primaryStage.show();
public static void main(String[] args) {
launch(args);
Can you post a short, complete example which demonstrates the problem? -
Add multiple repeating subforms based on radio button
I have a form with a hierarchy like this:
Action
Survey
Recommendation
I do not want the Action or Recommendation visible until a radio button on the survey selecting yes is performed. Multiple Recommendations can be added by clicking an "Add" button. Everytime a recommendaton is added, a summary table is also added in the "Action" subform. This is, so far, working.
My problem is that the user then has the ability to add another instance of the Survey and once again can select the radio button for yes with more Actions and Recommendations. What I cannot get it do is keep the Actions from the first Survey and start adding the additional ones from the new Survey Recommendations.
I have tried hiding the Action subform until the radio button yes is selected and I have tried setting the instance to 1 when it is selected. But nothing I've tried is working correctly. It either won't added the recommendations from the second survey or resets the Actions back to 1.
Would a better solution possibly be to have all of the actions compile in a table at invisibly at the end of the form after all the instances have been done? I really wanted them to appear as a sort of summary at the beginning?
Please, any help!!!Hi Satish,
I have seen some funky behavior with radio buttons and dynamic subforms. Make sure you are testing with Acrobat or Reader version 7.0.5. Earlier versions have some know quirks with radio buttons and dynamic subforms. As for the radio button not populating when merged with data, I haven't seen that problem before in any version. If you can post your form somewhere, I'd be glad to have a look for you.
Jared Langdon
J. Langdon Consulting, Inc. -
I have got radio button(with submit)(RB name is P5_R_RG) on my report. Radio button are Dynamic LOV (Select distinct RG a, RG b from participant). Display Null :- Yes, Null Display Value 'All', Null return Value:- 'ALL'
Participant is my table
RG is column in participant table and it has got value between 1 and 6 only.
I have got query in region and qeury is
select "PARTICIPANT"."AGSNO" as "AGSNO",
"PARTICIPANT"."FIRSTNAME" as "FIRSTNAME",
"PARTICIPANT"."LASTNAME" as "LASTNAME",
"PARTICIPANT"."RG" as "RG"
from "PARTICIPANT"
where ("PARTICIPANT"."RG" = :P5_R_RG or "PARTICIPANT"."RG" = 'ALL')
What I am trying to do is when user select 'All', all the record should be displayed.
1) When RG field type is numeric
Whenever I select 1 to 6 option its work perfectly fine, but when i select 'All', it gives error message ' Type Mismatch'
2) When RG field is varchar2
Whenever I select 1 to 6 option its work perfectly fine, but when i select 'All', it gives message ' no record found'
Could any one tell what i am doing wrong or give me some other idea or solution
Its Urgent---------------
SagarIt's easiest to get this all working if you stick with varchar2 types. For the radiogroup item, set display extra values No, set display null No, display value (leave empty). For LOV query:
select '-All-' d, '0' r from dual
union all
select distinct RG d, RG r from participant
For report query:
select "PARTICIPANT"."AGSNO" as "AGSNO",
"PARTICIPANT"."FIRSTNAME" as "FIRSTNAME",
"PARTICIPANT"."LASTNAME" as "LASTNAME",
"PARTICIPANT"."RG" as "RG"
from "PARTICIPANT"
where ("PARTICIPANT"."RG" = :P5_R_RG) or :P5_R_RG = '0'
Scott -
Raise Application Error on Dynamic Action
Hi
I am using Apex 4.2. On a click of button a Dynamic Action is written, which calls a DB Package. The DB package has exception handlers and also the package has two output parameters
Error Code and Error Msg
So in my code(Dynamic Code) i make a call to the package and checks the value for Erroc Code.
Begin
Package call......
If v_error_code <> '0' Then
Raise SC_Error;
End if;
Exception
When SC_Error Then
RAise_Application_error(v_err_code, v_err_msg);
End;
But when i run the page and I click I get an Internal exception error
Output from Debug -- I am not sure what the Cell in Red colour means, because the package is returning a correct message (before the red line).Can anyone help please??
Thanks
JS
......message: AJAX call returned server error ORA-20003: Customer has already been matched for Execute PL/SQL Code.
4
......is_internal_error: true
4
......apex_error_code: APEX.AJAX_SERVER_ERROR
4
......ora_sqlcode: -20003
4
......ora_sqlerrm: ORA-20003: Customer has already been matched
4
......error_backtrace: ORA-06512: at line 41 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926 ORA-06512: at "SYS.WWV_DBMS_SQL", line 973 ORA-06512: at "SYS.WWV_DBMS_SQL", line 999 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 830 ORA-06512: at "APEX_040200.WWV_FLOW_PLUGIN_UTIL", line 2304 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_ACTION_NATIVE", line 442
4
......component.type: APEX_APPLICATION_PAGE_DA_ACTS
4
......component.id: 23185203797756209
4
......component.name: NATIVE_EXECUTE_PLSQL_CODE
4
...Execute Error Handling Callout defined on Page or Application Level
4
...Execute Statement: begin declare l_error wwv_flow_error_api.t_error; begin l_error := wwv_flow_error_api.g_error; wwv_flow_error_api.g_error_result := apx_error_utils.handleerror ( p_error => l_error ); end; end;
4
......Values changed by callout:
4
.........message: An unexpected internal application error has occurred. Please get in contact with your system administrator and provide reference# for further investigation.
4
.........display_location: ON_ERROR_PAGE
4
Stop APEX Engine detected
4
Final commit
4
1 - 59Edit: Well, Patrick beat me to the punch because I was taking my jolly time writing this down
Well, if you look below the part you put in red, you can see that a callout is made: ...Execute Error Handling Callout defined on Page or Application Level
With directly below that:
......Values changed by callout:
4
.........message: An unexpected internal application error has occurred. Please get in contact with your system administrator and provide reference# for further investigation.
Since the plsql call is on the serverside, this error is trapped within the error handling function aswell. Your error has simply been obscured by it, and probably because it looks at the error backtrace and determines the error is internal.
Looking at the sample error handling code, this is probably where it goes "wrong":
-- If it's an internal error raised by APEX, like an invalid statement or
-- code which cannot be executed, the error text might contain security sensitive
-- information. To avoid this security problem rewrite the error to
-- a generic error message and log the original error message for further
-- investigation by the help desk.
if p_error.is_internal_error then
I recreated the situation here, and put some debug in the error handling function just so I could see what sort of error is being processed:
apex_debug.message('error code: '||p_error.apex_error_code);
apex_debug.message('sql code: '||p_error.ora_sqlcode);
apex_debug.message('sql errm: '||p_error.ora_sqlerrm);
apex_debug.message('error_backtrace: '||p_error.error_backtrace);
0.05750
0.00007
...Error data:
4
0.05757
0.00006
......message: AJAX call returned server error ORA-20099: raise application error for Execute PL/SQL Code.
4
0.05763
0.00006
......is_internal_error: true
4
0.05769
0.00005
......apex_error_code: APEX.AJAX_SERVER_ERROR
4
0.05774
0.00005
......ora_sqlcode: -20099
4
0.05779
0.00006
......ora_sqlerrm: ORA-20099: raise application error
4
0.05785
0.00005
......error_backtrace: ORA-06512: at line 1 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926 ORA-06512: at "SYS.WWV_DBMS_SQL", line 1064 ORA-06512: at "SYS.WWV_DBMS_SQL", line 1090 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 832 ORA-06512: at "APEX_040200.WWV_FLOW_PLUGIN_UTIL", line 2304 ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_ACTION_NATIVE", line 442
As you can see, the ajax error is an internal error, and that is why it is handled as such in the error handler. With this info you should be able to adjust your handling function. Test for the error code (APEX.AJAX_SERVER_ERROR) and then throw the error message or test for the -20000 range of custom errors for example.
if p_error.is_internal_error then
-- Access Denied errors raised by application or page authorization should
-- still show up with the original error message
-- do not parse ajax server errors here !
if p_error.apex_error_code <> 'APEX.AUTHORIZATION.ACCESS_DENIED'
and p_error.apex_error_code not like 'APEX.SESSION_STATE.%'
and p_error.apex_error_code != 'APEX.AJAX_SERVER_ERROR'
then
It probably does need some more work but you should get the gist of it. -
Passing radio button values to the backing bean
Hi all,
I need help with passing group of radio button values to a backing bean. I have page which has a dataTable to display a list of alerts. For each alert there are two radio buttons (YES & No) to indicate whether the email option for each alert is set or not. Now when i change the radio buttons and click on a submit button i should be able to pass these radio button values into action method in which i need to update the alerts. This is my code
<h:form>
<t:dataTable id="sub"
var = "alert"
value =#{subscriberBean.alertsList}">
<t:column>
<h:outputText value="#{alert.name}" />
</t:column>
<t:column>
<h:selectOneRadio id="subscriptions" value="#{alert.sendEmail}">
<f:selectItem id="item1" itemLabel="Yes" itemValue="0" />
<f:selectItem id="item2" itemLabel="No" itemValue="1" />
</h:selectOneRadio>
</t:column>
<t:dataTable>
<h:commandButton id="button1" value="Save changes" actionListener="#{subscriberBean.updateAlert}" />
</h:form>
{code}
I tried to to do something like below and get the updated list in the action event in the backing bean but it didn't work.
{code}
<h:commandButton id="button1" value="Save changes" actionListener="#{subscriberBean.updateAlert}" >
<f:attribute name="alerts" value="#{subscriberBean.alertsList}"/>
</h:commandButton>
// Backing Bean
public void updateAlert(ActionEvent e){
List<Alert updateList = (List<Alert>)event.getComponent().
getAttributes().get("alerts");
{code}
Can someone advise how to get these update radio button values in my actionListener method.The value the user selected will be written to the sendEmail property of the managed bean named alert. We know this because you set the value attribute to #{alert.sendEmail}. So simply access the managed bean in your action method.
Maybe you are looking for
-
How can I erase the hard drive securely?
I want to sell my old iMac G3 with OS 9.2. First I'd like to erase the hard drive securely, so that no information can be recovered later. OS X allows you to do this easily with the Erase tab in Disk Utility. Can anyone advise how this can be done in
-
Need advice on JVM GC tuning for server jdk 1.5.0_08
We are getting full GC , can you suggest optimal GC for the following logs: /usr/java1.5/jdk1.5.0_08/bin/java -server -Xms2048m -Xmx2048m -XX:NewSize=512m -XX:SurvivorRatio=8 -Xss1024k -verbosegc -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC -XX:+Disab
-
How to use 'IN' expression for SQL in DB adapter
Hi, I am working on BPEL PM 10.1.3.3 and need to configure db adapter to get multiple values for one parameter similar to " where deptid in ('1,2,3)". While configuring the adapter I am not able to find any such option. Also I need to use custom SQL.
-
Can we use a combination of structural and role authorisations in BW?
Can we use a combination of structural and role authorisations in BW for the same object (eg cost centre CC) in the same report? If so how does it work? Read the structurals from the DSO and if missing then look for role auth?
-
Spinning gear on startup after update
After updating my mac mini to OS 10.9 all I get is the spinning gear upon startup. Tried booting in safe mode but got the same result. Is there a way to fix this without reinstalling the OS. Thanks