Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Problem a4j:support for h:selectOneRadio in JSF

843844Jul 11 2010 — edited Jul 14 2010
Hi All,

I Need to Hide/Show the outputpanel when i select one option from <h:selectOneRadio> using a4j:support.
By default Date output panel is hidden but when yes option is selected it should be displayed and vice versa using ajax support.
 <h:selectOneRadio id="radio1Id" value="#{bean.options}" valueChangeListener="#{bean.onChange}">  
<f:selectItem itemLabel="Yes" itemValue="Yes" />  
 <f:selectItem itemLabel="No" itemValue="No" />  
 <a4j:support event="onclick" reRender="PanelDate" />  
 </h:selectOneRadio> 

<a4j:outputPanel id="quater" ajaxRendered="true" rendered="#{bean.displayDate}">
	<h:outputText value="From" styleClass="OuputText"/>	
	</a4j:outputPanel>

private boolean displayDate;
public void onChange(ValueChangeEvent event){			
		HtmlSelectOneRadio radio=(HtmlSelectOneRadio) event.getComponent();		
		System.out.println(radio.getValue());		
		if(!radio.getValue().equals("3")){
			setDisplayDate(true);
		}
	}
But the problem is entire page is getting refreshed instead of panel.
Please help me in resolving this issue.

Thanks in Advance.
Kriss

Comments

sb92075
912342 wrote:
Hi,

I'm trying to make heterogeneus connection, but when edited listener.ora return this error:

TNS-01201: Listener cannot find executable /app/oracle/product/11.2.0/db_home2/bin/oracle for SID ORCL

Any suggestions?
(PROGRAM=dg4odbc)
give fully qualified pathname for PROGRAM

PROGRAM=/u01/app/oracle/whatever/dg4odbc
Zakr
* (PROGRAM= /opt/progress/datadirect/Connect_for_ODBC_70/dg4odbc)*


[root@localhost admin]# lsnrctl start

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 13-FEB-2012 10:14:51

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Starting /home/oracle/app/oracle/product/11.2.0/dbhome_2/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                13-FEB-2012 10:14:51
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW)))
The listener supports no services
The command completed successfully
The listener supports no services
this is normal?

Edited by: 912342 on 13/02/2012 10:20

Edited by: 912342 on 13/02/2012 10:20

Edited by: 912342 on 13/02/2012 10:20
Pierre Forstmann
Yes, you may need to wait up to 1 minute for database instance automatic registration. If you don't want to wait, you need to run for each database instance:
alter system register;
Richard Harrison .
Hi,
What is your ORACLE_HOME?

is it

/home/oracle/app/oracle/product/11.2.0/dbhome_2

or

/app/oracle/product/11.2.0/dbhome_2

????

The listener log implies the first one but the parameter file implies the 2nd one?

Cheers,
Harry
Zakr
[root@localhost admin]# echo $ORACLE_HOME 
/home/oracle/app/oracle/product/11.2.0/dbhome_2

[root@localhost admin]# lsnrctl status

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 13-FEB-2012 11:10:36

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date                13-FEB-2012 11:08:14
Uptime                    0 days 0 hr. 2 min. 21 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 2 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
I changed the oracle_home on listener ... but the service postgresql does not appear yet.
Richard Harrison .
Hi again,
The top comment line of your listener.ora implies it is located in db_home1 but you are starting the listener from dbhome2. If there is no config at all then a default config will be started up. This looks like what might be happening make sure the listener.ora is located in the correct ORACLE_HOME.

Cheers,
Harry
Zakr
thanks all... this solved..

create public database link pt connect to "postgres" identified by "postgres" using 'PG_SERVICE';

but now.. when create the dblink.. and try select.. return this error.
missing some lib?


select * from table_x@pt
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-28541: Error in HS init file on line 18.
ORA-02063: preceding 2 lines from PT


initPOSTGRESQL.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC

# HS init parameters
#
HS_FDS_CONNECT_INFO = "PostgreSQL Wire Protocol"
HS_FDS_TRACE_LEVEL = ON
HS_LANGUAGE = "BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1"
HS_NLS_DATE_FORMAT = "DD/MM/YYYY HH24:MI:SS"
HS_OPEN_CURSORS = 200
HS_FDS_SHAREABLE_NAME = /opt/Connect_for_ODBC_70/lib/libodbc.so
#
# ODBC specific environment variables
#
set ODBCINI=/opt/Connect_for_ODBC_70/odbc.ini
set ODBCINSTINI=/opt/Connect_for_ODBC_70/odbcinst.ini
set LD_LIBRARY_PATH = /opt/Connect_for_ODBC_70/lib:
/home/oracle/app/oracle/product/11.2.0/dbhome_2/lib:
/lib:/usr/lib:/etc)
set PATH=/opt/Connect_for_ODBC_70/lib:/home/oracle/app/oracle/product/11.2.0/dbhome_2/lib:
/lib:/usr/lib
#
# Environment variables required for the non-Oracle system
#
#set [envvar]=[value]
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Richard Harrison .
Hi again,
Is LD_LIBRARY_PATH all on one line or spread over 3 lines it looks like it is 3 lines that should all be joined together?

Cheers,
Harry
1 - 8
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 11 2010
Added on Jul 11 2010
6 comments
1,909 views