Should I provide new GWT place? - gwt

I have a general question for GWT Activity and Places paradigm realization
For example, I have a place "productList" and appropriate view ProductListView. A have a table with some Product entity in each row. I wanna to double click on row and got popup window which allow me to edit Product in doubleclicked row. How to implement it? Should I provide new place "editProduct" for this activity?

A popup dialog is not a place - users would not expect to see it when they press the back button. So there is no need to create a special EditProduct place.
You can think of "places" as something that users may want to see when they click on Back or Forward buttons, or something they want to bookmark.

Related

How would I go about detecting links in TTTAttributedLabel?

I have a table view and in some of the cells there are links, I want to be allow the user to click on these links and view them in a webView (which I have already made). I don't want to use the row selection event because there may be more than one link in the cell. I came across TTTAttributedLabel and think it will be ideal. I don't need to add any style to the text in the cell, I only need to detect the links and capture the click event to open up my webview.
Any help would be greatly appreciated.
It looks like you can assign a TTTAttributedLabelDelegate to a TTTAttributedLabel that will get call backs for when a user selects different link types, but no opportunity for you to capture them and open your own web view (which I think is what you're trying to accomplish).
Instead, you might wanna check out OHAttributedLabel. It's similar in functionality, but when a user clicks on one of the links in the label, it calls -(BOOL)attributedLabel:(OHAttributedLabel*)attributedLabel shouldFollowLink:(NSTextCheckingResult*)linkInfo on it's OHAttributedLabelDelegate, which gives you the opportunity to handle the link tap yourself if you return NO.

Select dropdown list accessibility/usability

I am trying to find the most usable/accessible way to implement a simple form dropdown list which will sort a list of products by pice and alphabetical order.
In your opinion is the dropdown more usable when there is a button that governs its submission or when it automatically submits onchange of the dropdown?
The research I have read is both for and against such methods and there is a variery of implementations on the web so interest to hear the thoughts of the community.
Thanks in advance
As a blind computer user either method works fine. I find that having a button to click is slightly easier for me then the onchange event firing. I wouldn't say it's a big enough difference to take into account though assuming the majority of your users will not be disabled. If your targeting specifically blind users I would not use the onchange event.
So long as you do not change focus or navigate to another page when the selection changes, either approach should work. The classic example of a problem dropdown is where it contains a list of other pages on the site, and navigates as soon as the selection changes. This prevents a keyboard user from using the list; they can't browse it, and can't navigate to any pages beyond the first selection, since it's impossible to navigate past those. So in cases where focus changes or the page navigates as a consequence, having a separate action (eg. Go button, or handling enter) to cause the navigation to take place is essential. This is likely where the advice you've read is coming from.
In this case, however, it sounds as though you are just updating content elsewhere on the page, and not changing focus or doing navigation. Simply resorting existing content should be fine.
Depends on your users and their respective expectations and the context in which it's presented.
As a blanket, general statement, you should have the drop down accompanied by very obvious submission button. That is the safer approach.
If you are refreshing page data or if the focus moves away after the dropdown option is selected, you should use a button to be accessible. If you fire the event on change, blind or keyboard-only users will not be able to use the dropdown menu at all if they are on windows with ie and chrome (so added together, a majority of the people on windows). As soon as they use the arrows to scroll down and make a selection, the first option they hit will be selected and the page data will refresh or the focus will move, making it impossible for them to navigate or select the second option, third option, etc. Below is a thorough explanation with examples so you can see what I mean.
Designers definitely don't like the buttons, but if you are blind and on chrome/ie, it is impossible to use a lot of dropdowns without it. I'm guessing Jared uses firefox or a mac.
http://pauljadam.com/blog/javascript/onchange-event-on-a-select-inputjump-menu-accessibility-problems/

How can I change the whole structure of a form by clicking a button ( Visual C# Express 2010 )

I'm new here as I am programming with Visual C# Express 2010.
Thats the case:
I have the first form, it contains labels, buttons, textboxes etc. I want one of these buttons to change all the aspects of this first form in order to create a second one.
An example of what I want is an ordinary installer program. It has one form ( I think ). And we have "next" button. Clicking on it, the whole form structure will change.
PS: Im not making an installer program.
Thank you!
It might be easier simply to develop a new form, and have the button launch an instance of that new form.
That said, you can programatically change aspect of GUI elements by using the appropriate properties.
For example, suppose you have a label lblStatus somewhere on the form. You can change its location and text with the following lines:
lblStatus.Location = new Point(20, 0);
lblStatus.Text = "Updated Status";
Hopefully this is helpful to get you on the right track.
You could do multiple things:
Use tab pages for each page of things that you want. Add a button outside of the tabs that will change to the next one.
Add a button and a panel on the form. Each page of the form is a different UserControl. When you click the button, fill the panel with a new instance of the UserControl that you want.
Do something like this: http://www.codeproject.com/KB/miscctrl/DesignTimeWizard.aspx
Or this: http://visualstudiogallery.msdn.microsoft.com/en-us/c2c412fd-bd28-4e3b-9c20-4dc381ac5199

Editing Records with MVVM/MVVM-Light

I have created a very simple wpf app with mvvm light.
I have rows in a list view, these are templated representations of Book objects.
I can click a row, then click an edit button, this button loads a new window and sends the new window the book to edit (using mvvm-light's Messenger).
The issue I have is when I edit the record in my new window the data on the main form is updated. The text boxes are bound to the object received via the Messenger.
I know this is because I have essentially passed a reference to the same Book object around the place, therefore I update in one place.. and voilĂ  it updates on the main page too.
What I would like to know is.. is there a standard way/method/concept to achieve what I am trying to do? i.e. create an "edit" page/screen with the option of discarding the edits?
thanks.
Could you make your entity implement ICloneable and create a clone for editing?

Programatically change icon for a eclipse RCP command

I have a menu drop down action in the coolbar. It has 3 sub items that form a radio group. I would like to change the icon shown in the coolbar when the user selects one of these options.
I've googled and seen that I should look at:
org.eclipse.ui.commands.ICommandService.refreshElements(String, Map)
and
org.eclipse.ui.commands.IElementUpdater
Its probably the right thing to look at exception its not enough information. One or two small code snippets will be excellent.
Thanks in advance.
Ok basically if you don't want to use a "custom" control the what to do it is to have your handler (handler that is linked to the specific command) implement IElementUpdater. When every the toolbar item gets shown or clicked on (i.e if the user selects on the the radio buttons) the method: updateElement(UIElement element, Map parameters) gets called.
The element has a setIcon() method and this is what i used to change the icon of the menu drop down action.
Every update to the Coolbar points to the specialization of the WorkbenchWindowControlContribution class.
This bug 186800 has some code example in it which can be of interest.