Oracle Apex设置值,然后再移动到另一页,项目均为空 [英] Oracle Apex Set values before moving to another page, Items are all null

查看:152
本文介绍了Oracle Apex设置值,然后再移动到另一页,项目均为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行以下操作:

  • 具有唯一密钥的匿名用户输入代码,然后单击开始调查"
  • 该按钮需要调用一个plsql进程来填充一些隐藏的页面项.
  • 一旦设置了值,便会跳转到调查"页面,该页面将使用隐藏的项目来过滤结果.

问题

无论我到目前为止尝试过什么,当我进入下一页时,该过程设置的项目都为空.我认为这是因为它没有提交.我目前拥有的方式是:

No matter what I have tried so far the items set by the process are null when I get to the next page. I assume this is because it did not submit. The way I have it at the moment is:

  • 按钮导航到下一页
  • 设置为按下按钮时的新过程可设置页面项目的值.

到下一页时,它们再次空白.

By the time it gets to the next page they are blank again.

我可以将按钮设置为提交并在处理中执行分支,但是我认为提交将在设置值之前进行.我发现这些事情的发生顺序令人困惑.

I could set the button to submit and do the branch in the processing but I think the submit would happen before the values are set. I find it confusing what order these things happen in.

在进行这项工作时,我能否获得帮助,并且有一篇很好的文章可以更好地理解这一领域吗?

Can I please get help with making this work, and is there a good article on understanding this area better?

下面是将值放入以下过程的代码:

here is the code from the process that puts the values in:

Begin

select id into :P1_pat_id 
from lic_paticipent
where unique_id = :P1_unique_code;

select sur_id into :P1_sur_id 
from lic_paticipent
where unique_id = :P1_unique_code;

select id into :P1_first_res_id
  from lic_result r
  where r.pat_id = :P1_pat_id
  and   r.sur_id = :P1_sur_id
  and   r.qop_id is null
  and   rownum = 1;

End;

预先感谢您的帮助.

推荐答案

好,我解决了它,这是我解决另一个问题的原因. 我将隐藏字段设置为始终替换",而不是仅当为空",因此plsql进程更新了会话,但未更新项目,因此当我提交空项目时,替换了plsql进程设置的内容.我曾期望在更新会话时也会更新该项目. 我通过使隐藏字段可见来解决了这个问题,并且可以看到它为空白,但是当我检查会话状态时却具有一个值.

OK I solved it and it is my playing around with another issue that cased it. I had set the hidden fields to "Always replacing" instead of "Only when null" so the plsql process updated the session but not the item so when I did a submit the null item replaced what the plsql process had set. I had expected that when the session was updated it would update the item also. I worked it out by making the hidden field visible and could see it was blank but had a value when I checked the session state.

这篇关于Oracle Apex设置值,然后再移动到另一页,项目均为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆