壹佰网|ERP100 - 企业信息化知识门户

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2047|回复: 3

Component注册的问题!

[复制链接]
发表于 2009/7/23 10:28:57 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622  。

您需要 登录 才可以下载或查看,没有帐号?注册

x
我新建了一个Component,然后注册到PIA上,但是注册完成后报错
Error: Content reference xxxx was not created.
There is already a content reference with the same name or URL.
去Potal上的注册的folder看了,确实没有这个页面。
我怎样才能找到这个已存在的content reference?
 楼主| 发表于 2009/7/23 21:20:16 | 显示全部楼层
解决了!原来是Application Designer配置了错误的服务器。不过还是学到些东西!
1) Run the below SQL to get the content reference name for your component

SELECT PORTAL_NAME,
PORTAL_OBJNAME AS CONTENT_REFERENCE,
PORTAL_LABEL,
PORTAL_URI_SEG1 AS MENU,
PORTAL_URI_SEG2 AS COMPONENT,
PORTAL_URI_SEG3 AS MARKET
FROM psprsmdefn
WHERE PORTAL_NAME = 'EMPLOYEE'
   AND PORTAL_URI_SEG2 = :1;

-- Replace :1 with the component name you are looking for.

2) From the query above - copy the value in the CONTENT_REFERENCE field and replace the ":1" variable and you will have the path to your component.

WITH portal_registry AS
  (SELECT RTRIM(REVERSE(sys_connect_by_path(REVERSE(portal_label),    ' >> ')),    ' >> ') path,
     LEVEL lvl
   FROM psprsmdefn
   WHERE portal_name = 'EMPLOYEE' START WITH PORTAL_OBJNAME = :1 CONNECT BY PRIOR portal_prntobjname = portal_objname)
SELECT path
FROM portal_registry
WHERE lvl =
  (SELECT MAX(lvl)
   FROM portal_registry);

So, the 1st query is to get the content reference for a component name that you know and then using Jim's query to find the path!
发表于 2009/8/27 22:20:19 | 显示全部楼层
发一个根据组件名找导航路径的SQL:
SELECT REPLACE(NAVIGATION, '', ' > ') "PIA Navigation",
        URL,
        MENU_NAME,
        COMPONENT_NAME,
        PORTAL_OBJNAME,
        PORTAL_PRNTOBJNAME,
        PORTAL_URI_SEG3,
        PORTAL_LABEL
FROM (
        SELECT SYS_CONNECT_BY_PATH(A.PORTAL_LABEL, '>>') NAVIGATION,
                '/EMPLOYEE/ERP/c/' || A.PORTAL_URI_SEG1 || '.' || A.PORTAL_URI_SEG2 || '.' || A.PORTAL_URI_SEG3 URL,
                A.PORTAL_URI_SEG1 MENU_NAME,
                A.PORTAL_URI_SEG2 COMPONENT_NAME,
                A.PORTAL_OBJNAME PORTAL_OBJNAME,
                A.PORTAL_PRNTOBJNAME PORTAL_PRNTOBJNAME,
                A.PORTAL_URI_SEG3 PORTAL_URI_SEG3,
                A.PORTAL_REFTYPE PORTAL_REFTYPE,
                A.PORTAL_LABEL PORTAL_LABEL
                FROM (SELECT DISTINCT A.PORTAL_NAME,
                A.PORTAL_LABEL,
                A.PORTAL_OBJNAME,
                A.PORTAL_PRNTOBJNAME,
                A.PORTAL_URI_SEG1,
                A.PORTAL_URI_SEG2,
                A.PORTAL_URI_SEG3,
                A.PORTAL_REFTYPE
        FROM PSPRSMDEFN A
        WHERE PORTAL_NAME = 'EMPLOYEE'
          AND PORTAL_OBJNAME <> PORTAL_PRNTOBJNAME
          AND NOT EXISTS (
                SELECT 'X'
                FROM PSPRSMSYSATTRVL
                WHERE PORTAL_NAME = A.PORTAL_NAME
                  AND PORTAL_REFTYPE = A.PORTAL_REFTYPE
                  AND PORTAL_OBJNAME = A.PORTAL_OBJNAME
                  AND PORTAL_ATTR_NAM = 'PORTAL_HIDE_FROM_NAV'
                  AND A.PORTAL_OBJNAME NOT IN (
                        'CO_NAVIGATION_COLLECTIONS', 'PORTAL_BASE_DATA'
                  )
          )
) A
WHERE PORTAL_URI_SEG2 = 'COMP_NAME' -- 修改这里!
START WITH A.PORTAL_PRNTOBJNAME = 'PORTAL_ROOT_OBJECT'

CONNECT BY PRIOR A.PORTAL_OBJNAME = A.PORTAL_PRNTOBJNAME)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|手机版|壹佰网 ERP100 ( 京ICP备19053597号-2 )

Copyright © 2005-2012 北京海之大网络技术有限责任公司 服务器托管由互联互通
手机:13911575376
网站技术点击发送消息给对方83569622   广告&合作 点击发送消息给对方27675401   点击发送消息给对方634043306   咨询及人才点击发送消息给对方138011526

GMT+8, 2025/11/29 05:37 , Processed in 0.010935 second(s), 14 queries , File On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表