Samuel March

Ranch Hand
+ Follow
since Oct 28, 2009
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 Samuel March

Could just pop a new JFrame and that will.
14 years ago
Do not use a modal JDialog.
Also declare a separate JFrame to bind to the JDialog.
14 years ago
javax.swing.JViewport
and insert a Component
14 years ago
On one side put




getInputStream() .. MyInputStreamClassExtension : extend class InputStream or anything that extends it.
14 years ago
compare your code...
f1.renameTo(f1=new File("C:/test1.txt"));
14 years ago
To start javax.comm

naughty quote from docs: The Communications API
The Communications API is centered around the abstract class CommPort and its
two subclasses, SerialPort and ParallelPort,

14 years ago
public interface Set extends Collection
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Set.html





or just always without any hooha



or with hooha

14 years ago
JSF
Firstly, check your XML in web.xml and faces-config.xml is well formed and validate it too against DTD or Scema.

If thats ok, is there a seam-config.xml TO COIN A PHRASE FOR IT, that requires configuration and adding and referencing in web.xml or faces-config.xml???
14 years ago
JSF
Did you supply your own id to the form???

h:form id="someform"

next is the result............
h:input id="someform:firstinput"
14 years ago
JSF
What the point is in JSF is, is that when you use it, it is a complete system. If you were to use AJAX or a servlet for processing a "form" it misses the point of using it.
You send the information from the first page "that will be some type of form" and process that information.

Contract for JSFusage:
So what you are saying you will do is to take an individuals unique details and send it to the JSF , if it turns out ok with a validator on the element or it makes sense automatically(as in a commandLink) you use the unique properties of that information inside the JSF Framework system to make a decision with.

So the next page will call on the the bean and is set with a unique value from the commandLink to call the database to query using that information.
In each commandLink or commandButton form you need to supply each piece of unique identifying information to use in the query as the second page gets processed.

You don't particularly need an JSF.ActionListener you can simply get the information from the click and always refer to the navigation-rule to bring that down after obtaining the unique identifying information.
14 years ago
JSF
What your asking is a little complicated if you are populating the page as a list from the database.
You need to know how to transfer that result-set information to a property reference each.
E.G. a cheap trick would be first getting a query such as mysql select count(distinct) where....
then collecting the same but the required identity information to send to each property of an array
governed by the previous distinct count.
The get method each time it is referred to by page call will trigger a bean internal method to ++ increment and retrieve each array value and a final special page call at the end of the page(another method) could reset the counter value to zero for next use.
usersNameOut would contain that ++ system, but your difficulty is matching page code(markup) output iterations.


first: declare your pages with the @ directive at the pagetop threadsafe="false"

second: with you JSF session bean, for the user (provided your not using JAAS)

<h:commandLink id="johnsmith"
action="detailspage"
actionListener="#{sessionBean.makePageChangeLtsn}">
<h:outputText value="#{sessionBean.usersNameOut}" />
</h:commandLink>

name of the beans [i]actionListener method in your session bean: makePageChangeLtsn[/i]
bean call inside faces-config.xml navigation rule
#{sessionBean.pageChangTo}




The actionlistener method you write must return( alike setWhereTo(String where) ) to the property(String where; // global) that holds the navigation value property configured in navigation by the rules in faces-config.xml

When the render phase(response) occurs the bean method that calls get on the where property must be set as the outcome in the navigation rule.

name of the method returning a List of usersDetails: usersDetails


You can take the hyperlinks out and replace with a commandbutton in a form that points to an outcome PAGE in your faces-config.xml navigation.

Either way it requires iteration over values from somewhere and storing individual forms for each set of details unique identifier information.

So you would see something like:
|| Jonh Smith || =buttonDETAILS= ||
|| Alison Jones || =buttonDETAILS= ||
....

inside the page this would look like where the button is (.faces or what your configured trigger is):

<form id="johnsmith" method="post" action="/applicationname/yourpage.faces">
<h:inputHidden name="SOMEPREFIX:name" id="SOMEPREFIX:name" value="Alison Jones" />
<h:commandButton id="SOMEPREFIX:submit" action="detailspage" value="Get Details" />
</form>

== table-row and table-data here == then

<form id="AlisonJones" method="post" action="/applicationname/yourpage.faces">
<h:inputHidden name="SOMEPREFIX:name" id="SOMEPREFIX:name" value="Alison Jones" />
<h:commandButton id="SOMEPREFIX:submit" action="detailspage" value="Get Details" />
</form>

in the detailspage use the value to query your database, you supply to that value what you need





14 years ago
JSF
<script type="javascript"> should be:

either

XHTML


or simply

HTML



or rarely now, browser specific




and finally function clearTextMsg(){... // generally something like this.value passed to formref her inside the event-attribute on the element

should be (NOTE:put this below the form end tag , not up the top)


with

14 years ago
JSF
When in doubt...
http://java.sun.com/javaee/5/docs/tutorial/doc/bnaln.html#bnalt
Certainly allowed in a body tag.



isELIgnored set to be false too may help(not that its relevent to that but during testing you could try some things and worry too much on error, second, tag attributes have the same requirement about whether they evaluate scripting or other tagging).
14 years ago
JSP
You need to decide at the top of the page before anything is started to be printed whether to redirect.
However, I believe that just like with tag classes , with JSP scriptlet or JSTL you can cancel page processing, then redirect, but that may be the same clause(meaning you could have processed a large portion of the page but not sent it).
Look through the <@page > directives for buffer , and i think one directive has an attribute output whether to be "verbose"(output as it occurs) also.
If you need to do that after print, you could cease at an appropriate element and print a javascript with
<script>
window.location="http://mysite/thepage.jsp";
</script>
14 years ago
JSP

on another page


??? popup javascript
??? jsf/jsp page replace the datatable page
Please elaborate.
14 years ago
JSF