Armin Vetek

Greenhorn
+ Follow
since Aug 21, 2010
Merit badge: grant badges
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Armin Vetek

Hi,

My jsp page is designed as:

<s:form action="tab_action">
<sj:tabbedPanel>
<sj:tab>
<s:textfield>
<s:submit>
</sj:tab>
</sj:tabbedPanel>
<s:form>

Some criteria fields and a search button are placed on each tab. When the submit button is clicked the action is invoked. I need to know which tab is currently selected inside the struts2 action.

Best regards



13 years ago
Hi,

I thing that the field is validated but you do not see the validation because you use simple theme.

Change the simple theme to xhtml theme for the beginning regardless of layout.

You should add fielderror to simple theme if the validation will work.

Best regards,
Javanus
13 years ago
This is it!

Thank you,
Javanus
13 years ago
I suggest you to read some book about struts2, I was very satisfied with struts2 in action.

Best regards,
javanus
13 years ago
Hi,

I am using tinymce to input the message text. Tinymce is a rich text editor.
For example: The user enter a word Struts2 into a tinymce editor. Tinymce returns a message decorated with html p tag and a message is saved into the database as <p>Struts2</p>. Please nota a p tag added to the string.

Html tags are considered as a string when the value is retrieved from the database. <p>Struts2</p> is displayed in the table instead only Struts2.

I tried to use StringEscapeUtils but I could not find a solution.

I need some help...

Best regards,
Javanus

13 years ago
Hi,

I found one problem using css_xhtml.

Imagine a table with 2 textfield in 2 rows.
Form looks like:

label1: textfield1 label2:textfield2
label3: textfield3 label4:textfield4

In my jsp I put the following code:


I would like that labels are left aligned and input boxes are aligned to the right.

I found out that both label and a input box are in the same table cell. How can I align label to the left and input text to the right?
I found a workaround like in the code below. Is there a better way?


Requiredposition does not move * to the left. Is this only happening to me?

Best regards,
Javanus
13 years ago
Hi,

Thank you Anbarasu Aladiyan.

Yes, css_html is the answer!!!

CSS_XHTML is so useful to me and I decided to help also other developers. You can read more about at struts2: how to display more than one textfield in one row

Best regard,
Javanus
13 years ago
Hi,

I have not used css_xhtml theme yet. I checked out the theme description and I found out that one of the feature is also "Standard two-column CSS-based layout".

IMHO " Standard two-column CSS-based layout" is not a feature at all !!

Have you ever try to have an input form with two textfields in one row?

Regards,
Javanus
13 years ago
Hi,

are you using simple theme or xhtml theme? Simple theme does not support tooltip by default.

Best regards,
Javanus
13 years ago
OK, I know that the simple theme also support validation but you have to show a field error messages by hand for each field. I have to put field error beside each field if I am using simple theme and the html code becomes harder to read and maintain.

I would like to know what is the best practice? How do you develop a form which should have 3 input field in one row? Should I extend html theme (qxhtml), use simple theme or something completely different?

Best regards,
Javanus
13 years ago
Hi,

I am wondering how to design a real life input form with struts2.

Default struts2 theme is xhtml which allows only one text field in a row. Not very useful for a real life application.

I have spent a lot of time and I have only found out just one(single one) relatively good example how to extend a xhtml theme functionality - qxhtml (http://www.vitarara.org/cms/struts_2_cookbook/creating_a_theme). qxhtml is just fine, but if I add additional widget I could not use <s:param name="labelcolspan" value="%{1}"/> and <s:param name="inputcolspan" value="%{5}"/>.

For example:
I add a simple editor(tinymce) to my page and I could not control my layout anymore because I could not use param with tinymce.

I would like to know your experience about designing a form layout? What are your proposals to design a form? Which technique do you use? Do you extend a xhtml theme or are you using a completely different technique?

At the moment I could only use a simple theme to achieve a real flexibility but I lose a lot of good features with simple theme (validation...)

Best regards,
Javanus
13 years ago


I have modified the code like below. And....It works!!!

<sj:submit onClickTopics="before" value="Submit" />

Danke schön!!!

Best regards,
Javanus

13 years ago
Thank you.



It is almost perfect after spending more then 10*n hours (n???)

Done.jsp page is presented but I would not like to include Done.jsp page inside index.jsp.

Test jQuery Block UI
User: Javanus_____
[SUBMIT]

The successful action produces the following layout. Text "Test jQuery Block UI" is from index.jsp and should not be presented. I would like to include blockUI functionality when the user click save button on the entry form. Entry form display only one record and it is used to insert/edit a record. The list of all records should be displayed after the action is successfully completed. The list of all records is displayed in another jsp page.

Test jQuery Block UI
Action Finished
Hello Javanus!

If I do not use blockUI then I got the following content. Done.jsp is not included into index.jsp but it is own page.
Action Finished
Hello javanus!

Best regards,
Javanus
13 years ago
Hi,

I found out that I have used an old jquery.blockUI version.

I have downloaded the latest jquery.blockUI version now but now the automatic redirection to done.jsp after completed action does not work anymore. The action called from index.jsp is finished successfully but the user is note redirected to done.jsp.

The redirection to done.jsp page works if I comment <script type="text/javascript" src="jquery.blockUI.js"></script> but then I loose the blockUI functionallity.

Does anyone know how to solve this problem? Below is my code.

Best regards,
Javanus

1.index.jsp


2.done.jsp


3.struts.xml


4.LongAction.java
13 years ago