How to get dispaly value of radio button
hi i have situation where i what to get display value of radio button,for example i store value A in db but i display Active in my radio button how can i do that
my radio button is
<af:selectOneRadio id="sor3" layout="horizontal"
value="#{pageFlowScope.InternalBean.status}"
autoSubmit="true"
valueChangeListener="#{RadiobuttonPopupBean.activationChangedListener}">
<af:selectItem label="Active" value="A" id="si10"/>
<af:selectItem label="Inactive" value="I" id="si9"/>
</af:selectOneRadio>
i what to display the value in this outputtext
<af:outputText value="Reason: #{bindings.Reason.inputValue}" id="ot9"
partialTriggers="d1" inlineStyle="height:100px;"/>
am in jdeveloper 11.1.1.6.0
adf009, the answer was given in my blog I posted to your other thraed JDeveloper: Showing a Popup when Selecting an af:selectOneRadio | JDev &amp; ADF Goodies
You only have to read it and the link provided inside the blog pointing to the other blog entry.
use
<af:outputText value="Reason: #{pageFlowScope.InternalBean.status}" id="ot9"
partialTriggers="d1" inlineStyle="height:100px;"/>
to output the text.
By the way your code snipplet isn't understandable without knowing the context around it. You always should mention if you post code from someone else (at least give a link to the source).
Timo
Similar Messages
-
Having problem to get the value from radio button
i am doing my double module project for my degree course and i am also a newbie in JSP. Hope there is someone can help me to solve this problem. Now, i set the value of a radio button to "don't smoke", "smoke lightly", and "smoke heavily". Then i use request.getParameter ("smoking behavior") to get the value selected by the user, but the result is only "don't" or "smoke", which the character after spacing will be not be retrieved. I dun know how to solve it, so can any expert here help me to solve this problem? Thanks for helping.
Why do you have to use whitespace. If your radio button group is name smokingBehavior - no whitespace, wouldn't it just make sence to have values of don't, lightly and heavily. This would solve the problem easily. If your teacher is being a pain in the a&!, and requires you to use whitespace for your naming variables I guess you could insert %20 between the two words and unescape the value on the server side. This seems like a lot of unnecessary work and a silly solution - good luck!
-
How To Change 'ALL' Value from Radio button
Is it possible to change the 'ALL' value that is defaulted in the radio button group in BEx Web Designer? Instead of showing as 'ALL' I would like it to display 'Show All Products'
Create a custom Javascript which will replace the text for ALL on the onload event of the web template.
Thanks. -
How to get return values from a button to main program.
hello,
I have a main program which has a button Authenticate. On click of authenticate open a form for auth which has USERNAME FIELS AND PASSWORD.
If entered fields are true then enable editing of jtable in main program..
Basically something like this :
//main program
Authenticate.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
UpdateAuth ua=new UpdateAuth();// opens form which has username and pass for authentication
ua.setVisible(true);
//need code here for enabling table
if(s=="mactus")
enable table editing
//table.repaint();
// form open for auth..(class UpdateAuth )
private String SigninMouseClicked(java.awt.event.MouseEvent evt) {
String aname=Aname.getText();
String apass=Apassword.getText();
if(aname.equals("") && apass.equals(""))
JOptionPane.showMessageDialog(null,"Enter login name or password","Error",JOptionPane.ERROR_MESSAGE);
if(!(aname.equals("") && apass.equals("")))
if(aname.equals("harshil") && apass.equals("harshil123"))
String s="mactus"; /// if username and password is success enable table editing in main program
return s;
else if (!aname.equals("mactus") && !apass.equals("mactus123"))
Aname.setText("");
Apassword.setText("");
return null;
}986154 wrote:
hello,
I have a main program which has a button Authenticate. On click of authenticate open a form for auth which has USERNAME FIELS AND PASSWORD.
If entered fields are true then enable editing of jtable in main program..Well, you might be in over your head.
//need code here for enabling table
if(s=="mactus") If you don't know how to correctly test for String equality, you will have no chance of getting this to work.
You need to hit the tutorials. First the basic one, then the Swing one. -
How to get numerical value for every button
Hi,
Currently I am using a case structure to determine which graph i want to display. For example, each case( i have 7 cases), there is a frequency,amplitude dial which user can change it. So basically there are 7 of those. Let say the user want to change case 1 and display those. I've plan to place a button PLAY beside the frequency dial so that it will activate the case 1. But the problem is how can i do that as the input for the case structure is numerical (0-6) to select the case. How can i activate case 1 for an example, when i click the button PLAY beside the first dial? Is it possible to change the configuration of the button PLAY, so that when its activated, it will give out numeric 1 and i wire to the case structure input? Thanks guys.Maybe you want to use a single radiobutton control with seven items?
Here's a quick example.
(Also, see what happens if you wire the radiobutton control to a case structure. )
LabVIEW Champion . Do more with less code and in less time .
Attachments:
SelectWithRadio.vi 22 KB -
How to get the value assigned in dropdowmlistbox as well as radio button
Hi Everybody,
Please help me to find the solution for the following:
1. How to get the value assigned in dropdowmlistbox?
2. How to get the value assigned in radio button?
I am waiting for the answer and reply...
Thanks & Regards,
ShanthaKumar.KA.The radio button has a name attribute. That name attribute should be the same as the bean property. Then you just need a
<jsp:setProperty name="mybean" property="*"/>
and the bean's set method will be called for the value of that radio button.
so...
<input type="radio" name="doit"/>
class MyBean
public void setDoit( boolean yes )
//do whatever here
} -
HELP! I need help to understand how to get value on radio buttons!
hello,
I realy need the help from anyone that knows how to get value from radio buttons in a JSP.
I have this :
<%
java.util.Vector vLinha = (java.util.Vector) datos.get("ConsNefect");
java.util.Hashtable ordens;
java.util.Enumeration eLinha = vLinha.elements();
String t = "radio";
String x = "escolha";
String l = "";
int i = 0;
//int esc = 0;
String fila = "";
boolean bol = true;
while (eLinha.hasMoreElements())
ordens = (com.ibm.dse.base.Hashtable) eLinha.nextElement();
if (++i%2 == 0)
fila = "formgriscla";
else
fila = "formgrisosc";
out.println("<tr>");
out.println("<td class=\"" + fila + "\">");
out.print("<p class=\"dato2\">");
out.print("<a href=" + urls.get("action"));
out.print("&sequencia=" + (String) ordens.get("sequencia"));
out.print(">");
out.print((String) ordens.get("descricao"));
out.print("</a></p></td>");
out.println("<td class=\"" + fila + "\">");
out.print("<p class=\"datop\">");
out.print((String) ordens.get("datap"));
out.print("</p>");
out.println("<td class=\"" + fila + "\">");
out.print("<p class=\"datop\">");
out.print((String) ordens.get("erro"));
out.print("</p>");
out.println("<td class=\"" + fila + "\">");
out.print("<p class=\"datop\">");
l = (String) ordens.get("sequencia");
out.println("<input type=\"" + t + "\" name=\"" + x + "\" value=\"" + l + "\">");
out.print("</p></td>");
out.println("</tr>");
//esc++;
%>
<!--input type="Hidden" name="escolha" value=<!--%l%>-->
<!--input type="Hidden" name="escolha" value="<!--%=escolha%>"-->
</td>
</tr>
I don�t know how to take the value... PLEASE HELP ME OUT!
THANKS TO ALL!,
Best wishes,
Alex (portugal)You must wrap your contents into a FORM element and, then, using getParameter("escolha"), retrieve your value.
-
How to set value for radio button in sap crm survey suite
Hi ,
I created a survey in CRM Service, in which I added a question with answer as '10 Selection Button Group ('radio button'). And answer has 11 answer options (which means 11 radio buttions). Now when we test the survey, the value for the radio buttons is appearing like 'id_0050569b03091ee480a29d8ee61e953c'. But i want to set a specific value for each radion button (from 1 to 11). So, how to set value for radio button in sap crm survey suite???.
Thanks & Regards,
SeshuHi,
I found solution myself. Click on Goto -> Editing Mode -> Expert Mode. Now you can set value for radio button.
Regards,
Seshu -
How to get the values from popup window to mainwindow
HI all,
I want to get the details from popup window.
i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
now i am able to display popup window with values.How to get the values from popup window now.
I can anybody explain me clearly.
Thanks&Regards
kranthiHi Kranthi,
Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
Regards,
Uday -
How to get selected value from selectOneRadio ???
Hi...i want to how to get selected value from selectOneRadio and use it in another page and in backing bean.
Note i have about 10 selectOneRadio group in one page i want to know value of each one of them.
Plzzzzzzzz i need helpYou have a datatable in which each row is a question, correct?
Also in each row you have 5 possible answers that are in a radio, correct?
So,
You need to put in your datatable model, a question, and a list of answers (5 in yor case) and the selected one.
So you will have a get to the question, an SelectItem[] list to populate the radios and another get/set to the selected question.
ex:
<h:selectOneRadio value="#{notas.selectedString}" id="rb">
<f:selectItem itemValue="#{notas.valuesList}"/>
</h:selectOneRadio>
Search the web for examples like yours. -
How to get column value from DB grid
Hi!
I wander how to get col value from GridControl?
My app consists of one rowsetinfo with two
columns CODE and DESCRIPTION and a jbutton
titled SELECT. When user clicks SELECT button
the app should show the value of the CODE col
of the selected row in GridControl.
I wander how to make this action ?
XxpsTransTimesMasterIter.setAttributeInfo( new AttributeInfo[] {
CODEXxpsTransTimesMasterIter,
DESCRIPTIONXxpsTransTimesMasterIter} );
XxpsTransTimesMasterIter.setName("XxpsTransTimes");
XxpsTransTimesMasterIter.setQueryInfo(new QueryInfo(
"XxpsTransTimesMasterIterViewUsage",
"lov.XxpsTransTimes",
"CODE, DESCRIPTION",
"XXPS_TRANS_TIMES",
null,
null
));Hi,
You could attach an ActionListener on the JButton, and try the following code :
NavigationManager fm = NavigationManager.getNavigationManager();
DataItem dataItem = fm.getFocusedControl().getDataItem();
ImmediateAccess col_code = null;
String code = null;
if (dataItem != null && dataItem instanceof RowsetAccess) {
RowsetAccess rowset = (RowsetAccess)dataItem;
try {
col_code = (ImmediateAccess) rowset.getColumnItem("CODE");
code = col_code.getValueAsString();
} catch (DuplicateColumnException de) {
return;
} catch (ColumnNotFoundException ce) {
return;
} catch (SQLException se) {
return;
JTextField tf = new JtextField();
tf.setText(code);
I haven't tested this code.
I am curious to know, the Object type of the dataItem.If it doesnot happen to be RowsetAccess ..try.. ScrollableRowsetAccess OR ImmediateAccess.
Your code would change accordingly, depending on the instance.Refer to the product documentation for this.
Do let me know, if this works.
TIA
Sandeep -
How to get the values of 2 dynamic comboboxes in one jsp to another jsp?
I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
Select.jsp:
<%@ page language="java" import="java.sql.*" %>
<%!
Connection con = null;
Statement st = null;
ResultSet rs = null;
String sql = null;
void addItems(javax.servlet.jsp.JspWriter out, String sql)
try{
rs = st.executeQuery(sql);
while( rs.next() )
out.println("<option>" + rs.getString(1) + "</option>");
}catch(Exception e)
System.out.println(e);
%>
<HTML>
<HEAD>
<TITLE>JSP WITH MULTIPLE FORMS</TITLE>
<script language="javascript">
function checking()
form1.submit();
</script>
</HEAD>
<body>
<center>
<b><font size="5" color="#333399">Staff ID:</font></b></center>
<FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
<p align=center>
Details of Staff :
<SELECT 1 NAME="type" onchange="checking();">
<option> Administrator </option>
<option> OfficeAssistent </option>
<option> Clerk </option>
</SELECT 1>
</p>
</FORM>
<FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
<center>
<TABLE><TR><TD>Staff ID:</TD>
<TD><SELECT 2 NAME="staff_id">
<%
String type = request.getParameter("type");
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
catch (ClassNotFoundException ex) {
System.out.println(ex);
catch (SQLException ex)
System.out.println(ex);
st = con.createStatement();
sql = "select staff_id from "+type+"";
addItems(out, sql);
%>
</SELECT 2>
</TD>
</TR>
</table></center>
<h2> Details of <%= type + "s" %> </h2>
<center><input type=submit value=ok onclick="submit();"></center>
</FORM>
</BODY>
</HTML>
welcome1.jsp
<center><h1>WEL COME</h1></center>
<%
String type = request.getParameter("type");
String sid = request.getParameter("staff_id");
%>
<h2> Details of <%= type + "s" %> </h2>
<h2> Details of <%= sid %> </h2><SELECT 1 NAME="type" onchange="checking();">
<option value = "0"> Administrator </option>
<option value = "1"> OfficeAssistent </option>
<option value = "2"> Clerk </option>
</SELECT 1> -
Xml: how to get node value when pasing node name as a parameter
Hi,
I've got some xml:
var xmlData:XML =
<1stNode>
<buttonID>first child node value</buttonID>
<imageID>second child node value</imageID>
<labelID>third child node value</labelID>
</1stNode>
Then I want to read specific node value based on a value passed to a function. .
var buttonID = new Button;
var imageID = new Image;
var labelID = new Label;
getNodeValue(buttonID); //the value here is set dynamically
private function getNodeValue (nodeName:String):void {
trace (xmlData.nodeName) //doesn't work
var str:String = "xmlData." + nodeName;
var xml:XMLList = str as XMLList //doesn't work
I'm don't know how to get the value when node name is dynamically changed.use:
getNodeValue(buttonID); //the value here is set dynamically
private function getNodeValue (nodeName:String):void {
trace (xmlData[nodeName]) -
When i am on the 4 step in Search Result Display options, i get errors after 2 radio buttons
I am using Oracle portal 9.0.2 version
When i am on the 4 step in Search Result Display options, i get errors after 2 radio buttons
Default Search Results Page
This Search Portlet
An unexpected error has occurred (WWS-32100)
User-Defined Exception (WWS-11230)
Unknown Exception (WWC-45131)
ORA-20101:
ORA-06512: at "PORTAL.WWSBR_STDERR", line 437
ORA-06512: at "PORTAL.WWPOB_API_PAGE", line 3369
ORA-01403: no data found
ORA-01403: no data found (WWC-11230)
No data found (WWS-32101)
ORA-1403: ORA-01403: no data found
ORA-01403: no data found (WWC-36000)
Error: An unexpected error occurred: User-Defined Exception (WWC-43000)
Please help me with this one
P.S I tried to run inctxgrn.sql, but it did not solve the problemi solved the problem by runing 2 scripts as a portal user
You can refer to bug - 2418089. This was fixed in 9.0.2.3
begin
wwpre_api_value.set_value_as_number
p_path => 'oracle.portal.search',
p_name => 'searchresultpageid',
p_level_type => wwpre_api_value.SYSTEM_LEVEL_TYPE,
p_level_name => null,
p_value => 6,
p_commit => true
commit;
end;
begin
wwpre_api_value.set_value_as_number
p_path => 'oracle.portal.search',
p_name => 'searchresultpagesiteid',
p_level_type => wwpre_api_value.SYSTEM_LEVEL_TYPE,
p_level_name => null,
p_value => 6,
p_commit => true
commit;
end;
NOTE - The difference is the value of 'p_name' attribute. If u see carefully it is 'searchresultpagesiteid'. The first time u run this the value is 'searchresultpageid'. -
What is the code to get the Label of radio button item at runtime?
Hi All
I am working on forms 10g(version 10.1.2.0.2 ) with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 on windows 2000 platform.
My requirement is to dynamically get the label of the radio button item in a radio group.I am able to get the label of the radio group as shown below
Item :Radio group
Label : Gender
IF m_type = 'RADIO GROUP' THEN
m_label:=Get_Item_Property(m_Item ,label);
END IF;
There two Radio buttons inside this radio group which are
item : Radio button
Label : Male
item :Radio button
Label :female
What is the code to get the label of radio button(i.e) male and female ?
How will I get the count of radio buttons in a radio group at runtime?
Regards
MohanBut you have to provide the button name which cannot be get at runtime.
This is a lack of information that the Dev team would correct !
Francois
Maybe you are looking for
-
Printer HP Laserjet 200 MFP M276 is not printing in color
I am trying to get my printer to print in color, however I only get blue output, not in the least the colors it should print. Any ideas what might be the cause? FYI: I am using original HP toner Thanks Yvonne This question was solved. View Solution.
-
Need a recommendation about java smart card and a reader
I've been posting some message in this forum and others and haven't gotten a clear response. I want to experiment with java smart card technology. From what I gathered, Gemplus is a leading company in this field so I thought about buying a smart card
-
Lenovo Hard Disk Issue - Felt bad about the service
This email is regards to the complaint on Lenovo All in desktop i purchased which is still there in warranty. I purchased All in one desktop on 25/02/2014 in one of the outlet of Reliance Digital, Bangalore,India. Below is the detail of the product
-
Please help if you can.
-
Exception Handling in RH_RELATION_MAINTAIN
can we use Try...Catch Blocks for Exception Handling in RH_RELATION_MAINTAIN.....coz i need to Track the Status message coz most of the times it doesn't CATCH and Exception........and i need to send the status msg via Proxy n PI to the JAVA based sys