Updating ExtendedMultireferenceEditor when parent order is updated (Hybris SAP Commerce backoffice) - backoffice

We are having an editor in backoffice which shows order details. This editor have extendedmultireferenceeditor to display list of order Entries. We have written an action which changes the price of order entries and then recalculates the order total. This is working fine but the order entry editor keeps showing the old values until we refresh the page.
We have used cockpitEventQueue.publishEvent(event); to publish an event which refreshes the order but not order entries.

Resolved it by using below code.
DefaultWidgetModel widget = (DefaultWidgetModel)actionContext.getParameter("parentWidgetModel");
widget.setValue("currentObject", order);
widget.setValue("orderEntries",order.getEntries());
When using this code it is enabling the 'save' button on order. Not sure why.

Related

Oracle APEX default value not working on cascaded items

I have a blank page with a static content region (Template = Form Region). I select a project via a select list (there is only one project, so it automatically selects it). I then have a key popup lov (a popup lov that displays the description not the returned number value) from which I select a person to be in this project. I am trying to get the form to display the person I selected and saved previously when the form launches for the first time (since the project is chosen due to there being one). This works when you refresh the page, but it doesn't work if you log out and log back into the form. I tried using the default value with a sql query. I tried using a dynamic action that fires when the project changes; but neither approaches work. I fiddled with all the settings, but couldn't get anything to work. Does anyone know how to accomplish this in Oracle APEX?
I even added a refresh of the cascading popup lov to the dynamic action. I can see the hidden input item showing my defaulted value, but the popup lov does not display it on screen. Is this an Oracle bug?
Also in Javascript from the console
$s("P51_LINE_MANAGER1", "7104");
sets the hidden value, but doesn't display on screen.
$v("P51_LINE_MANAGER1");
does however return 7104.

How magento maintain grid values

I want to know where and how does magneto store the data to maintain grid filter and mode type. Like I go to listing page and select list mode while displaying five records and then goes to other page of the same site and comeback. It shows me my previous grid mode and records. I display $_REQUEST, but doesn't see anything there. Anyone knows how I can get those values?
Magento store limit,order,direction in Mage::getSingleton('catalog/session').
If limit,order,direction is found in REQUEST then new value is set in Mage::getSingleton('catalog/session') .
You can check getLimit(),getCurrentMode(),getCurrentOrder(),getCurrentDirection() function in the class
app\code\core\Mage\Catalog\Block\Product\List\Toolbar.php

Select a different value in a static dropdown using angular.js

I have a Magento product page producing static select elements, to which the price mechanism is tied in to backend, so i can't touch those dropdowns. I am using an angular.js radio element to recieve user input, which should in turn update the static dropdown's selected option.
I don't know how to link the two, I have recreated the problem here: http://jsfiddle.net/ldn_tech_exec/smBdC/1/
I want the radio button to update the dropdown, but I can only manipulate the dropdown after it has been created, perhaps using jquery to insert any angular directives required.
UPDATED again: Your select list needs an ng-model and the options should be generated with ng-options. When you select a radio button, the controller method you trigger should update that ng-model, which will cause the select list to update.
See http://docs.angularjs.org/api/ng.directive:select
Another way to do this is to use ng-selected. See
http://docs.angularjs.org/api/ng.directive:ngSelected
UPDATE #3: I missed the fact that you can't modify the select list initially. See my fiddle in the comments below for a working solution.
It sounds like you have some product where the price depends on the options set.
If this is the case then updating the drop-down from your radio button is relatively trivial - or at least depending on your prototype/jquery skills.
However there is a gotcha: once you update the drop-down in javascript with an 'invisible hand' there is a whole lot more javascript code to update the price and availability. To do this you need to bubble the event. This doesn't happen automatically if using prototype.
I hoped I could rustle up the 'bubble code' but I don't currently have it to hand, besides, you aren't stuck at that point, yet...

How to apply filter/specific criteria for browser UI component in Exact Synergy Enterprise?

I am creating a maintenance page where I want to select a task using browser UI component. What I want to do specifically is to filter and show only tasks that are not done yet. Can I implement this using browser UI component? Does Exact Synergy Enterprise offer other components for this functionality?
You should create your browser Repository Explorer and use it in browsefield UI component.
Go to System tab, process to Setup tab and under the Repository section click Explorer. Locate your Repository group, enter it, click Browsers tab next to Business components, Functional components, etc.
Click Add and provide Name, Caption, Caption suffix fields. Then write your SQL query in Query field. The structure is:
SELECT <column(s)> FROM <database table> WHERE <column(s)> IS NOT NULL ORDER BY <column>.
Leave the Column info field empty for now. Fill in the Result columns field with column name which will be used as a Browser component result.
Finally, add database table name in the Table list field. Click Save + Edit column info button. Edit column names from a list shown below Information section and fill in Header/Term ID field with title, describing your columns (this will be shown in Browser UI for the front-end user). Click Save and test your newly created browser. If something went wrong, repeat steps from the start. Most of the time problem could be wrongly filled Column info field.
Now go to your ASPX page and add browsername attribute to your browsefield UI component. Doing so will set the browserfield component to your newly created browser component. This is that you want to see in your maintenance page when setting up the browsefield UI component:
<ex:cardfield runat="server" id="cf" caption="Item" captionid="0">
<ex:browsefield runat="server" id="p" browsername="pbr" datasource="bc" />
</ex:cardfield>
Hope this gives you quick idea of what you need to do in order to adjust it to your situation with tasks.

jgGrid Search Dropdown Not Changing

This may be a followup to this question Possible to make jqGrid Search Box Stay on Page? - Or it may be unrelated because clicking the search button manually shows the same behavior.
We have a dynamically generated grid that is created by a) making an ajax request to get the grid columns based on a report id and then b) setting up the grid model and fetching the data. When the page loads initially, we pass in a starting report id, but there is a dropdown box on the page that lets the user change reports.
When the dropdown changes, I unload any existing grid, make the ajax request to get the columns, set up the grid model, and then get the data. The columns change, the data changes, and everything looks correct - except the search columns do not change in the search dropdown.
If I close the search box and reopen it, it still has the old search columns. Likewise, if I click the reset button or reload the entire grid.
I found it after a bit more poking around. I needed to set the recreateFilter option to true
prmSearch = {recreateFilter:true,multipleSearch:true,overlay:false,sopt:['cn','eq','ne','lt','le','gt','ge','in','ni','nc']};

Resources