CommandLink and navigation
Hi, I built a dataTable and put two columns each one with one commandLink with action param. The action methods were not the same and each returned a string. The navigation simply did not executed what I was hoping sometimes openning the first, or the second page configured in the faces-config.
I changed to commandButton and everything worked fine as expected.
Hi,
Here we go.
The jsf page had
<h:dataTable width="650" border="0" cellpadding="0" cellspacing="2"
rowClasses="list-row-odd,list-row-even"
id="table"
value="#{sapFormBean.listAP}"
var="sap">
<h:column>
<f:facet name="header">
<h:outputText value=""/>
</f:facet>
<h:commandLink id="imprimeAP"
action="#{sapFormBean.submitImprimeAPAction}"
alt="Imprime esta AP">
<h:graphicImage id="copy" url="bullets/print.gif"/>
</h:commandLink>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value=""/>
</f:facet>
<h:commandLink id="copiaAP"
action="#{sapFormBean.submitCopiaAPAction}"
alt="Gera nova AP a partir desta" >
<h:graphicImage id="copy" url="bullets/copy.gif"/>
</h:commandLink>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText styleClass="celTitulo" value="C�DIGO"/>
</f:facet>
<h:outputText id="codigo" value="#{sap.sap_codigo}"/>
</h:column>
</h:dataTable>
I configured the actions to return the strings "imprimir" and "copiar". In the faces-config I put
<navigation-rule>
<from-view-id>/lista_default.jsp</from-view-id>
<navigation-case>
<from-outcome>imprimir</from-outcome>
<to-view-id>/imprimir.jsf</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>copiar</from-outcome>
<to-view-id>/formulario.jsf</to-view-id>
</navigation-case>
</navigation-rule>
I changed then the commandLink to
<h:commandButton id="imprimeAP"
action="#{sapFormBean.submitImprimeAPAction}"
image="bullets/imprimir.gif"
alt="Imprime esta AP"/>
<h:commandButton id="copiaAP"
action="#{sapFormBean.submitCopiaAPAction}"
image="bullets/copiar.gif"
alt="Gera nova AP a partir desta" />
Thanks...
Similar Messages
-
Howto create a commandLink and param-attribute in a self written renderer?
Hi guys,
I'm currently trying to write a JSF-component for a content-mangement-system.
The goal of the component is to render a HTML-page which lists all elements
of an article (with all things like text-components, pictures, headline etc.)
and provides a link for every article-element which referes the user to a
special JSF-site in which the selected article-component can be edited. For
example: the user sees the site which lists all article-elements and selects
a "edit this text-component button" from one text component. Aftter that he
would be forwarded to a "editTextComponent.jsf"-Site which loads the selected
component into a managed bean. The site "editTextComponent.jsf"-Site itself
would then provide a JSF-form which fields are binded with the managed-bean
properties. To do this I need my own component-renderer to create a special
"command link" with an additional parameter of the selected component ID
(similar to the <h:commandLink />- and <h:f:param />-Tags in a normal
JSF-site). Because I need the ID of the selcted component in the new
JSF-site.
Now I need to know how I can pass such a parameter in a renderer. In a
jsf-site I would simply do something like
<h:commandLink action="myUser.accessRequestEditTextComponent">
<h:outputText value="articleAdminPage.editThisTextComp" />
<h:f:param name="componentID" value="myTextComp.databaseID" />
</h:commandLink>
But how can I do such a thing in a JavaClass??? I already tried a thing like
public void encodeEnd(FacesContext ctx, UIComponent comp)
writer.write(" <form
action=\"../articlecomponents/createnewpiccomp.jsf\" method=\"get\">");
writer.write(" <input type=\"hidden\" name=\"position\" value=\"" +
textComponent.getID() + "\" />");
writer.write(" <input type=\"image\" src=\"" +
myUIArticle.getCreateNewIcon() + " \" />");
writer.write(" </form>");
But this is not working and it is very ugly because the url of the new site is
hard-coded (and not a "action"-attribute which can be used in the
faces-config.xml for navigation), I'm not able to pick out this attribute in
the new jsf-site and the HTML-code is also hard coded.
Can you guys give at least a little hint, a keyword to what I shall look for?
I have defintly no idea and I'm already a little bit despaired.
Greetings,
HendrikOkay, Martin from the myfaces-development-team has just anwsered my question. For all of you who have the same question: such a think that I'm trying to do is done in the "writeLink"-method in the HTMLCalenderRenderer-class of the myfaces-extensions. So take a look at this for an excelent example!
-
Problem with commandLink and commandButton
Problem with commandLink and commandButton
I have commandButton id="submit" action="{myActionClass.dothis}"
When I click on the commandbutton it is not submiting to the action class rather, its submitting to the same page..
I am tired of this ...
I am using tiles for displaying jsf pages . Any problem because of using tilesyes I have the validator.
If I open the url directly its working fine
let say I am opening localhost:8080/test/test.jsf
then it works fine
If i use the same test.jsf along with tiles and open it, then its dispalying all the elements but when i click on commandbutton.. nothin is happening.
the seems like page is reloaded. -
Web-building my site. FIREFOX and NAVIGATOR is great but not SAFARI. Why?
Hi,
I am building my web site http://www.philthesecurityguard.com/ everything works great on FIREFOX and NAVIGATOR but not SAFARI. Example: on my web site, I click on REAL LETTERS in SAFARI and HALF of orange squares appears outside of my letters. FIREFOX and NAVIGATOR have FULL orange squares on the outside of my letters. Another example: The vertical thin partitions on my web is red on FIREFOX and NAVIGATOR, but there is no red line on SAFARI. How come SAFARI is "short circuiting?" (I have Adobe GoLive web builder.) [email protected]> Tim G" <[email protected]> wrote
in message
> news:gha37j$7lg$[email protected]..
> "jus2sho" <[email protected]> wrote in
message
> news:gha2rf$74r$[email protected]..
>> Thierry,
>> Can you elaborate a little on what you said. I'm a
complete noob that
>> knows a
>> little about how to use DW. Will adding the .html
extension fix my
>> problem? I
>> have yet to change it because I don't have access to
Firefox to try out
>> right
>> now. I will in the morning.
>
>
> You absolutely need to have an HTML-compatible
extension. Whether that is
> your only problem... well, fix that, and then see.
Configuring the server would allow the OP to use file names
with no
extension [1], which imho would be a better approach [2].
Cool URIs don't change...
[1]
http://www.w3.org/Provider/Style/URI
[2]
http://www.w3.org/Provider/Style/URI#remove
Thierry | Adobe Community Expert | Articles and Tutorials ::
http://www.TJKDesign.com/go/?0
Spry Widgets |
http://labs.adobe.com/technologies/spry/samples/
[click on
"Widgets"]
Spry Menu Bar samples |
http://labs.adobe.com/technologies/spry/samples/menubar/MenuBarSample.html -
CommandLink and js:confirm
hi, i meet some problem with commandLink and js.
jsf code:
<h:commandLink value="Del" onclick="return delconfirm();" action="#{userAdminBean.userDel}" >
<f:param name="userId" value="#{info.uid}"/>
<f:param name="userPartId" value="#{info.upartmentid}"/>
</h:commandLink>js code:
<script language="javascript">
function delconfirm(){
return confirm("confirm to del?");
</script>i click the commandLink "Del", then a messagebox with two button "submit" and "cancel" will be shown.but whether i click the "submit" or "cancel", the expolre client don't send request to web server,.
who can help me?thanks.sorry, i use jsf1.1.
it works when removing the onclick part.
i hava not used commandButton to replace commandLink, as i must pass someparameter useing f:param.
excepting using jsf1.2 , are there any other way to solve this problem?(not using commandButton ,because i have to pass parameter) -
Create View without inbound, outbound and navigation link
Please look at this picture:
There are:
+ PanelView
+ View 01
+ View 02
+ EmptyView
In the PanelView, there are two buttons, button01 and button02. When press on button01, it shows View01; when press on button02, it shows View02.
Problem is:
How to do above things without creating inbound, outbound and navigation link.
Thank u a lot.Dear Mr. Raghunandan Madarikuruva ,
Everything is very easy if there are inbound, outbound, and navigation link.
What happen if there isn't inbound, outbound, and navigation link.
My problem is how to open each childview without inbound, outbound, and navigation link.
How can I do that
Thank you for answer my question.
Thank you again
This is yahoo ID: [email protected]
and Skype ID: doleminhtriet
May I talk to you?
Edited by: krisscage krisscage on Sep 26, 2008 10:53 AM -
How can we align TOC and Navigation bar for Captivate 4 Aggregator Project?
Hi,
Is there any way we can align the bottom of TOC and Navigation bar of Captivate 4 Aggregator project. Or can we give a background color so that they don't look like different entities.
Thanks,
JanhaviI had this issue too. What I discovered was that some of the slides in one of my presentations were off the screen. Some because I had dropped pictures onto a blank slide, and others because I switched background images on recorded slides and didn't merge the images into the existing background. After fixing those issues and republishing, I put the revised .swf into the aggregator and it worked.
-
Line Item Dimension and Navigational attribute
Hi Gurus,
Can somebody tell me how line item Dimensions and navigational attributes works technically?
What are the pros and cons for them?
Regards
AlexHi Alex,
You will use navigational attributes based on how you want to track and report history. Let me explain with an example.
Customer Bubba is assigned Sales Group XYZ in Jan 2007. In July the Sales Group on the Customer Master record is changed to ABC. Your are looking at the sales report.
1). If you want to see all the sales made to Customer Bubba at the time of reporting (current) then you will use navigational attributes You will create 0SALESGRP as the navigational attribute of 0CUSTOMER . Then all sales to the customer will show up under Sales Group ABC.
2). If you want to see all the sales made to the customer at the time the actual transaction occured then you will add Sales Group as a characteristic of the InfoCube. Then sales from Jan - June 2007 will show under Sales Group XYZ and from July - Present will show under Sales Group ABC.
Performance issue occurs because navigational attribute is stored outside of the dimension table of the cube and is stored in separate master data tables. So query has to perform additional table read. So essentially there are advantages and disadvantages of usng navigational attributes. It is business requirement that will drive the use of navigational attribute.
Hope this helps!!!. Please assign points. -
What's the difference between Pages and Navigation Pages? Can I change a Page to Navigation Page? If yes, how?
Thanks a lot.The basic problem is that the default page only applies when you haven't yet accessed the book. Once you have accessed it , the last accessed page within the book is what gets displayed. (if the page label specified is the books).
as before, you either must implement your logic in a backing file or you must generate the url to the book correctly (by having the page label of the page you want active) i.e. if your book has a pagelabel b1 and your pages have labels p1 and p2 and you always want b1 to goto p2 (the default) , then whenever you want to generate a URL to the book you must use P2 as the label (whether it is custom menu or anywhere else in your site).
The reason the first option is preferable because the logic lives with your book's backing file, in the second case it is spread out (even if you use a helper)
regards
deepak -
Commandlink and checkbox in a region(.jsff).
Hi all,
I have a commandlink and checkbox in a region(.jsff).
when i tried to call a method using propertychangeListener or Actionlistener ..
methosd is not calling ...
Plase give any solution...Hi,
not enough information - sorry
Frank -
How to identify display and navigational attributes in report?
To all of thanks to be in SDN, plz send tue clarifications.....?
Q. How to identify display and navigational attributes in report? is there any naming convension differences for both of them?This works fine for "powerusers", but for informational users you have to create your own naming conventions for all navigational attributes which are not unique. For example 0COUNTRY may be a navigational attribute of 0CUSTOMER, OSOLD-TO, 0SHIP-TO, 0BILLTOPRTY, 0PAYER. To make the text clear for your users in reports name it CS Country, SO Country, SH Country, BT country, ... as 0COUNTRY could also be a characteristic from the document.
This means quiet some work especially if you have a multilingual installation, but the information users will be very thankful.
hope this helps
mich -
Mandatory Fields and Navigation Buttons
Hi
I have a search form where I search by number, then I have the choice to update and submit the request. All fields are required for submission. The problems is that when I have empty fields I cannot use the search and navigation buttons, I tried to set Immediate to true but then the buttons would not perform their action. How can I solve this?
Your help would be appreciatedHi,
immediate works in the combination with response complete. However, because you are omitting the model update you will have to do this manually in an action method or action listener
Frank -
Combined logo and navigation bar
Is it considered to be poor layout to combine the company
logo and navigation bar in the same image? I have created this
image in Fireworks 8 as a jpeg to keep the gradients looking good
for both the logo and navbar, but am not sure if it makes the page
load any slower by having them in the same image? I do have
rollover buttons on the navbar so I do have to export it as
‘HTML and images’ w/slices. I do find it easier to
setup in Dreamweaver if they are together but could separate them
with some extra work. Any suggestions? Thanks for your help.Navigation in an image? What - are you using hotspots?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Alex Mariño" <[email protected]> wrote in
message
news:erv068$hon$[email protected]..
> The bottom line is - how big are your images. If adding
the logo does not
> increase the file size significantly then all is well.
>
> alex
>
> P-C-Surgeonz wrote:
>> Is it considered to be poor layout to combine the
company logo and
>> navigation bar in the same image? I have created
this image in Fireworks
>> 8 as a jpeg to keep the gradients looking good for
both the logo and
>> navbar, but am not sure if it makes the page load
any slower by having
>> them in the same image? I do have rollover buttons
on the navbar so I do
>> have to export it as ?HTML and images? w/slices. I
do find it easier to
>> setup in Dreamweaver if they are together but could
separate them with
>> some extra work. Any suggestions? Thanks for your
help. -
What belongs in the faces-config.xml file? Just bean and navigation info?
I am looking for detailed information on the faces-config.xml file.
I've used examples up to this point and I was wondering where the documentation for this configuration file was at.
At this point, I know that bean management and navigation information is in this file, but are there other settings?
Thanks,
--ToddPringi: The tag explantion information, why isn't that easily found on Sun's web site or document site?
This has been the most frustrating part - finding pieces of information here and there... and not in one location.
Thanks,
--Todd -
I like to clean things out on a regular basis but when I run the Norton Clean-up utility all of my custom toolbar and navigation button settings get reset to 'factory' condition. How can I permanently save these changes to my config or preference settings?
Cookies, Completed Forms, .tmp files are all that's set to be cleared. If I can identify the appropriate elements I can protect them from deletion. Does anyone know?
Maybe you are looking for
-
Use return date value in stored procedure
hi i am new in oracle , i make stored procedure to fetch data in the form and i make calendar , i want user when they select a date from date LOV the stored procedure use this date in the query.. i try like this in the query: when time=:blok.date_ite
-
[svn:fx-trunk] 16349: Fix special case compc code in Library.java
Revision: 16349 Revision: 16349 Author: [email protected] Date: 2010-05-27 16:33:00 -0700 (Thu, 27 May 2010) Log Message: Fix special case compc code in Library.java Added support for special handling of include-classes and include-inheritance-
-
IP Telephony Implementation check list
Dear Pros, I am in the process of implementing the ip telephony project. The following products are used in this project. 1. Cisco MCS78251 2. Cisco callmanager4.1 3. Cisco unity 4. Cisco 1760 voice gateway 5. cisco catalyst 3560-48-PS-s 6. Cisco CP-
-
Can't open Premiere project exported from After Effects
I was working on something in After Effects, basically just audio and video clips. Editting really. I decided one part would be faster in Premiere so I exported a Premiere project of it. When I try to load it in premiere I get an error "The project
-
Just want to say I have an iPhone 4s and only in this app, if I move the phone toward my face like I'm going to talk on the phone, Siri pops up. No idea what that's about. Other than that this all is absolutely splendid.