MvcConrib Grid's Sortable property don't seems to to do any effect - grid

I need a way to generate the header texts in the grid as sortalbe link.
Do I need to use custom renderer to get this behavior?

You need to use GridSortOptions and call the .Sort(YourModel.GridSortOptions) method on the grid and then handle the OrderBy in your controller action.
See this link: http://www.jeremyskinner.co.uk/2010/03/14/mvccontrib-grid-part-6-sorting/
Thanks,
Hal

Related

How to add global barButtonItems to custom UINavigationBar?

I am currently trying to create a custom UINavigationBar Subclass.
What i want to achieve is that all custom navigationbars inside my app should have a couple of barbuttonitems in common. But it should still be possible to define left or .rightbarItems on the navigationItem in code.
What i tried so far is that subclassed the UINavigationBar and played around with all methods and delegate callbacks i could potentially use to change the navigationItem. There are methods like
setItems:animated:
setItems:
navigationBar:didPushitem etc.
.. which could be used to modify the navigationItem somehow.
But there is no callback which can be used to change the item initially.
What i basically want to know is how it is possible to change navigationItem initially before it is being pushed ?
Solved it by myself using
willShowViewController of the UINavigationControllerDelegateProtocol
to modify the navigationItem

How to change the Apache Wicket's CSVDataExporter's link type to a button?

I have a Grid, which have a TopToolbar and BottomToolbar. In the BottomToolbar, I added a CSVDataExporter:
CSVDataExporter csvDataExporter = new CSVDataExporter();
csvDataExporter.setDataFormatNameModel(new ResourceModel("csv.export.link.name"));
csvDataExporter.setDelimiter('|');
addBottomToolbar(new ExportToolbar(this).addDataExporter(csvDataExporter));
I have the link, so I can export the table to CSV fine!
BUT! How could I change the CSV export link to be a Button, but do the same and be at the same place as it was? Thank you!
The Link is generated by your ExportToolbar using the createExportLink method. To generate something else (as in any other component) you can extend the ExportToolbar to override this method. If this is the only place where you need this functionality, you can do so by implementing an anonymous inner class.
Generally you'll want this method to return a Component that has it's own markup, like a Panel, that contains whatever you want to display as your Exportlink or -button.

How to display changing data in XUL

I'm trying to build a firefox extension which can get rss feeds and display them in a popup panel. But I'm not aware about how to display feeds in a panel(I know how to display static text).Because the feed is varying all the time.
Any help regarding this matter will be appreciated.
Thanks in advance.
How about using setInterval to call a function that redraws the panel at the time interval you specify?
You can create DOM elements inside a XUL popup panel using JavaScript, but you have to remember that the panel requires the XHTML namespace:
<panel id="your-id" noautohide="true" xmlns:html="http://www.w3.org/1999/xhtml">
and instead of using:
document.createElement("p"); //for example
you would need to use:
document.createElementNS("http://www.w3.org/1999/xhtml","html:p");
You can get the popup reference by id and just create and append elements as you need them. Then the following might help:
https://developer.mozilla.org/en/XUL/PopupGuide/OpenClose:

flex: cant edit item in Datagrid with override set data method

I've a custom itemRenderer for my datagrid. To set the actual data I use the following method:
override public function set data(side:Object):void{
...
}
As soon as I use this function the cell doesn't show up any item Editor anymore. Why is that? When I remove this function the itemEditor is working but with the wrong initialization data...
What's the proper way to handle this?
Thanks,
Markus
Have u called 'Super' on that method ?
Make sure that you also have an itemEditor that is correctly working or that you set the rendererIsEditor property to true and use the renderer as the editor.

Flex component access other component

I have 2 components for example (editor.mxml using mx:windows), when I click an edit button, I want to get the current value from the other component's datafield? (datagrid.mxml using mx:window)
I do know how to access the main MXML's datagrid by parentDocument or Application.application method, but stumped block if I want to access other way as mentioned above. Keep the code as simple as possible.
You could either do dependency injection, that is, give component A a reference to component B so that they can communicate directly (example of tighter coupling,) or have both components communicate through a common mediator using events (example of more loose coupling.)
Both of those options would be implemented wherever it is that you're creating those components (A and B in this example) and adding them to the display list.
This might be more complicated than it deserves, and it smacks of Pattern-Fever, but you could use a mediator class that listens for the CLICK event from the button and knows enough about the other component to query its property. It could even transmit that data using a custom event, which the button listens for.
While this involves three classes instead of two, it often turns out to be easier to have two components that focus on looking good and one that worries about coordination.
Cheers
Try this:
FlexGlobals.topLevelApplication
This points Your root. From the root You can grab every element You want.
You can also add an id to the custom component like this,
<custom:Editor id="myCustomComponent">
</Editor:AddressForm>
and
access your datagrid's value like this,
var data:ArrayCollection = myCustomComponent.DatagridID.dataProvider;

Resources