Using GWT Cell Browser to create a product Taxonomy - gwt

I am in a very big issue. I need to be able to create a product taxonomy view together with ADD,DELETE,MODIFY functionality. On the first level the products will be general and as we go deep, it will become more specific.
for e.g. on the first level,
->Computer
-->Keyboard
-->Qwerty Keyboard
-->... Keyboard
-->Mouse
-->Wireless Mouse
-->2 Key Mouse
-->3 Key Mouse
-->MagicMouse
->Other
....
->Furniture
Can someone give me an idea about this??

Ok, I have been able to do it, the main idea is the listdataprovider

Related

GWT Editors for readonly and edit mode

GWT's Editor framework is really handy and it can not only be used for editing POJOs but also for read-only display.
However I am not entirely sure what the best practice is for doing inline edits.
Let's assume I have a PersonProxy and I have one Presenter-View pair for displaying and editing the PersonProxy. This Presenter-View should by default display the PersonProxy in read-only mode and if the user presses on a edit button it should allow the user to edit the PersonProxy object.
The solution I came up with was to create two Editors (PersonEditEditor and PersonDisplayEditor) that both added via UiBinder to the View. The PersonEditEditor contains
ValueBoxEditorDecorators and the PersonDisplayEditor contains normal Labels.
Initially I display the PersonDisplayEditor and hide PersonEditEditor.
In the View I create two RequestFactoryEditorDriver for each Editor and make it accessable from the Presenter via the View interface. I also define a setState() method in the View interface.
When the Presenter is displayed for the first time I call PersonDisplayDriver.display() and setState(DISPLAYING).
When the user clicks on the Edit button I call PersonEditDriver.edit() and setState(EDITING) from my Presenter.
setState(EDITING) will hide the PersonDisplayEditor and make the PersonEditEditor visible.
I am not sure if this is the best approach. If not what's the recommended approach for doing inline edits? What's the best way to do unit-testing on the Editors?
If you can afford developing 2 distinct views, then go with it, it gives you the most flexibility.
What we did in our app, where we couldn't afford the cost of developing and maintaining two views, was to bake the two states down into our editors, e.g. a custom component that can be either a label or a text box (in most cases, we simply set the text box to read-only and applied some styling to hide the box borders).
To detect which mode we're in, because we use RequestFactoryEditorDriver (like you do), we have our editors implement HasRequestContext: receiving a null value here means the driver's display() method was used, so we're in read-only mode. An alternative would be to use an EditorVisitor along with some HasReadOnly interface (which BTW is exactly what RequestFactoryEditorDriver does to pass the RequestContext down to HasRequestContext editors).
Yes,Presenter-View pair should be. But Here two ways to achieve this feature if you like to go with:
1) Integrate Edit/View code design in one ui.xml i.e.Edit code in EDitHorizonatlPanel and View code in ViewHorizontalPanel.The panel has different id. By using id, show/hide panel with display method. if getView().setState() ==Displaying then show ViewHorizontalPanel and if getView().setState()==Editing then show EditHorizontalPanel.
2) Instead of using labels, Use textboxes only. set Enable property is false when you need it in view mode otherwise true
You have created two Presenter/view but I think if Edit/View function has similar code so no need to rewrite similar code again and again for view purpose.
If a big project has so many Edit/View function and you will create such type of multiple View/Presenter than your project size become so huge unnecessary.
I think that whatever I have suggest that might be not good approach but a way should be find out which help to avoid code replication.

are there DOM events for controller presses on the PS3?

I want to develop a site which is easy to use from a Playstation 3 PS3 game console web browser. I thought it would be good to make screen actions on button presses on the console.
I can find no information on how to do this after quite a bit of searching.
Any info or links highly appreciated!
Why not write a function that displays a message for every "keystroke" and you'll see what values they represent:
$(document).keypress(function(event) {
alert(event.which);
});
Then you can use the number you get from this test and create some logic based on that.
Like this perhaps:
if(event.which == 13) {
// display cool menu maybe?
}
From what I've tested so far, the left stick generates mouse events, left pad with arrows generates keyboard events corresponding to arrows, while the right stick generates a mouseevent but unfortunately it does not move the mouse, but rather scrolls the window.
I do not know how to detect in which direction the stick is pushed (unless the cursor actually moved or the background scrolled, in which cases it is quite trivial).
Check: http://vanisoft.pl/~lopuszanski/public/ps3/

SegmentControll problem in iphone

A new bie here...
I am using a segmentController..in that there are three segments...Say segment A,B,C
Now I want this functionality...
when I press Segment A..Table A comes up..
when I press Segment B..Table B comes up..and
when I press Segment c..Table C comes up
well I know all the label change and that stuff...but what about the tables?? and again when I press the row elements they navigates me to another views and I want segment control to be displayed in navigated view also..
well ... can anyone please tell me how to do this??
any suggestion..any tutorial..any example code...any logic...anything....:)
Here is the link shows the simple Segment control. And when you want to add a Table , it is having the sample process , connect the delegates and data source. HERE is the descussion on the kind of similar question as your one.
This is the Class Reference of Segment control, which provides you a lot many examples this shall help you.
Hope this will help you.

Dispalying a list in combobox using visual studio(2008, express) for c sharp

I've got a class with a list(4 item) of data and I want to show all in a combo box. how do i do that maintaining Model-View-Controller?
I am a simple ComboBox and my job is to display things in a list, but not so much as to have the entire thing drop off the bottom of the screen causing the user to physically tilt his monitor to select items. Because of this, I implement a scroll-bar. Anyhoo, I'm empty right now and I need some data, can you help out?
Regards,
ComboBox (_idCounty)
Dear ComboBox,
Thankyou for your recent enquiry. As it turns out I DO have some data for you that you can display. Here it is.
Regards,
Model
PS: Make sure you listen to Controller!!!
In short, simply query the model for the data you require

Eclipse RCP get elements by ID

I don't know RCP very well yet, but I've been reading a lot of the docs. I don't know if my question makes sense; I apologize if not and beg that you try to work out what I mean and come up with some kind of answer.
I have a tree view element, which has a double click listener on it. In another part of the window there is a layout folder which contains views that are supposed to be inspectors for the items double-clicked on.
The only way I know to make another inspector appear is:
getActivePage().showView(Inspector.ID).
showView() doesn't give any opportunity to pass extra information to the view, so can it know which element to inspect?
Pointers in different directions appreciated. The Vogel tutorial doesn't seem to cover this, or I don't understand it.
You could check if the article "Link to Editor" can help you here.
That is, instead of trying to access the right view, define a Listener for the Editors:
private IPartListener2 partListener2 = new IPartListener2() {
public void partActivated(IWorkbenchPartReference ref) {
if (ref.getPart(true) instanceof IEditorPart)
editorActivated(getViewSite().getPage().getActiveEditor());
}
That way, you can get back the right Editor, and ask that Editor all you need for your View to update accordingly.
You can use the SelectionService. The Inspector view should register as a SelectionListener. And the other view with the tree should register a SelectionProvider. This view should listen for the double click in the tree and then update the selection