DataBinding in ArrayCollection
Hi All,
I have a ArrayCollection of Address classes.
The Address class is a VO and has some typical properties
such as street ... zipcode and so on.
I am using ActionScript to create an instance of an
AddressDetail mxml object.
However each dynamically created AddressDetail object must
bind its data to the Address class contained in the
ArrayCollectiion.
I have tried the following but does not work.
<mx:TextInput id="street"
text="{model.compDetailsAddressAC.getItemAt(0).street}" />
Can anyone give me a little help on this or know of any
documentation as to binding data to an Object in an
ArrayCollection.
Thanks
Nevermind.
Properties were private in VO. Made them public and it
works.
Similar Messages
-
Charting, Webservices, and DataBinding
I've been trying to create a chart with the xml data
retrieved from a WebService call, but haven't had much luck getting
the chart to display data. All the examples I've found have charts
databinding to ArrayCollections. Is there an example of one binding
to WebService results? or can you give an example of what the Xml
would need to look like to get the chart to display correctly?
I've tried a couple different XML structures with the
incoming webservice XML, but haven't been successful. Right now it
looks like the following:
quote:
<TEST>
<Data Month="8" Total="1"/>
<Data Month="9" Total="3"/>
<Data Month="10" Total="5"/>
<Data Month="11" Total="1"/>
<Data Month="12" Total="2"/>
</TEST>
MXML Chart Code:
quote:
<mx:AreaChart x="362" y="95" id="participationChart"
height="269" width="580"
dataProvider="{wsTest.GetTestData.lastResult.GetTestDataResult.TEST}">
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="Month" />
</mx:horizontalAxis>
<mx:series>
<mx:AreaSeries yField="Total" displayName="Total"/>
</mx:series>
</mx:AreaChart>
Thanks!
-Ned KostMy WebService is returning the XML detailed in the first
Quote. I'm using the debug mode in Flex Builder 2 for debugging.
I figured out I needed to use the dataProvider property of
the axis to set their data. Here is the code that ended up working
for me:
quote:
<mx:AreaChart id="chart1" height="269" width="100%"
dataProvider="{wsTest.GetTestData.lastResult.GetTestDataResult.Table}">
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="Day"
dataProvider="{wsTest.GetTestData.lastResult.GetTestDataResult.Table.Person}"/>
</mx:horizontalAxis>
<mx:series>
<mx:AreaSeries yField="Total" displayName="Total"
dataProvider="{wsTest.GetTestData.lastResult.GetTestDataResult.Table.Person}"
/>
</mx:series>
</mx:AreaChart>
Couple Questions though.. If instead of Month I am returning
a DateTime string (returned from a SQL query), is there an easy way
to convert that date to something that can be displayed by the
axis? Ultimately, I would like to have a chart that uses the
DateTime axis, and can have its date range varied according to user
input. Much like the Dashboard sample application graph available
here:
quote:
http://www.adobe.com/devnet/flex/samples/dashboard/
Thanks,
-Ned Kost -
From ArrayCollection to Array in DataBinding
Hi,
I am trying to use somebody else's visual component (have src code of that mxml),
which uses Array items as a DataSource.
In my program I use ArrayCollection to hold my data (from the data feed - changes in real time).
I need to pass some data from my ArrayCollection into that component inside the binding,
something like:
<view:Component1 items="{dataArrayCollection}"?? />
currently have in Component1.mxml:
public function set items(a:Array):void {...}
Since that component is pretty complicated, I would not want to break its logic,
so I am thinking of adding some data adapter, public method to Component1 like:
public function set dataProvider(ac:ArrayCollection):void {
Array tempArr = new Array();
// copy some data from ac -> tempArr
items(tempArr);
and do: <view:Component1 dataProvider="{dataArrayCollection}" />
Is there a more efficient way of doing that (I guess, "set dataProvider" will be called a lot, on each update)?
I don't think I can just straight convert ArrayCollection -> Array, need just a small subset of data.
Please advise.
TIA,
Oleg.Alex,
A friend suggested me another solution, which I tried and it seems to work and be more straightforward:
main.xml:
[Bindable]
private var ac : ArrayCollection;
<component dataProvider="{ac}" />
Component.xml:
[Bindable]
public var dataProvider:ArrayCollection;
private function onCreationComplete():void {
dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, onDataProviderUpdate);
public function onDataProviderUpdate(e:*=null):void {
if (dataProvider == null) {
return;
var aca:Array = dataProvider.source;
var dev1:Object = aca[0]; // process only 1 element of that AC
var dev:Device = new Device();
dev.cpu = dev1["cpu"];
// pass to items array
if (_items == null) { // if new // _items - component's data array
_items = new Array();
_items.push(dev);
} else {
_items.push(dev);
updateData();
updateView();
Do you like that solution ?
The only problem I see is that when the feed runs, the size of the browser memory grows fast,
so by element 60 it slows down, by 95 memory consumption grows to 1.4GB and browser crashes.
I do not think it is related to that data binding, but not positive.
Can it be array.push() ?
Any way to force garbage collection in Flex ?
Please advise,
Oleg. -
Why won't List display ArrayCollection?
Hi all,
I cannot for the life of me figure out why the List I created will not display any of the values in my ArrayCollection. I've read and watched so much databinding material, that I think it must be something extremely small or absolutely huge that I'm missing. If anyone could give me a pointer or two it would be so greatly appreciated, I've been on this for days now.
I have two .mxml's (MyCards and NewCard). The idea is that in the NewCard View the user types in a Title, and text for side 1 and side 2 of a flash card. The program then saves all 3 of these properties into an Object and puts that Object into an ArrayCollection. This ArrayCollection is display in a List in the MyCards.mxml file. The problem is, nothing shows up.
Here's part of MyCards.mxml showing how I'm implementing and binding the ArrayCollection to the List:
[Bindable]
public var card:Object = new Object();
public var nc:NewCard = new NewCard(); // create new instance of NewCard
[Bindable]
public var cards:ArrayCollection = new ArrayCollection();
public function add():void
cards.addItem(nc.myCard); // add new Item to ArrayCollection 'cards'
trace(cards.list);
]]>
</fx:Script>
<s:actionContent>
<s:Button label="Delete"/>
<s:Button label="Home" click="button1_clickHandler(event)" skinClass="skins.homeButtonSkin"/>
</s:actionContent>
<s:Image x="0" y="-80" height="603" source="mainapp1.jpg"/>
<s:List id="myCardsList" x="10" y="10" left="0" right="0" top="0" bottom="0" width="1004"
height="500" dataProvider="{cards}"
enabled="true" >
<s:itemRenderer>
<fx:Component>
<s:MobileItemRenderer label="{data.Title}"/>
</fx:Component>
</s:itemRenderer>
</s:List>
And then here's how I'm 'adding' the cards in the NewCard.mxml:
[Bindable]
public var myCard:CardVO = new CardVO(); // create new instance of CardVO
public function button2_clickHandler(event:MouseEvent):void // save button
var myc:MyCards = new MyCards();
myc.add();
trace(myc.cards.list);
trace(myc.cards.length);
//card.fTitle = titleCard.text;
//mycArray();
titleCard.text = "Card Added!";
<s:TextInput id="titleCard" x="240" y="10" height="62" chromeColor="#515851" color="#060606"
contentBackgroundAlpha="1.0" contentBackgroundColor="#FFFFFF" text="{myCard.Title}" change="{myCard.Title = titleCard.text}"/>
<s:SkinnableContainer
id = "groupt" x="161" y="88" width="703" height="357" >
<!-- text property of mtext1 and mtext2 is bound and returned to the get/set functions in CardVO in the 'change' event-->
<!-- change sets setter values to those retrieved from textAreas-->
<s:TextArea id="mtext2" visible="false" x="0" y="0" width="703" height="357"
color="#000000" contentBackgroundAlpha="1.0"
contentBackgroundColor="#FFFFFF" editable="true" enabled="true"
paddingTop="70" text="{myCard.Side2}" change = "{myCard.Side2 = mtext2.text}"
textAlign="center"/>
<s:TextArea id="mtext1" x="0" y="0" width="703" height="357" color="#030303"
contentBackgroundAlpha="1.0" contentBackgroundColor="#FFFFFF" editable="true"
enabled="true" fontFamily="Arial" fontStyle="normal" fontWeight="normal"
lineThrough="false" paddingTop="70" text="{myCard.Side1}" change="{myCard.Side1 = mtext1.text}"
textAlign="center" textDecoration="none" verticalAlign="middle"/>
</s:SkinnableContainer>The cards array collection items appear to be another list of items instead
of just items? -
2 way databinding between DataGrid and DropDownList
I am not getting anywhere with what I thought is the most simplest basic thing in the world.
I have a ArrayCollection "employees" which is used to fill a DataGrid. The department is listed as an Integer value. I would like to display however the name of the department, which is in a second ArrayCollection "departmentsArray". So the itemRenderer (which is not yet implemented in this code) needs to match the "idn" value with the "departmentid" value and then display the name of the department. However, when the user clicks on the DropDownLists and selects a new department, the departmentid value in the employee array needs to get updated too.
I am assuming that this can be done with 2 way databinding, but I am not getting this to work and would greatly appreciate if someone could show me how the code would have to look for this.
Michael
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var employees:ArrayCollection = new ArrayCollection([
{idn:1, firstname:'Lisa', lastname:'Tran', departmentid:1},
{idn:2, firstname:'Michael', lastname:'Orchard', departmentid:2},
{idn:3, firstname:'Wolfgang', lastname:'Prettyer', departmentid:2},
{idn:4, firstname:'Julia', lastname:'Stancau', departmentid:3},
[Bindable]
private var departmentsArray:ArrayCollection = new ArrayCollection([
{idn:1, department:'Video'},
{idn:2, department:'Web'},
{idn:3, department:'Print'},
]]>
</fx:Script>
<s:DataGrid x="57" y="90" width="410" requestedRowCount="4" dataProvider="{employees}">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="idn" headerText="ID"></s:GridColumn>
<s:GridColumn dataField="firstname" headerText="Vorname"></s:GridColumn>
<s:GridColumn dataField="lastname" headerText="Nachname"></s:GridColumn>
<s:GridColumn dataField="departmentid" headerText="Department"></s:GridColumn>
</s:ArrayList>
</s:columns>
</s:DataGrid>
</s:Application>Thanks for the info.
I've only seen info about Snow Leopard syncing (and it doesn't really specify 2 way) to Exchange (which is not LDAP)
Addressbookserver (www.addressbookserver.com) is also not LDAP.
I really need this to work (2 way sync) with an LDAP server.
Thanks. -
ArrayCollection vs. Array in HTTPService sending
Hi,
I want to send the content of an ArrayCollection as one of the parameters in an HTTPService.
However, Flex concatenates the collection's values into one long string and sends it as the value of a single parameter.
Doing this with arrays work just fine, e.g. in AS3:
service.send( { name=["john", "lucy", "mark"] });
(also works in MXML using parameter binding)
So then I tried first converting the ArrayCollection using .toArray() - this is done in MXML, e.g.:
name="{controller.name.toArray()}"
But, then Flex thinks there is NO value - i.e. data binding to the result of .toArray() doesn't keep track of changes to the underlying ArrayCollection.
Is there any way to databind a single HTTPService parameter to an ArrayCollection like one can do against an Array?
JoubertIt will be easier to show you an example of the ArrayCollection. Run this example with a line break at the trace(); statement, and examine the resulting ArrayCollection's items. Once you see this, I think you'll understand why your code isn't working as you expect.
The ArrayCollection is not simply a way to store or make a single Array bindable. It is a collection of objects which you can bind to. Its methods allow you to add, delete and search for items within it. You can, in fact, store many arrays within it. And those arrays could be using Flex components as object keys. Even if you send this to a WebService, that service will likely not understand it.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="testIt()">
<mx:Script>
<![CDATA[
import mx.controls.ComboBox;
import mx.collections.ArrayCollection;
import flash.utils.Dictionary;
//Create different types of arrays:
public var indexedArray:Array = new Array("john", "lucy", "mark");
public var associativeArray:Array = new Array([
{label:"One", data:"7000"},
public var dictionaryArray:Dictionary = new Dictionary();
//Create objects for a dictionary array:
public var objectOne:Object = new Object();
public var objectTwo:Object = new Object();
public var sprite1:Sprite = new Sprite;
public var comboBox1:ComboBox = new ComboBox;
//Create an ArrayCollection:
private var myAC:ArrayCollection = new ArrayCollection;
//This function populates the ArrayCollection:
private function testIt():void{
//Add values to the objects:
objectOne = "This is a Sprite Object";
objectTwo = "This is a ComboBox Object";
//Add objects to the Dictionary:
dictionaryArray[sprite1] = objectOne;
dictionaryArray[comboBox1] = objectTwo;
//Add all the Arrays to the Collection:
myAC.addItem(indexedArray);
myAC.addItem(associativeArray);
myAC.addItem(dictionaryArray);
trace();
]]>
</mx:Script>
</mx:Application> -
Hi !
I read the documentation about databinding but I still encounter some problems in my application..
The actionscript class looks like this (Only kept the important parts) :
[Bindable]
public class Alarm
public var _tag:String;
public var _limits:ArrayCollection;
public function Alarm() {}
public function loadAlarm(name:String) : void {
this.tag = name;
this.limits = new ArrayCollection([
new Limit ("HH", 10),
new Limit ("HI", 9),
new Limit ("LL", 3),
new Limit ("LO", 3.5)
Now when I load my application there is no information displayed because of the empty constructor off course.
When I then call the loadAlarm function with a button at runtime. The limits are displayed in a DataGrid
but the tag stays empty...
Both _tag and _limits have getters and setters and they are also public.
I have putted a trace in the setter and getter of _tag and the function is called and the correct name is put into the tag
so the value definitely changes !
Here is are the mxml snippets :
<fx:Script>
<![CDATA[
import model.Alarm;
import mx.binding.utils.BindingUtils;
import mx.controls.Text;
import mx.events.ListEvent;
[Bindable]
private var myAlarm:Alarm = new Alarm();
public function onClick(evt:Event):void
myAlarm.loadAlarm("newName");
trace(myAlarm._tag);
]]>
</fx:Script>
<mx:DataGrid width="147" height="306" id="alarmColumns" dataProvider="{myAlarm.limits}">
<mx:columns>
<mx:DataGridColumn id="alarms" headerText="Alarm" dataField="name"/>
<mx:DataGridColumn id="limits" headerText="Limit" dataField="value"/>
</mx:columns>
</mx:DataGrid>
<s:List width="167" height="306" id="alarmlist" selectedIndex="0" enabled="true">
<mx:ArrayCollection>
<fx:String>{myAlarm.tag}</fx:String>
</mx:ArrayCollection>
</s:List>
I really don't get why limits is changed but tag is not... Also the trace outputs the "newName" so it is definitely set !
Many Thanks !sorry, i misunderstand.
the code change like this:
public function onClick(evt:Event):void
myAlarm.loadAlarm(newName);
var arr:ArrayCollection = ArrayCollection(alarmlist.dataProvider);
arr.itemUpdated(arr.getItemAt(0));
trace(myAlarm._tag);
use itemUpdated method to update the view
Thanks -
FLEX3 : Repeater, databinding, and cast operator
Hello,
Having encountered problems using Repeater in our enterprise project, we have decided to process heavy tests on Repeater and databinding.
And what we have discovered is amazing!
Please copy paste this code, run the app and click on the button.
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var sourceArray:ArrayCollection = new ArrayCollection([
new SimpleBean(),
new SimpleBean(),
new SimpleBean()
public function changeValue():void{
var objectToModify:SimpleBean = sourceArray.getItemAt(1) as SimpleBean;
objectToModify.displayedName="Binding works";
]]>
</mx:Script>
<mx:VBox>
<mx:Repeater id="rp" dataProvider="{sourceArray}">
<mx:Label text="{SimpleBean(rp.currentItem).displayedName}" color="green"/>
<mx:Label text="{(rp.currentItem as SimpleBean).displayedName}" color="red"/>
</mx:Repeater>
</mx:VBox>
<mx:Button click="changeValue()"/>
</mx:WindowedApplication>
Here is the SimpleBean class:
package
public class SimpleBean
[Bindable]
public var displayedName:String="A default name";
Amazing, no? It seems that the 2 cast operators behave differently inside a Repeater, and one prevents databinding to be triggered...
So my question is: is it a SDK bug, or does this difference have an explanation?Hi schioche,
I think it is a bug in Flex 3.* SDK, confirmed the the same behaviour by me.
This bug was fixed somehow in Flex 4 SDK, verified.
If upgrading to Flex 4 SDK is not an option to you, then you can initiate binding manually via ActionScript, worked for me
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var sourceArray:ArrayCollection = new ArrayCollection([
new SimpleBean(),
new SimpleBean(),
new SimpleBean()
public function changeValue():void{
var objectToModify:SimpleBean = sourceArray.getItemAt(0) as SimpleBean;
objectToModify.displayedName="Binding works";
rp.executeBindings();
]]>
</mx:Script>
<mx:VBox>
<mx:Repeater id="rp" dataProvider="{sourceArray}">
<mx:Label id="labelA" text="{SimpleBean(rp.currentItem).displayedName}" color="green"/>
<mx:Label id="labelB" text="{(rp.currentItem as SimpleBean).displayedName}" color="red"/>
</mx:Repeater>
</mx:VBox>
<mx:Button click="changeValue()"/>
</mx:Application> -
Datagroup databind not working
Hi, all.
I have a datagroup which is databinded to a collection.
<s:DataGroup id="tasksContainer" width="100%"
dataProvider="{tasksCollection}"
itemRenderer="components.taskRender"
>
<s:layout>
<s:VerticalLayout gap="0" verticalAlign="middle" />
</s:layout>
</s:DataGroup>
I have a resultHandler that receives and updates the tasksCollection when a new entry has been made.
protected function getAllTasksResult_resultHandler(event:ResultEvent):void
tasksCollection = getAllTasksResult.lastResult;
Other parts of my application has no problem binding to the tasksCollection but for some reason the datagroup does not update.
I have tried putting in an arrayCollection.refresh() which doesn't work either?
Any suggestions?Hi all,
Thank you all for your advice. I have made a few tests and found where the problem is.
I tried using the simplest of ItemRenderers to see if the data is received correctly and it is. If I use the following setup everything works just fine.
<s:DataGroup id="tasksContainer03" width="100%"
dataProvider="{tasksCollection}" >
<!-- itemRenderer="components.taskRender"-->
<s:layout>
<s:VerticalLayout gap="0" verticalAlign="middle" />
</s:layout>
--new code with basic itemrenderer--
<s:itemRenderer>
<fx:Component>
<s:ItemRenderer>
<s:Label text="{data.taskname}"/>
</s:ItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:DataGroup>
So it seems my custom Itemrenderer is causing the problems.
My renderer looks like this:
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="100%"
xmlns:components="components.*" creationComplete="init();" >
<fx:Script>
<![CDATA[
import components.*;
import mx.utils.ObjectProxy;
[Bindable]
public var dataProxy:ObjectProxy;
private function init():void
dataProxy = new ObjectProxy(data);
]]>
</fx:Script>
<s:layout>
<s:VerticalLayout verticalAlign="middle"/>
</s:layout>
<components:taskComponent id="taskname" text="{dataProxy.taskname}" task="{data}" width="100%" />
</s:ItemRenderer>
The custom renderer basically just uses a custom component to show the data.
Has anyone had any problems with using custom components within custom item renderers??? -
Any ideas on this problem I'm having. I've got a combobox and
trying to bind data.
The combobox looks like:
<mx:ComboBox y="25" id="divisionNameDivision" left="110"
width="160" disabledColor="#000000" fontWeight="normal"
dataProvider="{DSManager.allDivisions()}" ></mx:ComboBox>
DSManager is a class that manages a bunch of objects and it's
creating divisions in sports. In DSManager, here's the script for
data binding (the entire class is declared bindable):
import flash.events.EventDispatcher;
import mx.events.FlexEvent;
import mx.collections.ArrayCollection;
........ deleted code ......
public static function allDivisions():ArrayCollection{
var allDivisions:Array;
for (var i:uint = 0; i < _divisions.length; i++){
allDivisions.push(_divisions
.divisionName)
var divisionList:ArrayCollection = new
ArrayCollection(allDivisions);
trace("here");
return divisionList;
The app traces "here" when I first fire it up (i.e., it
seems to bind to the control before I start adding new divisions)
but nothing as I add divisions, which I thought was the whole point
of databinding. Just seeing if I'm missing anything
obvious.Thanks for the comments. I've tried binding directly but I
always get a 1119 Access of possibly undefined property error if I
try to bind using the static variable I'm trying to bind to and a
message about an instance variable not being able to bind if I try
to use an instance of the singleton. From the documentation on
databinding, it seems like as long as I have a getter and setter
for the class property, it should bind. So I created the following
in the class:
public function get divisionNames():ArrayCollection{
return _divisionList; // also tried returning it as
ArrayCollection but no difference
public function set
divisionNames(newList:ArrayCollection):void{
_divisionList = newList;
// this fires off fine when I create a new division and
traces as I would expect
private static function allDivisions():void{
var allDivisions:Array = new Array();
for (var i:uint = 0; i < _divisions.length; i++){
allDivisions.push(_divisions
.divisionName)
allDivisions.sort(Array.CASEINSENSITIVE);
var _divisionList:ArrayCollection = new
ArrayCollection(allDivisions);
trace("The divisions are " + _divisionList);
Again, it traces the _divisionList fine in the function but
but for the combobox binding if I use:
dataProvider="{DSManager.divisionNames}" I get the flex 1119 Access
of possibly undefined property divisionNames through a reference
with static type Class. Argh. Sometimes it seems so easy and
sometimes .... -
Whats the difference between arrayCollection = null and
arrayCollection.removeAll()?In arrayCollection = null; statement you're setting this
reference to null and potentially making it available for garbage
collection. I say 'this reference' and potentially because, as you
may know, there might be other references to this array collection
object that won't be affected by this statement and hence it won't
be GC'ed.
arrayCollection.removeAll() says that I want to empty this
array collection for all the reference that we pointing to it. That
is, remove all the objects from the collection -- and of course
make them 'potentially' available for the GC -- the size of the
array collection would be reduced down to zero and all the
references would be pointing to a valid but empty collection.
Hope this helps.
ATTA -
Databind method call returns null in WebCenter Content Filter
Hi,
I have inherited some code that has an issue and I'm new to WebCenter Content and the Filters that can be added. We have a FileNameFilter class that starts off with the code
public class CWEFileNameFilter implements FilterImplementor {
public CWEFileNameFilter() {
super();
public int doFilter(Workspace workspace, DataBinder dataBinder,
ExecutionContext executionContext) throws DataException {
String service = dataBinder.getLocal("IdcService");
However, service sometimes comes back null and then the filter throws a NPE.
My questions are:
1) Can anyone explain what dataBinder.getLocal("IdcService"); is doing and why it could come back as null
2) Can anyone provide any links to documentation that explains Filters and a bit more about the DataBinder object as the JavaDoc isn't much help.
Thanks
MarcHi Marc,
Below code will give service name for which filter is implemented from LocalData
String service = dataBinder.getLocal("IdcService");
for example below
http://localhost:16200/cs/idcplg?IdcService=DOC_INFO_BY_NAME&dDocName=1111111&IsJava
This will print entire response data including localdata and results which are created as part of service execution. Below is snippet
<?hda version="11.1.1.8.0PSU-2015-04-01 00:14:53Z-r126309" jcharset="UTF8" encoding="utf-8"?>
@Properties LocalData
DocUrl=https://localhost:16200/cs/weblayout/groups/secure/documents/test/mhdk/mjg1/1111111.pdf
IdcService=DOC_INFO_BY_NAME
so String service = dataBinder.getLocal("IdcService"); will be service ="DOC_INFO_BY_NAME".
Below blog will give some idea about filter but best place to learn or start is "The Definitive Guide to Stellent Content Server Development" by Brian Huff
http://www.redstonecontentsolutions.com/technical-blog/ucm-service-handlers-and-javafilters
Also i would recommend reading "WebCenter Content Services Reference Guide"
http://docs.oracle.com/cd/E23943_01/doc.1111/e11011/toc.htm
Regards,
Amol Gavali. -
Getting values from a datagrid to an ArrayCollection
Hi, I have a drag and dropable datagrid. I fill it with rows of data from another datagrid. Finally, my application demands savings the data from the datagrid into an array collection along with the index of each row. How do i get values from a datagrid into an arrayCollection variable? Please help me..!
Whatever is dropped into the DataGrid automatically goes into its dataProvider property, typically an ArrayCollection. Just access the data grid's dataProvider property to see the values.
-
Problem updating a SOAP Web Service with ArrayCollection
Hello,
I am having issues POST'ing an ArrayCollection to a C# Web
Method. Here's how I have my application set up:
I have a DataGrid in my application and set the dataProvider
to be the result object of a Web Service operation. I set the
DataGrid's editable property to "true" and would like to be able to
edit the data and send off the DataGrid's dataProvider as the
parameter for the Web Method. If I edit the first row of the
DataGrid and trigger the operation, it gets saved just fine. If I
try to edit any other row this way, it keeps sending the same
packet (as verified by a packet sniffer) not allowing me to update
any other row. It seems the Web Service is sending the first 255
characters of the serialized ArrayCollection.
My questions are: why is this happening?
and
How can I fix this?
Here is the request of my Web Service operation:
<mx:request xmlns="">
<GlossaryTerms>
{GlossaryArrayCollection}
</GlossaryTerms>
</mx:request>
This is the definition of GlossaryArrayCollection:
[Bindable]
public var GlossaryArrayCollection:ArrayCollection = new
ArrayCollection();
Here is the SOAP packet that the C# Web Method is expecting:
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:soap12="
http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GlossaryUpdate xmlns="">
<GlossaryTerms>
<Glossary cID="int" cDeleted="boolean" cTerm="string"
cDefinition="string" cURL="string" cPublic="boolean"
cRowVersion="string"/>
<Glossary cID="int" cDeleted="boolean" cTerm="string"
cDefinition="string" cURL="string" cPublic="boolean"
cRowVersion="string" />
</GlossaryTerms>
</GlossaryUpdate>
</soap12:Body>
</soap12:Envelope>
Thanks to anyone for their help.
Brian CaryWhere exactly you are seeing this error? possible for you share the screenshot?
Execution failed: These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens -
How do you add multiple filters with checkboxes to an arrayCollection?
hey guys... so i have three checkboxes and when i click one of them i need to filter out my array collection according to which ones are clicked
I have the filter function working partially, but when i select multiple checkboxes i dont see anything in the arraycollection.
the code i have is
<s:VGroup x="-100" y="400">
<mx:HRule />
<s:CheckBox label="Approved Stories" color="#333333" selected="@{_approved}" change="filterChanged()" />
<s:CheckBox label="Rejected Stories" color="#0184C7" selected="@{_rejected}" change="filterChanged()" />
<s:CheckBox label="Pending Stories" color="#50C8E8" selected="@{_pending}" change="filterChanged()" />
</s:VGroup>
<s:DataGroup width="100%" height="100%" clipAndEnableScrolling="true" dataProvider="{filteredStoryDataArr}" click="itemClicked();">
</s:DataGroup>
private function returnesAllStories(event:ResultEvent):void{
for each(var item:Object in event.result){
storyDataArr.addItem(item);
filteredStoryDataArr = new ArrayCollection(storyDataArr.source);
filteredStoryDataArr.filterFunction = storyFilter;
public function storyFilter(item:Object):Boolean
return (!_approved || ((item.ApprovedBy > 0) && (item.DateApproved != ""))) &&
(!_pending || ((item.ApprovedBy == -1) && (item.DateApproved == ""))) &&
(!_rejected || ((item.ApprovedBy == 0) || (isNaN(item.ApprovedBy))));
public function filterChanged():void{
filteredStoryDataArr.refresh();
right now if i click approved i see all the approved stories, or if i check pending, i see all the pending stories.... but if i check pending and rejected, i dont see anythign in the list... any ideas how to fix that???there is no built-in way to do this. the only way i know is by using Mail Scripts
http://homepage.mac.com/aamann/Mail_Scripts.html
it has a script "Add addresses" that does just what you want.
Maybe you are looking for
-
About a week ago, my mother tried to place a DVD into my MacBook Pro while it was still closed & sleeping. Of course it didn't anything, but allowed her ignorant self to push the disc quite far into the disc drive. Once opened & woken up, the disc dr
-
Display line items of the data into next page in case of overflow
Hi all, In my requirement i am displaying header data with its line items through smart forms ( Landscape format).Since i am using landscape format main window size is less.Hence, In case of overflow of data the line items only should get displayed
-
The ideal knowledge of creating triggers in form
its very easy to design a form but the matters is creating triggers so since i am a beginner i need ur guidance how to create triggers in form
-
the airplay icon is appeared in iTunes 12 on windows but when trying to connect it tell me this message (the connection is timed out)
-
Importing table data from one schema to another schema
Hi All, I exported tablerows only of Schema A, and same I am trying to imported in Schema B. While importing I am getting oracle error "row rejected, Integrity constraint violated parent key not found". What I did is I disabled all the constraints th