How to display xmls in Flex? - apache-flex

I have XML pages with some defined structure , now using flex I want to display the content of these pages. The purpose of using Flex is to give better look.
If I can use something else which will provide a good UI to display then also its fine.
Please suggest.

you want to display the XML code??
read the xml file into a simple textarea and ready.
Damian

You could use an mx.controls.Tree and fill its dataProvider with your XML. It's an old component, sometimes buggy when you want to tweak it, but it provides a neat display of a tree. In addition you could use a textarea to display the node currently selected.

Related

Add Buttons in Sharepoint Library

I would like to know whether it is possible to add buttons to a particular document library's column when a new item is created. I am working on SharePoint without using any development tools like SPD and Visual Studio.So, is there any way to use JavaScript to achieve this? Because, if it is done using java script I can add the java script code to a content editor and get the desired functionality.
What are the any/other ways to achieve this functionality by coding in visual studio?
Thanks
You might be able to achieve it with JavaScript as you suggest. However, don't do it. SharePoint is a complicated product with very complicated means for displaying lists. Don't try to hack it, rather use the appropriate tools (i.e. Visual Studio and/or SharePoint Designer).
To achieve what you want, you will have to create a custom field type definition and an appropriate XSLT rendering template. However, this is both quite complicated. I would recommend either creating a custom list item menu action or a custom button in the ribbon.
Using Visual Studio you have several options. I expect you need to add buttons to the list form (Edit or Display). You can:
create custom ribbon buttons. - The most standard way.
create your own field with the button you need and use this column in the list. Little bit complicated. Can be used in more lists.
create your own Editform for your content type or list. - The most complicated way but with the most possibilities.

Drupal Search in Block View

i need to create a block View with a search box attach to the header in order to search nodes for one specific content type. I don't know how to achieve this, so i ask for your help. Something like the attached photo.
I'm not exactly sure here, but it sounds to me like you want to:
Create a view;
add a "filter" which limits the view to only your desired content type;
add an "argument," and then expose this argument, for either title, body, or one of your text fields.
Unfortunately:
This alone will not search the whole node. If most of your content is in body, this would probably be a good way to do it. But, for example, if for some reason you have a title like "Bicycles in Timbuktu" with a body that does not contain the word "Timbuktu" - were your users to search for Timbuktu, this item would not appear. That said, it's probably a rather rare case, and if you are simply aiming for happy users, and not rigorous perfection, this will likely be enough.
That said, Kniganapolke's suggestion of checking out Custom Search is excellent. The advice here is more applicable if you want to do this as you've designated and using the power you have with Views (and the other possibilities they offer), rather than a more dedicated-type module. If you don't have other specifications which require you to use Views, I'd guess that Custom Search will likely be the better solution.
Have you tried Custom Search module?
If anybody is interested, i have edited the header block view and load a custom_search_block inside it.
Thanks anyway
create a view with the content you want and then filter it by content. Expose the filter.
http://beeznest.wordpress.com/2011/11/01/create-a-view-to-search-on-content-title-in-7-steps-in-drupal-7/

Change icon of Alert buttons

How do I change the icons to Alert buttons like OK, CANCEL etc?
If you look at the source code for Alert there really isn't a lot there once you get past the comments and properties. What I've done in the past is to just copy the Alert class and modify my custom version however I see fit. That way you don't have to deal with the mx_internal stuff. If you are using Flex 4, there is no spark version of Alert, so another thing you can do is create your own spark version, which will give you even more control over skinning your alerts using skins etc. Sounds like a big deal, but it's actually much easier than you'd think (speaking from experience here.)
Just specify the iconClass paremeter of the Alert class. A detailed example can be found here.
You can find a complete source code and application example here

Classes to use for a flexible image selection/tagging widget in Qt

I'm new with Qt and am looking for advice on how to structure this.
I want a flexible widget that can display a set of images (normally read from a directory but other sources too) and let the user select images with the arrow keys and/or mouse and also apply custom tags.
For example there might be 5 tags defined by the application. A user can press a key to select one, and then a little icon would appear in or near the image preview showing that it was selected for that tag.
Would I need to implement this from scratch via drawing on a QWidget or is there something that would make a sensible base class? Thanks!
I would use a QListView base class, and then subclass QStyledItemDelegate.
There is an example here which might help you.

Changing individual TextArea/TextEditor lines in Flex?

So for a summer project I am thinking of writing a colaborative code editing application in Flex. In order to do this I need to be able to modify individual lines or characters in a text area as different user's modify the same document.
I think I've heard of Flex 4 having support for text primitives but that is still in development. Is there any way to modify or get the individual lines in a text area?
Also if anyone could shed some light on how text areas/editors store and process the text it displays, this would be very helpful. I've been diving into the source code but am still struggling to wrap my head around it.
Thanks!
If you're willing to work with the beta, you can work with the stuff in flex 4 now:
http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Text+Primitives
I believe you can bind htmlText of a TextArea. It will dispatch a htmlTextChanged event when there is a change that you can respond to. I do not know if this will be comprehensive enough for what you are trying to accomplish (May be necessary to roll out a editor from scratch?).
Why don't you use the htmlText property, and add markup manually to the text string? That might be your simplest option. Otherwise, you can dig into the internal textfield property and monkey around with the selectionIndex properties and set the textFormat on the range. Look at the TextField / TextFormat stuff in the flash documentation.
Not sure exactly how to accomplish it via the TextArea, but I guarantee it will be frustrating...

Resources