Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Pia Pringle

Greenhorn
+ Follow
since Jun 05, 2006
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 Pia Pringle

I'm getting the following error when trying to use Struts-menu

javax.servlet.jsp.JspException: The menu repository could not be found

What is going on ?

My JSP is simple. It is the following :

<%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>

<html>
<menu:useMenuDisplayer name="TabbedMenu"
bundle="org.apache.struts.action.MESSAGE">
<menu isplayMenu name="Home"/>
<menu isplayMenu name="About"/>
</menu:useMenuDisplayer>
</html>

In my WEB.xml file I have the following :

<taglib>
<taglib-uri>/WEB-INF/struts-menu.tld</taglib-uri>
<taglib-locationhttp://struts-menu.sf.net/tag</taglib-location>
</taglib>
13 years ago
Happy Now ???
13 years ago
Now I'm getting the following error :

javax.servlet.jsp.JspException: The menu repository could not be found

What is going on ?
13 years ago
Done,

Can I now get a relevant response to my question
13 years ago
Hi,

I'm having great difficulty getting struts-menu to work. I've put the struts-menu jar in the WEB-INF/lib folder. All the necessary accompanying jars are present. But on loading the following jsp I get this error message:

/pia.jsp(1): Could not parse deployment descriptor: java.io.IOException: cannot resolve 'http://struts-menu.sf.net/tag' into a valid tag library
probably occurred due to an error in /pia.jsp line 1:
<%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>


My JSP is simple. It is the following :

<%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>

<html>
<menu:useMenuDisplayer name="TabbedMenu"
bundle="org.apache.struts.action.MESSAGE">
<menu:displayMenu name="Home"/>
<menu:displayMenu name="About"/>
</menu:useMenuDisplayer>
</html>

In my WEB.xml file I have the following :

<taglib>
<taglib-uri>/WEB-INF/struts-menu.tld</taglib-uri>
<taglib-locationhttp://struts-menu.sf.net/tag</taglib-location>
</taglib>

Is this correct ? What am I doing wrong ?
13 years ago
Merrill,

Thank you so much for your guidance. I really appreciate it !! I finally got the behaviour I was looking for. I have another question for you.

I am using an onblur event to validate one of my date fields and I also have this image next to it, that when clicked pops up a calendar from where the user can choose a date.

If the date is invalid, the validation message pops up but if the person tries to hit the calendar icon, it keeps popping up and the only way to fix the problem is to manually input the correct value in the date field.

Is there a way where I can try to tie in use of the calendar icon so that the onblur event doesn't shoot off so quickly.

I had tried using the onchange event which works if I enter the text manually, but I use the Calendar to populate the field my validations are fired off at all.

Do you have any ideas ?

Thanks again,
Pia
14 years ago
Merrill,

Never mind... I think I got it to work. There was a problem in my ActionForm. But it's good now
14 years ago
14 years ago
<logic resent name="ppolistform" property="allAvailablePPOs">;
var selectBox = '<select class="tabletitle4" name="ppoentry['+newPPOsize+'].ppoID>';
<logic:iterate id="result" name="ppolistform" property="allAvailablePPOs">;
<bean efine id="ppoName" name="result" property="name"/>;
<bean efine id="ppoId" name="result" property="ppoId"/>;
var ppoID = <bean:write name="ppoId"/>;
selectBox += '<option value='+ ppoID + '><bean:write name="result" property="name"/></option>';
</logic:iterate></logic resent>
selectBox += '</select>';
return selectBox;
14 years ago
Hi Merrill,


Good news, the other two fields excepting the ppoID one which I mentioned is returning a null. Just need to get this value to update.
14 years ago
Hi Merrill,

Thanks for the apology. I did get what you were saying concerning the Struts tags etc. and removed them before your last post. Your idea concerning removing the logic tags from the innerHTML is a good one.

Another thing is..... on trying to submit my form with the one new row added. I do the following in my Action just to see if things are being added to the Form Bean:



he size prints out correctly with a value of one. However the ppoID corresponding to the value in the select tag is "null". Do you know what I'm missing here.
14 years ago
Hi Merrill,

Thanks for the apology. I did get what you were saying concerning the Struts tags etc. and removed them before your last post. Your idea concerning removing the logic tags from the innerHTML is a good one.

Another thing is..... on trying to submit my form with the one new row added. I do the following in my Action just to see if things are being added to the Form Bean:

14 years ago
Ok.


What's wrong with my concatentation ?

Java Bean naming conventions I thought were obeyed. If my instance variable is ppoName, then the getter/setter should be get/set PpoName where you capitalize on the first letter.

I really appreciate your help thus far, but there's no reason to behave that way. But whatever
14 years ago
Ok Can you help me with my first question concerning the problem with using the size variable and concatenating it to the rest of the object name

Please Merrill, I'm really close to figuring this out. Just a bit more guidance
14 years ago
Merrill,

I know about the use of the "innerHTML" tag. In fact, this is my function:




and it works in that new rows are in fact added.

My function to insert a "Select" tag is the following:


And this works !!!. It appears that the Struts tags are just stripped/replaced by normal HTML Tags. My problem is that for some reason when I try to concatenate the index to insert with the rest of the array as in ppoEntry[' + index + ']' it doesn't like this, but if I hardcode ppoEntry[0] it takes it.

Secondly,it can't seem to understand ppoEntry[index].pPOName - it understands up to ppoEntry[index] but then complains about the error I indicated in my last post.

Clarification needed. OK with the first few rows which aren't added with the button, these are created with logic:iterate tags but they represent elements in a different list. I want to add new row items to a new list, which will then populate some database tables in the backend.

Ok first things first... Do you know why I'm getting the first error mentioned above. At first I thought that the size attribute was probably misinterpreted because it's a number instead of a string but no such luck.
14 years ago