Martin Riedl

Greenhorn
+ Follow
since Sep 06, 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 Martin Riedl

Let's see if i'm able to describe this correctly In German this would be much easier.
We are currently discussing possibilities to work with 2 different windows in our Struts-Application. What we went to do is: we have a Form in Windows1
where you can type in a search pattern for users and search for all matching users by submitting one button. The result of the search should be displayed as a List of differnet users in Windows2 with every single user as link. By clicking one of the users Windows2 should be closed and the TextBox of Windows one should be updated with the whole username.
I'm sure it can be achieved by using some JavaScript - but i'm not a friend of JavaScript.
Any suggestions or solutions? Maybe some of you already worked with different windows in Struts?
Thx in advance
Martin
18 years ago
i know that this topic has been discussed earlier and i already have one version of indexed properties on another jsp that runs - but this time i have serious trouble.
I have an ActionForm-Bean which contains a String-Array of Beans.
----CODE----
private ListBean[] beans;
private ListBean bean;
public ListBean[] getBeans()
{
return beans;
}
public void setBeans(int index, ListBean bean)
{
beans[index] = bean;
}
public void setBean(int index, ListBean value)
{
beans[index] = value;
}
public ListBean getBean(int index)
{
return (ListBean) beans[index];
}
--Code end
This code in my jsp look like:
<html:form action="list.do?method=copy" >
<table width="400" border="0" >
<logic:iterate id="speech"
indexId="ctr"
name="CopyListFormBean"
property="beans"
type="istd.client.td.beans.ListBean" >
<tr>
<td width="20%">
<html:checkbox property='<%= "beans[" + ctr + "].copy" %>' />
</td>
<td>
<bean:write name="CopyListFormBean" property='<%= "beans[" + ctr + "].sprache" %>' />
<html:hidden property='<%= "beans[" + ctr + "].sprachId" %>' />
<html:hidden property='<%= "beans[" + ctr + "].listId" %>' />
</td>
</tr>
</logic:iterate>
<tr>
<td>
 
</td>
<td>
<html:submit />
</td>
</tr>
</html:form>
When Submitting the Form i get the 'popular' ErrorMessage
java.lang.NullPointerException
at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:497)
at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:410)
at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:749)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:780)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:793)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726)
Any Idea? I'm totally frustrated - maybe i need a break.
18 years ago
sometimes it's very useful to read some older posts
the Post 'This has to be easy!' handled a similar problem - i modified my code a bit and now it works - thanks
18 years ago
I got the following problem:
I created a Form for starting a query to the database with 8 different Criterias. I implemented the criterias as a seperate class (bean) with the properties 'from' and 'to' and 'displayName'.
In my ActionForm i nest this criterias as an array of these classes. I pre-populate this array in my reset-method of the ActionForm
----code---
criterias = new QueryCriteria[allSorter.length];

for(int i = 0; i < allSorter.length; i++)
{
QueryCriteria crit = new QueryCriteria();
crit.setDisplayName(displayNames[i]);
crit.setCritName(allSorter[i]);
crit.setFrom(null);
crit.setTo(null);
criterias[i] = crit;
}
---code---
allSorter is a String Array holding the criteria-types
so i get an array of 8 QueryCriteriaObjects (e.G. vendornumber, date)
in my jsp-page i iterate over this array to display the text-input-fields and render the display-name - all works fine. But by typing in some values in my text-fields and submitting the Form - the QueryCriteria-Properties 'From' and 'To' stay null.
What's really strange is when populating in the reset-Method with setting 'From' and 'To' to e.g. 'Test' - this 'Test'-String is displayed in my Jsp-Form - so there has to be some kind of link to my object.
Here's the part of my jsp-Page
----Code---
<logic:iterate id="result" name="QueryFormBean" property="criterias"
type="istd.client.td.beans.QueryCriteria">
<bean:write name="result" property="displayName" />
<html:text property="from" name="result" size="20" />
<html:text property="to" name="result" size="20" />
</logic:iterate>
---Code---
I hope i was able to describe this precisely enough and anyone can help.
Thanks
18 years ago
Hi,
currently I'm working on a project using Struts combined with Oracle's BusinessComponents for Java Framework. Everything works fine up to now, but there is one question I have.
I have some user-independent Collections i'd like to store in Application-Scope once when the Application is started. So where to do it with BC4J?
Where do you store application-scope data in your projects even if not using BC4J?
thanks in Advance
Martin
18 years ago
hi,
the only possible mistake i can see is that you probably don't have a user-object when storing it to the session in step 1)
just check your 'user'-object or post the entire code of this action.
let me know please
18 years ago
Hi,
your JSP calls an Action with the path "/LogonSubmit" - in your config-File your ActionPath says "/Start". I guess these two paths should match together, so try to change your JSP to "/Start" instead of "LogonSubmit".
18 years ago