Ananth Majumdar

Greenhorn
+ Follow
since Aug 17, 2006
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ananth Majumdar

Welcome to Frank, Robi and Chris. Wish you all the best for your book
11 years ago
I have developed a basic crud application in Android. But I have still a long way to go till I develop good looking applications like twitter. Can you explain more about the official Twitter application for Android. How did they interface between the twitter database and the application. Can you explain the application in detail?
11 years ago
static blocks and static variables are executed at compile time only.

Flow:
1. Static variables are initialized in the order they are declared first 'a' then the static block for b is executed then 'c'.
2. Then the new InitTest(); is called before the constructor is executed all the instance variables are initialized in the order they are declared. first '2' then '3' then '4' then the constructor is invoked and finally it calls the method with '1' and it prints it.

so it prints a b c 2 3 4 1
Thanks chandra and kumar..I got it know..

when the expression completes why would i be incremented?



if i++ is not done at all then what is the difference between i=1; and i=i++;

What I supposed was even if it is not used for this assignment, it would be incremented by the time the variable is used in the next expression which means atleast it should be used in the second assignment. Please clarify
why i++ is not executed..


int i=0;
i = i++; // assign 0 to i and operation completes
i = i++; // assign 0 to i and operation completes
i = i++; //assign 0 to i and operation completes



i=i++ // assign 0 to i and operation completes then when does i++ happen?
If the increment happens after the first i=i++ why is it not one atleast for the second assignment i=i++
i++ actually means that i=i+1; isn't it? So for i=i++

first
i=0; is assigned then i++ happens which is i=i+1; i.e i=1; so it should be 1. Why is it zero I am not able to understand. Please clarify..
public class Precedence {

final public static void main(String args[]) {

int i = 0;

i = i++;

i = i++;

i = i++;

System.out.println(i); }

}
This should print 3 but it is printing 0. Please explain
[ March 27, 2007: Message edited by: Ananth Majumdar ]
hi I'm using a form in a panelGrid.

I'm having two text feilds t1, t2 I have to validate the following condition

t2 becomes a required feild if and only if t1 is entered otherwise t2 can be empty.. so i cant put a required=true for the inputText t2. I wrote a custom validator and binded it to the feild t2 but the problem is that the validator is not called when i am not writing anything in that..so I thought of putting a validator at the panelgrid or form level but there is no option like that. what can be done.. please help?
16 years ago
JSF
thanks it worked
16 years ago
JSF
How can we write a paragraph in a panelGrid.

the code is like this



I want to keep it in a panelgrid



This code is not working as the paragraph style is not applying to the commandButton as each one is rendered as a table row.. Is there any way I can apply the paragraph style in panelGrid?

please help.
16 years ago
JSF
I checked the apache site... this clears my doubt

Tomahawk 1.1.3 has been released. There is one major change that users will need to be aware of. In order to be compatible with the Reference Implmentation (RI), all command links and components that use command links must now be enclosed within an <h:form> element. This means that components that make use of command links (like tree2) must now be inside an <h:form> in order to work properly. For those using the MyFaces Core JSF implementation, there is a tweak to faces-config.xml that will allow your existing pages to work without changing them.
16 years ago
JSF
I have to put the form like that or else I should enclose both the tiles in a form in companySearch.jsf...... why should there be a form always?
16 years ago
JSF
My tiles definitions are like this

<tiles-definitions>
<!-- Main Layout -->
<definition name="super.template" path="/superTemplate.jsp">
<put name="header" value="/header.jsp"/>
<put name="progressBar" value="/progressBar.jsp"/>
<put name="bottomMargin" value="/bottomMargin.jsp"/>
<put name="footer" value="/footer.jsp"/>
</definition>
<definition name="company.pages" extends="super.template">
<put name="pageTitle" value="[Task Header]: Company Search"/>


<put name="pageSubTitle" value="Select a company and click Continue"/>
<put name="body" value="search.body"/>
</definition>

<definition name="search.body" path="/companySearch.jsp">
<put name="searchCriteria" value="/searchcompany/searchCriteria.jsp"/>
<put name="searchResults" value="/searchResults.jsp"/>
</definition>
<definition name="newcriteria.body" path="/manageCompany.jsp">
<put name="searchCriteria" value="/managecompany/modify.jsp"/>

</definition>

</tiles-definitions>

In the companySearch.jsp I am including the search criteria and search results tiles.

The searchCriteria.jsp is like this


The page is displayed only if the h:form is there otherwise the search criteria and search results pages are not visible Why..I am using MyFaces implenentation.
16 years ago
JSF
I am using Jsf with tiles. In a superlayout I define the layout of the page
I am using tiles: insert to insert all the tiles header,body and footer. The page is not displayed correctly if I dont put all these inserts in a form. It is being displayed fully if I put it in a form. Otherwise the page is getting truncated i.e the body page is not displayed fully and footer is displayed on the body,.. How to overcome this? tell me if I should put the code also
16 years ago
JSF