Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Sybyll Jones

Greenhorn
+ Follow
since Dec 20, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sybyll Jones

Hi, does anyone have this extended UML PDF with java-code samples mentioned above??

Thank you
Syb.
11 years ago
Hi, i found these notes at a page of a guy who made the scja called alper. The other notes are very helpful,
but i have difficulties with these few examples...Do you have an idea to one of them?



11 years ago
Hello, i’ve found these notes (tipps) for SCJA, but I have difficulties in interpreting them: Can someone give code examples or say in few words, what exactly stand behind these notes?

* declarative user interface construction – is NOT part of the J2EE specification.
what does it mean: declarative user interface construction? Maybe an example is helpful.




* In Java an enumerated type is represented as first-class object.
is there a definition in java for these first-class objects?




* Classes that do NOT support information hiding are NOT treated specially in Java
"treated specially" in what manner?




* Attributes incur a runtime penalty. However, the Sun hotspot JVM usually can eliminate the added overhead by “inlining” the methods where they are called.

Maybe anyone have a code-example? why can attributes trigger runtime errors??



* Both class associations and class compositions relationship may be of any multiplicity.
in compositions the n*n multiplicity is not possible, or ??



* Compositions may also have navigation methods, but these methods must NOT pass references to the owned objects. This is usually achieved by passing back a copy of the object rather than the owned object itself.

code example?

Thanks
Sybyll








11 years ago
Maybe you have a tip for this example:

You have to classes A and B: An open arrow (UML) from class A points to class B.
There is a multiplicity-value of '1' at the class A (beginning of arrow) and a value of '*' at the class B:

Now the question is, which code correctly implements this relation:

1.
class A {
private B[] b; }

class B {}

2.
class A {
private B[] b; }

class B {
private A a;
}


I'd thought, the correct answer was 2., but someone said 1. is the right one???

Grettings
Syb.
11 years ago
Hello, take this for studying:

- Head First Java 2nd Edition
- J2EE Tutorial 1.4
- UML Distilled 3rd Edition
- UML for the Java Associate
- Section 2.6 of the Java 2 Platform, Enterprise Edition Specification, v1.4
- J2ME Datasheet

Good luck!

Syb.
12 years ago
But here is written, that javabeans implements this interface:

http://www.stardeveloper.com/articles/display.html?article=2001071901&page=1

? I am confused, too

Sybyll
12 years ago
Hello, i am a little confused about this:
In one test if found the assertion, that:
"departments are navigable through college".
But in another example they say:
student[] is navigable through the School class is WRONG??

I'd thought, that this navigable thing has only a meaning in combination with this UML-Arrow (can be traversed in one direction: example: Book ---> pages):
A book knows about its pages, but a page doesn't know what book it's in...).
So Book is navigable though pages??
Has the composition-relation an effect on the navigation?

Thanks
Syb.

[ June 25, 2008: Message edited by: Sybyll Jones ]
[ June 28, 2008: Message edited by: Sybyll Jones ]
12 years ago
Maybe you'll get it here. If not, i can send it to you. PM me
http://www.esnips.com/doc/bf534606-bf87-4107-a884-efc791c80fc5/hfoo-associateuml


Greetings
Syb.
[ June 16, 2008: Message edited by: Sybyll Jones ]
12 years ago
Hello, i had the same problem, too and the cause for me were different Java (JRE) versions on the two machines (the developer-machine had 1.6 and the target-machine only 1.5)
Maybe it helps someone...
Good luck
Sybyll
12 years ago
Hi,

>Does your real code have an "html:" at the front of your optionsCollection >tag?

my Init.jsp starts so:

<html:html locale="true">
<head>
<title></title>
<html:base/>
</head>
<body bgcolor="white">
<p>
<p>
<html:form action = "start">
...
<html:select name="initForm" property="idman" >
<optionsCollection name="initForm" property="manList" />
</html:select>
...

>Make sure you are populating the form that gets passed into the execute >method and not instantiating your own form (or if you are, be sure you are >saving it to the request correctly).

Here the InitAction-snippet:
public class InitAction extends DispatchAction {
public ActionForward show(ActionMapping mapping,
ActionForm aForm,
HttpServletRequest request,
HttpServletResponse response){
InitForm form = (InitForm)aForm;
try {
form.setManList(getMan());
...

My workflow:

- struts.config.xml => globalforwards: <forward name="welcome" path="/init.do?method=show"/> (that calls InitAction)
- InitAction sets the list (see code above) and has the line: "return new ActionForward("initTD");" where initTD is defined as "/pages/init.jsp"
- init.jsp should now give out the optionscollection.

Is there an error??

Sybyll
12 years ago
Hello, i use Struts 1.1, Eclipse 3.1 and JRE/JDK 1.6. I have this code in my JSP:
<html:select name="initForm" property="idman" >
<optionsCollection name="initForm" property="manList" />
</html:select>

But i get only the empty dropdownlist without any errormessages...
initForm is my ActionForm and idman is defined there as an int, manList as an List with Getter/Setter. to set the list i have this line in my InitAction:
form.setManList(getMan());
and getMan() returns a list. I made a breakpoint there, but when the jsp loads, he doesn't jump to getMan()??

Anyone an idea?
<bean:write name="initForm" property="idman"/> alone works...

Thanks
Sybyll
12 years ago
Hello, i use Struts 1.1, Eclipse 3.1 and JRE/JDK 1.6. I have this code in my JSP:
<html:select name="initForm" property="idman" >
<optionsCollection name="initForm" property="manList" />
</html:select>

But i get only the empty dropdownlist without any errormessages...
initForm is my ActionForm and idman is defined there as an int, manList as an List with Getter/Setter. to set the list i have this line in my InitAction:
form.setManList(getMan());
and getMan() returns a list. I made a breakpoint there, but when the jsp loads, he doesn't jump to getMan()??

Anyone an idea?
<bean:write name="initForm" property="idman"/> alone works...

Thanks
Sybyll
12 years ago
JSP
No, but i heard, that i don`t have to create a special composite mapping in the hbm-files, etc. for the case that the composite key should only be a control-entity (no duplicate values in database).
Hello, I'm trying the Hibernate mapping for the table "tabtest":
The table has the composite primary key which consists of time_id and data_id, which are both foreign keys (time_id to tabtime and data_id to tabdata).
Now, i don`t know how the *.hbm.xml-file has to look like...
I use Hibernate2, JRE/JDK 1.6 and no Annotiations by far.

Thanks
Sybyll