Displaying images in Popup of ArcGIS Flexviewer - arcgis

I have created a sample flex application using the ArcGIS Flex viewer and trying to access some images from web(wiki).
I have successfully configured the pop-up XML files such that it displays the images. However when I click on the feature, it is not showing the image.
I was thinking if this could be because of the fact that these images are larger to include within the pop-up window.
I have tried the following workarounds of using different tags in the Pop-up config xml.
workaround:1
<description><![CDATA[<img src="{LINK_NEW}"/>{LINK_NEW}.<br>a. ]]>
</description>
workaround:2
<medias>
<media chartfields="" type="image" imagesource="{LINK_NEW}" imagelink="{LINK_NEW}" />
</medias>
The second seems to get me near to the resolution but not able to see the images in the pop-up window.
The question here is, I wanted to know a way to resize the original image with the help of xml tags and also if possible I wanted to increase the size of the pop-up window as well as to reduce the size of image that fits the pop-up window.
My configuration file is like the below:
<?xml version="1.0" ?>
<configuration>
<title>{NAME}</title>
<medias>
<media chartfields="" type="image" imagesource="{LINK_NEW}" imagelink="{LINK_NEW}" />
</medias>
<fields>
<field name="NAME" alias="NAME" visible="true"/>
<field name="LOCID" alias="LOCID" visible="true"/>
<field name="STATE" alias="STATE" visible="true"/>
<field name="ACAIS" alias="ACAIS" visible="true"/>
<field name="LINK_NEW" alias="LINK_NEW" visible="false"/>
</fields>
<showattachments>true</showattachments>
</configuration>
Thanks in advance.

I just figured out that we cannot access larger images in the pop-up window, which might be an enhancement that needs to be done with the pop-up configuration.
And also figured out that accessing larger images is possible through FLEX API by using image control in the pop-up configuration. Below are the few links that might be helpful.
Image Control:
http://livedocs.adobe.com/flex/3/html/help.html?content=controls_16.html
PopUpRendererSkin:
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/skins/PopUpRendererSkin.html

Related

How to use image map in Odoo?

I am trying to use image map in Odoo 14 CE.
This is my attempt to do a proof-of-concept, which is not working (mapping does not happen in the image, and the <img> in the client-side page does not contain usermap="#workmap" attribute).
<field name="image_parts" widget="image" usemap="#workmap"/>
<map name="workmap">
<area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm"/>
<area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm"/>
<area shape="circle" coords="337,300,44" alt="Coffee" href="coffee.htm"/>
</map>
I am trying to make a feature that display image from field image_parts (customized) and it enables users to hover and see information in a small dialog popup. Moreover, the area can also be clicked to do some other methods further on.
Is there any possible solution for this or some parts of this?
To do this kind of changes, you will have to review the Map View / Map Rendered / Map Controller and Map Model JS classes.
You can find them here /enterprise/web_map/static/src/js/.
It's always tricky wanting to do this kind of big changes in Odoo standard views ^^
You'll need some Owl knowledge, in case you don't know you can find documentation/references/trainings/notes on the Odoo Owl github.
Courage

grouping toolwindows in menu

I am creating several tool windows and i would like to group them all under the same designated menu or at least a submenu of view
I am able to make the tool windows using this sort of syntax in the plugin xml:
<extensions defaultExtensionNs="com.intellij">
<toolWindow id="My Sample Tool Window" secondary="true" icon="/myToolWindow/plus.png" anchor="right" factoryClass="myToolWindow.MyToolWindowFactory"/>
</extensions>
and I am able to make menus and menu items like this:
<actions>
<group id="SampleMenu" text="Sample Menu" description="Sample menu">
<action id="Textboxes" class="TextBoxes" text="Text _Boxes" description="A test menu item" />
<add-to-group group-id="MainMenu" relative-to-action="HelpMenu" anchor="before" />
</group>
</actions>
but I can't seem to figure out how to combine the two or find the relevant parts in the documentation
You can't control how toolwindows are presented under View | Tool Windows. You can define your own actions to show your toolwindows, and add those actions in any
other place of the menu, as a group or in any way that you prefer.
To activate a toolwindow programmatically, use:
ToolWindowManager.getInstance(project).getToolWindow(YOUR_ID).activate(null);

TypeError: list.fields[order.name] is undefined

We are currently trying to upgrade to odoo 11 (from 10). We could fix most issues of our custom modules while installing them in new odoo 11 but now i get the following runtime error:
TypeError: list.fields[order.name] is undefined
http://10.15.0.183:8069/web/content/975-35dc0a2/web.assets_backend.js:1293
Traceback:
compareRecords#http://10.15.0.183:8069/web/content/975-35dc0a2/web.assets_backend.js:1293:190
Any ideas whats wrong? Any possibility to debug this or to find out where this exactly happens? the Traceback does not tell anything and in odoo-server log there is nothing.
we have different custom moduls extending articles,customers..
Try to unpack js files to get a better js error that will lead you exactly to where is located the issue, or at least a clear path to start debugging the JS issue in the browser. Try to reproduce the issue starting the page load from this URL
http://10.15.0.183:8069/web?debug=assets
you can also activate debugging mode from the Settings app or using a plugin for your browser:
chrome
Firefox
I know this question is old, but I had the same problem today.
I'm just sharing the fix in my case (Axel Mendoza "debug=assets" answer helped me to pinpoint the bug).
The problem was a mistake in a form view :
a <tree> element was used to render a many2many field, and the default_order attribute was referencing a field not used inside the <tree> definition.
Wrong XML :
<field name="my_many2many_field">
<tree default_order="my_field_0">
<field name="my_field_1"/>
<field name="my_field_2"/>
</tree>
</field>
In my case the fix was to add the field referenced by the default_order attribute, as an invisible field, inside the <tree> definition.
Fixed XML :
<field name="my_many2many_field">
<tree default_order="my_field_0">
<field name="my_field_0" invisible="1"/>
<field name="my_field_1"/>
<field name="my_field_2"/>
</tree>
</field>

Override a default view by a custom module?

Is there a way to override openerp's default views, developing a module instead of doing it manually from Settings / Customization / User Interface / Views...?
We are using OpenERP and customizing a lot of default views (Project List, Invoice List, Invoice Search etc) adding and hiding fields from list and search filters / groups, we are doing it manually view by view from web client.
Is there a way to develop a module where I can write the xml for all the views I want to customize, and when I install that module all that views (and window actions as well) will be updated?
You can use View Inheritance to customize any view using XML files.
Using inheritance, you can add, remove and replace elements to any view. You can also define new complete views to replace the default instead of inheritance. Just create a new module with the XML files that customizes or replaces the current views and load that module. The module folder should contain only __init__.py, __openerp__.py and the XML files.
Here is a simple example to remove the EAN13 field from the product view.
__init__.py empty file
__openerp__.py:
{
"name" : "View Customization Test",
"version" : "1.0",
"category" : "Generic Modules/Inventory Control",
'depends' : ['product',],
"update_xml" : ["product.xml",],
"installable": True,
"active": True
}
product.xml:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_product_form_custom">
<field name="name">product.form.inherit2</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
<field name="ean13" position="replace" />
</field>
</record>
</data>
</openerp>
Of course there is. You can create your custom module and install it. See the basics in the official docs. The Technical Memento is also something you should have at hand.
This makes it a lot easier to develop and test in a development environment, and afterwards copy and install in the production environment.
Certainly it is possible (and it is good idea to do it.)
First read the fundamentals of the view and view inheritance
then simply create a folder under your addons
add a __init__.py [python module descriptor]
Add __openerp__.py [OpenERP Module Descriptor]
Create an xml file and inheirt the required view with the XML Identifier of the existing view and register your view.xml in __openerp__.py.
And update your databse with your new module.

Open a PDF in a new browser window with ColdFusion cfpdfform

I'm using ColdFusion 8 to and the object to create an xml document and then write the data to fields in an existing PDF file on our intranet. The problem is that I need the PDF to open in a new browser window, not the same browser window, which is what is happening now.
Is there any additional info I can pass along with the 'destination=' tag to force the PDF form to open in a new browser window?
Thanks in advance for all replies
Providing code examples in the future would be greatly appreciated and should expedite resolution. However, if I am understanding you correctly, and depending on your preference, then one of the following solutions should suffice.
ColdFusion (Server-side)
If you are NOT writing the newly populated PDF to disk:
<cfpdf name="variableName" />
<cfheader name="Content-Disposition" value="attachment; filename=filename.pdf" />
<cfcontent type="application/pdf" variable="#toBinary(variableName)#" />
OR
If you ARE writing the newly populated PDF to disk:
<cfpdf action="write" destination="c:\full\path\to\filename.pdf" />
<cfheader name="Content-Disposition" value="attachment; filename=filename.pdf" />
<cfcontent type="application/pdf" file="c:\full\path\to\filename.pdf" />
OR
HTML (Client-side)
Anchor Text
OR
JavaScript (Client-side)
window.open("/relative/url/to/pdf/populate/template.cfm", "windowName");
I was looking for the answer and coworker steered me towards this easy solution. This will open a pdf in a new web browser window.
test.pdf
index.cfm (calling page)
<cfheader name="Content-disposition" value="inline;filename=test.pdf">
<CFCONTENT TYPE="application/pdf" FILE="#url.filePath#" DELETEFILE="No">
showPdf.cfm