Research Log of Web Science Students

Computer Science is not simply programming

Posts Tagged ‘Java

Finally Speaking – Part 2

with one comment

So instead of bothering with adding Listeners by iteration, we did an object-oriented approach instead.

Well these are eye-openers for me, since I’m not used to object-oriented programming in web development.

Written by Paolo Sy

November 30, 2009 at 12:43 am

Posted in Hardwire

Tagged with , , ,

Finally Speaking

with 2 comments

I have this certain code and I can’t seem to get the variable i plugged in to the MouseUpHandler. It seems that I cannot refer to a non-final variable inside an inner class.

for(int i = 0; i < activityCount; i++) {
activities.add(new VerticalPanel());
activities.get(i).add(new Label("Learning Activity #" + (i + 1)));

objectList.add(new VerticalPanel());
activities.get(i).add(objectList.get(i));

Button addLink = new Button("Add");
addLink.addMouseUpHandler(new MouseUpHandler() {
@Override
public void onMouseUp(MouseUpEvent event) {
addObject(i); // I CAN'T DO THIS!
}
});
}

And I haven’t figured out how to code-style-display the code above unlike what partner does.

Written by Paolo Sy

November 29, 2009 at 1:54 am

Posted in Hardwire

Tagged with , ,

Forgive My Ignorance

leave a comment »

… but I just knew how to “array-ize” lists and such things.

List<List<TextBox>> descriptions = new ArrayList<List<TextBox>>();

… which is, in array form,

TextBox[][] descriptions = new TextBox[][];

Now I’m thinking if I have to initialize every widget add, or get them immediately (but I’m betting on the former).

List<VerticalPanel> vpanel = new ArrayList<VerticalPanel>();
// initialize component to add to vpanel
vpanel.add(new VerticalPanel());
// access it
vpanel.get(0);

Written by Paolo Sy

November 29, 2009 at 1:45 am

Posted in Hardwire

Tagged with , , ,

GWTScript

leave a comment »

So the other day, I got a first glimpse of coding using the Google Web Toolkit (GWT) myself. It was pretty fun actually — it’s like you’re doing JavaScript but it’s on pure Java now.

RootPanel.get(optional_id_of_element_in_page).getElement().function;

is the equivalent of…

document.getElementById(id_of_element_in_page).function;

There’s a list of functions that can be used. Thank goodness for auto-complete.

Written by Paolo Sy

November 21, 2009 at 3:21 pm

Posted in Hardwire

Tagged with , ,

Services

leave a comment »

Currently I’m searching on how to create web services in Java–and make sure that it will run on the App Engine.

As I always say–if Projectrix was in C#.NET, we’re almost done with the project by now. But no. *sighs*

Written by falloutkee

September 16, 2009 at 3:04 am

Posted in ProjectriX

Tagged with , , , ,

Everything Needs Getting Used To

leave a comment »

Even web development under Java. Well, I’m enjoying JSP since it’s full of tags, but the behind-the-scenes work (i.e. packages, classes, and what-not) still manages to confuse me.

Written by Paolo Sy

September 15, 2009 at 10:31 pm

Posted in Hardwire

Tagged with , , ,

Spring In Action

leave a comment »

As Jeune recommends, Spring in Action is the best book to read if we want to learn about Spring. Reading Chapter One now. @-@

As Jeune recommends, Spring in Action is the best book to read if we want to learn about Spring. Reading Chapter One now. @-@

Written by Daniela

September 14, 2009 at 3:04 pm

Posted in ProjectriX

Tagged with , , ,