PL/SQL Portlet with edit defaults. HOW ???
Hi !
I created a pl/sql portlet that renders html. Now I want a customization option on the "Edit Defaults" page of the portlet. How do I do this ??
In the code of the portlet I set "l_portlet.has_show_edit_defaults" to true. So the Edit Defaults page is show, but it's empty.
On that page I want a variable where you can choose between 3 options. In the procedure where I render the html, I want to read this variable so I can render 3 different things.
Can someone please help me ?
I suggest you look at the database services provider in the PDK which is an example provider showing how to do the basic things within a provider/portlet - like customise and edit defaults.
You could also generate a provider using the pl/sql generator - that will produce code that you can use as a starting point for your development.
Basically you have to add code to the show procedure of the portlet to render a different page if the mode is 'MODE_SHOW_EDIT_DEFAULTS'. Look in the samples - it should be clear.
Hope this helps.
Similar Messages
-
PDK Java Portlet looses edit default values everytime I redeploy EAR
Hello All,
I have a PDK Java portlet (Portal - Oracle 10g). It works as expected perfectly till I redeploy my EAR. As soon as I redeploy EAR, it looses the settings that user had set using edit defaults link. Is there anyway to prevent this? Application runs on OC4J server.
I urgently need solution to this problem and any help would be greatly appreciated.
Thanks,
KinnareeJust to be sure, you are registering the PDK producer with a WebCenter portal?
Or are you just using the PDK provider in an oracle portal environment and you don't use webcenter?
If you are using webcenter, can you also test this behavior in Oracle portal? Do you also loose the values in oracle portal or is it just in webcenter? This way we can see if it's a webcenter or portlet issue.
If you loose the values on both the oracle portal and webcenter side, than it has something to do with the portlet. If they are working correctly in oracle portal, than it might be a bug in the PDK bridge in Webcenter.
Edited by: Yannick Ongena on Jun 23, 2011 11:14 AM -
Bug or feature : Using portlets with edit mode on a page in the portal
Hi,
i am using Workshop 8.1 (GA release july) and i have discovered a bug (or a
feature) with respect to the beta version.
i have created a simple portlet with a view mode and an edit mode. When i
place the portlet on the very first page of a one book portal, it works
perfectly. However, i have a book with three pages and placed the portlet on
the second page. Now when i put the portlet in edit mode, by clicking the
edit button, i am directed to the first page of the portal and the portlet
will not show.
Inspection learned that the URL generated for the edit button, didn't
contain the _pagelabel parameter. When i added the parameter manually it
works fine.
A final remark is that the buttons in the titlebar have no icons the browser
can load.
hope someone can help me out,
LodewijkCan you please post this question to weblogic.developer.interest.portal
newsgroup.
Thanks
"Lodewijk Spijker" <[email protected]> wrote in message
news:3f165945$[email protected]..
Hi,
i am using Workshop 8.1 (GA release july) and i have discovered a bug (ora
feature) with respect to the beta version.
i have created a simple portlet with a view mode and an edit mode. When i
place the portlet on the very first page of a one book portal, it works
perfectly. However, i have a book with three pages and placed the portleton
the second page. Now when i put the portlet in edit mode, by clicking the
edit button, i am directed to the first page of the portal and the portlet
will not show.
Inspection learned that the URL generated for the edit button, didn't
contain the _pagelabel parameter. When i added the parameter manually it
works fine.
A final remark is that the buttons in the titlebar have no icons thebrowser
can load.
hope someone can help me out,
Lodewijk -
PL/SQL portlet with images
We use a Portal Form to load images into the database. The field in the database is a BLOB. We do not know how to display the imagefield in PL/SQL. Can anyone explain to us how we can solve this problem?
Lene & Anniken :o)procedure query_row(p_empno in varchar2 default null)
is
l_size integer;
l_imedia ordsys.ordimage;
l_tmpblob blob;
begin
htp.init;
select emp_image into l_imedia
from imedia.imtest1 where
empno = p_empno;
if l_imedia.islocal() then
owa_util.mime_header(l_imedia.getmimetype(),false,null);
htp.p('Pragma : no-cache');
htp.p('Cache-control: no-cache');
htp.p('Expires: Thu, 01 Jan 1970 12:00:00 GMT');
htp.p('Content-length: '||l_imedia.getcontentlength());
owa_util.http_header_close;
dbms_lob.createtemporary(l_tmpblob,true);
dbms_lob.copy(l_tmpblob,l_imedia.getcontent(),l_imedia.getcontentlength(),1,1);
wpg_docload.download_file(l_tmpblob);
dbms_lob.freetemporary(l_tmpblob);
else
owa_util.mime_header('text/html',false);
htp.p('Content-length: 0');
owa_util.http_header_close;
end if;
end query_row;
This example retrieves data from ordsys.ordimage datatype.
But if you are storing the data in blob, alter the above code something like the following :
wpg_docload.download_file(<blob_content>) -
Use system console with editable default value
Hi,
Is it possible in java (or maybe groovy) to ask user for input in console with default value passed? User should be able to edit the default value or commit it by pressing enter key.
Sample:
<CONSOLE> Enter type: TYPE1<cursor>
if user hits enter key the TYPE1 is passed to application, when user hits backspace the TYPE1 is edited. Any ideas?Opal wrote:
if user hits enter key the TYPE1 is passed to application, when user hits backspace the TYPE1 is edited. Any ideas?For java it would need to look more like the following
<CONSOLE> Enter type[enter for default 'TYPE1']: <cursor>
I suspect that generally users will not be editing the default, so although you can't do it, it isn't much of a loss. -
How can I make Edit/Default Customization form with Java ?
In previous portal relise developers have simple way to rendering Edit/Default Customization form:
<% PortletRendererUtil.renderCustomizeFormHeader(portletRequest, out, null, "services_action", null, null); %>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="2">
<TR>
<TD>Days</TD>
<TD><INPUT TYPE="text" NAME="services_days" VALUE="<%= days %>" SIZE="10"/></TD>
</TR>
<TR>
<TD>Rows</TD>
<TD><INPUT TYPE="text" NAME="services_rows" VALUE="<%= rows %>" SIZE="10"/></TD>
</TR>
</TABLE>
<% PortletRendererUtil.renderCustomizeFormFooter(portletRequest, out); %>
In current portal version I can not find these methods, these methods not exists in JavaDoc and in jar's. And all old code do not works!!! Why?
I must hide portlet borders and use <renderContainer>false</renderContainer> in provider.xml. Then portal do not render Edit/Default Customization form in Edit/Default mode. In previous relise I can make this form with Java code.
My question: how I can get Edit/Default Customization form in Edit/Default mode with Java code?
Thanks in advance
CheslavHi George, the trick is to figure out which browser is your default now, and remove that designation using the Android settings for Apps. It might be Chrome or it might be something Samsung provides.
This article has more information: [[Make Firefox the default browser on Android]].
Does it work? -
How to use VPD in Java/Struts JSP portlet with SSO
DB = 10.1.0 (Standard Edition)
Portal = 9.0.4.1
10gAS = 9.4.0.1 (EE)
I am in the beginning stages of developing some portlets that will be Java/Struts JSP based. We use SSO and have implemented some VPD security in our DB by creating some views that use SYS_CONTEXT('USERENV','CURRENT_USERID').
These Java portlets connect to the DB using a defined JDBC connection for the OC4J container they are deployed in. The problem I'm having is that the call to SYS_CONTEXT is returning the user of the JDBC connection and not the SSO user. So far I have been unable to find any documentation that will point me in the right direction to get this configured properly.
Deployment and configuration are as follows. Deploy war file to custom container on app server. In the configuration of the OC4J contain the app used the containers default JDBC connection using the oracle.jdbc.pool.OracleDataSource class. Max and Min open connections are blank.
In the portal configuration under Navigator - Providers tab we defined a new Registered Provider. In the Connections tab for the provider we Specify the URL Http://hpsrv02.simsol.com:7777/discovery-portlets/providers. Under "Specify how the user's identity will be set by the Portal..." the "The user has the same identity in the Web providers application as in the Single Sign-On identity" is selected. Under "User/Session Information" User is selected and Login Frequency is set to "Once per user session". Then we created a new portal page and created a new portlet with the new provider.
Just an FYI I do have Discoverer working with VPD and any report portlet, dynamic page portlet and any other type of portlet I created all work correctly with VPD it is just the java/struts one that is not working.
So does any one have any insight into what configuration steps I have missed?
Any help is much appreciated,
Ed KlingerEd,
Your java code must get the SSO username (it's just a HTTP header variable) :
ie: code sample...
Enumeration e = request.getHeaderNames();
while (e.hasMoreElements()) {
String name = (String)e.nextElement();
String value = request.getHeader(name);
out.println("<br> "+name + " = " + value);
if (name.toUpperCase().trim().equals("OSSO-USER-DN")){
dn_user=value;
out.println("<br>******** USER DN = "+dn_user);
Then, the SSO username can be used in the VPD policy.
Note that there is a difference between the sso username and the database username . SSO username is not known by database (CURRENT_USERID will return a database username)
Discoverer worked OK in your case with the SYS_CONTEXT (.. CURRENT_USERID) because authentication is made by database user, probably. -
URGENT! Where is IMAP portlet "Edit Defaults" link????
Hi all,
I've deployed PDK(January). Registered the imap portlet to portal and add a portlet to a newly created page.
It iis written in documentation that there is a "Edit Defaults" page to enter server information (other than customization link to enter username/password info). But I could not find how to navigate to tha "Edit Default Page".
Any comments,
Thanks in advance,
YelizHi.
To get to the Edit Defaults page, click on the "Edit" link on your page. This will open a new page. On this page, just above your portlet there will be a button called "Actions". This will show you a page with the heading "Select Action". On this page, select the "Edit Defaults" radio button and click on OK. The page which opens is the Edit Defaults page.
Please note, the method I have described above holds true for most portal 9.0.2 versions. It might vary for certain portal 9.0.2 versions.
Thanks,
Ashish. -
Building portlets with PL/SQl vs java
Hi
We are planing to use oracle 9iAS application server(Enterprise version)to build portal application.
Can someone suggest me which one should i use, building portlets with j2ee or building portlets with PL/SQL.
what are the advantages of web providers over database providers?which one is the best way of building portlets.Hello
I've been using Portal for years now, and I'm still developping in PL/SQL. It's very simple and quick to developp. I'm even not using any database providers, I'm just invoking my procedures via their URLs with some Ajax hidden components, and I could developp some screens like employees vacations managements, trombinoscope, portal statistics, etc ...
I learnt at Oracle how to developp some "true" portlets with DB providers but it's not usefull for me at this time as I don't need portlet customization etc.
BUT
if I had to developp a really big project with several developpers I would use DB providers.
And maybe I would use Java but it takes rather long time to be efficient with this language and it needs to be a realy big project for I start using this language. And as explained above Java offers more compatibility with 3rd party products.
And last but not least, one has to know what Oracle is more and more dealing with Java, the next 11g version that has just released is much more using Java than 10g does, and that's true for every Oracle products.
So it's just a matter of skill and time.
A. -
XML FORM - How to save read-only controls with a default value
Hello everybody,
I have a 3 xml forms, each one to create one type of news. I need to use 3 because each of this forms has their own controls. But the control which indicates the type of news (asociated with a KM Predefined Property) must be common in the 3 forms, in order to use it on searches.
The question is, how can I include in this forms a control:
- Visible for the user
- With a default value defined in the control properties (each form has a different value, corresponding with the type of news)
- Read-only mode
- The value showed in the control must be saved in the associated KM Predefined Property when the user clicks the Save button.
Anyone knows how to do this?
What control can I use?
I was thinking of trying with text boxes, but I don't find the way to make them unwritable (Read only mode).
It is posible using labels?
Thanks.
Kind regardsHello Jose,
I know you responded with a question... I see it in the email, but I don't see it here! Very odd... but in response:
The first thing I do when I open the Edit.xsl file is do a 'find' for the name of the text field that I want to be read-only (in my test case, it's 'location'). Repeat the find until you see something like:
[code]<!--
field location
-->[/code]
Below there is where I put the new code. Mine looks like this:
[code]- <xsl:choose>
- <xsl:when test="location='' and ($editmode='create')">
- <xsl:choose>
- <xsl:when test="./xf:ValidationError/@tagname='location'">
- <input name="location" size="30" type="text" class="urEdfiTxtEnbl" id="field_1157467268006">
- <xsl:attribute name="tabindex">
- <xsl:choose>
<xsl:when test="$accessibilitymode='true'">21</xsl:when>
<xsl:otherwise>3792</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <xsl:attribute name="value">
<xsl:value-of select="''" />
</xsl:attribute>
- <xsl:attribute name="readonly">true</xsl:attribute>
</input>
</xsl:when>
- <xsl:otherwise>
- <input name="location" size="30" type="text" tabindex="3792" class="urEdfTxtEnbl" id="field_1157467268006">
- <xsl:attribute name="value">
<xsl:value-of select="''" />
</xsl:attribute>
- <xsl:attribute name="readonly">true</xsl:attribute>
</input>
</xsl:otherwise>
</xsl:choose>[/code]
I put the <xsl:attribute name="readonly"> in both places (when test, and when not test). I'm not entirely sure if that's necessary, but that worked for me.
Hope this helps,
Fallon -
Script will create database, 3 database objects and publish.
The error is due to the generation script to create the conflict tables that is not stripping out default constraints that reference a UDF.
As you can see below, the failure is on the generation script for the conflict table.
The conflict table should be a bucket table that shouldn’t enforce data integrity.
See how the default constraints for the columns someint and somestring were stripped out of the generation logic however the default constraint that utilizes a UDF persist and uses the same object name that was used on the production table (The
bold line) , this occurs if I explicitly name the constraint or let the system generate the name for me like in the example posted.
The only way I could see getting around this right now is to drop all default constraints in the system that uses a UDF, publish then add the constraints back which is vulnerable to invalid data and a lot of moving
steps. This all worked with SQL 2000, 2005, 2008, 2008r2, it’s stopped working in SQL 2012 and continues to not work in SQL 2014.
Error messages:
Message: There is already an object named 'DF__repTable__id__117F9D94' in the database.
Could not create constraint. See previous errors.
Command Text: CREATE TABLE [dbo].[MSmerge_conflict_MergeRepFailurePublication_repTable](
[id] [varchar](8) NULL CONSTRAINT [DF__repTable__id__117F9D94] DEFAULT ([dbo].[repUDF]()),
[somedata] [varchar](64) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NULL,
[someint] [int] NULL,
[somestring] [varchar](64) NULL
Parameters:
Stack: at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteNonQuery(SqlCommand command, Int32 queryTimeout)
at Microsoft.SqlServer.Replication.AgentCore.ExecuteDiscardResults(CommandSetupDelegate commandSetupDelegate, Int32 queryTimeout)
at Microsoft.SqlServer.Replication.Snapshot.YukonMergeConflictTableScriptingManager.ApplyBaseConflictTableScriptToPublisherIfNeeded(String strConflictScriptPath)
at Microsoft.SqlServer.Replication.Snapshot.BaseMergeConflictTableScriptingManager.DoConflictTableScriptingTransaction(SqlConnection connection)
at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen)
at Microsoft.SqlServer.Replication.Snapshot.BaseMergeConflictTableScriptingManager.DoConflictTableScripting()
at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateTableArticleCftScript(Scripter scripter, BaseArticleWrapper articleWrapper, Table smoTable)
at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateTableArticleScripts(ArticleScriptingBundle articleScriptingBundle)
at Microsoft.SqlServer.Replication.Snapshot.MergeSmoScriptingManager.GenerateArticleScripts(ArticleScriptingBundle articleScriptingBundle)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateObjectScripts(ArticleScriptingBundle articleScriptingBundle)
at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.DoScripting()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQLServer, Error number: 2714)
Get help: http://help/2714
Server COL-PCANINOW540\SQL2012, Level 16, State 0, Procedure , Line 1
Could not create constraint. See previous errors. (Source: MSSQLServer, Error number: 1750)
Get help: http://help/1750
Server COL-PCANINOW540\SQL2012, Level 16, State 0, Procedure , Line 1
Could not create constraint. See previous errors. (Source: MSSQLServer, Error number: 1750)
Get help: http://help/1750
Pauly C
USE [master]
GO
CREATE DATABASE [MergeRepFailure]
ALTER DATABASE [MergeRepFailure] SET COMPATIBILITY_LEVEL = 110
GO
USE [MergeRepFailure]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create view
[dbo].[repView] as select right(newid(),8) as id
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[repUDF]()
RETURNS varchar(8)
BEGIN
declare @val varchar(8)
select top 1 @val = id from [repView]
return @val
END
GO
create table repTable
id varchar(8) default([dbo].[repUDF]()),
somedata varchar(64) null,
rowguid uniqueidentifier ROWGUIDCOL default(newid()),
someint int default(1),
somestring varchar(64) default('somestringvalue')
GO
insert into reptable (somedata) values ('whatever1')
insert into reptable (somedata) values ('whatever2')
go
/*test to make sure function is working*/
select * from reptable
GO
/*Publish database*/
use [MergeRepFailure]
exec sp_replicationdboption @dbname = N'MergeRepFailure', @optname = N'merge publish', @value = N'true'
GO
declare @Descrip nvarchar(128)
select @Descrip = 'Merge publication of database ''MergeRepFailure'' from Publisher ''' + @@servername +'''.'
print @Descrip
-- Adding the merge publication
use [MergeRepFailure]
exec sp_addmergepublication @publication = N'MergeRepFailurePublication', @description = N'@Descrip',
@sync_mode = N'native', @retention = 14, @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'true',
@enabled_for_internet = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21,
@ftp_subdirectory = N'ftp', @ftp_login = N'anonymous', @allow_subscription_copy = N'false', @add_to_active_directory = N'false',
@dynamic_filters = N'false', @conflict_retention = 14, @keep_partition_changes = N'false', @allow_synctoalternate = N'false',
@max_concurrent_merge = 0, @max_concurrent_dynamic_snapshots = 0, @use_partition_groups = null, @publication_compatibility_level = N'100RTM',
@replicate_ddl = 1, @allow_subscriber_initiated_snapshot = N'false', @allow_web_synchronization = N'false', @allow_partition_realignment = N'true',
@retention_period_unit = N'days', @conflict_logging = N'both', @automatic_reinitialization_policy = 0
GO
exec sp_addpublication_snapshot @publication = N'MergeRepFailurePublication', @frequency_type = 4, @frequency_interval = 14, @frequency_relative_interval = 1,
@frequency_recurrence_factor = 0, @frequency_subday = 1, @frequency_subday_interval = 5, @active_start_time_of_day = 500, @active_end_time_of_day = 235959,
@active_start_date = 0, @active_end_date = 0, @job_login = null, @job_password = null, @publisher_security_mode = 1
use [MergeRepFailure]
exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repTable', @source_owner = N'dbo', @source_object = N'repTable', @type = N'table',
@description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x000000010C034FD1, @identityrangemanagementoption = N'manual',
@destination_owner = N'dbo', @force_reinit_subscription = 1, @column_tracking = N'false', @subset_filterclause = null, @vertical_partition = N'false',
@verify_resolver_signature = 1, @allow_interactive_resolver = N'false', @fast_multicol_updateproc = N'true', @check_permissions = 0, @subscriber_upload_options = 0,
@delete_tracking = N'true', @compensate_for_errors = N'false', @stream_blob_columns = N'false', @partition_options = 0
GO
use [MergeRepFailure]
exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repView', @source_owner = N'dbo', @source_object = N'repView',
@type = N'view schema only', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x0000000008000001,
@destination_owner = N'dbo', @destination_object = N'repView', @force_reinit_subscription = 1
GO
use [MergeRepFailure]
exec sp_addmergearticle @publication = N'MergeRepFailurePublication', @article = N'repUDF', @source_owner = N'dbo', @source_object = N'repUDF',
@type = N'func schema only', @description = null, @creation_script = null, @pre_creation_cmd = N'drop', @schema_option = 0x0000000008000001,
@destination_owner = N'dbo', @destination_object = N'repUDF', @force_reinit_subscription = 1
GOMore information, after running a profile trace the following 2 statements, the column with the default on a UDF returns a row while the other default does not. This might be the cause of this bug. Is the same logic to generate the object on
the subscriber used to generate the conflict table?
exec sp_executesql N'
select so.name, schema_name(so.schema_id)
from sys.sql_dependencies d
inner join sys.objects so
on d.referenced_major_id = so.object_id
where so.type in (''FN'', ''FS'', ''FT'', ''TF'', ''IF'')
and d.class in (0,1)
and d.referenced_major_id <> object_id(@base_table, ''U'')
and d.object_id = object_id(@constraint, ''D'')',N'@base_table nvarchar(517),@constraint nvarchar(517)',@base_table=N'[dbo].[repTable]',@constraint=N'[dbo].[DF__repTable__id__117F9D94]'
exec sp_executesql N'
select so.name, schema_name(so.schema_id)
from sys.sql_dependencies d
inner join sys.objects so
on d.referenced_major_id = so.object_id
where so.type in (''FN'', ''FS'', ''FT'', ''TF'', ''IF'')
and d.class in (0,1)
and d.referenced_major_id <> object_id(@base_table, ''U'')
and d.object_id = object_id(@constraint, ''D'')',N'@base_table nvarchar(517),@constraint nvarchar(517)',@base_table=N'[dbo].[repTable]',@constraint=N'[dbo].[DF__repTable__somein__1367E606]'
Pauly C -
How could I replace hard coded value in my sql query with constant value?
Hi all,
Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
PROCEDURE class_by_day_get_bin_data
in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER
IS
bin_period_length NUMBER(6,0);
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
JOIN bin_types
ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = 2
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set
ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value
ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v
ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE'
) report_lanes
ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
JOIN (
SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS'
) report_classes
ON bin_data_value.bin_id = report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table
ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >= in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time < in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = 2
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
bin_data.bin_type = 2But I dont want any hard coded number or string in the query.
How could I replace it?
I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
bin_type CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
Thanks.
Edited by: user10641405 on May 29, 2009 1:38 PMDeclare the constant inside the procedure.
PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
in_site_id IN NUMBER,
in_start_date_time IN TIMESTAMP,
in_end_date_time IN TIMESTAMP,
in_report_level_min IN NUMBER,
in_report_level_max IN NUMBER) IS
bin_period_length NUMBER(6, 0);
v_bin_type CONSTANT NUMBER := 2;
BEGIN
SELECT MAX(period_length)
INTO bin_period_length
FROM bin_data
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length <= 60;
--Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
--report.
DELETE FROM edr_class_by_day_bin_data;
INSERT INTO edr_class_by_day_bin_data
(site_id,
site_lane_id,
site_direction_id,
site_direction_name,
bin_start_date_time,
bin_end_date_time,
bin_id,
bin_value)
SELECT site_to_data_source_lane_v.site_id,
site_to_data_source_lane_v.site_lane_id,
site_to_data_source_lane_v.site_direction_id,
site_to_data_source_lane_v.site_direction_name,
bin_data_set.start_date_time,
bin_data_set.end_date_time,
bin_data_value.bin_id,
bin_data_value.bin_value
FROM bin_data
JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
bin_data_value.bin_data_set_serial
JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
site_to_data_source_lane_v.data_source_id
AND bin_data_set.lane =
site_to_data_source_lane_v.data_source_lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
report_lanes.lane_id
JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
FROM report_parameters
WHERE report_parameters.report_parameter_id =
in_report_parameter_id
AND report_parameters.report_parameter_group = 'CLASS'
AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
report_classes.class_id
JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
TRUNC(edr_rpt_tmp_inclusion_table.date_time)
WHERE site_to_data_source_lane_v.site_id = in_site_id
AND bin_data.start_date_time >=
in_start_date_time - numtodsinterval(1, 'DAY')
AND bin_data.start_date_time <
in_end_date_time + numtodsinterval(1, 'DAY')
AND bin_data_set.start_date_time >= in_start_date_time
AND bin_data_set.start_date_time < in_end_date_time
AND bin_data.bin_type = v_bin_type
AND bin_data.period_length = bin_period_length;
END class_by_day_get_bin_data; -
Hi!
I imported my portlets from 3.0.9 into the new one and all went fine, but the Edit Defaults Option does not work anymore :(
I tried to find new Guidelines to handle "Edit Defaults" but I failed ...
So does anyone share this problem with me ??Hi,
Is the portal version you imported the same to is also 309 ??
By any chance have you applied any patches on the 309 Build you have ??
Thanks,
Anu -
I have both Photoshop 4 and Photoshop 6 on my computer. When I am in Bridge and want to open an image by double clicking, it automatically opens in 6. I see, when I go to "open with" 6 is listed as "default" How can I change the default to open an image with a double click in 4?
You can associate files from the Bridge level and the Desktop level.
In Bridge CS4, go to Preferences > File Type Associations and change it to Photoshop CS4 for the file types you want.
If you want to open files from the Windows Desktop in CS4, these are the instructions:
Do this from the Windows Desktop:
If you want your image file to open in Photoshop and it doesn't, right click on it and choose
Open with > Choose default program… select Photoshop CS4 or CS6 and checkmark "always use the selected program to open this type of file". -
How to compare result from sql query with data writen in html input tag?
how to compare result
from sql query with data
writen in html input tag?
I need to compare
user and password in html form
with all user and password in database
how to do this?
or put the resulr from sql query
in array
please help me?Hi dejani
first get the user name and password enter by the user
using
String sUsername=request.getParameter("name of the textfield");
String sPassword=request.getParameter("name of the textfield");
after executeQuery() statement
int exist=0;
while(rs.next())
String sUserId= rs.getString("username");
String sPass_wd= rs.getString("password");
if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
exist=1;
if(exist==1)
out.println("user exist");
else
out.println("not exist");
Maybe you are looking for
-
I used to be able to minipulate huge photoshop files. Now I can't even get one to go from 20 to 50 gig! All I get is this out of ram error. I have a 400G scratch disk and well over optimum on all settings! NOT HAPPY!!
-
Invalid File after Downloading from Database using JSP/JDev 10.1.2
Hi, i got a problem when i download a file from my blobColumn in database. Well, actually i got no problem in reading the file out of database, but when i download this file, there are 3 more bytes then in the original one in Database... Here's my ja
-
Replication of table from Oracle 10g to sql server 2000
Could i replicate table from Oracle 10g to sql server online. we have tables with same configuration and if any change happen in oracle 10g or sql server in that table we need to replicate that change to other database. What is the solution for this
-
Oracle 9i and runInstaller and Slackware 8.0
i am running Slackware 8.0, and whenever i try to run /cdrom/runInstaller, i get this error: SIGSEGV 11* segmentation violation stackbase=0xbffff2fc, stackpointer=0xbffff1c4 Full thread dump: "Finalizer thread" (TID:0x42741210, sys_thread_t:0x4d093e0
-
hi friends i am facing problem in starting tomcat jakarta-tomcat-4.1.24 , actually i think i am doing mistake in setting environment variable set classpath=%classpath%;C:\tomcat\jakarta-tomcat-4.1.24\common\lib\servlet.jar; set path=%path%;C:\j2sdk1.