Why doesn't list component identify grid component
Hi,
I have couple of doubts.
1. I put <grid> component inside of <List>
component . Surprise! The <List> component is not identifying
the <Grid> component. Is this bug of Flex Or it's property of
Flex <List> component.
What I have to do to make <Grid> visible even I put
inside of <List> component.
2. what is an equilanat of <Table> in Flex. Ofcourse it
may be DataGrid. Suppose If I use DataGrid I have lot of
restrictions.
These are the problems I am facing with <DataGrid>
( i ) Is this possible to put radio button / link bar as one
of column in a row. I mean how to put radio button / link bar as
row in array
( ii ) Is it possible to make columns in a row as variable
sizes i.e. suppose if DataGrid header has size=100. Is it possible
to make column of next row size as 200.
anybody help me in this regard. I am eagarly waiting for
reply.Because I have been strugling to solve this problem for last
4 days.
Regards,
Siva Kumar
A custom itemRenderer will be the solution to several of your
issues(1,i).
For 2., there is no exact equivalent of an html table. Look
at Grid, TileList, or consider making your own component.
for ii), no, all cells in a columns must be the same size.
Tracy
Similar Messages
-
Data Grid in a List Component???
Hi there!
I have a populated List Component set to Multiple Selection.
This list contains titles of a magazine issues.
I wish to allow the user to select one or more items in the
list and enter the quantity of the selected issue(s) he/she wants
to receive.
Is it possible to achieve this with a Data GRid integrated in
the List Component or which simplier solution must I contemplate?
I thank you in advance for indicating the best way to
explore.
Best regards,
GerryHi GWD and thanks for responding.
I fully understood your explanations and the example you
provided.
I'll give it a try, for sure.
But I want to know:
- How do I populate a DataGrid Component? Like a List
Component? (you said they are quite the same, I assume methods to
apply are identical...)
-In the same way, I can pull out the data from a DataGrid as
I do for the List, right?
Thanks again!
Best,
gerry -
Displaying Text in List Component
I am using AS3 to load data from an XML document into an Array and use the Array as a dataProvider for a List Component. If I addChild the list to the main timeline, everything works fine. All 38 elements show up in the list with readable text. When I addChild the list into a MovieClip, all 38 rows of the list get created, but no text shows up. What the hell is going on? Does anyone know what the fix for this is and why in the world this is happening?
Here's my code:
TOCList = new List();
TOCList.dataProvider= new DataProvider(TOCArray);
TOCList.labelField="theLabel";
TOCList.y=75;
TOCList.width=250;
TOCList.height=350;
addChild(TOCList);
When I change the addChild(TOCList) to navBar.sceneMenu.addChild(TOCList) the list shows up formatted correctly, just no text.I figured it out with help from another web site's forum and the problem was that the MovieClip that I was loading into was masked, so the font needed to be embedded and my code...
var myFormat:TextFormat = new TextFormat();
myFormat.font="Tahoma";
TOCList.setStyle("embedFonts", true);
TOCList.setStyle("textFormat", myFormat);
...wasn't working, but I didn't know, because the text wasn't showing.
The fix was actually to use the StyleManager...
StyleManager.setStyle( "textFormat", new TextFormat("Arial") );
StyleManager.setStyle( "embedFonts", true );
...to force all components to this style.
I have no idea why the above code doesn't work. If anybody knows, please tell me!!! -
In Flash CS4,How can I give a AS3 List Component a suitable horizontalScrollBar
In Flash CS4 when an AS3 List Component has too many rows,it will has a verticalScrollBar automatically. but it will never has a horizontalScrollBar even a part of the content of the list is hidden.
I set the property list.horizontalScrollPolicy="on",and set list.maxHorizontalScrollPosition=200; then the horizontalScrollBar appear
but when I click the item of the list, all the list move to left, half of the list is hidden,
I can only see the right part of the list, the I click the list again,the list move to right,then I can see all the list by move the horizontalScrollBar
How can I give a suitable horizontalBar to the AS3 list component?Thank you for your help! (sorry,I`m bad in English...)
In fact, it works.
but,I made a mistake,the reason I want to give a list a horizontalScrollBar is:I want to show all content in a list that is not wide enough,
you see,first row can show all content in this list,but in the other rows,the content is too wide to show,I want to give the list a horizontalScrollBar to show all content by draging the horizontalScrollBar to right.
now,set property:
list.horizontalScrollPolicy="on", list.maxHorizontalScrollPosition=30;(the result is the image above),when I drag the horizontalScrollBar to right:
ah ha ,the row can`t show all content too,the horizontalScrollBar is related to the width of all the list, is not related to the width of the content in every row.
now I kown why the horizontalScrollBar is always disable.
but in design,to show a lot of content,we can`t draw a list too wide, it`s not beatiful,so I want to use a horizontalScrollBar to show all content in every row.
and the list is not too wide
ah ah, like the list in Flex4
In fact,ah,I have not studied Flex 4,so,I have to make it by using Flash CS4 Component
How can I do? Please
(so sorry for my bad English,I do my best in it) -
Horizontal Scroll in list component
Hi,
I'm using a list component which is populated from a textbox. I've set the horizontal scroll policy to auto and also to on however the scroll either doesn't appear (in the case of auto) or doesn't move (in the case of on). Is there a setting which I need to modify to have the horizontal scroll working normally?
ThanksI tried the invalidate method as follows but nothing happened:
mylist.invalidate();
Not sure if I explained myself well, I just want the horizontal scrollbar to appear and be able to move it when one or more items in the list are long and thus not all visible...thanks -
Hello!
I have some trouble with the list component in my
application. The thing is that the keyboard interaction don't work
proper. I've found out that it is my function "transferParameters"
who spoils it. The function looks like this:
Object.prototype.transferParameters = function(ref)
var i;
for(i in this)
ref[ i ] = this[ i ];
I am using the function to duplicate objects without making
the instances refer to each other.
What should I do to get the keyboard interaction to work?
Regards TobenNope that doesn't seem to solve the problem. I tried putting
the listListener function and all the variable definitions outside
of the onData, but still have the same problem! Is there a thing
with the List component that you have to click into them before
they're activated or something? Or might it be something with
Firefox? It works almost all the time in IE.
Thanks,
Mukul -
Hi all,
I have a list component and I have set up initial query in advance search, which generates the listing of the articles.
Now I am planning to add a search box and upon providing the new search text I would like to search again and utilizing same list component I would like to display new result list.
I looked a the init.jsp and found the place where I think it executes the initial query?
I tried to override source and query string but it is not taking an effect. Also I am not able to find the jar for "com.day.cq.wcm.foundation.List", I wanted to decompile and wanted to see how querys are executed.
List list = new List(slingRequest, new PageFilter());
list.setQuery("Test");
list.setSource("search");
Any pointers would be helpful!
Thanks in advance.I am workiing on a similiar workflow for an upcoming artilce that dicusses how to query the AEM CQ JCR: http://scottsdigitalcommunity.blogspot.ca/2013/02/querying-adobe-experience-manager-data.h tml .
This sample app queries the JCR for customer data, supports filtering, and displays the result set in a grid contol located in the client:
Although this article will not be posted until Feb 23 --I can provide a few pointers. Like most workflows in computer science -- you can perform a task in more than 1 way. I find that you get more power when you wrap the JCR Query Manager API within an OSGi component and develop the service to expose an operation that queries the JCR and returns the result set.
You can return the result set to the client and display the data in a web page - similiar to the pic above. Of course -- you can do the same workflow using sling -- its a matter of preferece IMHO. I prefer to develop OSGi services to do the heavy lifting and let the client call the service and display the data.
For example - to call the OSGI service from a client:
com.adobe.aem.CustomerService cs = sling.getService(com.adobe.aem.CustomerService .class);
String XML = cs.getCustomerData(filter) ;
In this workflow -- the query results are stored in an XML DOM and returned to the client -- where the data is parsed and displayed. The complete artilce will be posted next Fri.
Here is a snippet of the backend Java logic that is wrapped in the OSGi and queries the JCR that is called from the client:
public Document getCustomerData(String filter) {
Customer cust = null;
List<Customer> custList = new ArrayList<Customer>();
try {
Session session = this.repository.loginAdministrative(null);
// Obtain the query manager for the session ...
javax.jcr.query.QueryManager queryManager = session.getWorkspace().getQueryManager();
//Setup the query based on user input -- 3 options are All Customers,
//Active Customer or Past Customer
String sqlStatement="";
//Setup the query to get all corresponding customer nodes -- which are of node type nt:unstructured
if (filter.equals("All Customers"))
sqlStatement = "SELECT * FROM [nt:unstructured] WHERE CONTAINS(desc, 'Customer')";
else if(filter.equals("Active Customer"))
sqlStatement = "SELECT * FROM [nt:unstructured] WHERE CONTAINS(desc, 'Active')";
else if(filter.equals("Past Customer"))
sqlStatement = "SELECT * FROM [nt:unstructured] WHERE CONTAINS(desc, 'Past')";
//Execute the query and get the results ...
javax.jcr.query.Query query = queryManager.createQuery(sqlStatement,"JCR-SQL2");
javax.jcr.query.QueryResult result = query.execute();
//Iterate over the nodes in the results ...
javax.jcr.NodeIterator nodeIter = result.getNodes();
while ( nodeIter.hasNext() ) {
//For each node-- create a customer instance
cust = new Customer();
javax.jcr.Node node = nodeIter.nextNode();
//Set all Customer object fields
cust.setCustFirst(node.getProperty("firstName").getString());
cust.setCustLast(node.getProperty("lastName").getString());
cust.setCustAddress(node.getProperty("address").getString());
cust.setCustDescription(node.getProperty("desc").getString());
//Push Customer to the list
custList.add(cust);
// Save the session changes and log out
session.save();
session.logout();
//Return the customer data within an XML DOM
return toXml(custList);
catch(Exception e)
e.printStackTrace();
return null;
Hope this helps.. -
I have a list component (AS2) populated from an XML file. The
XML file contains the identifier for the appropriate icon which is
contained in the library. This works. What I would like to do is
include a URL leading to a JPG file and have this JPG used as the
icon because they will be unknown to the SWF until the XML is
loaded. Can this be done?
Everything I've read points the the need to have the icons in
the library.Do you want to achieve something like that http://blog.flexexamples.com/2009/06/24/displaying-icons-in-a-spark-list-control-in-flex-4 /http://blog.flexexamples.com/2009/06/24/displaying-icons-in-a-spark-list-control-in-flex-4 / ?
-
Paging data in Spark list component
I'm wondering if paging data for Spark list components will be available in the final release of FB 4 / Flex SDK 4? Currently you will get an error when trying to bind a paged service method to a Spark list component: "Paged operations are not supported by this component".
I'm asking this because of some problems we currently have with paging data in a Flex 3 TileList. See Jira issue: http://bugs.adobe.com/jira/browse/SDK-18758
The suggested solution in this issue is to use a Gumbo Spark TileLayout instead of a TileList. That's currently not a suitable solution since the list doesn't support paging...Hi Jacob and Ram,
Thank you for the information. Not the type of info I was hoping for of course . Do you guys know what I have to do to re-open my bug report (http://bugs.adobe.com/jira/browse/SDK-18758)? I'd really like to have the Halo TileList fixed so we are able to use it properly.
Thanks,
Jaap -
Change Event dispatched 2 times in List Component
Hi,
Thanks for taking the time to read about my problem. I have a List component which has a simlpe array of strings as a dataprovider. I'm using the change event to call a method and I don't know why this method gets called 2 times.
¿Someone knows why this keeps happening?
Thanks for your help.
Sebastián ToroIf an s:List, you put a IndexChangeEvent listener the event, and in that event, cast a filterFunction to the dataProvider of that List ...
You will have to validate inside that function through property IndexChangeEvent newIndex of greater than or equal to ZERO.
Because interestingly, the dataProvider of the List filter is invoked IndexChangeEvent again, but now the newIndex, give a value of "-1", leading with it the entire event, from null and associated with this throw this:
Error # 1009: Can not access a property or method of a null object reference.
When referring to the event ... :/ -
Refresh dragProxy in List component built-in drag & drop feature
Hi,
I'm using the built-in drag & drop feature of the List component. Everything works fine except one thing. The itemRenderer I use in my List contains many TextInput that the user can fill. The problem is when I drag an itemRenderer to reorder my list, the dragProxy of the itemRenderer doesn't show the text I enter in the TextInput; it shows the original state of my itemRenderer.
Is there any way to update the dragProxy to reflect the changes made in the itemRenderer ?
Thank you!
MatetnicIf editable=true, the user's changes should be saved to the dataprovider when the drag starts. The dragproxy renders whatever is in the dataprovider item
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui -
hello everyone,
I've been working with Flex 3 for over a year and really want
to get into customizing components the best way possible, so i've
been digging into the classes. my first task is to create a smooth
tween when scrolling a List component instead of the default
"jumping" motion. So i decided to extend the list and do some
function overriding:
override protected function moveRowVertically(i:int,
numCols:int, moveBlockDistance:Number):void
var r:IListItemRenderer;
trace(String(listItems
[j]));
for (var j:int = 0; j < numCols; j++)
r = listItems[j];
prev_y
= r.y + moveBlockDistance;
//trace(r.y +" "+(r.y+ moveBlockDistance)+" "+prev_y);
TweenMax.to(r,0.5,{y:(r.y +
moveBlockDistance),ease:Sine.easeOut});
//r.move(r.x, r.y + moveBlockDistance);
rowInfo
.y += moveBlockDistance;
I've found moveRowVertically to be the method that actually
does the vertical row movement (called from the scrollVertically
method in the ListBase class). As you can see, i've added the
TweenMax where the object's move method was. This works
normally when the tween time is set to 0 sec, the List scroll
effect is the same as the stock component. But when TweenMax.to is
changed to 0.5 sec, the animation behaves strangely. I believe this
is partly because when a new object appears in the list it is
immediately added to the list, so the method that controls the
addChild needs to have the TweenMax animation also applied to. But
also, there is another problem, when you click the scroll arrow
before the TweenMax animation is complete, this function uses the
current y poisition (in the middle of the animation) as opposed to
the end y position- when the animation is complete. This is why the
TweenMax positions the items correctly when the TweenMax duration
is set to 0.
I
have an example here.
When you click the scroll arrow and wait for the animation to
complete, it works as the code expects. But when you click too fast
or scroll the scrollbar thumb, you can see the unexpected behavior.
SO what I believe needs to be added to the code is an array
that stores the end y coordinate and have the class use that
instead of the current y coordinate. I believe the best way to do
this is to store the end y coordinate in the listItems
[j] array so that i could call: TweenMax.to(r.end_y +
moveBlockDistance),ease:Sine.easeOut}); and all would be fine (for
the objects in the display, hopefully). But i cannot find the
original as file where the listItems property is (aka:
listContent.listItems as defined in the listItems get and set
methods in ListBase.as). Here i could extend this and define a
custom property. But a more important question is this: is it
possible to define a custom property on the fly, so i wouldn't have
to extend the listContent object (therefore, extending ListBase,
then List... on down the line)?
thank you all for your help!Ok I found out that it works fine in IE but not in FirefoX
HOWEVER it does work fine in Firefox from another computer! I tried
clearing out the cache but NOTHING...chan ANYONE PLEASE HELP
ME??? -
How can I select an item from a list component with a seperate button
This is a repost, I decided it'd probably be better here than
in the general discussion board. I will try to delete the other
one.
Hello Everyone,
This is my first post here. I am trying to figure out how to
select an item within a list component with a button. This button
is calling a function. I have searched for the past 3 hours online
and I can't find anything about it. I thought perhaps I could set
the selectedItem parameter, but that is read only, and I believe it
returns an object reference rather than something like a number so
even if i could set it, it would be pointless. I also found a get
focus button, thought that may lead me somewhere, but I think that
is for setting which component has focus currently as far as typing
in and things like that. I am lost.
Basically I am looking for a way to type this
myList.setSelected(5); where 5 is the 5th item in the list.
Any help would be much appreciated.Never mind found it. It is the property called selectedIndex
and it is writable -
How to populate list component via xml file?
There is a TextArea component that should show the name and
the description of the item selected in the list component. But I
dont know how to populate list with external XML and what should be
the coding in flash as well as what should be written in the XML.
Please help.Here's an xml file listing a couple of brother comedy teams:
<?xml version="1.0" encoding="UTF-8"?>
<team>
<brothers>
<Marx>
<name>Groucho</name>
<name>Chico</name>
<name>Harpo</name>
<name>Zeppo</name>
<name>Gummo</name>
</Marx>
<Howard>
<name>Moe</name>
<name>Curly</name>
<name>Shemp</name>
</Howard>
</brothers>
</team>
Open a new .fla and save it in the same folder as the .xml
file. Place a List Component on the Stage and name it (in this
case, "comicTeams_list"). In the first frame write the following
ActionScript:
//create XML object and load external xml file
var broList:XML = new XML();
broList.ignoreWhite = true;
broList.onLoad = processList; // this is a function that will
be written below
broList.load("populateList.xml");
function processList(success:Boolean):Void{
if(success){
loadList();
}else{
trace("Load failure");
function loadList():Void{
var broName:String;
var listEntries =
broList.firstChild.childNodes[0].childNodes[0].childNodes.length;
for(var i:Number = 0;i<listEntries;i++){
broName =
broList.firstChild.childNodes[0].childNodes[0].childNodes
.childNodes[0].nodeValue;
trace(broName);
comicTeams_list.addItem(broName);
//to make something happen when you click on a name in the
List, create a Listener and function
var broListListener:Object = new Object();
broListListener.change = someAction; //"someAction" is a
function to be written shortly
//add the Listener to the List
comicTeams_list.addEventListener("change", broListListener);
function someAction(evtObj:Object):Void{
var pickedBrother:String = evtObj.target.selectedItem.label;
//write actions here, referencing pickedBrother variable
The names of the Marx Brothers will appear in the box.
This is written in AS2. When you post a question, it's a good
idea include which version of ActionScript you're using. -
Count the rows in a list-component
Hi,
How can I count the rows with a value in a list component?
I thought it would be RowCount but as I figured out that shows the number of shown rows, not the number of rows with a value.Hi,
Try list.dataProvider.length
Maybe you are looking for
-
After downloading the latest version of iTunes and updating my iPhone, everytime I turn on my computer I receive a message that reads: "AppleSyncNotifier.exe - Entry Point Not Found. The procedure entry point sqlite3_wal_checkpoint could not be locat
-
InDesign CS4 shutting down from serious error. Reinstall didn't help.
I started getting a weird "file import error" in InDesign CS4 where I couldn't open any .indd files. After searching around I tried a couple fixes, including deleting preferences, validating my fonts (and removing ones with errors), and removing SING
-
My screen on my iphone 4 stopped to work.
Hey. For a few days ago my iphone 4 started to mess with me. When i trying to lock it up (from the screensaver) im just getting a blank screen. I can see that iphone reacats and it lights up, but the screen is still blank... If i put the sound on, i
-
Buying a hard drive for ThinkPads is a bit confusing because I don't really understand what height I need to buy. From my understanding there are 9.5mm, 7mm, and 3.75mm SSDs. Is it possible for me to buy a 9.5mm and have it fit into either the main d
-
My Mac won't start. I have tried all trouble shooting things like unplug and plug into a different power point. If I leave finger on start button, can sometimes get internal fan to attempt to start then stops. Please help. My computer is less than tw