SQL from Table Column with Dynamic URL Problem
This is the SQL I'm attempting to save to a table column via the Object Browser;
select
"a"."PBR_BRIEF_ID" "Brief ID",
"a"."PROJECT_NUMBER" "Project",
"b"."DESCRIPTION" "Description",
"b"."ACTUAL_END_DATE" "Actual End",
"b"."RFS_DATE" "RFS",
"b"."LOCATION_CODE" "Location",
''||"b"."ESA_CODE"||'' "ESA",
"b"."PROJECT_USER_STATUS" "Status",
"b"."PROJECT_TRIGGER" "Trigger"
from
UPT1TRIAL.FUND_PLAN_BRIEF_LINK_CCR@NDSD "a",
UPT1INTEGRAL.INT_PROJECT_DATA@NDSD "b"
where
"a"."PBR_BRIEF_ID" = :P3_BRIEF_ID and
"a"."PROJECT_NUMBER" = "b"."PROJECT_DEFINITION_NUMBER"
The intesting bit is the following, where a URL is return behind a particular column;
''||"b"."ESA_CODE"||'' "ESA",
It's interesting because when I click on "Apply Changes" in the Object Browser, the text that appears in the column is as follows, i.e. with APP_ID and SESSION populated;
''||"b"."ESA_CODE"||'' "ESA",
Why would that happen??
The full SQL above is used in an application page with a SQL Query (PL/SQL function body returning SQL query). The basic SQL works OK but because of what the Object Browser is doing, the link does not.
Message was edited by:
Damian - apologies for lack of formatting!!
Message was edited by:
Damian
Damian,
Use
& lt;
for your < tags and then the message will appear in the proper format.
If you are using dynamic sql to generate an url with APP_ID and SESSSION you could:
a) create page items (P1_APP_ID and P1_SESSION)
b) compute those page items to the actual APP_ID and SESSION_ID
c) use the value of those items while generating your dynamic sql (instead of APP_ID and SESSION)
Then, your links will show the right APP_ID and the right SESSION.
Denes Kubicek
Similar Messages
-
Hi All,
We have used WSRP Portlet in Webcenter Portal Page. The Portlet is created using JSF Bridge out of ADF Bounded Taskflow.
It is causing Performance issue. Every time static content like js, css and images URLs are downloaded and the URL contain portlet_id and few other dynamic parameters like resource_id, client_id etc.
We are not able to cache these static content as these contains dynamic URL. This ADF Specific images, js and css files are taking longer time to load.
Sample URL:
/<PORTAL_CONTEXT>/resourceproxy/~.clientId~3D-1~26resourceId~3Dresource-url~25253Dhttp~2525253A~2525252F~2525252F<10.*.*.*>~2525253A7020~2525252FportletProdApp~2525252Fafr~2525252Fring_60.gif~26locale~3Den~26checksum~3D3e839bc581d5ce6858c88e7cb3f17d073c0091c7/ring_60.gif
/<PORTAL_CONTEXT>/resourceproxy/~.clientId~3D-1~26resourceId~3Dresource-url~25253Dhttp~2525253A~2525252F~2525252F<10.*.*.*>~2525253A7020~2525252FportletProdApp~2525252Fafr~2525252Fpartition~2525252Fie~2525252Fn~2525252Fdefault~2525252Fopt~2525252Fimagelink-11.1.1.7.0-4251.js~26locale~3Den~26checksum~3Dd00da30a6bfc40b22f7be6d92d5400d107c41d12/imagelink-11.1.1.7.0-4251.js
Technologies Used:
Webcenter Portal PS6
Jdeveloper 11.1.1.7
Please suggest , how this performance issue can be resolved?
Thanks.
Regards,
DigeshStrange...
I can't reproduce this because i have issues with creating portlets... If i can solve this issue i will do some testing and see if i can reproduce the issue...
Can you create a new producer with a single portlet that uses a simple taskflow and see if that works?
Are you also using business components in the taskflows or something? You can try removing some parts of the taskflow and test if it works so you can identify the component(s) that causes the issues. -
Importing From Flat File with Dynamic Columns
HI
I am using ssis 2008,i have folder in which I have Four(4) “.txt” files each file will have 2 columns(ID, NAME). I loaded 4
files in one destination, but today I receive one more “.txt” file here we have 3 columns (ID, NAME, JOB) how can I get a message new column will receive in source. And how can I create in extra column in my destination table dynamically …please help meHi Sasidhar,
You need a Script Task to read the names and number of columns in the first row of the flat file each time and store it in a variable, then create a staging table dynamically based on this variable and modify the destination table definition if one ore more
new columns need to be added, and then use the staging table to load the destination table. I am afraid there is no available working script for your scenario, and you need some .NET coding experience to achieve your goal. Here is an example you can refer
to:
http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/
Regards,
Mike Yin
TechNet Community Support -
Running a SQL Stored Procedure from Power Query with Dynamic Parameters
Hi,
I want to execute a stored procedure from Power Query with dynamic parameters.
In normal process, query will look like below in Power Query. Here the value 'Dileep' is passed as a parameter value to SP.
Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData 'Dileep'"]
Now I want to pass the value dynamically taking from excel sheet. I can get the required excel cell value in a variable but unable to pass it to query.
Name_Parameter = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
Name_Value = Name_Parameter{0}[Value],
I have tried like below but it is not working.
Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData Name_Value"]
Can anyone please help me with this issue.
Thanks
DileepHi,
I got it. Below is the correct syntax.
Source = Sql.Database("ABC-PC", "SAMPLEDB", [Query="EXEC DBO.spGetData '" & Name_Value & "'"]
Thanks
Dileep -
Move Table Column with AppleScript in Microsoft Word
Microsoft Word has a flaw (in my opinion) with tables in that it aligns the left and right text with the margins rather than aligning the table columns with the margins. This results in sloppy tables, because the left and right borderlines lie outside the margins.
I would like to fix the word tables by
calculating the left cell padding and right cell padding in points and setting them to variables {left_pad,right_pad} respectively
move left column by left_pad to the right
move right column by right_pad to the left
The script I was working on does not work, but I will post it to show my thought process as I hone in on my solution.
tell application "Microsoft Word"
--595 points is width of A4 paper
-- Set page margin in points to variables
set {l_margin, r_margin, t_margin, b_margin} to {(get left margin of page setup of active document), get (right margin of page setup of active document), get (top margin of page setup of active document), get (bottom margin of page setup of active document)}
get {l_margin, r_margin, t_margin, b_margin}
-- Set specific Paragraph margins
-- NOTE: If you select a table thinking you wish to drag just the left margin to the right, or the right margin to the left, this code does not accomplish this because each cell has its own paragraph formatting. This code will set the margin for every single cell, because each cell has its own margins! (separate from padding).
set para_sel to paragraph format of selection
set paragraph format left indent of para_sel to (centimeters to points centimeters 0.5)
-- Aligning left and right columns of table with the margins
-- NOTE: There is a command to set left row indent, but not right row indent (very stupid of Microsoft)
end tellI have worked up something that seems to work (although I cannot promise it is the best way). Hope it helps anyone else who has this need.
tell application "Microsoft Word"
activate
set findRange to find object of selection
clear formatting findRange -- clear any previous formatting used in a find operation
set forward of findRange to true -- find forward
set style of findRange to "List Bullet" -- the style to look for
tell findRange
set gotIt to execute find find text "" -- do the search w/o matching any text
end tell
if gotIt is true then -- if a match was found
copy object selection -- copy it to the clipboard
set mySelection to (the clipboard) -- then put clipboard into a variable
set myOffset to ¬
(get selection information selection information type ¬
(horizontal position relative to page)) -- now put selection info into a variable
display dialog mySelection & return & (myOffset as text) -- then display it
end if
end tell -
Hiding Table Columns with the Spry Element Selector
I am trying to set up a toggle button that will show/hide
rows >1 when clicked. I've used Adobe's
"Hiding
Table Columns with the Spry Element Selector" example and it
worked fine with an HTML list, until I linked to actual XML data.
Now it works in reverse. What gives?
Here's the example:
http://a44.awardspace.com/testing/toggleShowHideRows.htmThat's what I started with. Same result:
http://a44.awardspace.com/testing/toggleShowHideRows.htm -
Update table column with same auto-increment value, via T-SQL stored procedure
Good Evening to every one,
I have a table 'Contracts' as we can see in the picture below (I exported my data on An Excel Spreadsheet). Table's primary key is 'ID' column.
I am trying to create a stored procedure (i.e. updContractNum), through which I am going to update the 'Contract_Num' column, in every row where the values on Property_Code, Customer, Cust_Category and Amnt ARE EQUAL, as we can see in the schema above.
The value of Contract_Num is a combination of varchar and auto_increment (integer). For example, the next value on 'Contract number' column will be 'CN0005' for the combination of 11032-14503-02-1450,00
I' m trying to use CURSORS for this update but I am new in using cursors and I am stuck in whole process. I atttach my code below:
CREATE PROCEDURE updContractNum
AS
--declare the variables
DECLARE @CONTRACT_NUM VARCHAR(10); -- Contract Number. The value that will be updated on the table.
DECLARE @CONTRACT INTEGER; -- Contract number, the auto increment section on contract number
DECLARE @CONTR_ROW VARCHAR(200); -- Contract row. The row elements that will be using on cursor
DECLARE CONTRACT_CURSOR CURSOR FOR -- Get the necessary fields from table
SELECT PROPERTY_CODE, CUSTOMER, CUST_CATEGORY, AMNT
FROM CONTRACTS;
OPEN CONTRACT_CURSOR -- open a cursor
FETCH NEXT FROM CONTRACT_CURSOR INTO @CONTR_ROW
WHILE @@FETCH_STATUS = 0 -- execute the update, for every row of the tabl
BEGIN
--update Contract_Num, using the format coding : contract_number = 'CN' + 0001
UPDATE CONTRACTS
SET CONTRACT_NUM = 'CN'+@CONTRACT_NUM+1
END
CLOSE CONTRACT_CURSOR
Thank you in advance!You dont need cursor
You can simply use an update statement like this
UPDATE t
SET Contract_Num = 'CN' + RIGHT('00000' + CAST(Rnk AS varchar(5)),5)
FROM
SELECT Contract_Num,
DENSE_RANK() OVER (ORDER BY Property_Code,Customer,Cust_category,Amnt) AS Rnk
FROM table
)t
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How to create a dynamic table region with dynamic VO in processFormRequest
Hi All,
I have a requirement to create a dynamic table region with a dynamic VO.
I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
Thanks in Advance.
Thanks and Regards,
Myvizhi
Edited by: Myvizhi Selvi on May 20, 2013 6:21 PMHi,
You can use following sample code to create advance table columns dynamically with colum groups as well.
It assumes that you have already created advance table with ID EmpTblRN.
Below code returns column heading dynamically and if you keep your VO column names and attributes
same in all the cases (COL1, COL2.....) then you can easily use a loop to create advance table columns.
It is attaching VO attributes to OAMessageStyledText bean in the last.
Hope it helps.
OAAdvancedTableBean advTable = (OAAdvancedTableBean)webBean.findChildRecursive("EmpTblRN");
Serializable [] param = {currentWindowSeq.toString()};
Datum[] colHeadingArray = (Datum[])am.invokeMethod("getColumnHeading", param);
String oldGrpName = null;
String newGrpName = null;
OAColumnGroupBean columnGroup = null;
DictionaryData columnFormat = new DictionaryData();
columnFormat.put(WIDTH_KEY, "4%");
for (int i = 0; i < colHeadingArray.length; i++)
try
oracle.sql.STRUCT os = (oracle.sql.STRUCT)colHeadingArray;
Object[] colHeadAttr = os.getAttributes();
newGrpName = (String)colHeadAttr[0];
if(newGrpName!=null)
if(!newGrpName.equals(oldGrpName))
// Create a column group, create the set the column header,
// and add the column group under the advanced table
columnGroup = (OAColumnGroupBean)createWebBean(pageContext, COLUMN_GROUP_BEAN, null, "ColGroup"+i);
OASortableHeaderBean columnGroupHeader = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "ColGroupHeader"+i);
columnGroupHeader.setText(newGrpName);
// Retrieve from message dictionary
columnGroup.setColumnHeader(columnGroupHeader);
advTable.addIndexedChild(columnGroup);
oldGrpName = newGrpName;
// Create a column, create the set the column header, and add the column
// under the column group
OAColumnBean column1 = (OAColumnBean)createWebBean(pageContext, COLUMN_BEAN, null, "Column"+i);
OASortableHeaderBean column1Header = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "Column1Header"+i);
column1Header.setText(colHeadAttr[1].toString());
column1.setColumnHeader(column1Header);
column1.setColumnFormat(columnFormat);
columnGroup.addIndexedChild(column1);
// Create the actual leaf item under the first column
OAMessageStyledTextBean leaf1 = (OAMessageStyledTextBean)createWebBean(pageContext, MESSAGE_STYLED_TEXT_BEAN, null, "Leaf"+i);
//OARawTextBean leaf1 = (OARawTextBean)createWebBean(pageContext, RAW_TEXT_BEAN, null, "Leaf"+i);
leaf1.setViewAttributeName("Week"+(i+1));
String destination = "OA.jsp?page=/xxqc/oracle/apps/per/leaveadvance/webui/EmployeeLeaveDetailPG&personId={@PersonId}";
destination = destination + "&startDate="+colHeadAttr[1].toString()+"-"+(String)colHeadAttr[0];
destination = destination + "&addBreadCrumb=Y&retainAM=Y";
leaf1.setDestination(destination);
OADataBoundValueViewObject cssjob = new OADataBoundValueViewObject(leaf1,"Color"+(i+1));
//leaf1.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, cssjob);
leaf1.setAttributeValue(UIConstants.RENDERED_ATTR, cssjob);
column1.addIndexedChild(leaf1);
catch(Exception e)
System.out.println("e"+e); -
Indices and constraints on XML Tables/Columns (with Schema)
Hi,
I've read a lot of documents by know, but the more I read the more I got confused. So I hope you can help me.
Frist my Oracle Server Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
I've manages to create a table with a column with the type SYS.XMLTYPE and the storage modle "Object Relational" with an XML Schema.
I can insert data and I can execute XQuery statements.
I can also create an XMLTYPE table with my Schema, althoug the tool SQL Developer keeps telling me, that the one column wich is generated within the table is of the type CLOB instead of object realtional (which is what I defined).
The query for that is:
CREATE TABLE ENTRY_XML OF XMLTYPE
XMLTYPE STORE AS OBJECT RELATIONAL
XMLSCHEMA "BBMRI_Entry.xsd" ELEMENT "Entry";
That's where I am, now my questions:
1. What's the difference? I'm aware of the obviouse difference, that with the first way I can add relational columns as well, but apart from that? If I only want to store the xml data, is the second approach always better (especially in regard to my next question)?
2. My schema contains elements with attributes (which contain IDs), which have to be unique. So I tried to add a UNIQUE constraint, but failed. I found this (http://www.oracle.com/technology/sample_code/tech/java/codesnippet/xmldb/constraints/Specify_Constraints.html), but it just doesn't work.
Query: "ALTER TABLE ENTRY_XML CONSTRAINT ENTRY_XML_SUBID_UNQIUE UNIQUE (xmldata."SubId");"
Error: "ORA-01735: invalid ALTER TABLE option"
3. I didn't try yet, but I need to specifiy foreign keys within the XML as well (which is explained in the link at question 2). I guess the solution to question 2 will make this possible as well.
4. Since I can create a UNIQUE constaint for attributes (well, I can't yet, but I hope that this will change soon) I woundered if it would be possible to realize something like auto_increment. Although I see the problem with validating the xml input if the Ids are empty. Any suggestions on that problem? Do I have to query for the highest (free) id before I can insert the new documents?
Well, that's enough for today, I hope someone can help me!
Greetings, FlorianI've read through all the literature (again) and found out, that I did most of the stuff right in the first place. I just missinterpreted the generated tables for the types and wondered why they only contained one column. Well, at least one mistery solved.
But know to make it easier just one question, which might solve all problems I have:
How can I create UNIQUE constraints and FOREIGN KEYS when I have a table or column of the type XmlType with a schema using the object relational storage method?
I found a solution http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb05sto.htm#i1042421 (Example 5-12), but it just does not work for me.
I removed the FOREIGN KEY and tried it again and the UNIQUE Key works.
So basically the question is how to retrieve the "AId" Attribute. "XMLDATA"."AId", "XMLDATA"."Attribute"."AId" and "XMLDATA"."Subject"."Attribute"."AId" all do not work.
I've added my schema declarations at the bottom (which I've already successfully registred and used without foreign keys and constraints, so they work).
After I've registered the two schema files 3 types and 11 tables where created. One type for the attribute, one for the study type and one probably to link the attributes to the study types. The tables are one for the attribute, 4 for the content*-elements, 2 for the study type (I don't really know why two) and 4 with strange names starting with "SYS_NT" and then some random numbers and letters (looks alot like some base64 encoded string).
The Query I try to use to create the table is: (The table "Attribute" already exists and contains a field "ID", which is it's PK.)
CREATE TABLE STUDYTYPE_XML
OF XMLType (UNIQUE ("XMLDATA"."STId"),
FOREIGN KEY ("XMLDATA"."AId") REFERENCES ATTRIBUTE(ID))
XMLTYPE STORE AS OBJECT RELATIONAL
ELEMENT "StudyType.xsd#StudyType";
The error I get is:
Error starting at line 1 in command:
CREATE TABLE STUDYTYPE_XML
OF XMLType (UNIQUE ("XMLDATA"."STId"),
FOREIGN KEY ("XMLDATA"."AId") REFERENCES ATTRIBUTE(ID))
ELEMENT "StudyType.xsd#StudyType"
Error at Command Line:3 Column:37
Error report:
SQL Error: ORA-22809: nonexistent attribute
22809. 00000 - "nonexistent attribute"
Cause: An attempt was made to access a non-existent attribute of an
object type.
Action: Check the attribute reference to see if it is valid. Then retry
the operation.
Attribute-Schema (Attribute.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:attribute name="AId">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Name" type="xs:string" />
<xs:element name="ContentString" type="xs:string" />
<xs:element name="ContentInteger" type="xs:integer" />
<xs:element name="ContentDouble" type="xs:decimal" />
<xs:element name="ContentDate" type="xs:date" />
<xs:element name="Attribute">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element ref="ContentString" />
<xs:element ref="ContentInteger" />
<xs:element ref="ContentDouble" />
<xs:element ref="ContentDate" />
</xs:choice>
<xs:attribute ref="AId" use="required" />
<xs:attribute ref="Name" use="optional" />
</xs:complexType>
</xs:element>
</xs:schema>
Study Type Schema (StudyType.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="Attribute.xsd" />
<xs:attribute name="STId">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:element name="StudyType">
<xs:complexType>
<xs:sequence>
<xs:element ref="Attribute" minOccurs="1" maxOccurs="unbounded" />
<xs:element ref="StudyType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute ref="STId" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
Edited by: alwaysspam on Sep 8, 2010 5:35 PM -
Oracle deleting rows from tables starting with the name PQ
hai friends
we are given access rights to delete only tables starting with PQ. HAVING PQ_NUM as primary key for all the PQ tables.
totally we have 6 tables. PQ_01,PQ_02, PQ_03,PQ_04,PQ_05,PQ_06.
ALL This tables will have one primary key. for example pq_01 willl have pq01_num as primarykey and pq_02 table will have pq02_num as primary
key.
pq01_num value will exist in all the primary key of pq tables.
i want query to delete rows from the pq tables based on the input value i give.
for example if i give primarykey value 122 then that value in pq tables should be deleted.
One more problem is there. pq_06 table does not have pq02_num column. here the column differs. it is pq06_num_req.
so give your idea of deleting the rows from pq tables
waiting
SI dont have access to databse,this is untested
declare
v_cmd varchar2(2000);
columnname varchar2(30);
input_value number:=??;
tabowner varchar2(30):=???
begin
--step 1 identify table
FOR sub IN (SELECT table_name table_to_delete
FROM all_tables
WHERE table_name LIKE 'PQ%'
and owner=tabowner
) LOOP
----step 2 identify column
v_cmd :='select t.column_name from all_constraints S,All_Ind_Columns T where
S.OWNER=T.TABLE_OWNER
AND S.TABLE_NAME=T.TABLE_NAME
AND S.INDEX_NAME=T.INDEX_NAME
and s.owner=tabowner
AND S.TABLE_NAME='||table_to_delete||'
and s.constraint_type='''P'';
execute immediate v_cmd into columnname;
--step 3 delete records
v_cmd := 'delete from '||tabowner||'.' ||
sub.table_to_delete || '
where '||columnname||'='||input_value;
execute immediate v_cmd;
commit;
END LOOP;
end;Edited by: user5495111 on Aug 11, 2009 6:35 AM -
For a migration I have created a sql script that puts the full statement to be executed in a specific table column
I'm now looking for a way how to execute those statements.
Table structure like: oldName, newName, sqlStatement, id, otherField, otherField2
Instead of the full statement(sqlStatement) it would also be possible to use the oldName, newName and id field if that simplifies the problem.
The reason for building the statement and running that one is a) to validate upfront b) a self join is applied to the query result table to prevent some items for update.
The initial idea was to take the sql statements and execute them as a sql script but that process is pretty slow.user2833655 wrote:
For a migration I have created a sql script that puts the full statement to be executed in a specific table column
I'm now looking for a way how to execute those statements.That is wrong, tables are for data not executable code
Re: ref cursor - result set not known
http://en.wikipedia.org/wiki/Data_%28computing%29
>
Data is often distinguished from programs. A program is a sequence of instructions that detail a task for the computer to perform. In this sense, data is thus everything that is not program code.
>
user2833655 wrote:
The initial idea was to take the sql statements and execute them as a sql script but that process is pretty slow.This alternative will just make it difficult, complicated and unreliable as well. -
Opening Centered Pop-up window with Dynamic URL
I got some code for a centered pop-up window in Flash from a
Kirupa tutorial. It works well, except that you are supposed to put
an actual URL for the 'address' variable. I'm using a dynamic URL
(+url[p]+) for my URL. When I put address = "'+url[p]'"; for the
address, it doesn't work.
Here's the code for the button:
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = "'+url[p]+'";
target_winName = "FlashDevelopment";
width = 700;
height = 400;
toolbar = 0;
location = 0;
directories = 0;
status = 1;
menubar = 0;
scrollbars = 1;
resizable = 1;
//sends data back to the function
openWinCentre(address, target_winName, width, height,
toolbar, location, directories, status, menubar, scrollbars,
resizable);
And here's the function:
// New Window Function
_root.openWinCentre = function (url, winName, w, h, toolbar,
location, directories, status, menubar, scrollbars, resizable) {
getURL ("javascript:var myWin; if(!myWin ||
myWin.closed){myWin = window.open('" + url + "','" + winName +
"','" + "width=" + w + ",height=" + h + ",toolbar=" + toolbar +
",location=" + location + ",directories=" + directories +
",status=" + status + ",menubar=" + menubar + ",scrollbars=" +
scrollbars + ",resizable=" + resizable +
",top='+((screen.height/2)-(" + h/2 +
"))+',left='+((screen.width/2)-(" + w/2 + "))+'" +
"')}else{myWin.focus();};void(0);");
Any idea why my dynamic url is not being recognized?Do a malware check with some malware scanning programs on the Windows computer.<br />
You need to scan with all programs because each program detects different malware.<br />
Make sure that you update each program to get the latest version of their databases before doing a scan.<br /><br />
*http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
*http://www.superantispyware.com/ - SuperAntispyware
*http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
*http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
*http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
See also:
*"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked -
Dynamic Columns with dynamic header colspans
Hi All,
Our project requires creation of dynamic data table at runtime. Following are the requirements.
1.The number of columns and column headers should be dynamic. Basically the column headers are the Month names.
2.Some or All of the above displayed months can be further split into 3 columns based on further values selected by the user. The months to be split into 3 columns will be identified only at runtime based on some calculations. When this happens, that particular month header should span 3 columns and an additional header for the 3 split columns have to be displayed. Check the screen shot below.
----------------------------------------------------------------------------------|-------------|
Year: 2008 | Year: 2009 |
----------------------------------------------------------------------------------|-------------|
|Current Month | | |
-------------------------------------|--------------|-----------------------------|-------------|
Sep | Oct | Nov | Dec | Year Total| Jan |
------------------|------------------|--------------|-----------------|-----------|-------------|
| | |2008 |2009 |Total| | |
------------------|------------------|--------------|-----|-----|-----|-----------|-------------|
Old |New |Total|Old |New |Total | | | | | | |
Value|Value | |Value|Value| | | | | | | |
-----|------|-----|-----|-----|------|--------------|-----|-----|-----|-----------|-------------|
xx | xx | xx | xx | xx | xx | xx | xx | xx | xx | xx | xx |
-------------------------------------------------------------------------------------------------Points to be noted:
1.The colspan for the Year header is dynamic based on the months displayed for the previous, current, next year.
2.The ‘Current Month’ header is dynamic based on the month selected in the drop-down.
3.The colspan for the month is dynamic based on whether it is displaying single column or 3 columns
4.The header for the 3-column split is dynamic based on which are the months to be displayed with 3-column split.
5. Irrespective of the month selected, DEC is always split into 3 columns.
Is this achievable in JSF? Please let me know if anyone has worked on a similar requirement.
Thanks and Regards,
Anitha.Hi charishma/Raymond,
Thanks for your response.
charishma,
I checked the link you provided and the code in that page. For me it looks like the colspan and rowspan are set by the user. Can it be done dynamically? I am still not in the development phase. I am still evaluating the possibilities. So it would be great if you can tell me if my requirements will be met with rich faces.
Raymond,
I am still in the evalution phase of whether this requirement is possible or not?
In short, my requirement is to display columns dynamically. Based on certain conditions, each of the column can be further split to 3 more columns with 3 sub-headers below the main header. There are 4-5 rows of headers available for which the colspan has to be calculated dynamically depending on the total number of columns.
The columns should be editable. i.e., the columns contain textboxes where the user can enter data. Again, the editable columns and non-editable columns are determined at run-time based on certain calculations.
Is this possible? If not, i need reasoning as to why it is not acheivable.
If it is not at all posible then the client is ready to compromise on the editing part. That is, data entry can be in a pop-up whereas, the the datatable should just display the data dynamically so as to print it for a report.
Please let me know the possibility of this requirement.
Thanks and Regards,
Anitha. -
Custom sort pivot table columns with Essbase as the data source
Is it possible to sort columns in a pivot table according to an arbitrary value that I define when the data is coming from Essbase?
For example, say I have a dimension called Soda, with values Coke, Diet Coke, Dr. Pepper and Diet Dr. Pepper. I create a report with a sales measure with the measure labels on the rows and the Soda dimension on the column. By default the columns will be sorted alphabetically:
Coke Diet Coke Diet Dr. Pepper Dr. Pepper
Sales 1M .5M .75M 1.25M
I want to create a report that looks like this:
Coke Diet Coke Diet Dr. Pepper Dr. Pepper
Sales
I think I could do this if the source was relational just by creating bins or creating a custom column with a case statement that assigns each Soda an arbitrary value and then sort on this value. Everything I've tried with Essbase as the source, though, results in:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42043] An external aggregate is found in an outer query block. (HY000)
Any ideas?Hi,
1. You can try solve the 'An external aggregate is found in an outer query block' by changing aggregation rule for your measure both in physical and business layer.
By default it's set to Aggr_External - change it to Sum
In physical : Column properties->Aggregation rule
In business model : Column properties->Aggregation tab -> Default aggregation rule.
This may change the result - after changing check whether you still get correct values.
2. Also, in case the desired order is the same as the order of members in the Essbase cube, and you want to leave Aggr_External, you can create a calculated column that will help you with the sort.
See http://oraclebizint.wordpress.com/2008/04/28/oracle-bi-ee-101332-handling-sort-order-in-hyperion-essbase-931-evaluate-and-mdx/
Hope this helps,
Alex -
How to make table column with formula
Hi all..
This is my class
public class MyNumber{
private int num;
public int getNum(){
return num;
public void setNum( int num){
this.num = num;
}Consider I design a table with FXML editor ( Scene Builder in this case )
and these are some of my codes
private TableView tab;
private TableColumn<MyNumber, Integer> tabColInput;
private TableColumn tabColOutput;
tab.setEditable(true);
tabColInput.setEditable(true);
tabColInput.setCellValueFactory( new PropertyValueFactory<Person,Integer>("num") );
tabColInput.setCellFactory(TextFieldTableCell.forTableColumn());
tabColInput.setOnEditCommit(
new EventHandler<CellEditEvent<MyNumber, Integer>>() {
@Override
public void handle(CellEditEvent<MyNumber, Integer> t) {
((MyNumber) t.getTableView().getItems().get(
t.getTablePosition().getRow())
).setNum(t.getNewValue());
);Problem:
I want to make tabColOutput to always show the result for tabColInput times 2
eg:
When I change a row in tabColInput to 10, tabColOutput will show 20
When I change a row in tabColInput to 3, tabColOutput will show 6
Could anyone advice me how to do this?
Ps: I am not english native speaker, so I am sorry if I am saying it wrong ^^I just give it a try and it works like magic
Here is how I do it (change a cell from a table by code)
import java.util.ArrayList;
import java.util.List;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.stage.Stage;
public class TableViewSample extends Application {
public static final String Column1MapKey = "A";
public static final String Column2MapKey = "B";
public static void main(String[] args) {
launch(args);
@Override
public void start(Stage stage) {
List<MyTableData> listData = new ArrayList<MyTableData>();
listData.add(new MyTableData("A", 21) );
listData.add(new MyTableData("B", 24) );
listData.add(new MyTableData("C", 23) );
listData.add(new MyTableData("D", 21) );
listData.add(new MyTableData("E", 22) );
ObservableList<MyTableData> tableData = FXCollections.observableArrayList(listData);
Scene scene = new Scene(new Group());
stage.setTitle("Table View Sample");
stage.setWidth(300);
stage.setHeight(500);
final Label label = new Label("Student IDs");
label.setFont(new Font("Arial", 20));
TableColumn<MyTableData, String> firstDataColumn = new TableColumn<MyTableData, String>("NAME");
TableColumn<MyTableData, Integer> secondDataColumn = new TableColumn<MyTableData, Integer>("AGE");
firstDataColumn.setCellValueFactory(new PropertyValueFactory<MyTableData, String>("name"));
// firstDataColumn.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<MyTableData, String>, ObservableValue<String>>(){
// @Override
// public ObservableValue<String> call(CellDataFeatures<MyTableData, String> p) {
// return p.getValue().nameProperty();
firstDataColumn.setMinWidth(130);
secondDataColumn.setCellValueFactory(new PropertyValueFactory<MyTableData, Integer>("age"));
secondDataColumn.setMinWidth(130);
TableView<MyTableData> table_view = new TableView<MyTableData>();
table_view.setItems(tableData);
table_view.getColumns().setAll(firstDataColumn, secondDataColumn);
final VBox vbox = new VBox();
vbox.setSpacing(5);
vbox.setPadding(new Insets(10, 0, 0, 10));
vbox.getChildren().addAll(label, table_view);
((Group) scene.getRoot()).getChildren().addAll(vbox);
stage.setScene(scene);
stage.show();
//(this is where I change my table content with code)
tableData.get(0).setName("xx Gargoyle xx");
System.out.println("Testing Done");
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class MyTableData{
private final SimpleStringProperty name;
private int age;
public MyTableData(String name, int age) {
this.name = new SimpleStringProperty(name);
this.age = age;
public String getName() {
return name.get();
public StringProperty nameProperty(){
return name;
public void setName(String name) {
this.name.set(name);
public int getAge() {
return age;
public void setAge(int age) {
this.age = age;
}And thank you very much
Maybe you are looking for
-
Hi, I am making a Bot class. This function rotateTo makes the bot rotate towards some coordinates, xTarget and yTarget. There are two targetRadians lines because it is easier to read for me. The target radians shows the angle of the target from the b
-
Keyboard and trackpad (mouse) unresponsive after waking up
Every once in a while, when I leave my PowerBook sleeping for a while, the battery inevitably drains to the point where it puts itself into the deep sleep (saving all info to the disk). When waking from this deep sleep, my keyboard and trackpad are t
-
Problem creating pdf from multiple files
Hello, I'm running Windows XP SP3 with Adobe Acrobat Standard 8.2.1. When I try to create a one pdf from multiple files in Adobe Standard 8.2.1 the application just closes. The two files I'm trying to combine into 1 pdf file are word files. I'm a
-
Apple Care will not return my Hard drive.
I have a Power Book G4 1.67 . The hard drive has failed, it is covered under applecare for another 6 months, I have case number, the person on the phone was very nice, they sent the shipping box. I think it's more then just the HD, however. The drive
-
I am in shock over the dismal battery life of this phone. I didn't even make it through my day without the battery completely draining. I maybe got 9 hours. Yes, I have read Apple's humorous "Turn everything that you paid for off" battery life tips a