Alexander D�ubler

Greenhorn
+ Follow
since Feb 15, 2006
Merit badge: grant badges
For More
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 Alexander D�ubler

Hi everyone,

I try to use a JTextPane within a JScrollPane - if I use the followinh code snippet, everything works fine:



However, the width of the JTextPane must be alterable (if I use the code snippet from above the JTextPane takes the full width of the application window).

I tried to add the JTextPane to a JPanel instance and assign this JPanel to the JScrollBar - however, in this case the JPanel is much too wide as its bounds are out of the JScrollBar's bounds on the right side.

Does anyone have a solution for my problem??
17 years ago
Hi everyone,

I have the following question:

in one of our JUnit tests we use a printer driver to print to a file. However, we have to wait for this file to be completely written before we can continue the test-process. How can I ensure that the target file has been written completely?

Thanks a lot,
Alex
17 years ago
Hi everyone,

I have the following question: does anybody know about a SWT date control (might also be a commercial solution)? I'd think of kind of a text field used to enter date and time related information and also checking whether the entered data is correct. It should also be appropriate to handle arabic dates.

Does such a solution exist?

Thanks,
Alex
17 years ago
Hi everyone,

I use the Eclipse JUnit plugin in order to test whether my application correctly compares the content of two files each. In case that the currently compared files are not identical the fail() method is being executed with a String as parameter containing the two names of the corresponding files. If I select one of these (failed) test runs within the JUnit view, I get the corresponding information about the involved files.
My question is: how can it be achieved that, if the comparation reveals that the two files are identical (i.e. the test has been successful), I can also add the file information to be shown within the Eclipse JUnit view after selecting a corresponding test case??

Thanks a lot,
Alex
17 years ago
Hi,

I'm currently implementing a web application which enables the creation of certain documents (PDF respectively DOC) using a servlet and displays the documents in a browser after they have been created.

Now mail functionality is to be added to the application as follows: after the document has been created, it is to be sent to a particular address as an e-mail attachment.

Now I face the following problem: the document is created on the server. Is it possible to send the document as a mail attachment to the receiver without any additional authentication necessary? After the user has logged on to the OS there shouldn't be any further password queries.

Does JavaMail provide any solution for this problem?

Or is there any other solution not related to the JavaMail technology???

Thanks, Alex
18 years ago
First of all, thanks for the quick answer!

Yes, you're right, I meant 'open the default mail-client', of course... But on the other hand I'm quite sure that 99.99% of our customers are currently using Outlook as the default client. Well, be that as it may...

Could you please tell me more about sending the mail via SMTP to the browser? Is it thereby possible to open the default mail client?

Or is there any possibility to use JavaMail to send the mail directly from the server (instead of the client) to the receiver without getting into trouble with any security restrictions?


The main purpose of the mail functionality is as follows: the user that is currently logged on to the system creates a document, which is to be sent to the receiver of the document via e-mail. however, the document is not being created on the client machine but on the server. If the e-mail could somehow be sent to the client and automatedly opened in the default e-mail client then the user just needed to click on the send button and everything was fine. However, if the mail is being sent directly from the server authentication was needed, but there shouldn't be any commitment to the user to enter any password after logging on to the OS)...

I hope that made it a bit more clearer what our objectives are...


Thanks, Alex
[ March 17, 2006: Message edited by: Alexander D�ubler ]
18 years ago
Hi,

I'm currently implementing a web application which creates certain documents (PDF and DOC) using a servlet and displays them in a browser.

Now mail functionality is to be added as follows: after the document has been created, it is sent to a particular address as an e-mail attachment.

What I want to achieve is that the servlet creates the mail as a mime message in a way that the browser automatedly opens Outlook after it has received the message from the servlet. Unfortunately, for security purposes it is impossible to send the mail directly from the servlet-containes, but the mail must be returned to the client first.

Anyone got any idea???

Thanks, Alex
18 years ago
Hi,

I'm currently using a link in one of my JSF pages as follows:

<a href="./DialogServlet">Restdatenerfassung</a>

But as the whole neavigation of the application is done by means of buttons the single link on the page looks rather ugly.

Is is possible to replace the link with a command button opening the link reference in the current window (I already know how to open the link reference in a new window)?

Thanks, Alex
[ March 10, 2006: Message edited by: Alexander D�ubler ]
18 years ago
JSF
I've changed the code as shown below but I still encounter the same behavior...


<script type="text/javascript">
<!--
var clickedNodeID;

var req;

if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
try{
req = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){}
}

function ajaxtest(treenodeid){

clickedNodeID = treenodeid;

var url = "webdeskAjax.faces?clickedNodeID="+ treenodeid;

// send request to the server
if (req) {
req.open("GET", url, true);
req.onreadystatechange = processAjaxTreeResponse;
req.send(null);
}
else{
alert("Ajax is not supported");
}

}

function processAjaxTreeResponse() {
if (req.readyState == 4){
//process only if OK
if (req.status == 200){
if(req){
parseAjaxResponse(req.responseText);
}
else{
alert("Ajax is not supported");
}
}
}
}


function parseAjaxResponse(result){

var divnode = document.getElementById(clickedNodeID + " ivid");

divnode.innerHTML = result;

alert(result);

}
Hello everyone,

I'm currently trying to add some AJAX functionality to the tree2 JSF-component from the Apache MyFaces project (i. e. if the user clicks on some node of the tree component, then not the whole tree is to be rendered again but just the part of the tree which has actually changed).

Using Mozilla as browser everything works fine, but if IE is used I'm facing the following problem:

If I click on the [-] box next to an expanded node, nothing happens (of course, normally the node should be closed).


This is the AJAX part of the code on my JSP page:

<script type="text/javascript">
<!--
var clickedNodeID;

var req;

function ajaxtest(treenodeid){

//req = null;

if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
}
else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
}

if (req.readyState != 0) {
req.abort();
}


clickedNodeID = treenodeid;

var url = "webdeskAjax.faces?clickedNodeID="+ treenodeid;

// send request to the server
if (req != null) {
req.open("GET", url, true);
req.onreadystatechange = processAjaxTreeResponse;
req.send(null);
}

}

function processAjaxTreeResponse() {
if (req.readyState == 4){
//process only if OK
if (req.status == 200) {
if(req.responseText==null) {
hidePopup();
}
else {
parseAjaxResponse(req.responseText);

}
}
}


}


function parseAjaxResponse(result){


var divnode = document.getElementById(clickedNodeID + " ivid");

divnode.innerHTML = result;

alert(result);


}


//-->
</script>


The variables req and clickedNodeID contain the XMLHTTPRequest object respevtively the ID of the node which has been lastly clicked.

The parseAjaxResponse method determines a certain div element and adds the content being sent from the server to this element.

The alert statement has been added merely for testing purposes (as my MS-Debugger crashes every time I'm trying to move a single step further- anyone in here made similar experiences with the application???): every time I click on the [-] box the content that is added to the div element is equal to the content that has been saved in the element before the user action. The point is, that the server has not been contacted (I've registered a PhaseListener to my FacesContext) so I absolutely do not know where the content comes from...

Anyone got any advice what could be the reason for that odd behavior??

Thanks a lot,

Alex
I'm facing the following problem: we are working on a project which shall contain a tree structure - currently we're using the myfaces tree2 component from apache. Now we shall add AJAX functionality to the tree component, but the only thing I have found on the web is the following page:

http://smirnov.org.ru/en/ajax-jsf.html

But I don't have any idea how to use the classes in the repository in my own page containing the tree2 component...

Has anybody in here successfully used the AJAX-JSF framework and can help me out with some code samples (both client and server side)?

Or is there any other tree component which contains AJAX support??

Best regards,

Alex
18 years ago
JSF