加入收藏 | 设为首页 | Life家族 | SCMLife | RMLife | PMLife | SQALife | TESTLife | 企业VIP专区 | 中文化荣誉殿堂
 
发新话题
打印

[已解决] web方式字段a更改值后并没有触发相应hook( 此文章被查看:739次,被回复:5篇!! )

本主题由 happygod 于 2008-7-16 20:25 关闭

web方式字段a更改值后并没有触发相应hook

字段a,在表单是个复选框,设置了更改值hook
如下:
my $op_sys = $entity->GetFieldValue($fieldname)->GetValue();
    if ($op_sys eq "0") {
        $entity->SetFieldRequirednessForCurrentAction("项目经理", $CQPerlExt::CQ_MANDATORY);
}else{
$entity->SetFieldRequirednessForCurrentAction("项目经理", $CQPerlExt::CQ_READONLY);
}

这样的设置在Windows客户端生效,在Web客户端不生效
请问还需要设置什么吗?


问题已经解决 [打开主题]
本主题的最佳答案为 [ 6 楼].



© 本文为 happygodSCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员

TOP

需要把“项目经理”添加到fieldname字段在form中的web dependent fields属性上。



© 本文为 fishSCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员

TOP

复选框没有web dependent fields属性



© 本文为 happygodSCMLife 共同所有,未经同意,请勿转载 ©如该文侵犯了您的版权,请联系管理员

TOP

是的,这个问题我问过IBM的Support,的确不支持web更新,他们说只能加一个手动“Refresh”Button去解决

© 本文为 没有蛀牙 所有,未经同意,请勿转载
©如该文侵犯了您的版权,请联系管理员
i生活,i音乐!

TOP

引用:
原帖由 没有蛀牙 于 2008-7-16 18:21 发表
是的,这个问题我问过IBM的Support,的确不支持web更新,他们说只能加一个手动“Refresh”Button去解决
手动Refresh按钮,是指加个按钮,需要刷新的时候,再点击更按钮吗?
还有这个按钮是要触发什么代码来进行刷新的呢?

© 本文为 happygod 所有,未经同意,请勿转载
©如该文侵犯了您的版权,请联系管理员

TOP

请参考IBM Note

是的,请参考:
http://www-1.ibm.com/support/docview.wss?rs=0&uid=swg21118710

描述如下:
Problem(Abstract)
This technote explains that value changed hook do not fire on the IBM® Rational® ClearQuest® unless the record is saved.  
  


Resolving the problem
A Value Changed hook will fire on the ClearQuest client, but not on the ClearQuest Web clients. Even if the refresh button is added to the form, the value changed hook still does not fire.

To resolve this issue, replace the Value Changed hook with a Validation hook. The same hook code can be placed in the validation column for the desired field, and will fire on all ClearQuest clients. The validation hook will immediately fire on the ClearQuest Web client, but the form will need to be refreshed. See instructions for creating a refresh button.

Creating the Refresh button
To create the refresh button,

Create a record script hook with no code inside and name it Refresh.
Create a button on the form and label this button as "Refresh".
Go to the properties of the button control (by right clicking on the button > Properties). On the extended tab, under the "click hook" field, select the refresh record script. Also make sure to check the "click hook" field under the "Enable for web" section.

The validation hook will immediately fire on the ClearQuest client. The user will need to click on the newly created refresh button to see the validation hook fire on the web.


最佳答案
该回答被楼主/管理员列为正解!

© 本文为 没有蛀牙 所有,未经同意,请勿转载
©如该文侵犯了您的版权,请联系管理员
i生活,i音乐!

TOP

发新话题