Ulrich Vormbrock

Ranch Hand
+ Follow
since Apr 15, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
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 Ulrich Vormbrock

Thank you, Tim!

In the meantime, I've added - in the Phase Listener - each JSF life cycle to a list of a Managed Bean, something like this:



At the GUI-side, I iterate over the list of the PhaseListenerBean:


You can see my showcase at pro-jsf.de

All works fine - except that the last phase "After Phase: RENDER_RESPONSE(6)" is dropped!

Before Phase - RESTORE_VIEW(1)
After Phase - RESTORE_VIEW(1)
Before Phase - RENDER_RESPONSE(6)
LoginBean: isUsernameValid() - true
LoginBean: isPasswordValid() - true
After Phase - RENDER_RESPONSE(6)

I believe that the page is rendered BEFORE the last phase is added to the list - isn't it?
If this is not he reason, please let me know!

Thanks in advance!
12 years ago
JSF
Hello,

for a showcase application, I want to output the different JSF life cycles when a simple input form is submitted.
Normally, we use to do it with the famous "System.out.println()" - but in my case, I want to do such output on the GUI (xhtml file) and not on the console.

Does anybody know how to do?

To be precise, my question should be split into the follwing sub-questions:
a) Phase-Listener-class: how can I refer to GUI elements (for example by ID)?
b) GUI: which HTML-Element should I use? ? Unfortunately, JSF doesn't provide the div-Elements which can be filled later with "innerHTML".

Any suggestions are wellcome!
12 years ago
JSF
Thank you, Tim!

I already feared this - concerning an appropriate Java applet, do you know a product which can perform such task, for example an OpenSource product which enables the developer to interfere concerning the storage and examination of the local file system?
12 years ago
Hi,

I'm wondering if it's possible to do a sequential file upload.
The situation is the following:

1. I make a simple file upload - descriptor.dsc - to a HttpServlet - this works fine!
2. The Servlet analyzes this file - it deals with a descriptor file which contains path infos of the LOCAL file system, belonging to the same project (also this works fine, the Servlet lists all files described in the uploaded descriptor file)
3. The user now has the possibility to choose which files (of the local file system) have to be uploaded now (realized with checkboxes)
4. That's my issue: I'm searching for a possibility to upload automatically all SELECTED files by the user.

To give an example, let's have a look at the local filesystem:
c:/project/descriptor.dsc
c:/project/unit1/image1.img
c:/project/unit1/image2.img
c:/project/unit2/image3.img
c:/project/unit2/image4.img
c:/project/unit3/image5.img


Due to the fact that most browser satisfy the security restritions, it's unlikely to get the file system infos (in our case: "c:/project") when I upload the file "descriptor.dsc" (which points to image1 ... image5).
Now it seems unpossible to tell to my routine something like "take the directory 'C:/project' and upload all files under unit1, unit2, etc.".

My Servlet thus only displays the relative file system, like
unit1/image1.img
unit1/image2.img
unit2/image3.img
unit2/image4.img
unit3/image5.img


In any case, if the user chooses for example "image1.img" and "image3.img", I would like to perform an automatic file upload, without having to choose such files manually by the html file input control. But I fear it's not possible, for security reasons, is it correct?

if there's a workaround, please let me know.
Without Flash, perhaps with Ajax oder even Java applets.

Many thanks in advance.
12 years ago
Hi,

I'm actually trying to write an own widget, enabling to realize a kind of "tabbed panel" based on HTML list (<ul> and <li>).
Besides, no enclosing <div> should be generated - opposed to the most GWT widgets.

The background is that I want to integrate my widget into a css framework: as soon as an enclosing <div> comes into play, the whole widget is not displayed correctly.

I've just tried to write an own Widget class, looking like this:



The problem is that the widget from outside (for example HTML) has an enclosing <div>, thus destroying my design.
The add-Method (line 31, from ComplexPanel class) only takes a Widget as first argument, not an Element - so it seems to be unpossible to get rid of the <div>, doesn't it?

Or maybe there is a more elegant way to generate own widgets, bypassing the enclosing <div> tags?

In any case, my final output should look like this:


Any ideas?
13 years ago
GWT
Thanks a lot, Jayr - you've helped me a lot!
Now I've got an idea about "Deferred Binding"
13 years ago
GWT
Hi,

I'm asking myself if it's possible to mix both GWT and HTML5.
Would this be possible without having to fear side-effects?

In my case, it mainly deals with developing "standard" HTML components (=less than HTML5) - but for future compatibility, I would like to set up already an "HTML5 project".

What about eclipse plugins concerning HTML5?
As far as I know, the GWT plugin isn't likely to produce HTML5 output (ok, I know, it's a matter of doctype only within the first step), isn't it?

Thanks for any suggestions?
I'm still new to GWT ... and in the Internet, I could hardly find answers to such issue.
13 years ago
GWT
Hi Frits,

Thank you for sharing your masterwork - I've downloaded, printed out and coil bound your summary.
Now, it's compact, informative and a really good help for the preparation of the SCWCD exam.
In addition, it's likely to be a good reference within a concrete Web project, as well.
Congratulations - het is een heel goed werk!
Thank you again, Frits!
In future, I'll rely not only on the book, but also on the spec ...
Hartelijk bedankt - many thanks, Frits!

Can you please tell me where I can find this kind of info?
I ask because I didn't find no hint concerning <jsp:attribute> in the "Head First" book ...
Hi,

I've written a simple tag handler in order to print out several user data (from a form).
All works fine - except the last attribute named "programLanguages" - it deals with a List rather than with a String.
Below please find the tag "advice" which I've place into the "result.jsp":




When I run the result.jsp, I get the following exception:

org.apache.jasper.JasperException: Unable to convert string "[cpp, java, vb]" to class "java.util.List" for attribute "programLanguages": Property Editor not registered with the PropertyEditorManager



Instead, when I place the "programLanguages" attribute within my custom tag, it works fine:


Any ideas?
Hi,

I'm so glad and happy about my exam which I've cleared with 88 %.

Thanks to K&B and many thanks to this forum - you're great and very helpful - I've taken a lot of hints and advantages from this forum, and I highly appreciate the fact that many persons among you dedicate plenty of spare time in order to help others! Thanxx again!

I've crammed for this exam in Gran Canaria - initially, it was likely to travel to Madrid or Barcelona in order to take the final exam.
But on short notice, I had to present myself in Zurich due to an IT project as a freelancer, so I had to stop my exam preparations. After having passed the technical interview, I travelled to Germany in order to see my friends, because I had to wait about a week for the result - which finally was positive: on next Tuesday, I'll start my project work in Zurich.

Arrived in Germany, I had to "reactivate" all Java stuff - fortunately, I've brought with me a plenty (=500) of so-called memory cards, so I could go through during a couple of days, especially things like "classpath" and "inner classes" issues, which in fact belonged to my weak points.

Today, when I arrived in the test center, I saw that I had a room of my own, in addition, they served me coffee and mineral water for free.
Due to the fact that I could hardly sleep last night (also because of the heat - yes, it can be warm in Germany...), I felt nervous and exhausted - consequently, I supposed that I wouldn't be able to reach a score beyond 70%. When the system admin gave me the report (there was no result indicated on my screen after submitting ... really strange!) I could hardly believe my eyes discovering the "passed with 88 %".

Sure I've toughened up my Java skills using Enthuware and ExamLab.

Here my scores which I achieved with Examlab:
Diagnostic Exam: 56 %
Exam 1: 41 %
Exam 2: 54 %
Exam 3: 51%
Final Exam: 72 %


The range of my scores with Enthuware has been between 57% and 83%.
Now, I'm so glad and relieved ... I can hardly explain!



13 years ago
Hi,

I encountered the same problem while resolving and reviewing the final exam (ExamLab).

Thank you for your replies, so I don't need to create a new thread concerning this subject.

Here my code which ensures that both threads access the same object, the Trd object as target (line 23 and 25), not Thread as worker.


A crucial point to remember is that notifAll() should be applied to the Trd object, as well - otherwise, we get an IllegalMonitorStateException.

Nevertheless, I'm wondering why we don't get an IllegalMonitorStateException when we call notifyAll on the worker (Thread) - maybe, it has to do with the fact that target and worker are connected with each other?

One point I can't understand is why it works, as well ... when we apply synchronized() and notifyAll() on two different target instances (Trd, see line 20).
Thank you, Ankit, Mohitkumar and Maren!

Now I think I'm able to locate the main issue: line 6 goes back from A(4) to A(1) (arrow pointing to the left), but it deals only with a "passive" connection.
It seems that with object references, it behaves according to the famous Hollywood principle: "don't call us, we call you".
Consequently, the JVM doesn't care about line 6 - if line 6 pointed into the opposite direction, instead, A(4) would not be eligible for GC.

Hope I'm right ... when this thread is closed, I'll remove my painting above, trying to exhibit it in the Museum of Modern Art ;-))
Yes, indeed - I meant:

Besides, ExamLab is a very good testing tool, thank you Devaka!



Sorry for this ;-)