Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

James Clinton

Ranch Hand
+ Follow
since Jun 23, 2003
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 James Clinton

In jpa, you have the option to annotate the entity field, property or both (however either or is recommended).

What is everyone doing and why?
Hello!

I am struggling to configure apache to recognise my domain. The result I need is this:

http://mypc.mydomain:8080/etc/

I have edited the server.xml like so:

<Host name="mypc.mydomain" ... >

But when I attempt to hit the site, the server throws a 'Bad Request' error.

Any idea's where I'm going wrong?
13 years ago
There is no such thing as a stupid question, only stupid answers!

13 years ago
JSF
If your using facelets you need to declare the components in a tomahawk.xml file. At least you do for jboss.

My advice would be to get this workinf with JSPs, if that works you know your classpath etc is fine.
13 years ago
JSF
Are you using facelets? As I have had this white screen of death before too.

If so you might have forgot to put your faces 'view resolver' config in the faces-config.xml

Personally, if your new to JSF, I would forget about facelets for the time being and use sitemesh. All the apache examples are based on pure JSPs and it makes life so much easier when learning IMHO.

James
[ January 11, 2007: Message edited by: James Clinton ]
13 years ago
JSF
Gateway or as I'd call it 'View Resolver' can be done if you are using Spring.
13 years ago
JSF
Is it possble to have a tree inside a datatable, something like:

<h:treeColumn>
binding stuff
</h:treeColumn>
<h:column>
normal column stuff
</h:column>

I've tried but without success.

I know apache have a <t:tree> component, but this looks like I'll have to completely change from using the a datatable component.

Anyone have any advice?

Regards, James
13 years ago
JSF
Discovered the answer which is to embbed the html code in verbatim tags.
13 years ago
JSF
Hi

I have a hidden datatable component which is displayed when a link is clicked. Along with this component I want some html.

<h:panelGrid rendered="#{render}">

<div id="box-50">
<ul id="sub-heading">
<li><h2>Advanced search</h2></li>
</ul>

etc..

The HTML is ignored...why?
13 years ago
JSF
I have looked on the net, but cannot find an example on how to configure the context of a deployed war file.

What I want is have a war file named xxx.war, but when you start the application you goto /yyy/index.jsp.

I'm not in the position to deploy this within an ear, which would allow me to use jboss web context xml file...

Do anyone know how to acheive this?

Kind regards,

James
13 years ago
I know nothing about this...but Apache has a Ajax Input Suggest box...source is as always open to all...you might want to check out their implementation..
13 years ago
JSF
the 'value="#{bean.stringValue"' binding, binds local value, not the key value....or this is what i have discovered.

So

SelectItem.setLabel("displayed value");
SelectItem.setValue("key");

in HTML

<OPTION value="key-value">displayed-value</OPTION>

I have found the value binding always returns the local value, not the key value.

Please correct me if i have missed something..regards. J.
[ December 28, 2006: Message edited by: James Clinton ]
13 years ago
JSF
Finally discovered how to do this....

You need to bind the selectItems to a object of type http://www.docjar.com/docs/api/javax/faces/component/UISelectOne.html

binding="#{bean.uiSelectOneObj}"



Then, you can call getValue() on it.
13 years ago
JSF
Thank you.

So back to my orginal problem of getting hold of the selected value, not label, how can this be achieved

Previously doing this binds the selected items label to selectItem which is a String in the backing bean.

---JSF
<h:selectOneMenu id="roles" value="#{myBean.selectItem}">
<f:selectItems value="#{myBean.selectItems}"/>
</h:selectOneMenu>

---MyBean.java
String selectItem;

regards
13 years ago
JSF


You should return Arraylist<SelectItem> for using with <f:selectItems>.



Apoligies if this is a stupid question, but what exactly do you mean, how can this achieved?
13 years ago
JSF