How can I useStruts bean:write tag with parameter

Helow i'm using Struts tags for reading data from beans
for example:
public String getUserName(){
return name;
in the jsp:
<bean:write name="userInfoBean" property="userName"/>
but i have a getter with paramer as this:
public String getUserName(String id){
return getNameById(id);
How can i write the tag in the jsp???

You can't directly.
Your method MUST have the signature public String getUserName() in order to be identified as an attribute of the bean, accessed via the bean:write tag.
One workaround is to set the "id" as a separate property, and then use that attribute in the getUserName method.
ie
int id;
public void setUserId(int newId){
  this.id = newId;
public String getUserName(){
  return getUserName(id);
}

Similar Messages

  • How can I view only images tagged with specific upper level of keyword heirarchy, not including sub-levels?

    I use hierarchical keywords a lot.  For example, World/Europe/Austria/Tirol/specific location.  I sometimes assign only an upper level keyword (example: Austria) to an image when I don't know more specifics.  How can I then view only those images that have the tag that I select but not those with sub-levels of this keyword?  Exactly like choosing in Folders view to look only at a selected folder but not sub-folders.  There might be a complicated way to set up a smart collection that includes a keyword but excludes images with more than this number of keywords, but that would be really labor intensive.

    It's easy but quite obscure: In the Library Filter bar, select the Keyword column.  Then click the "properties" button on the right and select View: Flat.  Now tediously scroll through the list and select the desired keyword:

  • How can I display the vendor associated with result of my running total sum

    I have a report that lists vendors with their most vecent order dates.  I need to set up a rotation so that the vendor with the latest order date is next to be selected.  I used the running total summary to pick the latest date.  How can I display the vendor associated with result of my running total summary?

    If your "latest" order date means the "oldest" order date, why don't you try this:
    Go to Report tab -> Record Sort Expert -> Choose your order date in ascending order
    This will make your oldest order your first record shown. 
    You can then create a running total count for each record.
    Lastly, in your section expert under conditional suppress X+2 formula, write this:
    {#CountRecords}>1
    The result will only show the oldest record in your report.
    I hope that helps,
    Zack H.

  • How can I create an accessible tagged PDF in Illustrator CS6?

    I have put alt text on the slices but when I save the file as a PDF it isn't tagged. How can I use these alt tags to make the PDF accessible? How can I tag the text in the Illustrator file so it is tagged in the PDF?

    I do wonder why there are instructions on how to add alt tags in Illustrator, and they only work if you create HTML. It sounds like Illustrator is going to be a legacy product in favour of InDesign, if it can't create tagged PDFs with Alt Tags for images. In this case, the Illustrator file is placed in InDesign, so even though InDesign can create tagged PDFs, the tagging doesn't work for placed Illustrator content. So it sounds like we either do the tagging from scratch in Acrobat, as you say, or we try to bring in the content directly into InDesign and tag it there.
    If only Adobe wholeheartedly supported accessible documents so we could more easily use it to meet WCAG 2.0 Level AA standards which are mandatory for our organisation. We are looking at CommonLook software to make the process of creating accessible PDFs easier and quicker. It's just hard to believe the lack of support from Adobe on this. Acrobat doesn't even come close to checking against WCAG 2AA and the online help is very hit and miss and full of broken links. For such an expensive product it's very disappointing, so thank goodness for other companies who see this as an opportunity to provide a better service.

  • How can i switch my att wifi with time capsule

    how can i switch my att wifi with time capsule

    Sorry I have no idea what you mean.. switch off, switch on, swap over.
    Bridge the TC and use same ssid (wireless name), security but different channels..
    Or just turn it off.
    Please write a question that is a sentence and has sense.

  • Struts nesting the bean:write tag

    hi I want to nest the <bean:write tag into any other html tag
    i.e.
    <html:hidden property="color" value="<bean:write name="colorSet" property="colorValue" />"/>
    Could you tell me if I am missing any quotes or something ?
    Thanks

    You can't use custom tags as attributes to other tags.
    The correct way to do this in struts would be to populate the action form as part of the action.

  • How can I recover my old account with a new one?

    Hi, my hotmail account it was hacked, I can't have acces to my adobe account anymore.
    How can I get acces to my old account with a new Adobe ID?
    I'm already subscribed to creative cloud and I can't have acces to my account and upgrade my products.
    what can I do?
    Thanks

    Thanks Romshina
    I read the link you send me and thanks, but the thing is that I still can't get into my Adobe Id, because when I try they ask me to reset my password in an email they will send me to my old account and there is the problem, because I don't have acces to that old acount, [email protected]
    now this is my new email, because the las one it was hacked and I just can't get back to it.
    So I would like to have access to my account and update this new email account, to have acces to my CC account.
    Thanks
    Date: Fri, 27 Dec 2013 06:51:15 -0800
    From: [email protected]
    To: <Removed by Moderator>
    Subject: Re: How can I recover my old account with a new one? How can I recover my old account with a new one?
        Re: How can I recover my old account with a new one?
        created by Romsinha in Adobe Creative Cloud - View the full discussion
    Hi Guillermo Castellanos,
    Please refer the knowledge base article: http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sig n-faq.html.
    Regards,
    Romit Sinha
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5959347#5959347
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Re: How can I recover my old account with a new one?
    To unsubscribe from this thread, please visit the message page at Re: How can I recover my old account with a new one?. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Adobe Creative Cloud at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How can we view the data asociated with Request ID

    Hi All,
    I have data loaded in an ODS there are multiple files loaded in this ODS. Now i want to view data for a perticuler request OR i want to know how can we know the data associated with a perticular request.
    Please help me out.
    Thanks & Regards
    Amit Kumar

    Copy the request number (not request ID) from the ODS manage screen, Goto RSRQ give the request number and execute. it shows the monitor screen- now goto PSA from the top and check the data. But this possible only if you are loading data to PSA also along with ODS.
    Otherwise, Goto Display Data of ODS from the right click on it -- in the selection screen give the Request ID that you want to check the data. Then it displays only that request data.
    Hope this helps.
    Veerendra.
    Edited by: denduluri veerendra kumar on Dec 1, 2009 12:40 PM
    Edited by: denduluri veerendra kumar on Dec 1, 2009 12:43 PM

  • How can I use my Apple ID with 2 Apple devices?

    I just got an ipad mini and I registered it with the same Apple ID I use for my iphone 4s. Everything was fine until I downloaded apps to the ipad and noticed that the ones I had on both devices  no longer opened on my iphone. Why is this? How can I use my Apple ID with 2 Apple devices and how can I recover my apps on my iphone?

    I've had an iPad for almost two years. When I purchased an iPhone last fall I set it up to use the same Apple ID as my iPhone. I've had no problems doing this. Try resetting each device and see what happens.
    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

  • How can i use my apple ID with the itune store over my windows laptop

    how can i use my apple ID with the itune store over my windows laptop

    If you don't have iTunes installed on your laptop then you can download and install it from here : http://www.apple.com/itunes/download/
    You can then log into your account on it via the Store > Sign In menu option (on iTunes 11 on a PC you can get the menus to show via control-B) :
    And you can then select the Store on the left-hand sidebar (you can enable the sidebar via control-S), and then browse items in the store and buy them by clickin on their price.

  • I am new to IPAD and I want o use facetime, how can I use it to communicate with my mac at home, do I need to create another account with a different email account

    I am new to IPAD and I want o use facetime, how can I use it to communicate with my mac at home, do I need to create another account with a different email account

    do I need to create another account with a different email account
    Yes, the email addresses need to be unique to each device. You may use the same Apple ID on each device, but the email address used by each device needs to be different.

  • How can I use my time capsule with windows7

    How can I use my time capsule with windows7?

    This is asked regularly.
    https://discussions.apple.com/message/10978060#10978060
    Look at the more like this. On the right column next to the post.
    Load airport utility for windows.. which will also load bonjour for windows.
    In windows explorer type \\TCname or \\TCipaddress (replacing with the actual values.. names with spaces will give you trouble so change all names in the TC to SMB compatible or actual ip address).

  • How to restore my ipad?My ipad say on screen CONNECT TO ITUNE.How can i do when i connect with computer.It is need itune new version.Can you sent me.I will be waiting your answer.Please help me sir.

    How to restore my ipad?My ipad say on screen CONNECT TO ITUNE.How can i do when i connect with computer.It is need itune new version.Can you sent me.I will be waiting your answer.Please help me sir.

    Check for Updates.
    http://i1224.photobucket.com/albums/ee374/Diavonex/Album%208/78d42b19fa42e8d83b5 5a65e1333373f_zpsf58bbe10.jpg

  • How can I sync my iPad 2 with my new MacBook Pro when it is already synced with my old MacBook? I am getting a message on the new MacBook Pro that says I am not allowed to sync the iPad 2 because it is synced to another iTunes library.

    How can I sync my iPad 2 with my new MacBook Pro when it is already synced with my old MacBook? I am getting a message on the new MacBook Pro that says I am not allowed to sync the iPad 2 because it is synced to another iTunes library.

    1) ensure iTunes is authorized for your iTunes store account(s)
    2) connect your device and right-click or control-click it in the iTunes Source list, then choose transfer purchases from the shortcut menu that appears.
    3) sync the device
    iTunes will wipe the iPad but, since you transferred your purchases in the previous step, your content will be in your library and you can re-populate the iPad with it.
    above works for purchases from the iTunes store. for everything else, check out this post by Zevoneer.
    also, there are PhoneView and iRip.

  • My iPod Classic is seen by Windows but not by iTunes.  I have reset it, gone to disk mode and it won't show up in iTunes.  There appears to be music on it in a file called MUSICSAVE.  How can I get this to work with iTunes again?

    My iPod Classic is seen by Windows but not by iTunes.  I have reset it, gone to disk mode and it won't show up in iTunes.  There appears to be music on it in a file called MUSICSAVE.  How can I get this to work with iTunes again?

    1. Update iTunes to the latest version. Plug in your iPod. If iTunes still can't recognize it, then in iTunes in the top left corner click help> run diagnostics. On the box that comes up, check the last two things. Click next and it should identify your iPod.
    2. Click on your windows start menu. Type in "services". Click on it and when it pops up, on the bottom of it click on "standard". Now Scroll down to find "Apple Mobile Device" Right click it when you see it and click on "Start". When it has started, close iTunes and replug in your iPod and it should show up.
    3. Check the USB cable
    4 Verify that Apple Mobile Device Support is installed
    5. Restart the Apple Mobile Device Service and verify that the Apple Mobile Device USB Driver is installed.
    6. If you just want to add some photos, songs and movies from computer to your devices, you can use an iTunes alternative to do the job
    7. Check for third-party software conflicts.
    <Link Edited By Host>

Maybe you are looking for