Oracle ADF: LOV not working on create - oracle

I have a ViewObject (VO1) with a ListOfValue that points to a ViewObject (VO2), and fetches records from VO2. There is no ViewCriteria added on VO2.
When testing in the BC tester, the LOV works fine. Both on editing a row in VO1, and when creating a row in VO1.
Using the LOV in a jspx page, the LOV works fine when editing a row in VO1. But when I'm creating a new row in the jspx page, the LOV doesn't fetch any records. Just an empty list.
I can't figure out what is wrong, or why it doesn't work. I have created several LOV all working like a charm, but this one is making me tear my hair out.
Anyone else experienced a similar scenario where a LOV only works upon editing a row?
Any ideas what can be wrong?
The SOC on the jspx page:
<af:selectOneChoice value="#{row.bindings.IdSosBasGrantType.inputValue}"
label="#{row.bindings.IdSosBasGrantType.label}"
required="#{bindings.SosBasCaseGrantPerCaseType.hints.IdSosBasGrantType.mandatory}"
shortDesc="#{bindings.SosBasCaseGrantPerCaseType.hints.IdSosBasGrantType.tooltip}"
id="soc12" autoSubmit="true">
<f:selectItems value="#{row.bindings.IdSosBasGrantType.items}" id="si11"/>
</af:selectOneChoice>
The iterator binding:
<tree IterBinding="SosBasCaseGrantPerCaseTypeIterator" id="SosBasCaseGrantPerCaseType">
<nodeDefinition DefName="fo.att.alm.sos.model.bas.views.SosBasCaseGrantVO" Name="SosBasCaseGrantPerCaseType0">
<AttrNames>
<Item Value="Seq"/>
<Item Value="IdSosBasGrantType"/>
<Item Value="IdSosBasGrantVariant"/>
<Item Value="RuleType"/>
<Item Value="Status"/>
<Item Value="IdAplCfgPartyType"/>
</AttrNames>
</nodeDefinition>
</tree>
The ViewAttribute:
<ViewAttribute
Name="IdSosBasGrantType"
LOVName="LOV_IdSosBasGrantType"
IsUnique="true"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="IdSosBasGrantType"
EntityUsage="SosBasCaseGrantEO"
AliasName="ID_SOS_BAS_GRANT_TYPE">
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="choice"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
The ListBinding:
<ListBinding
Name="LOV_IdSosBasGrantType"
ListVOName="SosBasGrantTypeUsgLOV"
ListRangeSize="-1"
NullValueFlag="none"
NullValueId="LOV_IdSosBasGrantType_LOVUIHints_NullValueId"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="IdSosBasGrantType"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="GrantTypeId"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="ObjectTypeDisplayName"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
The ViewAccessor
<ViewAccessor
Name="SosBasGrantTypeUsgLOV"
ViewObjectName="fo.att.alm.sos.model.bas.views.SosBasGrantTypeUsgRO"
RowLevelBinds="true"/>

Hard to guess without knowing more about the code.
But if you have a situation where on creating a new record the LOV shows up empty, maybe you have a viewlink defined between the two VOs.
You need to make sure that the LOV data comes from an independent VO2 that is not a detail of VO1.

I guess that
1- Lov view object VO2 has view link defined between two View Objects
2- Lov view object VO2 has parameter in its sql statement to filter data which gets its value from current view object VO1 and the parameter is null so it will not return data

Try turning on the ADF BC debugging and see what is the query that the LOV sends to the DB when you invoke it from the page.
edit your project properties and in the Run/Debug page, select a run configuration and click Edit. Then add the string -Djbo.debugoutput=console to the Java Options field.
http://docs.oracle.com/cd/E16162_01/web.1112/e16182/web_testdebug.htm#BABDBCGF

Related

How to use "editor" field type in joomla "repeatable" form field?

I am developing a module for Joomla 3.3.6. I want to use "editor" field type in "repeatable" field in the xml file. The code I am using is as follows:
<field
name="fpssibtos_img1subs"
type="Repeatable"
icon="list"
label="GLOBAL_SUBS"
description="GLOBAL_SUBS_DESC"
default="{'fpssibtos_img1sub':['test']}">
<fields name="params">
<fieldset hidden="true" name="fpssibtos_img1subs_modal" repeat="true">
<field
name="fpssibtos_img1sub"
default="test"
type="editor"
label="GLOBAL_SUB"
description="GLOBAL_SUB_DESC"
filter="safehtml"/>
</fieldset>
</fields>
</field>
The problem is the editor is not editable, I mean you cannot type anything in it.
I am using CKEditor, I changed it to TinyMCE and others ,but the problem persists. I know that repeatable form field is still buggy ,but I thought some of you guys might know the fix to this particular problem.
In case anyone else comes across this problem, the repeatable form fields only support simple field types. This is apparently due to Joomla not having a simple way for scripts to interact.
Comment on the issue from one of the devs here and here.

Joomla 2.5 'Alternative Menu Items' and 'Category Blog' (Multiple template layout overrides for the same component)

I've come across a very strange problem relating to 'Alternative Menu Items', the usage is described here:
http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6
The following files are located in: templates/testtemplate/html/com_content/category and these are the steps I took:
These files:
blog.php, blog.xml, blog_children.php, blog_item.php, blog_links.php
Have been changed to:
bloggal.php, bloggal.xml, bloggal_children.php, bloggal_item.php, bloggal_links.php
For file bloggal.xml – I changed this part:
<layout title="COM_CONTENT_CATEGORY_VIEW_BLOG_TITLE"
To:
<layout title="Blog Gallery"
Then added sub headings to bloggal.php and bloggal_item.php so I can see if the child items are in effect.
Now the interesting part is bloggal.php works fine but the child items drawn from bloggal_item.php do not come up.
I've done this test with the same template on multiple Joomla installs, on one of them it seems to work and the rest it does not.
The only thing I can think of is Joomla may have had a regression since the working one was an updated install and the rest are more recent versions.
Any ideas?
Starting Joomla 1.6 you can choose an alternate layout for each category. Including those you have overrides for. No need to select an alternate layout when configuring menu items ;)
Sorry I should've posted this sooner. I figured out the issue, I renamed:
<field name="layout_type"
type="hidden"
default="blog"
/>
To:
<field name="layout_type"
type="hidden"
default="bloggal"
/>
Essentially looking for a model that doesn't exist.
If you did this, do the following to fix it:
Rename default="whatever" back to default="blog"
In your database go to _menu table
Look for your menu item via the title column
Head over to the params and change {"layout_type":"bloggal"... to {"layout_type":"blog"...

Devexpress Gridview Filter Control

I have a ASPxGridView component that is filled from a SQL query
I wanted to apply a filter on my ASPX Gridview
so I wrote:
<dx:ASPxGridView runat="server" ID="gvExecReq" Visible="false" AutoGenerateColumns="true"
OnPageIndexChanged="gvExecReq_PageIndexChanged" OnBeforeColumnSortingGrouping="gvExecReq_BeforeColumnSortingGrouping">
**<Settings ShowFilterRow="True" />
<Settings ShowFilterBar="Visible" ShowHeaderFilterButton="True" />**
</dx:ASPxGridView>
the filter is well established, but it is not functional
What do I need to add more?
Please Use Following Settings For Filter To Be Operational :
<Settings ShowHeaderFilterButton="true"
EnableFilterControlPopupMenuScrolling="True"
ShowFilterBar="Visible" ShowFilterRow="True" ShowFilterRowMenu="True" />
Also In The Columns of The Grid You Can Control The Condition of Filtering i.e. Contains, Equal, Does Not Contain etc.
<dx:GridViewDataColumn Settings-AutoFilterCondition="Contains" Settings-FilterMode="DisplayText">
if in the database filed type is string you can write part of text for search,but is type of int or decimal or so on,you should write ALL text even it can find rows

Customize a document_view and add a div?

This feels like a newbie question but:
I am trying to create a new page from the drop-down display menu so that I can supply a background color to the page (so end user doesn't have to go into the html and add a div). I tried adding a new (empty) div to the template but it's not working. Is this even possible?
Here is my code (my div is called "s_holder"):
<metal:field use-macro="python:here.widget('text', mode='view')">
Body text
</metal:field>
<div metal:use-macro="here/document_relateditems/macros/relatedItems">
show related items if they exist
</div>
<div tal:replace="structure provider:plone.belowcontentbody" />
</tal:main-macro>
</metal:main>
<div id="s_holder"></div><!--end s holder-->
</body>
</html>
For the part of creating the new display view: as #Auspex said, you should put the div inside the macro.
To add your display view to the drop down menu you need to edit every content type. There are two ways of doing this:
1- manually add a "types" folder in the genericsetup profile of your product and put inside one xml file per content type. Ex:
File.xml
<?xml version="1.0"?>
<object name="File"
meta_type="Factory-based Type Information with dynamic views"
i18n:domain="plone" xmlns:i18n="http://xml.zope.org/namespaces/i18n">
<property name="view_methods">
<element value="file_view"/>
<element value="myniewfantastic_view"/>
</property>
</object>
2- in the ZMI -> portal_types edit every content type to add your display view and then in the portal_setup tool export the step for types. Extract the xml definitions from the downloaded archive to your genericsetup profile (in the "types" folder) and then edit them to remove unuseful parts as above.
Sure you can do it. I'm not convinced it's a good idea :-), but you need the <div> to be inside the main_macro (your example HTML is invalid - you have a </tal:main-macro> and no start tag, but I'm assuming you just cut and pasted the last part of the template here, because that template would never display, if it was written that way.
That said, how exactly are you adding it to "the drop-down display menu"?

How can I control the subreport layout?

My business analysts have created 7 reports (using Report Builder) they want merged into a MEGA-report. I've been trying to do this by wrapping them all in subreports (which you can't use in Report Builder 1.0). While all reports show up, the layouts are all over the place. The subreports seem to reorder themselves.
I've dropped down to only using two reports to try to isolate the error. When this runs, subreport2 shows up above subreport1.
What changes do I need to make to my report, (or the child reports) to get them to display in order?
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="schema">
<InteractiveHeight>11in</InteractiveHeight>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<RightMargin>1in</RightMargin>
<LeftMargin>1in</LeftMargin>
<BottomMargin>1in</BottomMargin>
<rd:ReportID>480f6105-cb4d-4969-b530-81ab5a5e3fb8</rd:ReportID>
<Width>8.5in</Width>
<Body>
<ReportItems>
<Subreport Name="subreport1">
<ReportName>Report1</ReportName>
</Subreport>
<Subreport Name="subreport2">
<ReportName>Report2</ReportName>
</Subreport>
</ReportItems>
<Height>0.5in</Height>
</Body>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>
Add a Table
Place each subreport in its own table cell
Organize cells for desired layout

Resources