darryl nortje

Greenhorn
+ Follow
since Mar 31, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by darryl nortje

I solved this.

The problem was that the
<h:panelGroup id="parameterPanel" binding="#{reportBean.parameterPanel}"/>

was inside a <f:verbatim tag. This meant that the binding went for a ball.

sorry if I wasted someone's time by not posting the full source code. I did leave out the <f:verbatim tag in my original post.

Anyway. Don't put any elements you want to have bound to the backing bean inside a verbatim tag.

cheers
Darryl
16 years ago
JSF
Hi there guys,

This topic heading looks just like others in this forum, I've read them and implmented the proposed solutions but something is still not working.

Here's what I have.

jsf page.....
...
<h:panelGroup id="parameterPanel" binding="#{reportBean.parameterPanel}"/>
...
<h:commandButton value="Request Report" id="requestReportButton" action="#{reportBean.requestReport}"/>
...

backing bean
...
public UIPanel getParameterPanel() {
return parameterPanel;
}
public void setParameterPanel(UIPanel parameterPanel) {
this.parameterPanel = parameterPanel;
}
...
private void loadParameters() {
HtmlOutputText table = new HtmlOutputText();
table.setValue("<table>");
table.setEscape(false);
parameterPanel.getChildren().add(table);

for (Parameter parameter : parameters) {
if (!parameter.isVisible()) {
continue;
}

table = new HtmlOutputText();
table.setValue("<tr><td valign='top'>");
table.setEscape(false);
parameterPanel.getChildren().add(table);

// add the label/////////////////////////////
HtmlOutputText label = new HtmlOutputText();
label.setValue(parameter.getLabel() + (parameter.isRequired() ? " * " : ""));
parameterPanel.getChildren().add(label);

table = new HtmlOutputText();
table.setValue("</td><td>  </td><td valign='top'>");
table.setEscape(false);
parameterPanel.getChildren().add(table);

// add the parameter control/////////////////////////////
parameterPanel.getChildren().add(parameter.getControl());

table = new HtmlOutputText();
table.setValue("</td><td>  </td><td valign='top'>");
table.setEscape(false);
parameterPanel.getChildren().add(table);

// add the blurp/////////////////////////////
HtmlOutputText blurp = new HtmlOutputText();
blurp.setValue(parameter.getBlurp());
blurp.setStyle("font-size:small;font-style:italic");
parameterPanel.getChildren().add(blurp);

table = new HtmlOutputText();
table.setValue("</td></tr>");
table.setEscape(false);
parameterPanel.getChildren().add(table);
}

table = new HtmlOutputText();
table.setValue("</table>");
table.setEscape(false);
parameterPanel.getChildren().add(table);

}

All the get control does is check the parameter attributes and decide whether to make the type an html input, radio button drop down box etc...

All works well when loading the page, but after I have filled values in to the input fields the setter for the panel never gets called.

When I click on the requestReport button the framework doesn't ever call the setParameterPanel method.

Like the binding isn't working after the first time.

Please help, let me know if you need any more info.

thanks
Darryl
16 years ago
JSF
your code "
String sql = "select instr(\'"+files+"\',\'"+fileid+"\',1) from clientinfonew where CL_ACUSERID=\'"+acuserid+"\'";
System.out.println(sql);
// I can execute this output in oracle
conn.prepareStatement(sql);
System.out.println("Hello");//okay
rs = pstmt.executeQuery();
"
Let me guess, you're getting a NullPointerException
try this
pstmt = conn.prepareStatement(sql);
I think that'll help
cheers
Darryl
Howzit Chris and Sachin,
I think I found out why it worked. Let me explain, when I was trying to get the rmi server up, I was starting the rmiregistry external to the server in the command line. This was giving me the not bound exception. I then put the exec line in my server itself, which at the time was a dummy server, in the default package (ie no packed). So what it did is start the rmiregistry in the root directory of the application, so that from the root, it could then find com.whatever_stub.
When I structured my dummy application properly and put the server class in a package, suddenly the error NotBoundException returned. so in essence you're right. It is due to a classpath problem, which can be solved in two ways as I have found out recently.
1) in the command prompt, set the classpath to reference the root directory of your application, or start the rmiregistry from the root of your application.
2) there is a solution using the codebase. you have to set the codebase to be exactly that, the base/root of your application, which I think is similar to setting your classpath to the root.
Either way, I think I have now solved the problem on my side for good. I have an environment variable for my application, that points to the root of my app, and I start the rmiregistry from my server, but instead of running the rmiregistry, I run a batch file that starts the rmiregistry using the environment variable.
Hope this helps.
cheers
Darryl
20 years ago
Hey guys
I was getting this error as well and read this post in the hope of it shedding some light. Needless to say it didn't help. But I have subsequently found a solution to the problem. I have no idea why it works, but it does.
I had the _stub file in the classpath, And I kept getting the ClassNotFoundException whenever I tried starting the server. I had started the rmiregistry in a seperate window. So for some reason I stopped the rmiregistry and added the following line to my server class, before the bind/rebind Runtime.getRuntime().exec("rmiregistry 2020"); and the error disappeared into thin air.
Like I said, I have no idea why it is now working, but I do know that it is at least working now. So if you read this, try it, and hopefully it works for you too. good luck.
cheers
Darryl
PS: your server does need the stub by the way...
20 years ago