Help coderanch get a
new server
by contributing to the fundraiser

Brajendra Mathema

Ranch Hand
+ Follow
since Jun 02, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Brajendra Mathema

What i guess is ,
since you are submitting the form with the command button ,
you are performing navigation to display the same page again,
so the html data table will call the value that has been bind to it when it is rendered again, therefore your method to query the db is invoked again.

If your check box value is being saved in the db while submitting the form,
the check box should be reflected with the new value when the form is rendered again after submission.

Thanks
12 years ago
JSF
Since your bean is in session scope, the data you have fetched would be there till the current session is active.

You can use request scope or you have to remove the fetched contents from you session while you are redirecting to your home page.

Please go through the request/session scope.



Thanks.
12 years ago
JSF
Hi all,

I'm trying an android app. I'm trying to display some data from database in list view. In my layout xml , i have two edit text box and a date picker, a button and list view.
I want to display the data when the activity loads in list view. I'm able to get the list view only if i remove the datepicker widget or if i place the datepicker widget below the list view.

I'm using simple cursor adapter to set the list veiw.

My layout xml file is like below :

The below layout does'nt work .

how ever this one works:

Any help appreciated.

Thanks
12 years ago
how can i set up glassfish in windows server 2003.

I had a service installed which had error , i tired to remove the service for that i removed it from the registry level.

Now what's the process to install it as service .

thankyou
12 years ago
Hi Mark ,

thanks for the reply and suggestions.

I did that using javascript in the call back function, where i wrote the html to generate the radio button , i forgot to consider that simple html also goes with <form:form> tag and it gets binded with the form during form submission.



Many Thanks
12 years ago

So is there any way such that i can populate the radio button in spring form using javascript, would writing the plain html for radio button and placing the html in the division work , but i think i will need to bind the radio button with the back end then.

How can that be done, please provide with me the idea.

Thanks
12 years ago
Hi Mark,

Thanks for the reply once again.

What i'm trying to do is to re-render the radio button



The above code is hidden initially during the page load.

The ajax call returns the boolean value after setting the 'session variable' and in the call back function i'm trying to refresh the div containing the above code such that it is rerendered, so ${} jstl should work (please correct me in this).


12 years ago
Hi Mark,

Thanks for the reply.

Actually i mistyped the code in here, in the controller mapping and I am sorry for that.

And i'll use the CODE tag surely.


I've edited my question with my actual code.



In the above code , after I get the values in the back end and set in the "session variable" with the ajax call , what i have done in the call back is





that is, i've tried to call the same url and show the radio button in the div with the new value that was set in the 'session variable' .

this works fine in FF, chrome , safari and opera but not in IE , am i doing something wrong or is it the javascript problem.

Thanks
12 years ago
Hi Tim,

Thanks for the reply.

I have one more question.

In above case, if i re-render the main panel with the button click in the popup which also closes the popup panel, should not the button1 click render popup panel again with focus in first tab.

I've found that when the switch type is 'ajax' and the main panel is rerendered , the first tab is in focus, but to go to next tab i need two click.



Thanks
12 years ago
JSF
Hi , i trying with spring mvc and jquery.

what i want to do is render radio button value dynamically and display them with the onchange event of the select box.

What i have done is, i have a spring mvc form which contains a select box. on the onchange event , ajax query using jquery is performed.

In the back end , i have assigned the values for the radio button in a seesion variable . And finally i'm rendering the division containing the radio button . (Trying to do simalar as we do in JSF)


Is there better way to achieve this.

This works well with FF, chrome, opera and safari, but not with IE.
I don't know whethere is should post this in spring forum or jquery as it may be jquery issue as it doesnot work only in IE. My apologies if i posted in the wrong forum , but is this the appropriate way to do.






12 years ago
I have a page with a button say button 1 which opens a rich popup panel, the popup panel has rich tabpanel within it with rich tab, and a4j command button.

Now if i click the second tab in the rich tabpanel and click the a4j command button, the command button does some processing and hides the popup panel.

Afterward when the button i.e button 1 on the page is fired , the popup panel is loaded but the rich tab within the popup panel has the second tab in focus instead of first tab.

I think the focus should be on the first tab. I'm not able to identify the problem.

here is the page code.

<div id="mydiv">
<h:form>
<a4j:commandButton onclick="maskk()" render=":pnl :tt :ttt" action="#{test.testAction}" value="test_action" oncomplete="#{rich:component('popUpPanel1')}.show();return false;"/>
</h:form>
</div>





<div id="mydiv1">
<rich:popupPanel id="popUpPanel1" modal="false" height="300" width="500">
<f:facet name="header">
<h:outputText value="Header Test Panel" />
</f:facet>
<f:facet name="controls">
<h:graphicImage alt="X" onclick="#{rich:component('popUpPanel1')}.hide()"/>
</f:facet>
<h:panelGroup id="pnl">
<h:form id="popUpPanelFrm">
<a4j:commandButton value="test" action="#{test.testAct}" oncomplete="#{rich:component('popUpPanel2')}.show();return false;"/>
</h:form>
</h:panelGroup>
</rich:popupPanel>
</div>



<rich:popupPanel id="popUpPanel2" modal="false">
<f:facet name="header">
<h:outputText value="Test Only Panel" />
</f:facet>
<f:facet name="controls">
<h:graphicImage alt="X" onclick="#{rich:component('popUpPanel2')}.hide()"/>
</f:facet>

<h:form id="aa">
<a4j:commandButton action="#{test.testAct}" value="btn_popUpPanel2"/>

<rich:tabPanel switchType="ajax" id="nrt" style="font-size: 20px">
<rich:tab header="Notes" id="n">
<h:inputTextarea id="note" value="#{test.note}" style="width: 350px;height: 70px"/>
</rich:tab>
<rich:tab header="Recommendations" id="r">
<h:inputTextarea id="recommendation" value="#{test.recom}" style="width: 350px;height: 70px"/>
</rich:tab>
</rich:tabPanel>
<h:panelGroup id="nrPopUpPanelBtn">

<a4j:commandButton style="margin: 5px 0 0 0px" id="btnSubmit" oncomplete="#{rich:component('popUpPanel2')}.hide();unmaskk();" action="#{test.testNR}" value="Ok"/>
<a4j:commandButton style="margin: 5px 0 0 20px" id="btnCancle" onclick="#{rich:component('popUpPanel2')}.hide();unmaskk();" value="Cancel"/>
</h:panelGroup>
</h:form>
</rich:popupPanel>



Thanks You


12 years ago
JSF
hi Bear Bibeault,

I went through the Phonegap again & found the following info:

Q. Can I just create an iPhone PhoneGap-based app that just loads my website?
A. You can, but as for Apple approving it, that's another matter, and they most likely won't. As a rule of thumb, if there is no Internet connection, you must at least load the UI (your views) without the corresponding data, and put an error notice to that effect. Therefore your app must have these views included in it. For a guideline, set your iPhone to Airplane Mode in the Settings, then load either the Maps, Weather, Youtube, ITunes or Facebook apps, and see what they do (have a "shell"). Apple is probably concerned about them approving your app based on your app description and functionality as promised by you, and then you turning around and changing it completely after approval to something undesirable.

Thanks for providing the information.



Thanks
12 years ago
iOS
hi Bear Bibeault,

Thankyou for the reply.

I have tried going through Phonegap and what I have understood is that using phonegap we can only use HTML , CSS and JavaScript and to communicate with serverside we need ajax (please correct me if my understanding is wrong).

To work with phonegap I'll have to rewrite the HTML, CSS and JAVASCRIPT to talk to my backend environment.

However I was thinking if there is any way to use the existing web application built with JSF framework to directly access in ios as we can do it in the android environment.



Thankyou
12 years ago
iOS
Hi ,Hussein

Thanks for the reply.

I wanted to know , can I do anything like this in ios as we can do in android to wrap an external web application.

In android the following code loads the Google site within the web view:

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl("http://www.google.com");
}

Is there any way I can do similar in ios ? I need an advice on this.

Thanks



12 years ago
iOS