Matrix display of Radio button in JSF
Hi,
I need to show a matrix using JSF in the following way .
. A B C
X 1 2 3
Y 4 5 6
Z 7 8 9
I'm having a table in database named "matrix" which is having 3 fields.
field1 is a number,field2 and field 3 are foreign keys which references to
table "A1" and table "X1".
A1 is having elements A,B,and C
X1 is having elements X,Y and Z
Elements of table MATRIX are as follows
table:MATRIX
field2 field3 field1
A X 1
A Y 4
A Z 7
B X 2
B Y 5
B Z 8
Now I need to display the field1 of "matrix" table according to X and Y direction values(Those values are dynamic ones).
As h:datatable only supports X direction display, I thought I'll use any available GRID component for this kind of display.Unfortunately I couldnt get any faces component for this.
Is there any ready-made component available? Or do I need to write my own component for this? If so, can you guys help me by providing any similar kind of component which I can change for my requirement?
Please help me out a possible solution.
The trick is more likely in formatting the data in a bean such that you can easily display it using a h:datatable or h:panelGrid. So in stead of wanting to display the data is it is in the database, perform some translations on it to make the transition to a web display easier.
With a clever datastructure you can usually display most of anything with out of the box JSF components. if you cannot, you should investigate the extension frameworks (primefaces, richfaces, tomahawk, icefaces) to see if one of them has a component that fits more with your requirements.
Similar Messages
-
IE8 can not display the radio button in B1iP
Hi,
I installed B1i and finished the configuration in B1i. But when assigning systems in B1iP, my IE8 can not display the radio button. Does anyone know how to solve it?
Dawson LuHi Eddy,
Thanks a lot for your proposal.
Yes the explorer may have some wrong settings. I will check it again or reinstall it.
Best Regards,
Dawson -
Can you display a radio button on the same line as a selection field?
I am fairly sure this can not be done but then I have never had a request like this.
My users want me to change a screen to have radio buttons on the same liines as other fields.
For example:
From Order: ________ To Order: ________ @ First Radio Button
From Loc: ____ To Loc: _____ @ Second Radio Button
These are using selection screens in an SAP report program - no dynpro or web design.
And the user would only be able to select one button as all are in the same group.
I could define as a check box too and only permit one to be selected - I think.
if this can be done i do not know anyway to codee it.Hi
Please check the below code:
TABLES: mara,
vbak.
SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) v_mat.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECTION-SCREEN POSITION 60.
SELECTION-SCREEN COMMENT 70(10) v_ma.
PARAMETERS: r_m RADIOBUTTON GROUP g1 DEFAULT 'X' USER-COMMAND abc.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) v_sal.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.
SELECTION-SCREEN POSITION 60.
SELECTION-SCREEN COMMENT 70(10) v_sa.
PARAMETERS: r_s RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
v_mat = 'Material number'.
v_sal = 'Sales Order Number'.
v_sa = 'Sales'.
v_ma = 'Mat'.
Shiva -
How to display Radio buttons with default selection on
Hi
I want to display Radio buttons using jsf
i have done it using
<h:dataTable id="apartmentList" value="#{userBean.allApartmentList}"
var="apartments">
<h:column>
<h:selectOneRadio id="selectedApartment" onclick="javascript:setSelectedApartment(this);">
<f:selectItem itemValue="#{apartments.apartmentVO.apartmentId}" />
</h:selectOneRadio>
</h:column>
inside a data table
now when i click some page i want to display the radio's with default radio button selected
also when i select one radio button and click on some command button
eg:<h:commandButton action="#{userBean.setSelectedApartment}"
the Radio button's Selection should not disappear
i have written a javaScript
function setSelectedApartment(oRadio)
oForm = oRadio.form;
elems=oForm.elements;
for(iIndex=0;iIndex<elems.length;iIndex++)
if(elems[iIndex].type == 'radio')
if(elems[iIndex].name != oRadio.name)
elems[iIndex].checked=false;
document.getElementById("apartmentListForm:selectedApartmentId").value=oRadio.value;
To check which Raio button is Selected
How do i show the Default Selected button and How the selection should not disappear
Can any one suggest me links or the solution to this problem
Thank you
Geetanjalee-set the value binding expression of select items to a request scope bean
- on the page load event() ,do
setdefaultval("ur default value")
so each time on the page load it sets the default value. and you can get selected value by getdefaultval()
--raju -
NO-DISPLAY option for Radio buttons
Hi All,
I want to hide the 2 radio buttons on the selection screen using the NO-DISPLAY option. when i worked with that its giving an error like 'no-display and radio button group can be specified together'.
my question was is it possible to use NO-DISPLAY option with radio buttons?
Thanks
Kumar.See this sample code
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-h01.
*Radio button for Process PO invoice
PARAMETERS : rb_po RADIOBUTTON GROUP inv USER-COMMAND rad.
" PO Invoice
*Radio button for FI Invoice
PARAMETERS : rb_fi RADIOBUTTON GROUP inv.
" FI Invoice
*Radio button for Process PO & FI Invoice
PARAMETERS : rb_pofi RADIOBUTTON GROUP inv.
" PO & FI Invoice
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
SELECT-OPTIONS:
s_bukrs FOR rbkp-bukrs, "Company Code
s_ekorg FOR ekko-ekorg NO INTERVALS MODIF ID md2,
"Purchasing Org.
s_ekgrp FOR ekko-ekgrp NO INTERVALS MODIF ID md2,
"Purchasing Group
s_werks FOR rseg-werks NO INTERVALS MODIF ID md2,
"Plant
s_lifnr FOR rbkp-lifnr NO INTERVALS,
"Vendor
s_matkl FOR ekpo-matkl NO INTERVALS
MODIF ID md1,
"Material Group
s_belnr FOR rbkp-belnr NO INTERVALS,
"Invoice Number
s_ebeln FOR rseg-ebeln NO INTERVALS MODIF ID md2,
"Purchasing Document No
s_gjahr FOR rbkp-gjahr NO INTERVALS,
"Fiscal year
s_budat FOR rbkp-budat NO INTERVALS,
"Posting date
s_blart FOR bkpf-blart NO INTERVALS,
" Document Type
s_bldat FOR bkpf-bldat NO INTERVALS,
" Invoice Date
s_usnam FOR rbkp-usnam NO INTERVALS.
"User
*Report type
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECTION-SCREEN BEGIN OF LINE.
*Radio button for User Report
PARAMETERS : rb_user RADIOBUTTON GROUP za DEFAULT 'X' <b>USER-COMMAND rad MODIF ID md2.</b>"User report
SELECTION-SCREEN COMMENT 3(20) text-003 FOR FIELD rb_user MODIF ID md2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
*Radio button for Managing Report
PARAMETERS : rb_man RADIOBUTTON GROUP za
<b>MODIF ID md2.</b>
"Management Report
SELECTION-SCREEN COMMENT 3(20) text-004 FOR FIELD rb_man
MODIF ID md2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN OUTPUT.
* Checking Radiobuttons and modifing Material Group field .
PERFORM f13000_check_radio.
FORM f13000_check_radio.
* When the FI button is selected hide the fields under group md1 and MD2
LOOP AT SCREEN.
IF screen-group1 = 'MD2'
OR screen-group1 = 'MD1'.
IF rb_fi = c_x
OR rb_pofi = c_x.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
* If the user output radiobutton is checked then make the screen
* input of Material Group off
<b> LOOP AT SCREEN.
IF screen-group1 = 'MD1'.
IF rb_user = 'X'.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.</b>
IF rb_user = 'X'.
* When display for material group is off
* then refresh the select option for material
* group
REFRESH s_matkl.
ENDIF.
ENDFORM. " f13000_check_radio
hope this helps. -
How to not display radio buttons in the select many shuttle component
Hi all,
af:selectManyShuttle is a true nice component.
For business / UI ergo reasons I've decided to not display the radio buttons before each item. There's no option to do that.
Is it possible ? How ?
Regards
Luc-Let say there are three ways:
1. You can use skinning mechanism,
2. You can include css file in .jspx page and then use it.
3. You can write css directly in .jspx page.
For skinning read documentation. For two other ways here is example code that should be inside metaContainer facet of document tag.
<f:verbatim>
<!-- CSS directly in jspx page -->
<style type="text/css">
.myClass{
background-color: #8888FF;
</style>
<!-- Include css file in jspx page -->
<link href="css/incStyle.css" rel="stylesheet" type="text/css" />
</f:verbatim>
{code} -
Radio button displayed before the text
Can any one let me know if there is any way of displaying a radio button on the selection screen before the text.
Regards
DeeptiUse..
selection-screen: begin of line.
selection-screen comment 1(12) comm1.
parameters R1 RADIOBUTTON GROUP RAD1.
selection-screen end of line.
Parameters R2 RADIOBUTTON GROUP RAD1 DEFAULT 'X'.
initialization.
comm1 ='Radiobutton1'. -
How can I display choice type as radio button ?
HI,
I used SPD 2013 to create a workflow , action --- collect date from user .
I created one choice type item , but display style only drop down list and check box .
How can I do to display as radio button?
And other question , I don't want to display delete ITEM in this page . how can I do it ?
Thanks a lotHi,
According to your description, my understanding is that you want to change the drop down list control to radio button control in the task form.
I suggest you can use InfoPath to change the control to radio button like below:
For hiding "Delete Item" action in the task form, I suggest you can add the Jquery to the PlaceHolderMain tag of "WrkTaskIP.aspx" within layouts folder path:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\WrkTaskIP.aspx
More information:
Jquery Hide
Thanks
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Calling an action on Click of Radio Button
Hi,
We have a form in which we need to display two radio buttons and two dropdown lists. Depending on the selection of Radio Button the drop down list should change.
To get the different data in the dropdown based on the selection of radio button, what would be the best method?a.If the data is fairly static and little, then you could get it all at once and use standard javascript (or a toolkit like jquery)
b. If the data is potentially large, then you could use javascript + ajax + dhtml using a toolkit like jquery
c. If you cant use javascript , then you would have to first change the UI to have a submit button , then its like any other pageflow action.
what would be the best methodDepends on what attributes you wish to measure best , development time, accessibility, response times etc.
regards
deepak -
Hello all,
i want to create radio button using code dynamically so as to do this i am using the following code :
OAMessageRadioButtonBean radio = (OAMessageRadioButtonBean)this.createWebBean(pageContext,OAMessageRadioButtonBean.MESSAGE_RADIO_BUTTON_BEAN,null,checklist);
radio.setTrueValueObject(--value--);
radio.setPrompt(--value--);
rowlayout.addIndexedChild(radio);
it is displaying the radio buttons at page load,but if i select both the radio buttons then i am able to selcet it,but i dnt want this i want to restrict the user to select only one button
kindly helpHi Jegan,
You can create the radio button in processRequest by using (OAMessageRadioButtonBean)webBean.createbean()
Assumption for the following code:
The radio buttons and radio group is created at design time.
OAMessageRadioButtonBean radioButton01 = (OAMessageRadioButtonBean)webBean.findChildRecursive("LastOrderDateRadioBtn");
if (radioButton01 != null)
radioButton01.setName("OrderShipRadioGroup1");
radioButton01.setValue("Y1");
radioButton01.setSelected(true);
OAMessageRadioButtonBean radioButton02 = (OAMessageRadioButtonBean)webBean.findChildRecursive("LastShipOrderDateRadioBtn");
if (radioButton02 != null)
radioButton02.setName("OrderShipRadioGroup1");
radioButton02.setValue("Y2");
radioButton02.setSelected(false);
thanks,
Kumar -
Radio button and select option in one line
Hi,
I have an requirement in which i need to display the radio button and select option in one line in an report program.
How can i do it?
Regards,
Arun.Hi,
Try this code.
TABLES: bkpf.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_r1 RADIOBUTTON GROUP a.
SELECTION-SCREEN COMMENT 4(20) text-001 FOR FIELD p_r1.
SELECTION-SCREEN COMMENT 30(12) text-002 FOR FIELD p_date.
SELECTION-SCREEN POSITION 39.
SELECT-OPTIONS: p_date FOR bkpf-budat OBLIGATORY.
SELECTION-SCREEN END OF LINE.
PARAMETERS: p_r2 RADIOBUTTON GROUP a.
text-001 = " Radio button"
text-002 = "Posting date" -
PHP Form Validation: Radio Buttons
Hey everyone -
I'm trying to do two things here with an addition to one of
my forms using
PHP.
1. Attempting to validate if one of the radio buttons has
been selected.
2. Displaying which radio button is selected once the page is
reloaded
(checking for validation errors). That is - if they've
selected a radio
button but didn't fill in the other area - I want the radio
button they've
already selected to be actually "selected" once the page
reloads.
Here is the series of radio buttons:
<input type="radio" name="subject" id="subject1" value="1"
/>
<label for="subject1" class="labelbold">I wish to
contact you regarding
website design</label><br />
<input type="radio" name="subject" id="subject2" value="2"
/>
<label for="subject2" class="labelbold">I wish to
report a technical
error</label><br />
<input type="radio" name="subject" id="subject3" value="3"
/>
<label for="subject3" class="labelbold">I wish to
report an error with the
copy</label><br />
<input type="radio" name="subject" id="subject4" value="4"
/>
<label for="subject4"
class="labelbold">Other</label><br />
This is how I'm validating my checkboxes:
if($_POST['confirmbox'] == false) $error[] = "Check the
Privacy Policy
Agreement Box";
However, using "false" doesn't seem to matter with the radio
buttons. So,
how can I get the radio buttons to validate that ONE was
selected and how
can I show that selected button on a page reload (I'm
thinking I may need to
dynamically generate the value=""....<?php...?>....?).
Thanks!
Shane H
[email protected]
http://www.avenuedesigners.com
=============================================
Proud GAWDS Member
http://www.gawds.org/showmember.php?memberid=1495
Delivering accessible websites to all ...
=============================================Hello there -
After no replies - I decided to strain my brain (ha-ha) - and
finally
figured out the solution to the problem.
For the curious - I added this to each <input...>
field:
<?php if($_POST['subject'] == "1") echo'
checked="checked"';?>
And then for each <input...> I changed the "1" to the
corresponding value
each field was given.
Have a wonderful night. :)
Shane H
[email protected]
http://www.avenuedesigners.com
=============================================
Proud GAWDS Member
http://www.gawds.org/showmember.php?memberid=1495
Delivering accessible websites to all ...
=============================================
"Shane H" <[email protected]> wrote in
message
news:[email protected]...
> Hey everyone -
>
> I'm trying to do two things here with an addition to one
of my forms using
> PHP.
>
> 1. Attempting to validate if one of the radio buttons
has been selected.
>
> 2. Displaying which radio button is selected once the
page is reloaded
> (checking for validation errors). That is - if they've
selected a radio
> button but didn't fill in the other area - I want the
radio button they've
> already selected to be actually "selected" once the page
reloads.
>
> Here is the series of radio buttons:
>
> <input type="radio" name="subject" id="subject1"
value="1" />
> <label for="subject1" class="labelbold">I wish to
contact you regarding
> website design</label><br />
>
> <input type="radio" name="subject" id="subject2"
value="2" />
> <label for="subject2" class="labelbold">I wish to
report a technical
> error</label><br />
>
> <input type="radio" name="subject" id="subject3"
value="3" />
> <label for="subject3" class="labelbold">I wish to
report an error with the
> copy</label><br />
>
> <input type="radio" name="subject" id="subject4"
value="4" />
> <label for="subject4"
class="labelbold">Other</label><br />
>
> This is how I'm validating my checkboxes:
>
> if($_POST['confirmbox'] == false) $error[] = "Check the
Privacy Policy
> Agreement Box";
>
> However, using "false" doesn't seem to matter with the
radio buttons. So,
> how can I get the radio buttons to validate that ONE was
selected and how
> can I show that selected button on a page reload (I'm
thinking I may need
> to dynamically generate the
value=""....<?php...?>....?).
>
> Thanks!
>
> --
> Shane H
> [email protected]
>
http://www.avenuedesigners.com
>
> =============================================
> Proud GAWDS Member
>
http://www.gawds.org/showmember.php?memberid=1495
>
> Delivering accessible websites to all ...
> =============================================
>
>
> -
Radio buttons on Customer_H fields in Web UI
Hi Experts,
I have a requirement to include the Customer_H fields in Web UI. In the Customer_H table, there are 8 fields, which are currently used in the GUI as follows:
Field 1 & 2 - Type char1 - Checkbox
Fields 3 - 8 - Type char1 - 3 radio buttons for each field
(depending on the selection of a radio button, a corresponding char value is set to the field)
How do I use the same combination of radio buttons for fields 3-8 on the UI? On the UI, I see checkboxes by default for all the 8 fields.
I have tried the following:
For each of fields 3 - 8, I have set the following code in their P_GETTER methods:
CASE iv_property.
WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>field_type_radio.
ENDCASE.
Thus, in the configuration tab, I can see "Radio button group" written against these fields and field type as "Radiobutton" in the field properties.
However, on launching the UI, I still see all these fields as checkboxes.
Please help me in:
i) Setting up the radio buttons for these fields (do I need to use value nodes?)
ii) Displaying the radio buttons on the UI
iii) Capturing the selected radio button's value and updating the customer_h field.
Look forward to your reply.
Thanks in advance.
Regards
VickyHi Stephen,
I understand your point and agree to it.
However, I have been able to solve the issue now.
Solution:
We need to use the P_GETTER method of the EEWB ZZ field to define:
i) the field type as radio button,
ii) the radio button group,
iii) The way radio buttons should be arranged (horizontally or vertically). If we put no. of cols = 1, then these will be arranged vertically.
We need to use V_GETTER of the same ZZ field to:
Assign the key & value to the radio buttons (coding is similar as for dropdowns).
Following is the code:
*method GET_P_ZZCUSTOMER_H0101.*
CASE iv_property.
WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>field_type_radio.
WHEN if_bsp_wd_model_setter_getter=>fp_radio_cols.
rv_value = 3.
WHEN if_bsp_wd_model_setter_getter=>fp_group.
rv_value = 'R1'.
ENDCASE.
endmethod.
*method GET_V_ZZCUSTOMER_H0101.*
DATA: lt_ddlb TYPE bsp_wd_dropdown_table,
ls_ddlb TYPE bsp_wd_dropdown_line.
IF GR_DDLB_FIELD0101 IS NOT BOUND.
CREATE OBJECT GR_DDLB_FIELD0101
EXPORTING
iv_source_type = 'T'.
clear : ls_ddlb.
ls_ddlb-key = '1'.
ls_ddlb-value = 'P1'.
append ls_ddlb to lt_ddlb.
clear : ls_ddlb.
ls_ddlb-key = '2'.
ls_ddlb-value = 'P2'.
append ls_ddlb to lt_ddlb.
clear : ls_ddlb.
ls_ddlb-key = '3'.
ls_ddlb-value = 'P3'.
append ls_ddlb to lt_ddlb.
GR_DDLB_FIELD0101->set_selection_table( lt_ddlb ).
ENDIF.
rv_valuehelp_descriptor = GR_DDLB_FIELD0101.
endmethod.
Say the field label of the field ZZCUSTOMER_H0101 is "Grade", then it will show in the UI as below:
Grade () P1 () P2 () P3
() = radio button.
Hope it helps.
Cheers
Vicky -
ADDING RADIO BUTTONS IN REPORT NEAR MISS (EHSM-NWBC)
Hi Experts,
I am new to this EHSM Enhancements , I have a requirement to add 3 radio buttons in Report Near Miss ( EHSM-NWBC ), I am not understanding this BOPF firm Enhancement .So please provided me the required information .
Thanks & Regards.
Bhushan K.Hi Bhushan,
If you want to add 3 radio buttons, then first of all you have to append one field in EHHSSS_INC_BASIC_INFO_ALL_D structure with Fixed Domain values.
Then you need to enhance EHHSS_INC_REC_NRM_QAF_V3_BSCI component Configuration.
In that Configuration you need to add field with display type Radio Button Group, with column count 3.
Kindly refer the following snap for the same.
Thanks and regards,
Chetan P. Patil -
Addressing Individual Radio Buttons Using Conditional Statements
Hello Everyone
I don't know a lot about writing code, just basic things. The last thing I touched was C++ while in college and that was over 10 years ago. However,
I have four radio buttons. let's say A, B, C, and D. Using Acrobat 8 and FORMCALC, is there a way to address each individual radio button in an IF/THEN statement? For example, if A is selected, then display the number 1, if B is selected, display the number 2 and so on. Apparently, these buttons are sub-components of a main object, I get errors when I try to refer to each sub-component. Any help would most certainly be welcomed.
Thanks
DarylUnfortunatley, my inexperience with this language and working with objects will become apparent b/c I am having problems with the syntax as you'll see below.
>The RadioButtonList name is "RObject1"
>The three individual radio buttons are named R1, R2 and R3 with values of 30, 60, 90 respectively
>A numeric field named NField1 is supposed to display which radio button is selected
>Using FormCalc, the following script was used:
if (RObject1=30) then NField1=30 else Field1=0 endif
>I used "calculate" as the event and committed the changes.
The below error is generated:
Script failed (language is formcalc; context is xfa[0].form[o].form1[0]#subform[0].NField1[0])
script=if (Object1=30) then NField1=30 else Field1=0 endif
Error: syntax error near token'=' on line 1, column 12
Obviously, my supposing that RObject1 would take on the value of whatever button was selected does not seem to be the case or I am incorrectly addressing the object.
Thanks
Maybe you are looking for
-
How do i share music between my ipod and iphone
I have music on my ipod that i would like on my phone and i want to have it on both devices with out hooking my phone up to my lab top. there has to be a way to have it on both devices they are on the same apple id
-
Install an app on multiple computers with the Creative Cloud membership?
I have the Creative Cloud membership. Can I install an app on multiple computers? I wouldn't use the app on different computers at the same time.
-
How do I turn off Itunes match without lossing all my music
Hi, I had all my music on my hard drive. Then I turned om Itunes match. All the music was accesible with all the IOS devices. 1. But playing on IOS devices during travel took almost all my download availbility amount of GB of my provider. 2. Itunes m
-
Hi, I finally was able to force feed my computer the J2SDK today. It took a while. I'm trying to compile a few classes and this is the error that is being spit out at me: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java
-
My Macbook Pro slow on startup. How can I fix this?
Hello, My macbook pro is slow on start up. Today I had to shut the computer down using the power button TWO TIMES IN A ROW. On the third time, the computer executed the start up correctly. What could be the cause of this? How do I fix it? saxman81