actionRegion makes my labels disappear - action

The question is quite simple, yet, I'm till' now unable to answer it myself. Is there any solution to stop my label from a selectRadio/selectList/anything from disappearing everytime I use action region? I need to use it due to having required fields whenever one of these radio values is changed but it is breaking my design because it not only does it erase my "label" field but it also moves its location to the left like a "margin-left: 0".
<apex:pageBlockSection id="Info" title="Some Information" columns="2">
<apex:actionRegion >
<apex:selectRadio id="taxType" label="Why does this disappear?" value="{!answer}">
<apex:selectOptions value="{!itemsAnswer}"/>
<apex:actionSupport event="onchange" rerender="Info" status="status"/>
</apex:selectRadio>
</apex:actionRegion>
<apex:outputLabel >Is the Tax paid at the same time as the Cost?</apex:outputLabel>
</apex:pageBlockSection>

Can you try wrapping an output panel and Render the panel on change

Related

Oracle APEX 21.2.6 Interactive Grid - double-click to edit popup LOV shifts data rows over. How to prevent this?

I have an IG display that looks like this without clicking anything else:
Only Supervisor, and Direct Supervisor are editable, and they are both Popup LOV's.
If I double-click the Supervisor data, and immediately type any letter for the Popup LOV search, the data row(s) display shifts to the left like this:
It doesn't matter how wide the window is when I test this. I've been looking for ways to prevent that shift. Do you have any tips to resolve that?
Thank you
I've since learned that this is a known issue, and a bug report was logged: https://community.oracle.com/tech/developers/discussion/4340268/apex-20-1-popup-lov-in-interactive-grid-causing-issue/p1?new=1
I've also noticed that it seems to happen from a single click plus typing to search - not necessarily from a double-click.
Finally, freezing a column or two in place in the IG display appears to prevent the visual shift of the columns.

How to insert and update the inserted row in Oracle APEX?

I want my "Create" button to insert a row on a table and once inserted to update that row. The reason I need to insert that row first and then update is because some columns that I want to update depend on the value being there in the first place. For example I would like to update the "Gross Margin" column but the "Gross Margin" = Payrate + something else. If I don't have the value in "Payrate" column, well there is no way I can update "Gross Margin" since it depends on it.
What I have tried:
) Create a Dynamic Action that triggers if "create" button is clicked. If its clicked is true then run the 2 true actions of type "Execute server side code" which is the Insert statement and the other is the Update statement. I made sure that Insert has the first sequence(It runs first) then the update(It runs second). Please see below picture of the settings of the "Create" button.
Please see below picture of the settings of the "Dynamic action"
See below settings of the "Insert Action"
Below settings of the "Update Action"
2.) I have also tried by creating a "Process" that is binded to the "Create" button when clicked but it did not worked.
I am open to all suggestions and thank you in advance!
I created a workspace on apex.oracle.com to illustrate my answer:
workspace: SO_HELP, username: so_68399404, pwd: so_68399404
App 22384 (Demonstration - EMP / DEPT) is an app generated on the standard emp/dept sample dataset. In the report "Employees", there is a "create" button but employees can also be edited with the edit icon. Both the "create" button and the "edit" link point to the same form (page 4). The salary is depends on the job. If the job is MANAGER then salary is set to 5000 else salary is increased by 1. Similar to your requirement. I did this with an after submit computation with code
CASE WHEN :P4_JOB = 'MANAGER' THEN 5000 ELSE :P4_SAL + 1 END
No other code needed. No dynamic actions, no custom processes. All updates are handled by the process of type "Automatic Row Processing - DML". Login with the credentials above and have a look. If it is not what you need, please explain exactly what is different in this app - or create a new form/report on that data to illustrate your issue.
May I suggest you ask your questions this way ? Extract your problem out of your code and illustrate it with the sample dataset. No one knows your actual data, everyone knows the emp/dept schema. That can avoid endless discussions in the comments.

Formula help on IF ELSE on Smartsheet

I want to have a condition where IF Delivered column checkbox is checked, then that whole row will be deleted. Is that feasible?
How can I start with it?
Formulas can't change the condition of an item (like a row), only the value in a cell. So, in other words, you can't delete a row with a formula.
You "could" do this with an external script using the Smartsheet API, but you'll want to take situations that #Ken White mentioned in the comments into account. Your script should make sure that there is a way for users to recover the deleted row if the box is checked by mistake.
There are a couple of ways this might be possible. If you set up a default filter on a sheet to always load rows where complete box is unchecked, then, if you checked off a task or two and reloaded the sheet those tasks would not be visible the next time it loads.
To do this:
Create a new filter.
Title it and check the Share Filter checkbox
Set the criteria to the checkbox is unchecked
Then click okay
Save the sheet to save the shared filter.
Click on SHARE
Scroll down and click edit next to the default view
Set the filter to new filter you saved
Save.
Check off some boxes and save the sheet.
Reload the sheet and the completed items will not be visible.

I need a text field or "Label vs TextField"

I develop a game with cocos2d-x rc1 and I need a text field where I will show the score of the player. Which one to use cocos2d::Label or TextField defined in cocos/ui/UITextField.cpp ? What is the difference? For example, I have noticed that Label has enableShadow, but TextField misses.
Don't use a TextField for a mere output field. (Jeff Johnson: "GUI Bloopers", Blooper #17.)
Text fields are meant for input. The fact that they can be active or passive doesn't mean that they should be used in always-passive mode for output. To display a result, use a Label indicating what the following value is, and another Label for the value itself.
Score: 42
Later
One reason is that an inactive TextField typically has an appearance that dampens its visibility, like being grayed out. Another one is that the border surrounding a TextField identifies it as a place where data can be entered, if not now, then some other time; and this is bound to irritate users that are trained to observe such niceties - and there are, me 4 1 ;-)

Why is my cfgrid showing extra space to the right?

I have a cfgrid with 5 columns. The funny thing is, it's showing a sort of extra column to the right, but without any of the formatting that applies to the rest of the grid. I can't seem to get rid of it by playing with the width of the grid or the fields... How can I get it to go away? (It shows up in Firefox and IE, but not in Chrome)
I'm attaching a screenshot of the grid to show what I mean.
It's because you have autowidth="true" set on the cfgrid.
Not having access at the code, I can only make an assumption. I believe you have your last column "centered" by using dataalign="center" within your cfgridcolumn. But did you add headeralign="center" to that cfgridcolumn? It fixed my issue.