JSF Drop Down Converter Problems
I am having problems with JSF 1.1_01 (MyFaces 1.1.1).
I have created page called page.jsp as follows:
<h:selectOneMenu value="#{test.selectedDevice}" id="deviceTypeList" styleClass="dropdown">
<f:selectItems value="#{test.deviceTypes}" />
<ajax:support action="#{test.loadDevice}" event="onchange" reRender="t2,t3,t4,t5"/>
</h:selectOneMenu>
It is uses managed bean called TestBean.java:
public class TestBean {
public List getDeviceTypes(){
logger.info(" *** In getDeviceTypes Backing Bean*** ");
List<SelectItem> models = new ArrayList<SelectItem>();
List<SelectItem> deviceTypes = new ArrayList<SelectItem>();
// Gets Data from Hibernate Query . It returns List of Device Types
models = deviceManager.getDeviceTypes();
logger.info(" *** DeviceType List Size=*** "+models.size());
for (Iterator it = models.iterator(); it.hasNext();) {
System.out.println("Inside For Loop Iterator size="+models.size());
Object[] row = (Object[]) it.next();
System.out.println("ID: " + row[0]); // prints data
System.out.println("Name: " + row[1]); //prints data
// Below line results in error : does not have a Converter
deviceTypes.add(new SelectItem(row[0],row[1]+""));
return deviceTypes;
During page rendering, page.jsp throws following exception:
javax.servlet.ServletException: Value is no String and component _id0:deviceTypeList does not have a Converter
Is this bug with MyFaces 1.1.1 or I have made something wrong?
I am a newbie & didnt know much about Converters hence read some examples from the web saying to have getObject() & getString methods . So i added below Class but not sure how to align with page.jsp page.
public class DeviceTypeConverter implements Converter{
protected final Log logger = LogFactory.getLog(getClass());
public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String s) throws ConverterException {
DeviceDao dao = new DeviceDao();
return dao.getdeviceTypes().(Long.decode(s));
public String getAsString(FacesContext facesContext, UIComponent
uiComponent, Object o) throws ConverterException {
if(o!= null)
logger.debug(o.toString());
try {
if((o!= null) && (o instanceof DeviceType)){
DeviceType dt = (DeviceType) o;
return ""+dt.getId();
else
return "0";
} catch (Exception e) {
logger.error(e);
throw new ConverterException();
Any pointers/suggestions on how to write a Converter & help in resolving the error will be highly appreciated
Regards
Bansi
Glad you found a way to make it work. I've got some ideas on improving this, as it is a little hacked together right now.
But first things first...
Does the models ArrayList really contain SelectItem
objects??? If so, why would you bother transfering
each SelectItem if it's already built.The models ArrayList doesnt contain SelectItems objects. It stores List of
DeviceType objects retrieved from Database via Spring business layer i.e.
models = deviceManager.getDeviceTypes() Then this line of code is wrong.
List<SelectItem> models = new ArrayList<SelectItem>();You are not creating a list of SelectItem objects. You are creating a list of DeviceType objects. It should be:
List<DeviceType> models = new ArrayList<DeviceType>();
What are the objects represented by row[0] and
row[1]?As models ArrayList contains Array of Objects i.e. multiple records (or
rows) i am using Object[] row to store the values. That means row[0] &
row[1] will contain column values for e.g. row[0] contains id values viz. 1,2,3
etc
What object does setSelectedDevice expect to
receive?setSelectedDevice sets the selected Device id value submitted from JSF
page into Backing BeanThis isn't what I was asking. I just want to know the java type object represented by row[0], row[1], and the java type object passed into setSelectedDevice. e.g: String, Integer, DeviceType, etc, or perhaps even the java primitive (int, char, boolean, etc...) if that's the case.
These two questions are related and important. The java object represented by row[0] needs to be the java object passed into the setSelectedDevice. Actually, just by looking at your code, I can tell you the setSelectedDevice requires a String argument. My bet is that row[0] is not a String.
As a side note... You shouldn't be making DB calls
from your bean getters or setters. DB calls can mean
a performance hit, and JSF will call the getters and
setters multiple times per page request (which means
you'll be doing multiple DB calls).... i started working on JSF-Spring-Hibernate project i always asked the
question on Best Practices and i totally agree with your point. Hence i use
Spring in the middle layer therefore i always call my Managers from
Backing Bean for e.g. TestBean calls deviceManager for
save,update,delete, getDeviceTypes,getDeviceTypes(String id)
Also i have a question for you on the best practice. What should be the
arguments to these save, update methods.
Do you think it should be individual field values as specified in backing
bean or should it be an objectUmm, I don't know. I'm sorry, I won't be much help to you here. I have not worked with Spring or Hibernate (yet). I can't advise you on those technologies (or how JSF would interface best with them).
Check out this topic and you might be able to glean some useful information from it.
http://forum.java.sun.com/thread.jspa?threadID=784351
Hope I've been of some help!
CowKing
Similar Messages
-
Hi All,
I have been reading a lot about drop-down boxes in JSF. Most of them have been very useful but have not been able to completely solve my problem here...
I have a very simple page that displays a dropdown with model-id numbers. There is also a button below the dropdown which when clicked takes the user to another page and says "You selected this model: <model-id number from dropdown>"
So far so good - all works fine. Now I wanted to add a description so that after clicking on the button I get the modelId as well as the model description - This just does not work - the page does not even come up and shows a lot of errors.
In order to show the description as well I used the SelectItem constructor that accepts a value and a label. I used the modelId as the label and the model-description as value.
Here is the jsp page code:
<h:selectOneMenu id="selectedModel" value="#{modelBean.selectedModel}">
<f:selectItems value="#{modelBean.models}" />
</h:selectOneMenu>Here is the java backing bean code:
This code is supposed to put the modelDescription as well - but does not work....
public List getModels(){
logger.debug("getting Models for display");
this.models = new ArrayList<SelectItem>();
for(Model model: modelIds){
models.add(new SelectItem(model.getDescription(),model.getModelId()));
logger.debug("Model added: " + model.getModelId() +" | " + model.getDescription());
return models;
public void setModels(List<SelectItem> modelsList){
logger.debug("setting Models frm display");
this.models = modelsList;
public String getSelectedModel(){
return this.selectedModel;
public void setSelectedModel(String selectedModel){
this.selectedModel = selectedModel;
}I get these errors:
On the browser:
javax.faces.el.EvaluationException: Expression: '#{modelBean.models}'
at net.sourceforge.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:463)
at javax.faces.component.UISelectItems.getValue(UISelectItems.java:55)
at net.sourceforge.myfaces.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:357)
at net.sourceforge.myfaces.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:300)
at net.sourceforge.myfaces.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:369)
at net.sourceforge.myfaces.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:328)
at net.sourceforge.myfaces.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:64)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:329)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:376)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:280)
at org.apache.jsp.gse.model_jsp._jspx_meth_h_selectOneMenu_0(org.apache.jsp.gse.model_jsp:306)
at org.apache.jsp.gse.model_jsp._jspx_meth_h_form_0(org.apache.jsp.gse.model_jsp:183)
at org.apache.jsp.gse.model_jsp._jspx_meth_f_view_0(org.apache.jsp.gse.model_jsp:147)
at org.apache.jsp.gse.model_jsp._jspService(org.apache.jsp.gse.model_jsp:92)
Caused by: javax.faces.el.EvaluationException: Bean: com.sigma.gse.view.ModelPageBean, property: models
at net.sourceforge.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:458)
at net.sourceforge.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:113)
at net.sourceforge.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:541)
at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
at net.sourceforge.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:438)
... 56 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sourceforge.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:454)
... 60 more
Caused by: java.lang.NullPointerException: value
at javax.faces.model.SelectItem.(SelectItem.java:55)
at com.sigma.gse.view.ModelPageBean.getModels(ModelPageBean.java:48)
... 65 more
On the Tomcat console:
ERROR - PropertyResolverImpl.getValue(117) | com.sigma.gse.view.ModelPageBean
javax.faces.el.EvaluationException: Bean: com.sigma.gse.view.ModelPageBean, property: models
at net.sourceforge.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:4
at net.sourceforge.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:113)
at net.sourceforge.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java
Code that worked:
public List getModels(){
logger.debug("getting Models for display");
List<SelectItem> models = new ArrayList<SelectItem>();
for(Model model: modelIds){
models.add(new SelectItem(model.getModelId()));
return models;
public String getSelectedModel(){
return this.selectedModel;
public void setSelectedModel(String selectedModel){
this.selectedModel = selectedModel;
I need help in figuring out what I am doing wrong? If you see there is very little difference between the code that worked and the above defective code.
Thanks a TOn in advance,
AnoopHi,
I am trying to dynamically populate a combo box at screenload. I aslo checked the codes that you have put up in the forum.
private List searchPMPCountys;
private List searchNCMs;
private String selNCM;
private String selPMPCounty;
private List searchUnassignedPatients;
public List getSearchNCMs() {
searchNCMs = new ArrayList(1);
searchNCMs.add(new SelectItem("Lynn"));
return searchNCMs;
public void setSearchNCMs(List searchNCMs) {
this.searchNCMs = searchNCMs;
public List getSearchPMPCountys() {
searchPMPCountys = new ArrayList();
List AllPMPCounty = patientmgr.getAllCounties();
if (AllPMPCounty != null) {
Iterator it = AllPMPCounty.iterator();
while (it.hasNext()) {
NcmCounty county = (NcmCounty)it.next();
searchPMPCountys.add(new SelectItem(county.getCountyName()));
//String startTag = ((SelectItem)searchPMPCountys.get(0)).toString();
return searchPMPCountys;
public void setSearchPMPCountys(List searchPMPCountys) {
this.searchPMPCountys = searchPMPCountys;
public String getSelNCM() {
return this.selNCM;
public void setSelNCM(String selNCM) {
this.selNCM = selNCM;
public String getSelPMPCounty() {
return selPMPCounty;
public void setSelPMPCounty(String selPMPCounty) {
this.selPMPCounty = selPMPCounty;
<td>
<h:selectOneMenu id="listingNCM" value="#{patientTool.selNCM}">
<f:selectItems value="#{patientTool.searchNCMs}" />
</h:selectOneMenu>
</td>
</tr>
<tr>
<td>
PMP County
</td>
<td>
<h:selectOneMenu id="listingPMPCounty" value="#{patientTool.selPMPCounty}">
<f:selectItems value = "#{patientTool.searchPMPCountys}" />
</h:selectOneMenu>
</td>
</tr>
I am new to web and in paticular to JSF. I was wondering if you any of you can guide me??
I could pull up the screen only once. But the components were not rendered properly I had to reload the screen and I am getting this error as shown below..
java.lang.IllegalArgumentException: Value binding of UISelectItems with id searchAsgn:_id11 does not reference an Object of type SelectItem, SelectItem[], Collection or Map but of type : null
at net.sourceforge.myfaces.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:393)
at net.sourceforge.myfaces.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:309)
at net.sourceforge.myfaces.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:355)
at net.sourceforge.myfaces.renderkit.html.HtmlRendererUtils.renderListbox(HtmlRendererUtils.java:321)
at net.sourceforge.myfaces.renderkit.html.HtmlListboxRendererBase.encodeEnd(HtmlListboxRendererBase.java:69)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:329)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:376)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:280)
at org.apache.jsp.pages.patientAssignment_jsp._jspx_meth_h_selectManyListbox_0(patientAssignment_jsp.java:1086)
at org.apache.jsp.pages.patientAssignment_jsp._jspx_meth_h_form_0(patientAssignment_jsp.java:473)
at org.apache.jsp.pages.patientAssignment_jsp._jspx_meth_f_view_0(patientAssignment_jsp.java:229)
at org.apache.jsp.pages.patientAssignment_jsp._jspService(patientAssignment_jsp.java:114)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at us.in.state.isdh.cdms.ncm.web.MessageFilter.doFilter(MessageFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at net.sourceforge.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:404)
at net.sourceforge.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:241)
at net.sourceforge.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:287)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at us.in.state.isdh.cdms.ncm.web.MessageFilter.doFilter(MessageFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
There is no server error. I am using Tomcat server..
Thanks,
Raji -
CSS Drop Down Menu Problem (only in IE)
Hi Folks,
I have just added a new drop down menu and it seems to work perfectly in every other browser except IE.
In IE the cursor makes the next menu item along drop down and not the one that's hovered over.
I have removed the jquery script and the same problem occurs, so I reckon it must be a CSS problem. Here's the CSS code in case anyone has any ideas what the problem is.
Any suggestions would be hugely appreciated cos I can't figure it out .
Cheers
Dave
/*Navigation Menu Style*/
#topmenu{
#topmenu #nav, #nav ul{
font-size:10.5px;
font-weight:bold;
margin:0;
list-style-type:none;
list-style-positionutside;
position:relative;
line-height:35px;
background-color:#006699;
width:100%;
text-align:left;
#topmenu #nav a{
display:block;
padding:0px 5px 0px 10px;
width:145px;
border-left-color:#006699;
background-color:#006699;
color:#fff;
text-decoration:none;
text-transform:uppercase;
#topmenu #nav a:hover{
color:#CFF;
#topmenu #nav li{
float:left;
position:relative;
#topmenu #nav ul {
position:absolute;
display:none;
width:160px;
top:35px;
#topmenu #nav li ul{
/*padding-bottom:20px;*/
#topmenu #nav li ul a{
width:180px;
height:35px;
float:left;
text-transform:capitalize;
#topmenu #nav li ul a:hover{
text-decoration:underline;
#topmenu #nav ul ul{
top:auto;
#topmenu #nav li ul ul {
left:180px;
margin:0px 0px 0px 10px;
#topmenu #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul{
display:none;
#topmenu #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul{
display:block;
/*Navigation Menu Style Ends */I think that is fine but it did get converted to a smiley face you are right. This is how it looks
#topmenu #nav, #nav ul{
font-size:10.5px;
font-weight:bold;
margin:0;
list-style-type:none;
list-style-position:outside;
position:relative;
line-height:35px;
background-color:#006699;
width:100%;
text-align:left;
it's all on a local set up right non but I will try to pop it up and post a link.
The symptoms are easy to describe though. When you hover over a top level menu item, the list drops down under the link directly to the right.The positioning isn't random, it is exactly in line, just under the wrong heading.
In every other browser it seems to be fine. -
DW Pop-Up / Drop-Down Menu Problems
Hi. I am new to this forum and I am not a pro web designer
(but am proficient with web / graphic design software), so bear
with me...
I am using Dreamweaver MX and Fireworks MX (not the 2004
versions) to re-design a new website for my photography biz (I am,
of course, using PhotoShop for some graphics/images too).
I want to use a horizontal navigation bar (with 9 buttons)
and drop-down menus on the new site.
My first attempt was to design the nav bar in FW and export
it into DW (preferably into a Template). The nav bar design (w/
drop-down menus) in FW was simple. Exporting was also simple.
However, I experienced major problems when inserting the "piece"
into a FW document (I use "tables" and not "frames"; no CSS nor
Flash).
Once the nav bar is inserted into a DW table, it doesn't work
in the Browser (latest version of Safari; I use a Mac PowerBook).
Some times, it did work, but most others, it did not. FRUSTRATING.
I then decided to simply design the nav bar "buttons" in FW
(with simple roll-over to change text color / size on each button)
and realized that DW can also do Drop-Down / Pop-Up menus. This was
successful at first, but now when I try to insert numerous buttons
into a DW document (multi-row and column table), I get the same
result in that the d-d menus do not work when viewing in the
browser (but the roll-over text effect does work). STILL
FRUSTRATING.
I have also tried to save the nav bar / buttons as Library
Items, but to no avail. This is rather important should I decide to
one day change the navigation on the site (it will have over 25
pages to start with).
I have been on the Adobe site and have read numerous tech
reports to try and solve this. I have also come across a few notes
on this forum, so decided to give it a shot. Quite simply:
1. Am I wasting my time using an older version of DW and FW
(even though I have no interest in using fancy Flash stuff and have
no interest in being a pro web designer; I do want to do my own
site and maintain it though...). Should I upgrade to Version 8 of
the suite?
2. I see that some third-party software is available to do
Drop-Down menus. Should I take this route? Will these extensions
work in the older version of DW?
3. My nav bar will be relatively simple, both in appearance
and functionality. So, I do not need any extravagant type of
software. Can anyone recommend something for me?
4. The following link is the only attempt that I had at
getting the nav bar to operate both locally on my browser and
uploaded on to my host server. I am not 100% happy with the
appearance, but when I went to change it, I had the same problems
detailed above (i.e., it didn't work). This example was done with
FW into DW. It was simply a test (to see if uploading the page on
to the server would get the drop-downs to work), so none of the
links have been inserted into the menu selection tabs.
http://www.vagabondvistas.com/test/home_page_test.html
Thanks for your help. Sorry about the long message, but I
wanted to include enough detail such that you wouldn't have to come
back to me for numerous questions...
Dave> 1. Am I wasting my time using an older version of DW and
FW (even though
> I
> have no interest in using fancy Flash stuff and have no
interest in being
> a pro
> web designer; I do want to do my own site and maintain
it though...).
> Should
> I upgrade to Version 8 of the suite?
Depending on your expertise level, DMX may be all you you
need. But where
you are wasting your time is by fiddling with these awful
pop-up menus.
Those who understand them left them behind when they were
first introduced.
Read this -
http://apptools.com/rants/jsmenu.php
http://apptools.com/rants/menus.php
> 2. I see that some third-party software is available to
do Drop-Down
> menus.
> Should I take this route? Will these extensions work in
the older version
> of
> DW?
Yes, and yes, and don't think twice about doing it! Use the
PVII methods or
commercial products. They are what you need.
> 3. My nav bar will be relatively simple, both in
appearance and
> functionality.
> So, I do not need any extravagant type of software. Can
anyone recommend
> something for me?
If really simple, check even the MiniMenus from
http://www.fourlevel.com
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"VagabondVistas" <[email protected]> wrote
in message
news:[email protected]...
> Hi. I am new to this forum and I am not a pro web
designer (but am
> proficient
> with web / graphic design software), so bear with me...
>
> I am using Dreamweaver MX and Fireworks MX (not the 2004
versions) to
> re-design a new website for my photography biz (I am, of
course, using
> PhotoShop for some graphics/images too).
>
> I want to use a horizontal navigation bar (with 9
buttons) and drop-down
> menus
> on the new site.
>
> My first attempt was to design the nav bar in FW and
export it into DW
> (preferably into a Template). The nav bar design (w/
drop-down menus) in
> FW
> was simple. Exporting was also simple. However, I
experienced major
> problems
> when inserting the "piece" into a FW document (I use
"tables" and not
> "frames";
> no CSS nor Flash).
>
> Once the nav bar is inserted into a DW table, it doesn't
work in the
> Browser
> (latest version of Safari; I use a Mac PowerBook). Some
times, it did
> work,
> but most others, it did not. FRUSTRATING.
>
> I then decided to simply design the nav bar "buttons" in
FW (with simple
> roll-over to change text color / size on each button)
and realized that DW
> can
> also do Drop-Down / Pop-Up menus. This was successful at
first, but now
> when I
> try to insert numerous buttons into a DW document
(multi-row and column
> table),
> I get the same result in that the d-d menus do not work
when viewing in
> the
> browser (but the roll-over text effect does work). STILL
FRUSTRATING.
>
> I have also tried to save the nav bar / buttons as
Library Items, but to
> no
> avail. This is rather important should I decide to one
day change the
> navigation on the site (it will have over 25 pages to
start with).
>
> I have been on the Adobe site and have read numerous
tech reports to try
> and
> solve this. I have also come across a few notes on this
forum, so decided
> to
> give it a shot. Quite simply:
>
> 1. Am I wasting my time using an older version of DW and
FW (even though
> I
> have no interest in using fancy Flash stuff and have no
interest in being
> a pro
> web designer; I do want to do my own site and maintain
it though...).
> Should
> I upgrade to Version 8 of the suite?
>
> 2. I see that some third-party software is available to
do Drop-Down
> menus.
> Should I take this route? Will these extensions work in
the older version
> of
> DW?
>
> 3. My nav bar will be relatively simple, both in
appearance and
> functionality.
> So, I do not need any extravagant type of software. Can
anyone recommend
> something for me?
>
> 4. The following link is the only attempt that I had at
getting the nav
> bar
> to operate both locally on my browser and uploaded on to
my host server.
> I am
> not 100% happy with the appearance, but when I went to
change it, I had
> the
> same problems detailed above (i.e., it didn't work).
This example was
> done
> with FW into DW. It was simply a test (to see if
uploading the page on to
> the
> server would get the drop-downs to work), so none of the
links have been
> inserted into the menu selection tabs.
>
> <a target=_blank class=ftalternatingbarlinklarge
> href="
http://www.vagabondvistas.com/test/home_page_test.html
>
> ">
http://www.vagabondvistas.com/test/home_page_test.html
>
> </a> Thanks for your help. Sorry about the long
message, but I wanted to
> include enough detail such that you wouldn't have to
come back to me for
> numerous questions...
>
> Dave
> -
Spry region drop-down list problems in IE
Can someone please help me determine the reason that IE does not display the correct item in a spry region drop-down list when first opening the site. You can see the problem at http://www.minursemap.org/agedistnurse.html. The initial item in the drop-down list should be Alcona with the corresponding graphic displayed in the detail region. In Firefox, this works correctly. When first opening the page in IE, the graphic is Alcona, but the drop-down list displays Wexford (the last item in the list). From then on, all of the links work correctly.
The code for the two regions is below. Thanks in advance for assisting someone new to spry.
<div id="ctyname">
<div spry:region="dsChartNurse">
<select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
<option value="{ds_RowID}">{name}</option>
</select>
</div> <!--spry:region close -->
</div><!--ctyname close -->
<div id="image">
<div spry:detailregion="dsChartNurse">
<div align="center" style="padding-bottom:15px"><img src="{dataimage}" width="405" height="202" />
</div><!--un-named div close -->
</div><!-- spry:detailregion close -->
</div><!--image close -->Try the following code to replace yours:
<select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
<option spry:if="{dsChartNurse::ds_RowID}=={dsChartNurse::ds_CurrentRowID}" spry:selected="selected" value="{ds_RowID}">{name}</option>
<option spry:if="{dsChartNurse::ds_RowID}!={dsChartNurse::ds_CurrentRowID}" value="{ds_RowID}">{name}</option>
</select>
I hope this helps.
Ben -
Developer toolbox, Editable drop down encoding problem
Hi
I'm using DW CS3 with Developer toolbox, PHP MySql.
Problem is that Editable drop down show national characters
wrongly.
actually its inserts data in to database with wrong encoding.
I use encoding "charset=utf-8", all other forms working fine.
Only Editable drop down show [squares] instead Ä Ö
Ü ...
How i can do that Editable drop down will inserts data in
utf-8 encoding?
(like other forms and fields in my page)
Thanks!I already read that one (and a few others) but it never
solved my
problem, but perhaps it will help Markokiz
Dooza skrev:
> Maybe this will help:
>
http://dev.mysql.com/doc/refman/5.0/en/charset-server.html
>
> Steve
>
> kim wrote:
>> Hi,
>>
>> I had a similar problem recently (not with tool box
though) and I gave
>> up using UTF-8 and went with charset=iso-8859-1
instead. It seemed (in
>> my case) that whenever data was being submitted from
a page to the DB
>> and then pulled back out I got the problem. I guess
it's some setting
>> in the MySQL but I just couldn't figure out where.
This is only the
>> case when I'm working with Danish characters. Maybe
it could help you
>> with your problem... maybe not.
>>
>> Markokiz skrev:
>>> Hi
>>> I'm using DW CS3 with Developer toolbox, PHP
MySql.
>>> Problem is that Editable drop down show national
characters wrongly.
>>> actually its inserts data in to database with
wrong encoding.
>>> I use encoding "charset=utf-8", all other forms
working fine. Only
>>> Editable drop down show [squares] instead ? ? ?
>>> How i can do that Editable drop down will
inserts data in utf-8
>>> encoding? (like other forms and fields in my
page)
>>> Thanks!
>>>
>>>
>>
>
Kim
http://www.geekministry.com -
Helo,
I am not able to view any of the drop down menus that are present in websites like http://indiaitaly.com/main.asp or others. Kindly tell me how to fix it.
Thank you so much in advance
POWERBOOKG4 Mac OS X (10.4.6)Welcome to Apple's Users Help Users Forums, brand new. :~)
Hi ES,
Glad the problem is fixed. You got some great help from ~Bee & Ferd. You have rewards to hand out.
Gold Star = Helpful = 5 pts w 2 available and Green Star = Solved = 10 pts
Quote from the emails Apple sends re threads:
"===============================================
IF YOU ARE THE AUTHOR OF THE ORIGINAL QUESTION:
===============================================
When you return to view the answers, please mark responses appropriately. Simply login and select the value you desire for applicable responses. As the author of the original question, you may assign a helpfulness value to responses. Please use the following when rating a response:
None: The response was simply a point of clarification to my original question or didn't really help.
Helpful: This response helped with a portion of my question, but I still need some additional help.
Solved: This response has solved my problem completely.
WHY SHOULD I DO THIS?
In short, here are 3 reasons why it's worth a few moments of your time:
1) Other members have taken time out of their day to assist you, so please take a moment to give them credit for the assistance they have provided.
2) Your rating not only helps your peers earn points toward their status in Discussions, but validates the quality of the solution you've received.
3) Other readers will be able determine which response(s) helped solve the original question, which will greatly enhance the knowledge and experience for all community members and visitors.
===============================================
We appreciate your participation in Apple Discussions. Thank you for being part of our community.
Apple Discussions Team"
======================
If the forums can help you w any thing else, welcome back. JP -
Hi
I have two drop down lists.
One called P2_PRODUCT_GROUP which has a LOV.
Also another called P2_PRODUCTS which has another LOV.
I want P2_PRODUCTS to be filtered based on the selection I make in P2_PRODUCT_GROUP.
I've used the following SQL statement for the P2_PRODUCTS LOV:
select PRODUCT d, ID r
from PRODUCT
where ID = :P2_PRODUCT_GROUP
When I run the page, it doesnt display anything in the P2_PRODUCTS drop down list at all, even after I select a PRODUCT in P2_PRODUCTS nothing shows in P2_PRODUCT_GROUP.
What am I doing wrong?
Regards
Adam
Message was edited by:
user582756Hi Adam,
that's the classical cascading lov problem. It's not necessary to do a page submit roundtrip, you can use AJAX instead.
Have a look at Carl Backstrom's AJAX example at http://htmldb.oracle.com/pls/otn/f?p=11933:37 or have a look at my generic cascading lov which is part of the ApexLib Framework http://inside-apex.blogspot.com/2006/11/generic-solution-for-depending-select.html
BTW, my solution also can handle a popup lov as a master.
Patrick
My APEX Blog: http://inside-apex.blogspot.com
The ApexLib Framework: http://apexlib.sourceforge.net
The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/ -
I have a small problem, don't know if you can help at all. I have have upgraded to the latest version of spry and created my spry menu in Dreamweaver CS3. It works great in firefox, but in IE7 the drop down menu jumps up to the top of the browser window, instead of below the menu bar.
When I check using the browser compatibility function in CS3, I get a message "Expanding Box Problem" with the following lines of code highlighted:
<ul>
<li><a href="testimonials extra.html">Extra</a></li>
<li><a href="testimonials defender.html">Defender II</a></li>
</ul>
Here is link to the site, so you can take a look
http://www.efptproducts.com/
Any ideas or help would be greatly appreciated ?
regards,
BillHi again,
Not sure if you need it, but following is the spry css file code:
@charset "UTF-8";
/* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */
/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
LAYOUT INFORMATION: describes box model, positioning, z-order
/* The outermost container of the Menu Bar, an auto width box with no margin
or padding */
ul.MenuBarHorizontal
/* Set the active Menu Bar with this class, currently setting z-index to
accomodate IE rendering bug:
http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
ul.MenuBarActive
z-index: 1000;
height: 33px;
font-family: Trebuchet, "Trebuchet MS", sans-serif;
color: #FFFF00;
font-weight: bold;
/* Menu item containers, position children relative to this container and
are a fixed width */
ul.MenuBarHorizontal li
/* Submenus should appear below their parent (top: 0) with a higher z-index,
but they are initially off the left side of the screen (-1000em) */
ul.MenuBarHorizontal ul
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we
set left to auto so it comes onto the screen below its parent menu item */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
/* Menu item containers are same fixed width as parent */
ul.MenuBarHorizontal ul li
/* Submenus should appear slightly overlapping to the right (95%) and up
(-5%) */
ul.MenuBarHorizontal ul ul
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we
set left to 0 so it comes onto the screen */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
DESIGN INFORMATION: describes color scheme, borders, fonts
/* Submenu containers have borders on all sides */
ul.MenuBarHorizontal ul
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal a
/* Menu items that have mouse over or focus have a blue background and white
text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
/* Menu items that are open with submenus are set to MenuBarItemHover with a
blue background and white text */
ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal
a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
background-color: #33C;
color: #333333;
font-family: Trebuchet, "Trebuchet MS", sans-serif;
SUBMENU INDICATION: styles if there is a submenu under a given menu item
/* Menu items that have a submenu have the class designation
MenuBarItemSubmenu and are set to use a background image positioned on the
far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenu
background-image: url(../images/MB%20Dark%20Thin.jpg);
background-repeat: repeat-x;
background-position: 95% 50%;
font-family: Trebuchet, "Trebuchet MS", sans-serif;
font-size: 14px;
font-style: normal;
font-weight: bold;
color: #FFFF00;
/* Menu items that have a submenu have the class designation
MenuBarItemSubmenu and are set to use a background image positioned on the
far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
background-image: url(../images/MB%20Light%20Thin.jpg);
background-repeat: repeat-x;
background-position: 95% 50%;
font-family: Trebuchet, "Trebuchet MS", sans-serif;
font-size: 14px;
font-style: normal;
font-weight: bold;
color: #000000;
width: 120px;
/* Menu items that are open with submenus have the class designation
MenuBarItemSubmenuHover and are set to use a "hover" background image
positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
background-image: url(../images/MB%20Light%20Thin.jpg);
background-repeat: repeat-x;
background-position: 95% 50%;
font-family: Trebuchet, "Trebuchet MS", sans-serif;
font-size: 14px;
font-style: normal;
font-weight: bold;
color: #000000;
/* Menu items that are open with submenus have the class designation
MenuBarItemSubmenuHover and are set to use a "hover" background image
positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
background-image: url(../images/MB%20Light%20Thin.jpg);
background-repeat: no-repeat;
background-position: 95% 50%;
font-family: Trebuchet, "Trebuchet MS", sans-serif;
font-size: 14px;
font-style: normal;
font-weight: bold;
color: #000000;
BROWSER HACKS: the hacks below should not be changed unless you are an
expert
/* HACK FOR IE: to make sure the sub menus show above form controls, we
underlay each submenu with an iframe */
ul.MenuBarHorizontal iframe
/* HACK FOR IE: to stabilize appearance of menu items; the slash in float is
to keep IE 5.0 from parsing */
@media screen, projection
ul.MenuBarHorizontal li.MenuBarItemIE
display: inline;
f\loat: left;
background: #FFF;
font-family: Trebuchet, "Trebuchet MS", sans-serif; -
Hi,
I have 2 views 'BUSINESS' and 'PROPERTY' ...Both the views contains one node each with cardinality 0:n, and both view contains drop down by key Ui element... coding i have done in 'wddoinit' method. the drop down coding is working fine for view 'property', but for view 'BUSINESS', its giving assert condition violated.....
plz help me to resolve this problem.... i need drop down for cardinality 0:n... is it possible..Hi ,
Am using different nodes in both the views....The nodes cardinality is 0:n.... My coding is,it is written in wddoinit.
DATA:
NODE_BUSINESS TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_BUSINESS TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_BUSINESS TYPE IF_MOD_BUSINESS=>ELEMENT_BUSINESS ,
ITEM_CITYID LIKE STRU_BUSINESS-CITYID.
navigate from <CONTEXT> to <BUSINESS> via lead selection
NODE_BUSINESS = WD_CONTEXT->GET_CHILD_NODE( NAME = `BUSINESS` ).
DATA LCO TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
CALL METHOD NODE_BUSINESS->GET_NODE_INFO
RECEIVING
NODE_INFO = LCO.
DATA L1 TYPE TABLE OF WDR_CONTEXT_ATTR_VALUE.
DATA W1 TYPE WDR_CONTEXT_ATTR_VALUE.
DATA L2 TYPE STANDARD TABLE OF ZPRM_TBL_CITY.
DATA W2 TYPE ZPRM_TBL_CITY.
SELECT * FROM ZPRM_TBL_CITY INTO TABLE L2.
SORT L2 BY CITYID.
DELETE ADJACENT DUPLICATES FROM L2 COMPARING CITYID.
LOOP AT L2 INTO W2.
W1-TEXT = W2-CITY_NAM.
W1-VALUE = W2-CITYID.
APPEND W1 TO L1.
ENDLOOP.
CALL METHOD LCO->SET_ATTRIBUTE_VALUE_SET
EXPORTING
NAME = 'CITYID'
VALUE_SET = L1. -
I have a drop-down list that I have populated. When an item is chosen from the drop-down list it automatically shows the code for that item in another field. I have put these codes in in the Binding section. The problem I'm having is that if a person chooses an item from the drop-down list and then change their mind, the code from the original item stays in the field as well as the new item code.
Is there any way that the field can automatically change to the new item code?
Thanks.Hi,
In the change event of the drop down you can use code similar to;
TextField1.rawValue = this.boundItem(xfa.event.change);
Where TextField1 will be your field that needs to be keep in sync.
Here's an example that might help, https://acrobat.com/#d=p*6x4WA4w8NDDlMvq*aspg
Bruce -
Serial resourse name drop down menu problem in built versions of software.
Hi,
I have developed Labview programs to test new PCBs as they come off the production line, by stimulating the PCBs via RS232 serial. These programs work well on my development PC, and have been built as appilcations with installer ready to be transferred to the test PC, so our production department can use them. The problem is that when I install the built applications onto the production PC, the serial resource name selection drop down menu is grayed out and disabled. This stops anyone from being able to select the correct serial port.
I am using Labview 6.1, Windows XP.
Regards,
Wardo.My first guess is that you have not installed VISA on the target machine.
See the link below: -
http://search.ni.com/nisearch/nisearchservlet?nistype=default&ddown=2&filter=%2Btaxonomy:%22Drivers+And+Updates%22&q=visa+windows
My second is that there is no serial port. -
Fireworks drop down menu problem in explorer 7 help
I created a fireworks drop down menu for my website which
usually shows the 'up' label, in this case January, February etc
once activated, but now this only shows when the mouse moves over
it and then the 'down' state shows correctly. Has anyone
experienced this problem and if so can you offer a solution? The
drop down is at
http://www.laserbattlefield.co.uk/index.html
and its the photo gallery label which has the drop down.
Thanks.Debbie
Welcome to the Apple Discussions.
when I attempt to use these programs, and I choose a drop down menu from the top title bar, a lot of the options on the menus are in gray, and they do not work. Does this mean the only give you the preview of the program?
No Debbie you have the full version. However, if these options and commands are not available (are gray) then it means that the objects the operate on are not selected. So, in iPhoto for instance, under the File menu, I cannot ‘Edit a Smart Album’ unless I have selected a Smart Album first. I cannot create an Event unless I have selected a photo to make that Event with, and so on.
If you’re new to Macs check out here: http://www.apple.com/support/mac101/
If you’ve switched from Windows, check out here: http://www.apple.com/support/switch101/
For help with the iLIfe applications specifically: http://www.apple.com/ilife/tutorials/#iphoto
Regards
TD -
I am currently redesigning a website for the company I work
in-house for and am having IE problems.
The site includes both a Accordion Spry and a Spry menu.
Which look and function as they should in all other browsers except
IE (but of coarse). What happens is when the site is viewed in IE
the drop down links have space between them and a gray border
around the drop down. Also for some strange reason the word "false"
apaers in the background of the drop down.
Which I can only conclude is from the imported style sheet,
but I have no idea why. I have tried removing the spry menu and
create the menu in css but still no luck.
If any one can help it will be appreciated.
Thank you
The test site is at:
http://www.leaf-financial.com/newsite/index.htmlHello,
The problem for the false is a known bug we have for the Spry
Menu in a solution for another IE bug. You'll have to go in your
CSS and look for this class "ul.MenuBarVertical iframe". Inside you
should add the following line:
filter:alpha(opacity:0.1);
and that element behind the menu will disappear. I am not yet
sure why you have the other problem with the menu spacing but I
will try to investigate later.
Cristian -
[JS][CS3] Drop down menu problem
Hi
I am trying to use a drop down menu inone of my dialogs. The emnu is showing, but i cannot select it.
myDialog = new Window ('dialog', 'Name',[50,50,350,370]);
myDialog.frameLocation = [300,200];
var myListItems = ["One","Two","Three"];
var myList = myDialog.add('dropdownlist',undefined,myListItems);
myList.selection = 1;
myList.bounds = [20,200,100,20];
myDialog.show();
Any ideas where I cam going wrong?
It seems to be when I am entering the bounds of the list, but I do need to place this list carefully.
RoyHarbs. wrote:
Or Rapid ScriptUI...
http://www.scriptui.com/
Harbs
Thanks for the plug...
I was really trying hard not to advertise, but rather to advocate the correct way to use ScriptUI.
However once it was brought up let me just say a word. Most apps that automatically create dialogs will use co-ordinates and bounds, overriding the default layout manager. In that Rapid ScriptUI is different, since it shows you how to manipulate position of elements without using layout manager.
The $2 script, while still existing, is a really old version of the library, however the professional version is extremely capable and outputs code which is really easy to understand and edit if necessary.
I did not realize that some countries don't allow paypal. But if its an issue, contact me via prvt or contact page on scriptui.com and we could try to work something out.
Steven Bryant
http://scriptui.com
Maybe you are looking for
-
I installed imovie 06 and now idvd08 does not work. I have tried the different solutions offered on this forum but nothing works. Can anyone help?
-
Problem in accessing KM from portal development
Hi all, I want to access CM repository stored in KM of portal. for that i have followed following steps. http://help.sap.com/saphelp_nw2004s/helpdata/en/42/60aef8032c1422e10000000a114cbd/frameset.htm but i am facing the problem that how to access rep
-
Itune showing white screen(ipad3)
itune showing white screen after upadating my iPad3 to iOS6. does anyone have a solution for it or facing same problem. seems like iOS6 has some issues better not to update.
-
Troubles opening files from Lightroom 5.3 to Photoshop sinds update.
I did the update to Lightroom 5.3 and i use Photoshop 13.0.6. When i open an image from lightroom into Photoshop i always get the undeveloped image. How can i get the developped image into photoshop?
-
Hi guys, I own a mac pro 2.8 ghz quad core since july this year. The built in superdrive is an optiarc AD-7170A. I burnt a lot if discs using toast 9.02 since then. But due to the instable behavior of this program i tried the newest version of nti dr